@geekity/cms 0.30.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -4266
- package/admin/components/badge.njk +4 -0
- package/admin/components/fields.njk +41 -24
- package/admin/components/job-status.njk +45 -0
- package/admin/components/setting-fields.njk +38 -0
- package/admin/layouts/settings-page.njk +16 -0
- package/admin/pages/comments/all.njk +1 -2
- package/admin/pages/documents/editor.njk +17 -15
- package/admin/pages/documents/syndication.njk +4 -4
- package/admin/pages/federation/followers.njk +56 -6
- package/admin/pages/federation/settings.njk +1 -1
- package/admin/pages/media/library.njk +52 -3
- package/admin/pages/navigation/menus.njk +2 -2
- package/admin/pages/plugins/screen.njk +5 -46
- package/admin/pages/settings/discussion.njk +76 -47
- package/admin/pages/settings/email.njk +75 -47
- package/admin/pages/settings/general.njk +15 -15
- package/admin/pages/settings/permalinks.njk +8 -8
- package/admin/pages/settings/privacy.njk +6 -6
- package/admin/pages/settings/reading.njk +36 -36
- package/admin/pages/tools/dev-mode.njk +29 -3
- package/admin/pages/tools/export.njk +89 -0
- package/admin/pages/tools/maintenance.njk +51 -0
- package/admin/pages/users/apps.njk +2 -2
- package/admin/pages/users/edit.njk +3 -3
- package/admin/pages/users/new.njk +2 -2
- package/admin/static/admin.css +80 -0
- package/dist/access-log.d.ts +2 -10
- package/dist/access-log.d.ts.map +1 -1
- package/dist/access-log.js +1 -1
- package/dist/access-log.js.map +1 -1
- package/dist/{web → admin}/admin-bar.d.ts +3 -2
- package/dist/admin/admin-bar.d.ts.map +1 -0
- package/dist/{web → admin}/admin-bar.js +20 -17
- package/dist/admin/admin-bar.js.map +1 -0
- package/dist/{indieauth → admin}/app-activity.d.ts +2 -2
- package/dist/admin/app-activity.d.ts.map +1 -0
- package/dist/{indieauth → admin}/app-activity.js +6 -7
- package/dist/admin/app-activity.js.map +1 -0
- package/dist/admin/appearance.d.ts +4 -8
- package/dist/admin/appearance.d.ts.map +1 -1
- package/dist/admin/appearance.js +19 -20
- package/dist/admin/appearance.js.map +1 -1
- package/dist/admin/assets.d.ts +1 -8
- package/dist/admin/assets.d.ts.map +1 -1
- package/dist/admin/assets.js +2 -9
- package/dist/admin/assets.js.map +1 -1
- package/dist/admin/comments.d.ts +2 -2
- package/dist/admin/comments.d.ts.map +1 -1
- package/dist/admin/comments.js +17 -19
- package/dist/admin/comments.js.map +1 -1
- package/dist/admin/confirm-password.d.ts +4 -0
- package/dist/admin/confirm-password.d.ts.map +1 -0
- package/dist/admin/confirm-password.js +11 -0
- package/dist/admin/confirm-password.js.map +1 -0
- package/dist/{indieauth → admin}/connected-apps.d.ts +2 -2
- package/dist/admin/connected-apps.d.ts.map +1 -0
- package/dist/{indieauth → admin}/connected-apps.js +33 -39
- package/dist/admin/connected-apps.js.map +1 -0
- package/dist/admin/credentials.js +1 -1
- package/dist/admin/credentials.js.map +1 -1
- package/dist/admin/dev-mode.d.ts +1 -1
- package/dist/admin/dev-mode.d.ts.map +1 -1
- package/dist/admin/dev-mode.js +35 -10
- package/dist/admin/dev-mode.js.map +1 -1
- package/dist/admin/documents.d.ts +16 -301
- package/dist/admin/documents.d.ts.map +1 -1
- package/dist/admin/documents.js +94 -1040
- package/dist/admin/documents.js.map +1 -1
- package/dist/admin/editor-actions.d.ts +3 -2
- package/dist/admin/editor-actions.d.ts.map +1 -1
- package/dist/admin/editor-actions.js +8 -9
- package/dist/admin/editor-actions.js.map +1 -1
- package/dist/admin/editor-fields.d.ts +45 -0
- package/dist/admin/editor-fields.d.ts.map +1 -0
- package/dist/admin/editor-fields.js +71 -0
- package/dist/admin/editor-fields.js.map +1 -0
- package/dist/admin/editor-layout.d.ts +2 -10
- package/dist/admin/editor-layout.d.ts.map +1 -1
- package/dist/admin/editor-layout.js +2 -2
- package/dist/admin/editor-layout.js.map +1 -1
- package/dist/admin/export.d.ts +10 -0
- package/dist/admin/export.d.ts.map +1 -0
- package/dist/admin/export.js +72 -0
- package/dist/admin/export.js.map +1 -0
- package/dist/admin/federation.d.ts +6 -17
- package/dist/admin/federation.d.ts.map +1 -1
- package/dist/admin/federation.js +49 -104
- package/dist/admin/federation.js.map +1 -1
- package/dist/admin/flash.d.ts +2 -2
- package/dist/admin/flash.d.ts.map +1 -1
- package/dist/admin/headers.d.ts +1 -1
- package/dist/admin/headers.d.ts.map +1 -1
- package/dist/admin/headers.js +1 -1
- package/dist/admin/headers.js.map +1 -1
- package/dist/admin/index.d.ts +36 -21
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +26 -14
- package/dist/admin/index.js.map +1 -1
- package/dist/{indieauth/consent.d.ts → admin/indieauth-consent.d.ts} +4 -4
- package/dist/admin/indieauth-consent.d.ts.map +1 -0
- package/dist/{indieauth/consent.js → admin/indieauth-consent.js} +20 -23
- package/dist/admin/indieauth-consent.js.map +1 -0
- package/dist/admin/job-status.d.ts +25 -0
- package/dist/admin/job-status.d.ts.map +1 -0
- package/dist/admin/job-status.js +53 -0
- package/dist/admin/job-status.js.map +1 -0
- package/dist/admin/legacy-migrations.d.ts +131 -0
- package/dist/admin/legacy-migrations.d.ts.map +1 -0
- package/dist/admin/legacy-migrations.js +236 -0
- package/dist/admin/legacy-migrations.js.map +1 -0
- package/dist/admin/maintenance.d.ts +9 -0
- package/dist/admin/maintenance.d.ts.map +1 -0
- package/dist/admin/maintenance.js +42 -0
- package/dist/admin/maintenance.js.map +1 -0
- package/dist/admin/media.d.ts +8 -109
- package/dist/admin/media.d.ts.map +1 -1
- package/dist/admin/media.js +35 -188
- package/dist/admin/media.js.map +1 -1
- package/dist/admin/menu.d.ts.map +1 -1
- package/dist/admin/menu.js +11 -7
- package/dist/admin/menu.js.map +1 -1
- package/dist/admin/messages.d.ts +1 -1
- package/dist/admin/messages.d.ts.map +1 -1
- package/dist/admin/messages.js +11 -14
- package/dist/admin/messages.js.map +1 -1
- package/dist/admin/navigation.d.ts +3 -3
- package/dist/admin/navigation.d.ts.map +1 -1
- package/dist/admin/navigation.js +34 -33
- package/dist/admin/navigation.js.map +1 -1
- package/dist/admin/personal-data.d.ts +1 -1
- package/dist/admin/personal-data.d.ts.map +1 -1
- package/dist/admin/personal-data.js +3 -6
- package/dist/admin/personal-data.js.map +1 -1
- package/dist/admin/plugins.d.ts +1 -1
- package/dist/admin/plugins.d.ts.map +1 -1
- package/dist/admin/plugins.js +28 -79
- package/dist/admin/plugins.js.map +1 -1
- package/dist/admin/preview.d.ts +2 -1
- package/dist/admin/preview.d.ts.map +1 -1
- package/dist/admin/preview.js +31 -36
- package/dist/admin/preview.js.map +1 -1
- package/dist/admin/recovery.d.ts +3 -3
- package/dist/admin/recovery.d.ts.map +1 -1
- package/dist/admin/recovery.js +12 -14
- package/dist/admin/recovery.js.map +1 -1
- package/dist/admin/routes.d.ts +1 -3
- package/dist/admin/routes.d.ts.map +1 -1
- package/dist/admin/routes.js +34 -29
- package/dist/admin/routes.js.map +1 -1
- package/dist/admin/setting-overrides.d.ts +4 -0
- package/dist/admin/setting-overrides.d.ts.map +1 -0
- package/dist/admin/setting-overrides.js +24 -0
- package/dist/admin/setting-overrides.js.map +1 -0
- package/dist/admin/settings-discussion.d.ts +6 -4
- package/dist/admin/settings-discussion.d.ts.map +1 -1
- package/dist/admin/settings-discussion.js +79 -46
- package/dist/admin/settings-discussion.js.map +1 -1
- package/dist/admin/settings-email.d.ts +12 -9
- package/dist/admin/settings-email.d.ts.map +1 -1
- package/dist/admin/settings-email.js +94 -80
- package/dist/admin/settings-email.js.map +1 -1
- package/dist/admin/settings-federation.d.ts +0 -7
- package/dist/admin/settings-federation.d.ts.map +1 -1
- package/dist/admin/settings-federation.js +0 -36
- package/dist/admin/settings-federation.js.map +1 -1
- package/dist/admin/settings-fields.d.ts +32 -0
- package/dist/admin/settings-fields.d.ts.map +1 -0
- package/dist/admin/settings-fields.js +368 -0
- package/dist/admin/settings-fields.js.map +1 -0
- package/dist/admin/settings-general.d.ts.map +1 -1
- package/dist/admin/settings-general.js +17 -23
- package/dist/admin/settings-general.js.map +1 -1
- package/dist/admin/settings-page.d.ts +5 -32
- package/dist/admin/settings-page.d.ts.map +1 -1
- package/dist/admin/settings-page.js +39 -55
- package/dist/admin/settings-page.js.map +1 -1
- package/dist/admin/settings-pages.d.ts +1 -1
- package/dist/admin/settings-pages.d.ts.map +1 -1
- package/dist/admin/settings-permalinks.js +3 -3
- package/dist/admin/settings-permalinks.js.map +1 -1
- package/dist/admin/settings-privacy.js +1 -1
- package/dist/admin/settings-privacy.js.map +1 -1
- package/dist/admin/settings-reading.d.ts +2 -2
- package/dist/admin/settings-reading.d.ts.map +1 -1
- package/dist/admin/settings-reading.js +17 -16
- package/dist/admin/settings-reading.js.map +1 -1
- package/dist/admin/settings-renderer.d.ts +32 -0
- package/dist/admin/settings-renderer.d.ts.map +1 -0
- package/dist/admin/settings-renderer.js +79 -0
- package/dist/admin/settings-renderer.js.map +1 -0
- package/dist/admin/settings.d.ts +0 -579
- package/dist/admin/settings.d.ts.map +1 -1
- package/dist/admin/settings.js +1 -1155
- package/dist/admin/settings.js.map +1 -1
- package/dist/admin/site-setting-edit.d.ts +4 -0
- package/dist/admin/site-setting-edit.d.ts.map +1 -0
- package/dist/admin/site-setting-edit.js +20 -0
- package/dist/admin/site-setting-edit.js.map +1 -0
- package/dist/admin/syndication-targets.d.ts +1 -1
- package/dist/admin/syndication-targets.d.ts.map +1 -1
- package/dist/admin/syndication-targets.js +11 -15
- package/dist/admin/syndication-targets.js.map +1 -1
- package/dist/admin/taxonomy.d.ts +2 -2
- package/dist/admin/taxonomy.d.ts.map +1 -1
- package/dist/admin/taxonomy.js +17 -29
- package/dist/admin/taxonomy.js.map +1 -1
- package/dist/admin/templates.d.ts +2 -0
- package/dist/admin/templates.d.ts.map +1 -1
- package/dist/admin/templates.js +3 -1
- package/dist/admin/templates.js.map +1 -1
- package/dist/admin/tools.d.ts +4 -4
- package/dist/admin/tools.d.ts.map +1 -1
- package/dist/admin/tools.js +3 -6
- package/dist/admin/tools.js.map +1 -1
- package/dist/admin/uploads.d.ts +1 -106
- package/dist/admin/uploads.d.ts.map +1 -1
- package/dist/admin/uploads.js +2 -191
- package/dist/admin/uploads.js.map +1 -1
- package/dist/admin/users.d.ts +20 -15
- package/dist/admin/users.d.ts.map +1 -1
- package/dist/admin/users.js +84 -81
- package/dist/admin/users.js.map +1 -1
- package/dist/avatars/avatars.d.ts +2 -4
- package/dist/avatars/avatars.d.ts.map +1 -1
- package/dist/avatars/avatars.js +15 -19
- package/dist/avatars/avatars.js.map +1 -1
- package/dist/avatars/index.d.ts +1 -2
- package/dist/avatars/index.d.ts.map +1 -1
- package/dist/avatars/index.js +1 -2
- package/dist/avatars/index.js.map +1 -1
- package/dist/cache.d.ts +4 -4
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +13 -9
- package/dist/cache.js.map +1 -1
- package/dist/cli.d.ts +2 -33
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +729 -344
- package/dist/cli.js.map +1 -1
- package/dist/cms/app.d.ts +11 -0
- package/dist/cms/app.d.ts.map +1 -0
- package/dist/cms/app.js +126 -0
- package/dist/cms/app.js.map +1 -0
- package/dist/cms/boot.d.ts +26 -0
- package/dist/cms/boot.d.ts.map +1 -0
- package/dist/cms/boot.js +128 -0
- package/dist/cms/boot.js.map +1 -0
- package/dist/cms/create.d.ts +272 -0
- package/dist/cms/create.d.ts.map +1 -0
- package/dist/cms/create.js +181 -0
- package/dist/cms/create.js.map +1 -0
- package/dist/cms/lifecycle.d.ts +11 -0
- package/dist/cms/lifecycle.d.ts.map +1 -0
- package/dist/cms/lifecycle.js +15 -0
- package/dist/cms/lifecycle.js.map +1 -0
- package/dist/{web/errors.d.ts → cms/server-error.d.ts} +2 -8
- package/dist/cms/server-error.d.ts.map +1 -0
- package/dist/{web/errors.js → cms/server-error.js} +4 -14
- package/dist/cms/server-error.js.map +1 -0
- package/dist/cms/services.d.ts +57 -0
- package/dist/cms/services.d.ts.map +1 -0
- package/dist/cms/services.js +410 -0
- package/dist/cms/services.js.map +1 -0
- package/dist/cms/site-records.d.ts +4 -0
- package/dist/cms/site-records.d.ts.map +1 -0
- package/dist/cms/site-records.js +13 -0
- package/dist/cms/site-records.js.map +1 -0
- package/dist/comments/akismet.d.ts +14 -47
- package/dist/comments/akismet.d.ts.map +1 -1
- package/dist/comments/akismet.js +30 -71
- package/dist/comments/akismet.js.map +1 -1
- package/dist/comments/conversation.d.ts +340 -0
- package/dist/comments/conversation.d.ts.map +1 -0
- package/dist/comments/conversation.js +51 -0
- package/dist/comments/conversation.js.map +1 -0
- package/dist/comments/form.d.ts +2 -2
- package/dist/comments/form.d.ts.map +1 -1
- package/dist/comments/form.js +2 -2
- package/dist/comments/form.js.map +1 -1
- package/dist/comments/index.d.ts +15 -9
- package/dist/comments/index.d.ts.map +1 -1
- package/dist/comments/index.js +9 -6
- package/dist/comments/index.js.map +1 -1
- package/dist/comments/intake.d.ts +147 -0
- package/dist/comments/intake.d.ts.map +1 -0
- package/dist/comments/intake.js +161 -0
- package/dist/comments/intake.js.map +1 -0
- package/dist/comments/markdown.d.ts.map +1 -1
- package/dist/comments/markdown.js +2 -9
- package/dist/comments/markdown.js.map +1 -1
- package/dist/comments/migrations.d.ts +45 -0
- package/dist/comments/migrations.d.ts.map +1 -0
- package/dist/comments/migrations.js +194 -0
- package/dist/comments/migrations.js.map +1 -0
- package/dist/comments/moderate.d.ts +2 -2
- package/dist/comments/moderate.d.ts.map +1 -1
- package/dist/comments/moderate.js +3 -13
- package/dist/comments/moderate.js.map +1 -1
- package/dist/comments/page-form.d.ts +52 -0
- package/dist/comments/page-form.d.ts.map +1 -0
- package/dist/comments/page-form.js +62 -0
- package/dist/comments/page-form.js.map +1 -0
- package/dist/comments/policy.d.ts +24 -35
- package/dist/comments/policy.d.ts.map +1 -1
- package/dist/comments/policy.js +16 -38
- package/dist/comments/policy.js.map +1 -1
- package/dist/comments/records.d.ts +17 -195
- package/dist/comments/records.d.ts.map +1 -1
- package/dist/comments/records.js +24 -394
- package/dist/comments/records.js.map +1 -1
- package/dist/comments/reply-notices.d.ts +10 -11
- package/dist/comments/reply-notices.d.ts.map +1 -1
- package/dist/comments/reply-notices.js +32 -20
- package/dist/comments/reply-notices.js.map +1 -1
- package/dist/comments/reply-post.d.ts +2 -2
- package/dist/comments/reply-post.d.ts.map +1 -1
- package/dist/comments/reply-post.js +8 -7
- package/dist/comments/reply-post.js.map +1 -1
- package/dist/comments/routes.d.ts +3 -3
- package/dist/comments/routes.d.ts.map +1 -1
- package/dist/comments/routes.js +19 -31
- package/dist/comments/routes.js.map +1 -1
- package/dist/comments/submission.d.ts +5 -102
- package/dist/comments/submission.d.ts.map +1 -1
- package/dist/comments/submission.js +5 -22
- package/dist/comments/submission.js.map +1 -1
- package/dist/comments/viewer.d.ts +1 -25
- package/dist/comments/viewer.d.ts.map +1 -1
- package/dist/comments/viewer.js +1 -44
- package/dist/comments/viewer.js.map +1 -1
- package/dist/config-loader.d.ts +35 -0
- package/dist/config-loader.d.ts.map +1 -0
- package/dist/config-loader.js +117 -0
- package/dist/config-loader.js.map +1 -0
- package/dist/config.d.ts +99 -51
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +137 -181
- package/dist/config.js.map +1 -1
- package/dist/contact/delivery.d.ts +3 -5
- package/dist/contact/delivery.d.ts.map +1 -1
- package/dist/contact/delivery.js +5 -14
- package/dist/contact/delivery.js.map +1 -1
- package/dist/contact/form.d.ts +2 -4
- package/dist/contact/form.d.ts.map +1 -1
- package/dist/contact/form.js +3 -4
- package/dist/contact/form.js.map +1 -1
- package/dist/contact/index.d.ts +3 -3
- package/dist/contact/index.d.ts.map +1 -1
- package/dist/contact/index.js +3 -3
- package/dist/contact/index.js.map +1 -1
- package/dist/contact/records.d.ts +0 -2
- package/dist/contact/records.d.ts.map +1 -1
- package/dist/contact/records.js +11 -16
- package/dist/contact/records.js.map +1 -1
- package/dist/contact/submission.d.ts +2 -2
- package/dist/contact/submission.d.ts.map +1 -1
- package/dist/contact/submission.js +7 -16
- package/dist/contact/submission.js.map +1 -1
- package/dist/{images → content}/alt-text.d.ts +1 -1
- package/dist/content/alt-text.d.ts.map +1 -0
- package/dist/{images → content}/alt-text.js +3 -5
- package/dist/content/alt-text.js.map +1 -0
- package/dist/content/authors.d.ts +79 -0
- package/dist/content/authors.d.ts.map +1 -0
- package/dist/content/authors.js +106 -0
- package/dist/content/authors.js.map +1 -0
- package/dist/content/citation.d.ts +4 -0
- package/dist/content/citation.d.ts.map +1 -1
- package/dist/content/citation.js +3 -0
- package/dist/content/citation.js.map +1 -1
- package/dist/content/comments.d.ts +3 -0
- package/dist/content/comments.d.ts.map +1 -0
- package/dist/content/comments.js +3 -0
- package/dist/content/comments.js.map +1 -0
- package/dist/content/contact.d.ts +3 -0
- package/dist/content/contact.d.ts.map +1 -0
- package/dist/content/contact.js +3 -0
- package/dist/content/contact.js.map +1 -0
- package/dist/content/document-form.d.ts +197 -0
- package/dist/content/document-form.d.ts.map +1 -0
- package/dist/content/document-form.js +201 -0
- package/dist/content/document-form.js.map +1 -0
- package/dist/content/document-kind.d.ts +55 -0
- package/dist/content/document-kind.d.ts.map +1 -0
- package/dist/content/document-kind.js +30 -0
- package/dist/content/document-kind.js.map +1 -0
- package/dist/{admin/enclosure-field.d.ts → content/enclosure-form.d.ts} +14 -34
- package/dist/content/enclosure-form.d.ts.map +1 -0
- package/dist/{admin/enclosure-field.js → content/enclosure-form.js} +43 -81
- package/dist/content/enclosure-form.js.map +1 -0
- package/dist/content/enclosure.d.ts.map +1 -1
- package/dist/content/enclosure.js +3 -4
- package/dist/content/enclosure.js.map +1 -1
- package/dist/{admin/event-field.d.ts → content/event-form.d.ts} +6 -5
- package/dist/content/event-form.d.ts.map +1 -0
- package/dist/{admin/event-field.js → content/event-form.js} +45 -12
- package/dist/content/event-form.js.map +1 -0
- package/dist/content/excerpt.d.ts +26 -0
- package/dist/content/excerpt.d.ts.map +1 -0
- package/dist/content/excerpt.js +46 -0
- package/dist/content/excerpt.js.map +1 -0
- package/dist/content/form-error.d.ts +10 -0
- package/dist/content/form-error.d.ts.map +1 -0
- package/dist/content/form-error.js +2 -0
- package/dist/content/form-error.js.map +1 -0
- package/dist/{web → content}/guids.d.ts +12 -5
- package/dist/content/guids.d.ts.map +1 -0
- package/dist/{web → content}/guids.js +28 -5
- package/dist/content/guids.js.map +1 -0
- package/dist/content/image-tags.d.ts +25 -0
- package/dist/content/image-tags.d.ts.map +1 -0
- package/dist/content/image-tags.js +55 -0
- package/dist/content/image-tags.js.map +1 -0
- package/dist/content/index.d.ts +11 -6
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +6 -3
- package/dist/content/index.js.map +1 -1
- package/dist/content/kept-properties.d.ts +0 -1
- package/dist/content/kept-properties.d.ts.map +1 -1
- package/dist/content/kept-properties.js +2 -2
- package/dist/content/kept-properties.js.map +1 -1
- package/dist/content/language.d.ts +19 -0
- package/dist/content/language.d.ts.map +1 -0
- package/dist/content/language.js +19 -0
- package/dist/content/language.js.map +1 -0
- package/dist/content/license.d.ts.map +1 -0
- package/dist/content/license.js.map +1 -0
- package/dist/{web → content}/locale.d.ts +0 -6
- package/dist/content/locale.d.ts.map +1 -0
- package/dist/{web → content}/locale.js +1 -6
- package/dist/content/locale.js.map +1 -0
- package/dist/content/location-form.d.ts +17 -0
- package/dist/content/location-form.d.ts.map +1 -0
- package/dist/{admin/location-field.js → content/location-form.js} +2 -23
- package/dist/content/location-form.js.map +1 -0
- package/dist/content/location.d.ts.map +1 -1
- package/dist/content/location.js +1 -3
- package/dist/content/location.js.map +1 -1
- package/dist/content/locations.d.ts +0 -1
- package/dist/content/locations.d.ts.map +1 -1
- package/dist/content/locations.js +2 -2
- package/dist/content/locations.js.map +1 -1
- package/dist/content/markdown-links.d.ts +11 -0
- package/dist/content/markdown-links.d.ts.map +1 -0
- package/dist/content/markdown-links.js +223 -0
- package/dist/content/markdown-links.js.map +1 -0
- package/dist/content/markdown.d.ts +2 -1
- package/dist/content/markdown.d.ts.map +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/markdown.js.map +1 -1
- package/dist/content/media.d.ts +7 -0
- package/dist/content/media.d.ts.map +1 -1
- package/dist/content/media.js +12 -1
- package/dist/content/media.js.map +1 -1
- package/dist/content/metadata/strip-job.d.ts +16 -0
- package/dist/content/metadata/strip-job.d.ts.map +1 -0
- package/dist/content/metadata/strip-job.js +24 -0
- package/dist/content/metadata/strip-job.js.map +1 -0
- package/dist/content/metadata/sweep.d.ts +13 -1
- package/dist/content/metadata/sweep.d.ts.map +1 -1
- package/dist/content/metadata/sweep.js +47 -25
- package/dist/content/metadata/sweep.js.map +1 -1
- package/dist/content/migrated.js +1 -1
- package/dist/content/migrated.js.map +1 -1
- package/dist/content/parser.d.ts.map +1 -1
- package/dist/content/parser.js +1 -12
- package/dist/content/parser.js.map +1 -1
- package/dist/content/permalink-file.d.ts +2 -1
- package/dist/content/permalink-file.d.ts.map +1 -1
- package/dist/content/permalink-file.js +3 -3
- package/dist/content/permalink-file.js.map +1 -1
- package/dist/content/permalinks.d.ts +34 -0
- package/dist/content/permalinks.d.ts.map +1 -0
- package/dist/{web/documents.js → content/permalinks.js} +6 -56
- package/dist/content/permalinks.js.map +1 -0
- package/dist/content/photo-form.d.ts +29 -0
- package/dist/content/photo-form.d.ts.map +1 -0
- package/dist/{admin/photo-field.js → content/photo-form.js} +43 -40
- package/dist/content/photo-form.js.map +1 -0
- package/dist/content/photo.d.ts +2 -1
- package/dist/content/photo.d.ts.map +1 -1
- package/dist/content/photo.js +2 -2
- package/dist/content/photo.js.map +1 -1
- package/dist/content/post-fields.d.ts +40 -0
- package/dist/content/post-fields.d.ts.map +1 -0
- package/dist/content/post-fields.js +252 -0
- package/dist/content/post-fields.js.map +1 -0
- package/dist/content/read-form.d.ts +31 -0
- package/dist/content/read-form.d.ts.map +1 -0
- package/dist/content/read-form.js +157 -0
- package/dist/content/read-form.js.map +1 -0
- package/dist/content/read.d.ts +9 -2
- package/dist/content/read.d.ts.map +1 -1
- package/dist/content/read.js +28 -13
- package/dist/content/read.js.map +1 -1
- package/dist/content/redirects.d.ts +84 -0
- package/dist/content/redirects.d.ts.map +1 -0
- package/dist/content/redirects.js +234 -0
- package/dist/content/redirects.js.map +1 -0
- package/dist/content/sanitize.d.ts +13 -0
- package/dist/content/sanitize.d.ts.map +1 -0
- package/dist/{web → content}/sanitize.js +4 -71
- package/dist/content/sanitize.js.map +1 -0
- package/dist/content/save.d.ts +5 -8
- package/dist/content/save.d.ts.map +1 -1
- package/dist/content/save.js +5 -26
- package/dist/content/save.js.map +1 -1
- package/dist/content/schedule.d.ts +2 -2
- package/dist/content/schedule.d.ts.map +1 -1
- package/dist/content/schedule.js +1 -3
- package/dist/content/schedule.js.map +1 -1
- package/dist/content/served.d.ts +58 -0
- package/dist/content/served.d.ts.map +1 -0
- package/dist/content/served.js +65 -0
- package/dist/content/served.js.map +1 -0
- package/dist/content/site-links.d.ts +72 -0
- package/dist/content/site-links.d.ts.map +1 -0
- package/dist/content/site-links.js +191 -0
- package/dist/content/site-links.js.map +1 -0
- package/dist/content/sqlite/archive.d.ts +4 -0
- package/dist/content/sqlite/archive.d.ts.map +1 -0
- package/dist/content/sqlite/archive.js +96 -0
- package/dist/content/sqlite/archive.js.map +1 -0
- package/dist/content/sqlite/backlinks.d.ts +4 -0
- package/dist/content/sqlite/backlinks.d.ts.map +1 -0
- package/dist/content/sqlite/backlinks.js +46 -0
- package/dist/content/sqlite/backlinks.js.map +1 -0
- package/dist/content/sqlite/catalog.d.ts +4 -0
- package/dist/content/sqlite/catalog.d.ts.map +1 -0
- package/dist/content/sqlite/catalog.js +62 -0
- package/dist/content/sqlite/catalog.js.map +1 -0
- package/dist/content/sqlite/clauses.d.ts +57 -0
- package/dist/content/sqlite/clauses.d.ts.map +1 -0
- package/dist/content/sqlite/clauses.js +76 -0
- package/dist/content/sqlite/clauses.js.map +1 -0
- package/dist/content/sqlite/database.d.ts +26 -0
- package/dist/content/sqlite/database.d.ts.map +1 -0
- package/dist/content/sqlite/database.js +27 -0
- package/dist/content/sqlite/database.js.map +1 -0
- package/dist/content/sqlite/documents.d.ts +12 -0
- package/dist/content/sqlite/documents.d.ts.map +1 -0
- package/dist/content/sqlite/documents.js +40 -0
- package/dist/content/sqlite/documents.js.map +1 -0
- package/dist/content/sqlite/lookups.d.ts +6 -0
- package/dist/content/sqlite/lookups.d.ts.map +1 -0
- package/dist/content/sqlite/lookups.js +25 -0
- package/dist/content/sqlite/lookups.js.map +1 -0
- package/dist/content/sqlite/open.d.ts +8 -0
- package/dist/content/sqlite/open.d.ts.map +1 -0
- package/dist/content/sqlite/open.js +63 -0
- package/dist/content/sqlite/open.js.map +1 -0
- package/dist/content/sqlite/replies.d.ts +4 -0
- package/dist/content/sqlite/replies.d.ts.map +1 -0
- package/dist/content/sqlite/replies.js +21 -0
- package/dist/content/sqlite/replies.js.map +1 -0
- package/dist/content/sqlite/rows.d.ts +22 -0
- package/dist/content/sqlite/rows.d.ts.map +1 -0
- package/dist/content/sqlite/rows.js +93 -0
- package/dist/content/sqlite/rows.js.map +1 -0
- package/dist/content/sqlite/schedule.d.ts +4 -0
- package/dist/content/sqlite/schedule.d.ts.map +1 -0
- package/dist/content/sqlite/schedule.js +16 -0
- package/dist/content/sqlite/schedule.js.map +1 -0
- package/dist/content/sqlite/schema.d.ts +10 -0
- package/dist/content/sqlite/schema.d.ts.map +1 -0
- package/dist/content/sqlite/schema.js +209 -0
- package/dist/content/sqlite/schema.js.map +1 -0
- package/dist/content/sqlite/search.d.ts +4 -0
- package/dist/content/sqlite/search.d.ts.map +1 -0
- package/dist/content/sqlite/search.js +54 -0
- package/dist/content/sqlite/search.js.map +1 -0
- package/dist/content/sqlite/spellings.d.ts +6 -0
- package/dist/content/sqlite/spellings.d.ts.map +1 -0
- package/dist/content/sqlite/spellings.js +80 -0
- package/dist/content/sqlite/spellings.js.map +1 -0
- package/dist/content/sqlite/taxonomy.d.ts +4 -0
- package/dist/content/sqlite/taxonomy.d.ts.map +1 -0
- package/dist/content/sqlite/taxonomy.js +75 -0
- package/dist/content/sqlite/taxonomy.js.map +1 -0
- package/dist/content/sqlite/writes.d.ts +9 -0
- package/dist/content/sqlite/writes.d.ts.map +1 -0
- package/dist/content/sqlite/writes.js +164 -0
- package/dist/content/sqlite/writes.js.map +1 -0
- package/dist/content/store.d.ts +142 -138
- package/dist/content/store.d.ts.map +1 -1
- package/dist/content/store.js +0 -1051
- package/dist/content/store.js.map +1 -1
- package/dist/content/sync.d.ts +12 -4
- package/dist/content/sync.d.ts.map +1 -1
- package/dist/content/sync.js +24 -41
- package/dist/content/sync.js.map +1 -1
- package/dist/content/syndicate-to.d.ts +25 -0
- package/dist/content/syndicate-to.d.ts.map +1 -0
- package/dist/content/syndicate-to.js +8 -0
- package/dist/content/syndicate-to.js.map +1 -0
- package/dist/{web → content}/taxonomy.d.ts +1 -1
- package/dist/content/taxonomy.d.ts.map +1 -0
- package/dist/{web → content}/taxonomy.js +2 -2
- package/dist/content/taxonomy.js.map +1 -0
- package/dist/content/time.d.ts +2 -2
- package/dist/content/time.d.ts.map +1 -1
- package/dist/content/time.js +3 -3
- package/dist/content/time.js.map +1 -1
- package/dist/content/trash.d.ts +35 -0
- package/dist/content/trash.d.ts.map +1 -0
- package/dist/content/trash.js +83 -0
- package/dist/content/trash.js.map +1 -0
- package/dist/content/uploads.d.ts +24 -0
- package/dist/content/uploads.d.ts.map +1 -0
- package/dist/content/uploads.js +32 -0
- package/dist/content/uploads.js.map +1 -0
- package/dist/content/video.d.ts.map +1 -1
- package/dist/content/video.js +3 -5
- package/dist/content/video.js.map +1 -1
- package/dist/content/write.d.ts +84 -0
- package/dist/content/write.d.ts.map +1 -0
- package/dist/content/write.js +570 -0
- package/dist/content/write.js.map +1 -0
- package/dist/content/writer.d.ts.map +1 -1
- package/dist/content/writer.js +1 -2
- package/dist/content/writer.js.map +1 -1
- package/dist/dev-mode.d.ts +6 -26
- package/dist/dev-mode.d.ts.map +1 -1
- package/dist/dev-mode.js +5 -54
- package/dist/dev-mode.js.map +1 -1
- package/dist/drain.d.ts +2 -3
- package/dist/drain.d.ts.map +1 -1
- package/dist/drain.js +2 -1
- package/dist/drain.js.map +1 -1
- package/dist/export/export-archives.d.ts +29 -0
- package/dist/export/export-archives.d.ts.map +1 -0
- package/dist/export/export-archives.js +88 -0
- package/dist/export/export-archives.js.map +1 -0
- package/dist/export/export-job.d.ts +21 -0
- package/dist/export/export-job.d.ts.map +1 -0
- package/dist/export/export-job.js +63 -0
- package/dist/export/export-job.js.map +1 -0
- package/dist/export/site-export.d.ts +101 -0
- package/dist/export/site-export.d.ts.map +1 -0
- package/dist/export/site-export.js +243 -0
- package/dist/export/site-export.js.map +1 -0
- package/dist/export/site-import.d.ts +75 -0
- package/dist/export/site-import.d.ts.map +1 -0
- package/dist/export/site-import.js +492 -0
- package/dist/export/site-import.js.map +1 -0
- package/dist/exports.d.ts +31 -0
- package/dist/exports.d.ts.map +1 -0
- package/dist/exports.js +10 -0
- package/dist/exports.js.map +1 -0
- package/dist/federation/actor.d.ts +1 -1
- package/dist/federation/actor.d.ts.map +1 -1
- package/dist/federation/actor.js +6 -13
- package/dist/federation/actor.js.map +1 -1
- package/dist/federation/article.d.ts +4 -14
- package/dist/federation/article.d.ts.map +1 -1
- package/dist/federation/article.js +40 -51
- package/dist/federation/article.js.map +1 -1
- package/dist/federation/backfill.d.ts +7 -5
- package/dist/federation/backfill.d.ts.map +1 -1
- package/dist/federation/backfill.js +12 -13
- package/dist/federation/backfill.js.map +1 -1
- package/dist/federation/citations.d.ts.map +1 -1
- package/dist/federation/citations.js.map +1 -1
- package/dist/federation/cited-post.d.ts +1 -1
- package/dist/federation/cited-post.d.ts.map +1 -1
- package/dist/federation/cited-post.js +3 -5
- package/dist/federation/cited-post.js.map +1 -1
- package/dist/federation/delivery-plan.d.ts +85 -0
- package/dist/federation/delivery-plan.d.ts.map +1 -0
- package/dist/federation/delivery-plan.js +137 -0
- package/dist/federation/delivery-plan.js.map +1 -0
- package/dist/federation/delivery.d.ts +12 -34
- package/dist/federation/delivery.d.ts.map +1 -1
- package/dist/federation/delivery.js +79 -212
- package/dist/federation/delivery.js.map +1 -1
- package/dist/federation/federation.d.ts +12 -12
- package/dist/federation/federation.d.ts.map +1 -1
- package/dist/federation/federation.js +12 -18
- package/dist/federation/federation.js.map +1 -1
- package/dist/federation/followers.d.ts +1 -1
- package/dist/federation/followers.d.ts.map +1 -1
- package/dist/federation/handles.d.ts +1 -1
- package/dist/federation/handles.d.ts.map +1 -1
- package/dist/federation/handles.js +1 -1
- package/dist/federation/handles.js.map +1 -1
- package/dist/federation/inbox.d.ts +1 -1
- package/dist/federation/inbox.d.ts.map +1 -1
- package/dist/federation/inbox.js +6 -5
- package/dist/federation/inbox.js.map +1 -1
- package/dist/federation/index.d.ts +10 -8
- package/dist/federation/index.d.ts.map +1 -1
- package/dist/federation/index.js +7 -5
- package/dist/federation/index.js.map +1 -1
- package/dist/federation/keys.d.ts +8 -27
- package/dist/federation/keys.d.ts.map +1 -1
- package/dist/federation/keys.js +7 -50
- package/dist/federation/keys.js.map +1 -1
- package/dist/federation/mount.d.ts +2 -2
- package/dist/federation/mount.d.ts.map +1 -1
- package/dist/federation/mount.js +9 -7
- package/dist/federation/mount.js.map +1 -1
- package/dist/federation/paths.d.ts +1 -9
- package/dist/federation/paths.d.ts.map +1 -1
- package/dist/federation/paths.js +2 -12
- package/dist/federation/paths.js.map +1 -1
- package/dist/federation/profiles.d.ts +2 -2
- package/dist/federation/profiles.d.ts.map +1 -1
- package/dist/federation/profiles.js +6 -9
- package/dist/federation/profiles.js.map +1 -1
- package/dist/federation/queue.d.ts +32 -17
- package/dist/federation/queue.d.ts.map +1 -1
- package/dist/federation/queue.js +173 -39
- package/dist/federation/queue.js.map +1 -1
- package/dist/federation/quotes.d.ts +2 -2
- package/dist/federation/quotes.d.ts.map +1 -1
- package/dist/federation/quotes.js +4 -4
- package/dist/federation/quotes.js.map +1 -1
- package/dist/federation/records.d.ts +2 -2
- package/dist/federation/records.d.ts.map +1 -1
- package/dist/federation/records.js +12 -19
- package/dist/federation/records.js.map +1 -1
- package/dist/federation/relays.d.ts +8 -5
- package/dist/federation/relays.d.ts.map +1 -1
- package/dist/federation/relays.js +52 -53
- package/dist/federation/relays.js.map +1 -1
- package/dist/federation/resend-job.d.ts +44 -0
- package/dist/federation/resend-job.d.ts.map +1 -0
- package/dist/federation/resend-job.js +59 -0
- package/dist/federation/resend-job.js.map +1 -0
- package/dist/federation/site-loaders.js +1 -1
- package/dist/federation/site-loaders.js.map +1 -1
- package/dist/federation/webfinger.d.ts +23 -0
- package/dist/federation/webfinger.d.ts.map +1 -0
- package/dist/federation/webfinger.js +70 -0
- package/dist/federation/webfinger.js.map +1 -0
- package/dist/files/atomic.d.ts +9 -0
- package/dist/files/atomic.d.ts.map +1 -1
- package/dist/files/atomic.js +5 -10
- package/dist/files/atomic.js.map +1 -1
- package/dist/files/data-files.d.ts +104 -0
- package/dist/files/data-files.d.ts.map +1 -0
- package/dist/files/data-files.js +330 -0
- package/dist/files/data-files.js.map +1 -0
- package/dist/files/export-archives.d.ts +12 -0
- package/dist/files/export-archives.d.ts.map +1 -0
- package/dist/files/export-archives.js +67 -0
- package/dist/files/export-archives.js.map +1 -0
- package/dist/files/static-files.d.ts +21 -0
- package/dist/files/static-files.d.ts.map +1 -0
- package/dist/files/static-files.js +73 -0
- package/dist/files/static-files.js.map +1 -0
- package/dist/files/tar.d.ts +29 -0
- package/dist/files/tar.d.ts.map +1 -0
- package/dist/files/tar.js +206 -0
- package/dist/files/tar.js.map +1 -0
- package/dist/files/upload-types.d.ts +81 -0
- package/dist/files/upload-types.d.ts.map +1 -0
- package/dist/files/upload-types.js +234 -0
- package/dist/files/upload-types.js.map +1 -0
- package/dist/forms/checker.d.ts +93 -0
- package/dist/forms/checker.d.ts.map +1 -0
- package/dist/forms/checker.js +2 -0
- package/dist/forms/checker.js.map +1 -0
- package/dist/forms/protection.d.ts +3 -9
- package/dist/forms/protection.d.ts.map +1 -1
- package/dist/forms/protection.js +5 -11
- package/dist/forms/protection.js.map +1 -1
- package/dist/images/icons.d.ts.map +1 -1
- package/dist/images/icons.js +4 -2
- package/dist/images/icons.js.map +1 -1
- package/dist/images/index.d.ts +2 -1
- package/dist/images/index.d.ts.map +1 -1
- package/dist/images/index.js +2 -1
- package/dist/images/index.js.map +1 -1
- package/dist/images/markup.d.ts +4 -21
- package/dist/images/markup.d.ts.map +1 -1
- package/dist/images/markup.js +15 -70
- package/dist/images/markup.js.map +1 -1
- package/dist/images/paths.d.ts +1 -14
- package/dist/images/paths.d.ts.map +1 -1
- package/dist/images/paths.js +9 -23
- package/dist/images/paths.js.map +1 -1
- package/dist/images/variants.d.ts +5 -3
- package/dist/images/variants.d.ts.map +1 -1
- package/dist/images/variants.js +23 -22
- package/dist/images/variants.js.map +1 -1
- package/dist/index.d.ts +4 -291
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -839
- package/dist/index.js.map +1 -1
- package/dist/indexnow.d.ts +4 -2
- package/dist/indexnow.d.ts.map +1 -1
- package/dist/indexnow.js +52 -45
- package/dist/indexnow.js.map +1 -1
- package/dist/indieauth/client.d.ts +1 -1
- package/dist/indieauth/client.d.ts.map +1 -1
- package/dist/indieauth/client.js +1 -1
- package/dist/indieauth/client.js.map +1 -1
- package/dist/indieauth/grants.d.ts +1 -1
- package/dist/indieauth/grants.d.ts.map +1 -1
- package/dist/indieauth/identity.d.ts +2 -2
- package/dist/indieauth/identity.d.ts.map +1 -1
- package/dist/indieauth/identity.js +5 -7
- package/dist/indieauth/identity.js.map +1 -1
- package/dist/indieauth/redeem.d.ts +1 -1
- package/dist/indieauth/redeem.d.ts.map +1 -1
- package/dist/indieauth/redeem.js.map +1 -1
- package/dist/indieauth/request.d.ts +5 -1
- package/dist/indieauth/request.d.ts.map +1 -1
- package/dist/indieauth/request.js +6 -2
- package/dist/indieauth/request.js.map +1 -1
- package/dist/indieauth/tokens.d.ts +1 -3
- package/dist/indieauth/tokens.d.ts.map +1 -1
- package/dist/indieauth/tokens.js +4 -6
- package/dist/indieauth/tokens.js.map +1 -1
- package/dist/jobs/file-records.d.ts +13 -0
- package/dist/jobs/file-records.d.ts.map +1 -0
- package/dist/jobs/file-records.js +104 -0
- package/dist/jobs/file-records.js.map +1 -0
- package/dist/jobs/in-process.d.ts +10 -0
- package/dist/jobs/in-process.d.ts.map +1 -0
- package/dist/jobs/in-process.js +45 -0
- package/dist/jobs/in-process.js.map +1 -0
- package/dist/jobs/lock-file.d.ts +13 -0
- package/dist/jobs/lock-file.d.ts.map +1 -0
- package/dist/jobs/lock-file.js +107 -0
- package/dist/jobs/lock-file.js.map +1 -0
- package/dist/jobs/processes.d.ts +11 -0
- package/dist/jobs/processes.d.ts.map +1 -0
- package/dist/jobs/processes.js +50 -0
- package/dist/jobs/processes.js.map +1 -0
- package/dist/jobs/queue.d.ts +18 -0
- package/dist/jobs/queue.d.ts.map +1 -0
- package/dist/jobs/queue.js +220 -0
- package/dist/jobs/queue.js.map +1 -0
- package/dist/jobs/types.d.ts +159 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +22 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/mail/index.d.ts +1 -7
- package/dist/mail/index.d.ts.map +1 -1
- package/dist/mail/index.js +0 -3
- package/dist/mail/index.js.map +1 -1
- package/dist/mail/provider.d.ts +7 -0
- package/dist/mail/provider.d.ts.map +1 -1
- package/dist/maintenance.d.ts +6 -43
- package/dist/maintenance.d.ts.map +1 -1
- package/dist/maintenance.js +4 -67
- package/dist/maintenance.js.map +1 -1
- package/dist/media/library.d.ts +99 -0
- package/dist/media/library.d.ts.map +1 -0
- package/dist/media/library.js +160 -0
- package/dist/media/library.js.map +1 -0
- package/dist/media/uploads.d.ts +106 -0
- package/dist/media/uploads.d.ts.map +1 -0
- package/dist/media/uploads.js +192 -0
- package/dist/media/uploads.js.map +1 -0
- package/dist/micropub/content.js +1 -1
- package/dist/micropub/content.js.map +1 -1
- package/dist/micropub/create.d.ts +7 -15
- package/dist/micropub/create.d.ts.map +1 -1
- package/dist/micropub/create.js +48 -184
- package/dist/micropub/create.js.map +1 -1
- package/dist/micropub/endpoint.d.ts +2 -2
- package/dist/micropub/endpoint.d.ts.map +1 -1
- package/dist/micropub/endpoint.js +36 -47
- package/dist/micropub/endpoint.js.map +1 -1
- package/dist/micropub/media.d.ts +1 -3
- package/dist/micropub/media.d.ts.map +1 -1
- package/dist/micropub/media.js +10 -12
- package/dist/micropub/media.js.map +1 -1
- package/dist/micropub/update.d.ts +6 -14
- package/dist/micropub/update.d.ts.map +1 -1
- package/dist/micropub/update.js +37 -90
- package/dist/micropub/update.js.map +1 -1
- package/dist/notifications/comments.d.ts +8 -6
- package/dist/notifications/comments.d.ts.map +1 -1
- package/dist/notifications/comments.js +80 -76
- package/dist/notifications/comments.js.map +1 -1
- package/dist/notifications/digest.d.ts +6 -8
- package/dist/notifications/digest.d.ts.map +1 -1
- package/dist/notifications/digest.js +15 -26
- package/dist/notifications/digest.js.map +1 -1
- package/dist/notifications/index.d.ts +9 -6
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +6 -5
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/links.d.ts.map +1 -1
- package/dist/notifications/links.js +2 -2
- package/dist/notifications/links.js.map +1 -1
- package/dist/{mail/service.d.ts → notifications/mail-service.d.ts} +16 -20
- package/dist/notifications/mail-service.d.ts.map +1 -0
- package/dist/{mail/service.js → notifications/mail-service.js} +100 -121
- package/dist/notifications/mail-service.js.map +1 -0
- package/dist/{mail/templates.d.ts → notifications/mail-templates.d.ts} +4 -2
- package/dist/notifications/mail-templates.d.ts.map +1 -0
- package/dist/{mail/templates.js → notifications/mail-templates.js} +5 -3
- package/dist/notifications/mail-templates.js.map +1 -0
- package/dist/notifications/optouts.d.ts +0 -2
- package/dist/notifications/optouts.d.ts.map +1 -1
- package/dist/notifications/optouts.js +2 -4
- package/dist/notifications/optouts.js.map +1 -1
- package/dist/notifications/tokens.d.ts +2 -4
- package/dist/notifications/tokens.d.ts.map +1 -1
- package/dist/notifications/tokens.js +4 -30
- package/dist/notifications/tokens.js.map +1 -1
- package/dist/notify.d.ts +4 -2
- package/dist/notify.d.ts.map +1 -1
- package/dist/notify.js +35 -35
- package/dist/notify.js.map +1 -1
- package/dist/plugin.d.ts +59 -19
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +22 -4
- package/dist/plugin.js.map +1 -1
- package/dist/plugins/changes.d.ts +0 -1
- package/dist/plugins/changes.d.ts.map +1 -1
- package/dist/plugins/changes.js +2 -3
- package/dist/plugins/changes.js.map +1 -1
- package/dist/plugins/data.d.ts +19 -0
- package/dist/plugins/data.d.ts.map +1 -0
- package/dist/plugins/data.js +117 -0
- package/dist/plugins/data.js.map +1 -0
- package/dist/plugins/enabled.d.ts +1 -13
- package/dist/plugins/enabled.d.ts.map +1 -1
- package/dist/plugins/enabled.js +12 -26
- package/dist/plugins/enabled.js.map +1 -1
- package/dist/plugins/fetch.d.ts +1 -1
- package/dist/plugins/fetch.d.ts.map +1 -1
- package/dist/plugins/fetch.js +1 -1
- package/dist/plugins/fetch.js.map +1 -1
- package/dist/plugins/folder.d.ts.map +1 -1
- package/dist/plugins/folder.js +1 -3
- package/dist/plugins/folder.js.map +1 -1
- package/dist/plugins/install.d.ts +1 -1
- package/dist/plugins/install.d.ts.map +1 -1
- package/dist/plugins/install.js +14 -45
- package/dist/plugins/install.js.map +1 -1
- package/dist/plugins/manage.d.ts +1 -1
- package/dist/plugins/manage.d.ts.map +1 -1
- package/dist/plugins/migrate-settings.d.ts +7 -0
- package/dist/plugins/migrate-settings.d.ts.map +1 -0
- package/dist/plugins/migrate-settings.js +41 -0
- package/dist/plugins/migrate-settings.js.map +1 -0
- package/dist/plugins/registry.d.ts +10 -14
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +63 -45
- package/dist/plugins/registry.js.map +1 -1
- package/dist/plugins/settings.d.ts +5 -57
- package/dist/plugins/settings.d.ts.map +1 -1
- package/dist/plugins/settings.js +47 -181
- package/dist/plugins/settings.js.map +1 -1
- package/dist/plugins/site.d.ts +3 -2
- package/dist/plugins/site.d.ts.map +1 -1
- package/dist/plugins/site.js +8 -8
- package/dist/plugins/site.js.map +1 -1
- package/dist/plugins/upgrade.d.ts.map +1 -1
- package/dist/plugins/upgrade.js +4 -3
- package/dist/plugins/upgrade.js.map +1 -1
- package/dist/privacy/erase.d.ts +1 -1
- package/dist/privacy/erase.d.ts.map +1 -1
- package/dist/privacy/retention.d.ts +6 -2
- package/dist/privacy/retention.d.ts.map +1 -1
- package/dist/privacy/retention.js +20 -15
- package/dist/privacy/retention.js.map +1 -1
- package/dist/settings/akismet.d.ts +9 -0
- package/dist/settings/akismet.d.ts.map +1 -0
- package/dist/settings/akismet.js +46 -0
- package/dist/settings/akismet.js.map +1 -0
- package/dist/settings/declare.d.ts +15 -0
- package/dist/settings/declare.d.ts.map +1 -0
- package/dist/settings/declare.js +20 -0
- package/dist/settings/declare.js.map +1 -0
- package/dist/settings/dev-mode.d.ts +29 -0
- package/dist/settings/dev-mode.d.ts.map +1 -0
- package/dist/settings/dev-mode.js +77 -0
- package/dist/settings/dev-mode.js.map +1 -0
- package/dist/settings/kinds.d.ts +13 -0
- package/dist/settings/kinds.d.ts.map +1 -0
- package/dist/settings/kinds.js +108 -0
- package/dist/settings/kinds.js.map +1 -0
- package/dist/settings/mail.d.ts +10 -0
- package/dist/settings/mail.d.ts.map +1 -0
- package/dist/settings/mail.js +92 -0
- package/dist/settings/mail.js.map +1 -0
- package/dist/settings/maintenance.d.ts +6 -0
- package/dist/settings/maintenance.d.ts.map +1 -0
- package/dist/settings/maintenance.js +33 -0
- package/dist/settings/maintenance.js.map +1 -0
- package/dist/settings/names.d.ts +7 -0
- package/dist/settings/names.d.ts.map +1 -0
- package/dist/settings/names.js +31 -0
- package/dist/settings/names.js.map +1 -0
- package/dist/settings/presence.d.ts +2 -0
- package/dist/settings/presence.d.ts.map +1 -0
- package/dist/settings/presence.js +7 -0
- package/dist/settings/presence.js.map +1 -0
- package/dist/settings/registry.d.ts +14 -0
- package/dist/settings/registry.d.ts.map +1 -0
- package/dist/settings/registry.js +369 -0
- package/dist/settings/registry.js.map +1 -0
- package/dist/settings/types.d.ts +176 -0
- package/dist/settings/types.d.ts.map +1 -0
- package/dist/settings/types.js +2 -0
- package/dist/settings/types.js.map +1 -0
- package/dist/site/admin-paths.d.ts +23 -0
- package/dist/site/admin-paths.d.ts.map +1 -0
- package/dist/site/admin-paths.js +25 -0
- package/dist/site/admin-paths.js.map +1 -0
- package/dist/site/admin-theme.d.ts.map +1 -0
- package/dist/site/admin-theme.js.map +1 -0
- package/dist/{web → site}/authors.d.ts +1 -72
- package/dist/site/authors.d.ts.map +1 -0
- package/dist/site/authors.js +107 -0
- package/dist/site/authors.js.map +1 -0
- package/dist/site/feed-settings.d.ts +28 -0
- package/dist/site/feed-settings.d.ts.map +1 -0
- package/dist/site/feed-settings.js +22 -0
- package/dist/site/feed-settings.js.map +1 -0
- package/dist/{web/indexnow.d.ts → site/indexnow-key.d.ts} +1 -1
- package/dist/site/indexnow-key.d.ts.map +1 -0
- package/dist/{web/indexnow.js → site/indexnow-key.js} +1 -1
- package/dist/site/indexnow-key.js.map +1 -0
- package/dist/site/namespace.d.ts +88 -0
- package/dist/site/namespace.d.ts.map +1 -0
- package/dist/site/namespace.js +471 -0
- package/dist/site/namespace.js.map +1 -0
- package/dist/{web → site}/navigation.d.ts +7 -1
- package/dist/site/navigation.d.ts.map +1 -0
- package/dist/{web → site}/navigation.js +18 -0
- package/dist/site/navigation.js.map +1 -0
- package/dist/{notifications/preferences.d.ts → site/notification-preferences.d.ts} +2 -2
- package/dist/site/notification-preferences.d.ts.map +1 -0
- package/dist/{notifications/preferences.js → site/notification-preferences.js} +1 -1
- package/dist/site/notification-preferences.js.map +1 -0
- package/dist/site/passwords.d.ts.map +1 -0
- package/dist/site/passwords.js.map +1 -0
- package/dist/{privacy/policy.d.ts → site/retention-policy.d.ts} +1 -1
- package/dist/site/retention-policy.d.ts.map +1 -0
- package/dist/{privacy/policy.js → site/retention-policy.js} +1 -1
- package/dist/site/retention-policy.js.map +1 -0
- package/dist/site/robots.d.ts +62 -0
- package/dist/site/robots.d.ts.map +1 -0
- package/dist/site/robots.js +130 -0
- package/dist/site/robots.js.map +1 -0
- package/dist/site/setting-rows.d.ts +45 -0
- package/dist/site/setting-rows.d.ts.map +1 -0
- package/dist/site/setting-rows.js +361 -0
- package/dist/site/setting-rows.js.map +1 -0
- package/dist/site/setting-values.d.ts +63 -0
- package/dist/site/setting-values.d.ts.map +1 -0
- package/dist/site/setting-values.js +170 -0
- package/dist/site/setting-values.js.map +1 -0
- package/dist/site/settings-form.d.ts +30 -0
- package/dist/site/settings-form.d.ts.map +1 -0
- package/dist/site/settings-form.js +54 -0
- package/dist/site/settings-form.js.map +1 -0
- package/dist/site/settings.d.ts +29 -0
- package/dist/site/settings.d.ts.map +1 -0
- package/dist/site/settings.js +44 -0
- package/dist/site/settings.js.map +1 -0
- package/dist/site/site-json.d.ts +38 -0
- package/dist/site/site-json.d.ts.map +1 -0
- package/dist/site/site-json.js +69 -0
- package/dist/site/site-json.js.map +1 -0
- package/dist/{admin/accounts.d.ts → site/users.d.ts} +25 -50
- package/dist/site/users.d.ts.map +1 -0
- package/dist/{admin/accounts.js → site/users.js} +51 -166
- package/dist/site/users.js.map +1 -0
- package/dist/store/admin-store.d.ts +72 -0
- package/dist/store/admin-store.d.ts.map +1 -0
- package/dist/store/admin-store.js +62 -0
- package/dist/store/admin-store.js.map +1 -0
- package/dist/store/comments.d.ts +253 -0
- package/dist/store/comments.d.ts.map +1 -0
- package/dist/store/comments.js +234 -0
- package/dist/store/comments.js.map +1 -0
- package/dist/store/conversation.d.ts +28 -0
- package/dist/store/conversation.d.ts.map +1 -0
- package/dist/store/conversation.js +16 -0
- package/dist/store/conversation.js.map +1 -0
- package/dist/store/deliveries.d.ts +92 -0
- package/dist/store/deliveries.d.ts.map +1 -0
- package/dist/store/deliveries.js +88 -0
- package/dist/store/deliveries.js.map +1 -0
- package/dist/store/followers.d.ts +91 -0
- package/dist/store/followers.d.ts.map +1 -0
- package/dist/store/followers.js +79 -0
- package/dist/store/followers.js.map +1 -0
- package/dist/{federation/replies.d.ts → store/inbox-replies.d.ts} +2 -2
- package/dist/store/inbox-replies.d.ts.map +1 -0
- package/dist/{federation/replies.js → store/inbox-replies.js} +2 -4
- package/dist/store/inbox-replies.js.map +1 -0
- package/dist/store/inbox.d.ts +132 -0
- package/dist/store/inbox.d.ts.map +1 -0
- package/dist/store/inbox.js +157 -0
- package/dist/store/inbox.js.map +1 -0
- package/dist/store/profiles.d.ts +49 -0
- package/dist/store/profiles.d.ts.map +1 -0
- package/dist/store/profiles.js +71 -0
- package/dist/store/profiles.js.map +1 -0
- package/dist/store/queue-database.d.ts +11 -0
- package/dist/store/queue-database.d.ts.map +1 -0
- package/dist/store/queue-database.js +39 -0
- package/dist/store/queue-database.js.map +1 -0
- package/dist/store/relays.d.ts +66 -0
- package/dist/store/relays.d.ts.map +1 -0
- package/dist/store/relays.js +69 -0
- package/dist/store/relays.js.map +1 -0
- package/dist/store/rows.d.ts +33 -0
- package/dist/store/rows.d.ts.map +1 -0
- package/dist/store/rows.js +44 -0
- package/dist/store/rows.js.map +1 -0
- package/dist/store/schema.d.ts +14 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +588 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/sessions.d.ts +90 -0
- package/dist/store/sessions.d.ts.map +1 -0
- package/dist/store/sessions.js +107 -0
- package/dist/store/sessions.js.map +1 -0
- package/dist/store/state.d.ts +18 -0
- package/dist/store/state.d.ts.map +1 -0
- package/dist/store/state.js +19 -0
- package/dist/store/state.js.map +1 -0
- package/dist/store/tokens.d.ts +75 -0
- package/dist/store/tokens.d.ts.map +1 -0
- package/dist/store/tokens.js +82 -0
- package/dist/store/tokens.js.map +1 -0
- package/dist/store/webmentions.d.ts +66 -0
- package/dist/store/webmentions.d.ts.map +1 -0
- package/dist/store/webmentions.js +84 -0
- package/dist/store/webmentions.js.map +1 -0
- package/dist/supervisor/control.d.ts +1 -0
- package/dist/supervisor/control.d.ts.map +1 -1
- package/dist/supervisor/control.js +10 -0
- package/dist/supervisor/control.js.map +1 -1
- package/dist/supervisor/primary.d.ts +1 -1
- package/dist/supervisor/primary.d.ts.map +1 -1
- package/dist/supervisor/primary.js +46 -14
- package/dist/supervisor/primary.js.map +1 -1
- package/dist/supervisor/worker.d.ts +6 -2
- package/dist/supervisor/worker.d.ts.map +1 -1
- package/dist/supervisor/worker.js +4 -4
- package/dist/supervisor/worker.js.map +1 -1
- package/dist/testing.d.ts +8 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +6 -0
- package/dist/testing.js.map +1 -0
- package/dist/{web → theme}/assets.d.ts +1 -32
- package/dist/theme/assets.d.ts.map +1 -0
- package/dist/{web → theme}/assets.js +2 -100
- package/dist/theme/assets.js.map +1 -0
- package/dist/theme/site-data.d.ts +187 -0
- package/dist/theme/site-data.d.ts.map +1 -0
- package/dist/theme/site-data.js +160 -0
- package/dist/theme/site-data.js.map +1 -0
- package/dist/{web → theme}/templates.d.ts +2 -0
- package/dist/theme/templates.d.ts.map +1 -0
- package/dist/{web → theme}/templates.js +9 -32
- package/dist/theme/templates.js.map +1 -0
- package/dist/{web → theme}/themes.d.ts +1 -0
- package/dist/theme/themes.d.ts.map +1 -0
- package/dist/{web → theme}/themes.js +6 -3
- package/dist/theme/themes.js.map +1 -0
- package/dist/util/client-id.d.ts.map +1 -0
- package/dist/util/client-id.js.map +1 -0
- package/dist/util/clock.d.ts +9 -0
- package/dist/util/clock.d.ts.map +1 -0
- package/dist/util/clock.js +2 -0
- package/dist/util/clock.js.map +1 -0
- package/dist/util/errors.d.ts +3 -0
- package/dist/util/errors.d.ts.map +1 -0
- package/dist/util/errors.js +5 -0
- package/dist/util/errors.js.map +1 -0
- package/dist/util/files.d.ts +5 -0
- package/dist/util/files.d.ts.map +1 -0
- package/dist/util/files.js +38 -0
- package/dist/util/files.js.map +1 -0
- package/dist/util/forms.d.ts +5 -0
- package/dist/util/forms.d.ts.map +1 -0
- package/dist/util/forms.js +17 -0
- package/dist/util/forms.js.map +1 -0
- package/dist/util/guards.d.ts +4 -0
- package/dist/util/guards.d.ts.map +1 -0
- package/dist/util/guards.js +12 -0
- package/dist/util/guards.js.map +1 -0
- package/dist/{webmention/html.d.ts → util/html-tree.d.ts} +2 -2
- package/dist/util/html-tree.d.ts.map +1 -0
- package/dist/{webmention/html.js → util/html-tree.js} +3 -64
- package/dist/util/html-tree.js.map +1 -0
- package/dist/util/html.d.ts +4 -0
- package/dist/util/html.d.ts.map +1 -0
- package/dist/util/html.js +34 -0
- package/dist/util/html.js.map +1 -0
- package/dist/util/public-address.d.ts.map +1 -0
- package/dist/util/public-address.js.map +1 -0
- package/dist/util/queue.d.ts +7 -0
- package/dist/util/queue.d.ts.map +1 -0
- package/dist/util/queue.js +23 -0
- package/dist/util/queue.js.map +1 -0
- package/dist/util/retry.d.ts +11 -0
- package/dist/util/retry.d.ts.map +1 -0
- package/dist/util/retry.js +14 -0
- package/dist/util/retry.js.map +1 -0
- package/dist/util/url.d.ts +11 -0
- package/dist/util/url.d.ts.map +1 -0
- package/dist/util/url.js +20 -0
- package/dist/util/url.js.map +1 -0
- package/dist/web/absolute-urls.js +1 -1
- package/dist/web/absolute-urls.js.map +1 -1
- package/dist/web/archive.js +2 -2
- package/dist/web/archive.js.map +1 -1
- package/dist/web/asset-routes.d.ts +52 -0
- package/dist/web/asset-routes.d.ts.map +1 -0
- package/dist/web/asset-routes.js +115 -0
- package/dist/web/asset-routes.js.map +1 -0
- package/dist/{avatars/routes.d.ts → web/avatar-routes.d.ts} +2 -2
- package/dist/web/avatar-routes.d.ts.map +1 -0
- package/dist/{avatars/routes.js → web/avatar-routes.js} +3 -3
- package/dist/web/avatar-routes.js.map +1 -0
- package/dist/web/comment-routes.d.ts +18 -0
- package/dist/web/comment-routes.d.ts.map +1 -0
- package/dist/web/comment-routes.js +177 -0
- package/dist/web/comment-routes.js.map +1 -0
- package/dist/web/compression.d.ts.map +1 -1
- package/dist/web/compression.js +1 -2
- package/dist/web/compression.js.map +1 -1
- package/dist/{contact/routes.d.ts → web/contact-routes.d.ts} +2 -2
- package/dist/web/contact-routes.d.ts.map +1 -0
- package/dist/{contact/routes.js → web/contact-routes.js} +15 -18
- package/dist/web/contact-routes.js.map +1 -0
- package/dist/web/context.d.ts +6 -187
- package/dist/web/context.d.ts.map +1 -1
- package/dist/web/context.js +13 -174
- package/dist/web/context.js.map +1 -1
- package/dist/web/conversation.d.ts +6 -357
- package/dist/web/conversation.d.ts.map +1 -1
- package/dist/web/conversation.js +177 -151
- package/dist/web/conversation.js.map +1 -1
- package/dist/web/document-page.d.ts +13 -0
- package/dist/web/document-page.d.ts.map +1 -0
- package/dist/web/document-page.js +137 -0
- package/dist/web/document-page.js.map +1 -0
- package/dist/web/document-site.d.ts +14 -0
- package/dist/web/document-site.d.ts.map +1 -0
- package/dist/web/document-site.js +29 -0
- package/dist/web/document-site.js.map +1 -0
- package/dist/web/embed.d.ts +13 -0
- package/dist/web/embed.d.ts.map +1 -0
- package/dist/web/embed.js +66 -0
- package/dist/web/embed.js.map +1 -0
- package/dist/{env.d.ts → web/env.d.ts} +36 -26
- package/dist/web/env.d.ts.map +1 -0
- package/dist/web/env.js.map +1 -0
- package/dist/web/federation-routes.d.ts +33 -0
- package/dist/web/federation-routes.d.ts.map +1 -0
- package/dist/web/federation-routes.js +282 -0
- package/dist/web/federation-routes.js.map +1 -0
- package/dist/web/feed-atom.d.ts.map +1 -1
- package/dist/web/feed-atom.js +4 -3
- package/dist/web/feed-atom.js.map +1 -1
- package/dist/web/feed-item.d.ts +4 -39
- package/dist/web/feed-item.d.ts.map +1 -1
- package/dist/web/feed-item.js +9 -73
- package/dist/web/feed-item.js.map +1 -1
- package/dist/web/feed-json.js +2 -2
- package/dist/web/feed-json.js.map +1 -1
- package/dist/web/feed-routes.d.ts +35 -0
- package/dist/web/feed-routes.d.ts.map +1 -0
- package/dist/web/feed-routes.js +126 -0
- package/dist/web/feed-routes.js.map +1 -0
- package/dist/web/feed-rss.d.ts.map +1 -1
- package/dist/web/feed-rss.js +9 -6
- package/dist/web/feed-rss.js.map +1 -1
- package/dist/web/feed-source.d.ts +11 -41
- package/dist/web/feed-source.d.ts.map +1 -1
- package/dist/web/feed-source.js +11 -48
- package/dist/web/feed-source.js.map +1 -1
- package/dist/web/feeds.d.ts +4 -2
- package/dist/web/feeds.d.ts.map +1 -1
- package/dist/web/feeds.js +8 -5
- package/dist/web/feeds.js.map +1 -1
- package/dist/web/health.d.ts +1 -1
- package/dist/web/health.d.ts.map +1 -1
- package/dist/web/health.js +1 -1
- package/dist/web/health.js.map +1 -1
- package/dist/web/index.d.ts +53 -29
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +37 -18
- package/dist/web/index.js.map +1 -1
- package/dist/{indieauth/activity-log.d.ts → web/indieauth-activity-log.d.ts} +3 -5
- package/dist/web/indieauth-activity-log.d.ts.map +1 -0
- package/dist/{indieauth/activity-log.js → web/indieauth-activity-log.js} +7 -10
- package/dist/web/indieauth-activity-log.js.map +1 -0
- package/dist/{indieauth/bearer.d.ts → web/indieauth-bearer.d.ts} +5 -5
- package/dist/web/indieauth-bearer.d.ts.map +1 -0
- package/dist/{indieauth/bearer.js → web/indieauth-bearer.js} +5 -5
- package/dist/web/indieauth-bearer.js.map +1 -0
- package/dist/{indieauth/discovery.d.ts → web/indieauth-discovery.d.ts} +2 -11
- package/dist/web/indieauth-discovery.d.ts.map +1 -0
- package/dist/{indieauth/discovery.js → web/indieauth-discovery.js} +7 -17
- package/dist/web/indieauth-discovery.js.map +1 -0
- package/dist/{indieauth/token.d.ts → web/indieauth-token.d.ts} +2 -2
- package/dist/web/indieauth-token.d.ts.map +1 -0
- package/dist/{indieauth/token.js → web/indieauth-token.js} +9 -9
- package/dist/web/indieauth-token.js.map +1 -0
- package/dist/web/listing-pages.d.ts +19 -0
- package/dist/web/listing-pages.d.ts.map +1 -0
- package/dist/web/listing-pages.js +147 -0
- package/dist/web/listing-pages.js.map +1 -0
- package/dist/web/listing-subject.d.ts +58 -0
- package/dist/web/listing-subject.d.ts.map +1 -0
- package/dist/web/listing-subject.js +89 -0
- package/dist/web/listing-subject.js.map +1 -0
- package/dist/web/llms.d.ts +16 -15
- package/dist/web/llms.d.ts.map +1 -1
- package/dist/web/llms.js +23 -35
- package/dist/web/llms.js.map +1 -1
- package/dist/web/maintenance.d.ts +1 -1
- package/dist/web/maintenance.d.ts.map +1 -1
- package/dist/web/maintenance.js +10 -16
- package/dist/web/maintenance.js.map +1 -1
- package/dist/web/manifest.d.ts +1 -1
- package/dist/web/manifest.d.ts.map +1 -1
- package/dist/web/manifest.js +2 -1
- package/dist/web/manifest.js.map +1 -1
- package/dist/web/markdown-page.d.ts +76 -0
- package/dist/web/markdown-page.d.ts.map +1 -0
- package/dist/web/markdown-page.js +79 -0
- package/dist/web/markdown-page.js.map +1 -0
- package/dist/web/markdown-representation.d.ts +15 -0
- package/dist/web/markdown-representation.d.ts.map +1 -0
- package/dist/web/markdown-representation.js +130 -0
- package/dist/web/markdown-representation.js.map +1 -0
- package/dist/web/negotiate.d.ts +5 -12
- package/dist/web/negotiate.d.ts.map +1 -1
- package/dist/web/negotiate.js +11 -18
- package/dist/web/negotiate.js.map +1 -1
- package/dist/{notifications/routes.d.ts → web/notification-routes.d.ts} +2 -2
- package/dist/web/notification-routes.d.ts.map +1 -0
- package/dist/{notifications/routes.js → web/notification-routes.js} +24 -29
- package/dist/web/notification-routes.js.map +1 -0
- package/dist/web/oembed.d.ts +2 -2
- package/dist/web/oembed.d.ts.map +1 -1
- package/dist/web/oembed.js +5 -4
- package/dist/web/oembed.js.map +1 -1
- package/dist/web/opensearch.d.ts.map +1 -1
- package/dist/web/opensearch.js +2 -1
- package/dist/web/opensearch.js.map +1 -1
- package/dist/web/page-sources.d.ts +14 -0
- package/dist/web/page-sources.d.ts.map +1 -0
- package/dist/web/page-sources.js +43 -0
- package/dist/web/page-sources.js.map +1 -0
- package/dist/web/pagination.d.ts +1 -0
- package/dist/web/pagination.d.ts.map +1 -1
- package/dist/web/pagination.js +4 -1
- package/dist/web/pagination.js.map +1 -1
- package/dist/web/paths.d.ts +52 -0
- package/dist/web/paths.d.ts.map +1 -0
- package/dist/web/paths.js +208 -0
- package/dist/web/paths.js.map +1 -0
- package/dist/web/pingback-routes.d.ts +5 -0
- package/dist/web/pingback-routes.d.ts.map +1 -0
- package/dist/web/pingback-routes.js +100 -0
- package/dist/web/pingback-routes.js.map +1 -0
- package/dist/{plugins/federation.d.ts → web/plugin-federation.d.ts} +3 -3
- package/dist/web/plugin-federation.d.ts.map +1 -0
- package/dist/{plugins/federation.js → web/plugin-federation.js} +55 -45
- package/dist/web/plugin-federation.js.map +1 -0
- package/dist/{plugins/mount.d.ts → web/plugin-routes.d.ts} +3 -3
- package/dist/web/plugin-routes.d.ts.map +1 -0
- package/dist/{plugins/mount.js → web/plugin-routes.js} +2 -2
- package/dist/web/plugin-routes.js.map +1 -0
- package/dist/web/redirects.d.ts +1 -84
- package/dist/web/redirects.d.ts.map +1 -1
- package/dist/web/redirects.js +0 -232
- package/dist/web/redirects.js.map +1 -1
- package/dist/web/render.d.ts +55 -12
- package/dist/web/render.d.ts.map +1 -1
- package/dist/web/render.js +123 -65
- package/dist/web/render.js.map +1 -1
- package/dist/web/request.d.ts +44 -0
- package/dist/web/request.d.ts.map +1 -0
- package/dist/web/request.js +82 -0
- package/dist/web/request.js.map +1 -0
- package/dist/web/robots.d.ts +1 -46
- package/dist/web/robots.d.ts.map +1 -1
- package/dist/web/robots.js +5 -131
- package/dist/web/robots.js.map +1 -1
- package/dist/web/routes.d.ts +5 -39
- package/dist/web/routes.d.ts.map +1 -1
- package/dist/web/routes.js +102 -1374
- package/dist/web/routes.js.map +1 -1
- package/dist/web/search.d.ts.map +1 -1
- package/dist/web/search.js +2 -9
- package/dist/web/search.js.map +1 -1
- package/dist/{admin → web}/session.d.ts +1 -5
- package/dist/web/session.d.ts.map +1 -0
- package/dist/{admin → web}/session.js +0 -4
- package/dist/web/session.js.map +1 -0
- package/dist/web/share-image.d.ts.map +1 -1
- package/dist/web/share-image.js +3 -2
- package/dist/web/share-image.js.map +1 -1
- package/dist/web/signed-in.d.ts +27 -0
- package/dist/web/signed-in.d.ts.map +1 -0
- package/dist/web/signed-in.js +45 -0
- package/dist/web/signed-in.js.map +1 -0
- package/dist/web/site-index.d.ts +13 -0
- package/dist/web/site-index.d.ts.map +1 -0
- package/dist/web/site-index.js +142 -0
- package/dist/web/site-index.js.map +1 -0
- package/dist/web/site-view.d.ts +43 -0
- package/dist/web/site-view.d.ts.map +1 -0
- package/dist/web/site-view.js +65 -0
- package/dist/web/site-view.js.map +1 -0
- package/dist/web/sitemap.d.ts.map +1 -1
- package/dist/web/sitemap.js +5 -7
- package/dist/web/sitemap.js.map +1 -1
- package/dist/{admin → web}/throttle.d.ts +3 -4
- package/dist/web/throttle.d.ts.map +1 -0
- package/dist/{admin → web}/throttle.js +1 -2
- package/dist/web/throttle.js.map +1 -0
- package/dist/web/webmention-routes.d.ts +11 -0
- package/dist/web/webmention-routes.d.ts.map +1 -0
- package/dist/web/webmention-routes.js +51 -0
- package/dist/web/webmention-routes.js.map +1 -0
- package/dist/web/well-known.d.ts +2 -2
- package/dist/web/well-known.d.ts.map +1 -1
- package/dist/web/well-known.js +10 -20
- package/dist/web/well-known.js.map +1 -1
- package/dist/webmention/cited-picture.d.ts +1 -2
- package/dist/webmention/cited-picture.d.ts.map +1 -1
- package/dist/webmention/cited-picture.js +5 -7
- package/dist/webmention/cited-picture.js.map +1 -1
- package/dist/webmention/discovery.d.ts +2 -13
- package/dist/webmention/discovery.d.ts.map +1 -1
- package/dist/webmention/discovery.js +18 -73
- package/dist/webmention/discovery.js.map +1 -1
- package/dist/webmention/endpoint.d.ts +27 -0
- package/dist/webmention/endpoint.d.ts.map +1 -0
- package/dist/webmention/endpoint.js +26 -0
- package/dist/webmention/endpoint.js.map +1 -0
- package/dist/webmention/fetch-public.d.ts +18 -1
- package/dist/webmention/fetch-public.d.ts.map +1 -1
- package/dist/webmention/fetch-public.js +57 -23
- package/dist/webmention/fetch-public.js.map +1 -1
- package/dist/webmention/index.d.ts +11 -9
- package/dist/webmention/index.d.ts.map +1 -1
- package/dist/webmention/index.js +7 -6
- package/dist/webmention/index.js.map +1 -1
- package/dist/webmention/links.d.ts +0 -55
- package/dist/webmention/links.d.ts.map +1 -1
- package/dist/webmention/links.js +2 -185
- package/dist/webmention/links.js.map +1 -1
- package/dist/webmention/microformats.d.ts +1 -1
- package/dist/webmention/microformats.d.ts.map +1 -1
- package/dist/webmention/microformats.js +1 -1
- package/dist/webmention/microformats.js.map +1 -1
- package/dist/webmention/pingback.d.ts +13 -12
- package/dist/webmention/pingback.d.ts.map +1 -1
- package/dist/webmention/pingback.js +6 -113
- package/dist/webmention/pingback.js.map +1 -1
- package/dist/webmention/receive.d.ts +9 -4
- package/dist/webmention/receive.d.ts.map +1 -1
- package/dist/webmention/receive.js +35 -41
- package/dist/webmention/receive.js.map +1 -1
- package/dist/webmention/reply-context/fediverse.d.ts +29 -0
- package/dist/webmention/reply-context/fediverse.d.ts.map +1 -0
- package/dist/webmention/reply-context/fediverse.js +59 -0
- package/dist/webmention/reply-context/fediverse.js.map +1 -0
- package/dist/webmention/reply-context/json-ld.d.ts +5 -0
- package/dist/webmention/reply-context/json-ld.d.ts.map +1 -0
- package/dist/webmention/reply-context/json-ld.js +78 -0
- package/dist/webmention/reply-context/json-ld.js.map +1 -0
- package/dist/webmention/reply-context/oembed.d.ts +21 -0
- package/dist/webmention/reply-context/oembed.d.ts.map +1 -0
- package/dist/webmention/reply-context/oembed.js +137 -0
- package/dist/webmention/reply-context/oembed.js.map +1 -0
- package/dist/webmention/reply-context/page.d.ts +30 -0
- package/dist/webmention/reply-context/page.d.ts.map +1 -0
- package/dist/webmention/reply-context/page.js +134 -0
- package/dist/webmention/reply-context/page.js.map +1 -0
- package/dist/webmention/reply-context/source.d.ts +29 -0
- package/dist/webmention/reply-context/source.d.ts.map +1 -0
- package/dist/webmention/reply-context/source.js +46 -0
- package/dist/webmention/reply-context/source.js.map +1 -0
- package/dist/webmention/reply-context.d.ts +5 -34
- package/dist/webmention/reply-context.d.ts.map +1 -1
- package/dist/webmention/reply-context.js +9 -432
- package/dist/webmention/reply-context.js.map +1 -1
- package/dist/webmention/reply-contexts.d.ts +17 -6
- package/dist/webmention/reply-contexts.d.ts.map +1 -1
- package/dist/webmention/reply-contexts.js +19 -20
- package/dist/webmention/reply-contexts.js.map +1 -1
- package/dist/webmention/routes.d.ts +1 -1
- package/dist/webmention/routes.d.ts.map +1 -1
- package/dist/webmention/routes.js +5 -8
- package/dist/webmention/routes.js.map +1 -1
- package/dist/webmention/service.d.ts +9 -7
- package/dist/webmention/service.d.ts.map +1 -1
- package/dist/webmention/service.js +111 -110
- package/dist/webmention/service.js.map +1 -1
- package/dist/webmention/syndication.d.ts +3 -26
- package/dist/webmention/syndication.d.ts.map +1 -1
- package/dist/webmention/syndication.js +6 -20
- package/dist/webmention/syndication.js.map +1 -1
- package/package.json +17 -11
- package/themes/default/README.md +36 -2339
- package/themes/default/layouts/base.njk +5 -4
- package/themes/default/layouts/front-page.njk +4 -3
- package/themes/default/layouts/page.njk +2 -0
- package/themes/default/partials/comment-form.njk +1 -1
- package/themes/default/partials/contact-form.njk +1 -2
- package/themes/default/partials/conversation.njk +1 -2
- package/themes/default/partials/markdown-footer.md.njk +24 -0
- package/themes/default/partials/markdown-header.md.njk +31 -0
- package/themes/default/partials/post-list.njk +11 -11
- package/themes/default/src/style.css +18 -6
- package/themes/default/static/style.css +19 -0
- package/dist/admin/accounts.d.ts.map +0 -1
- package/dist/admin/accounts.js.map +0 -1
- package/dist/admin/admin-theme.d.ts.map +0 -1
- package/dist/admin/admin-theme.js.map +0 -1
- package/dist/admin/enclosure-field.d.ts.map +0 -1
- package/dist/admin/enclosure-field.js.map +0 -1
- package/dist/admin/event-field.d.ts.map +0 -1
- package/dist/admin/event-field.js.map +0 -1
- package/dist/admin/location-field.d.ts +0 -27
- package/dist/admin/location-field.d.ts.map +0 -1
- package/dist/admin/location-field.js.map +0 -1
- package/dist/admin/passwords.d.ts.map +0 -1
- package/dist/admin/passwords.js.map +0 -1
- package/dist/admin/photo-field.d.ts +0 -38
- package/dist/admin/photo-field.d.ts.map +0 -1
- package/dist/admin/photo-field.js.map +0 -1
- package/dist/admin/read-field.d.ts +0 -22
- package/dist/admin/read-field.d.ts.map +0 -1
- package/dist/admin/read-field.js +0 -61
- package/dist/admin/read-field.js.map +0 -1
- package/dist/admin/session.d.ts.map +0 -1
- package/dist/admin/session.js.map +0 -1
- package/dist/admin/store.d.ts +0 -1025
- package/dist/admin/store.d.ts.map +0 -1
- package/dist/admin/store.js +0 -1628
- package/dist/admin/store.js.map +0 -1
- package/dist/admin/throttle.d.ts.map +0 -1
- package/dist/admin/throttle.js.map +0 -1
- package/dist/avatars/routes.d.ts.map +0 -1
- package/dist/avatars/routes.js.map +0 -1
- package/dist/contact/routes.d.ts.map +0 -1
- package/dist/contact/routes.js.map +0 -1
- package/dist/env.d.ts.map +0 -1
- package/dist/env.js.map +0 -1
- package/dist/federation/replies.d.ts.map +0 -1
- package/dist/federation/replies.js.map +0 -1
- package/dist/images/alt-text.d.ts.map +0 -1
- package/dist/images/alt-text.js.map +0 -1
- package/dist/indieauth/activity-log.d.ts.map +0 -1
- package/dist/indieauth/activity-log.js.map +0 -1
- package/dist/indieauth/app-activity.d.ts.map +0 -1
- package/dist/indieauth/app-activity.js.map +0 -1
- package/dist/indieauth/bearer.d.ts.map +0 -1
- package/dist/indieauth/bearer.js.map +0 -1
- package/dist/indieauth/client-id.d.ts.map +0 -1
- package/dist/indieauth/client-id.js.map +0 -1
- package/dist/indieauth/connected-apps.d.ts.map +0 -1
- package/dist/indieauth/connected-apps.js.map +0 -1
- package/dist/indieauth/consent.d.ts.map +0 -1
- package/dist/indieauth/consent.js.map +0 -1
- package/dist/indieauth/discovery.d.ts.map +0 -1
- package/dist/indieauth/discovery.js.map +0 -1
- package/dist/indieauth/token.d.ts.map +0 -1
- package/dist/indieauth/token.js.map +0 -1
- package/dist/mail/service.d.ts.map +0 -1
- package/dist/mail/service.js.map +0 -1
- package/dist/mail/templates.d.ts.map +0 -1
- package/dist/mail/templates.js.map +0 -1
- package/dist/notifications/preferences.d.ts.map +0 -1
- package/dist/notifications/preferences.js.map +0 -1
- package/dist/notifications/routes.d.ts.map +0 -1
- package/dist/notifications/routes.js.map +0 -1
- package/dist/plugins/federation.d.ts.map +0 -1
- package/dist/plugins/federation.js.map +0 -1
- package/dist/plugins/mount.d.ts.map +0 -1
- package/dist/plugins/mount.js.map +0 -1
- package/dist/privacy/policy.d.ts.map +0 -1
- package/dist/privacy/policy.js.map +0 -1
- package/dist/web/admin-bar.d.ts.map +0 -1
- package/dist/web/admin-bar.js.map +0 -1
- package/dist/web/assets.d.ts.map +0 -1
- package/dist/web/assets.js.map +0 -1
- package/dist/web/authors.d.ts.map +0 -1
- package/dist/web/authors.js +0 -211
- package/dist/web/authors.js.map +0 -1
- package/dist/web/documents.d.ts +0 -81
- package/dist/web/documents.d.ts.map +0 -1
- package/dist/web/documents.js.map +0 -1
- package/dist/web/errors.d.ts.map +0 -1
- package/dist/web/errors.js.map +0 -1
- package/dist/web/guids.d.ts.map +0 -1
- package/dist/web/guids.js.map +0 -1
- package/dist/web/indexnow.d.ts.map +0 -1
- package/dist/web/indexnow.js.map +0 -1
- package/dist/web/license.d.ts.map +0 -1
- package/dist/web/license.js.map +0 -1
- package/dist/web/locale.d.ts.map +0 -1
- package/dist/web/locale.js.map +0 -1
- package/dist/web/navigation.d.ts.map +0 -1
- package/dist/web/navigation.js.map +0 -1
- package/dist/web/recent.d.ts +0 -43
- package/dist/web/recent.d.ts.map +0 -1
- package/dist/web/recent.js +0 -37
- package/dist/web/recent.js.map +0 -1
- package/dist/web/sanitize.d.ts +0 -29
- package/dist/web/sanitize.d.ts.map +0 -1
- package/dist/web/sanitize.js.map +0 -1
- package/dist/web/taxonomy.d.ts.map +0 -1
- package/dist/web/taxonomy.js.map +0 -1
- package/dist/web/templates.d.ts.map +0 -1
- package/dist/web/templates.js.map +0 -1
- package/dist/web/themes.d.ts.map +0 -1
- package/dist/web/themes.js.map +0 -1
- package/dist/webmention/html.d.ts.map +0 -1
- package/dist/webmention/html.js.map +0 -1
- package/dist/webmention/public-address.d.ts.map +0 -1
- package/dist/webmention/public-address.js.map +0 -1
- /package/dist/{web → content}/license.d.ts +0 -0
- /package/dist/{web → content}/license.js +0 -0
- /package/dist/{admin → site}/admin-theme.d.ts +0 -0
- /package/dist/{admin → site}/admin-theme.js +0 -0
- /package/dist/{admin → site}/passwords.d.ts +0 -0
- /package/dist/{admin → site}/passwords.js +0 -0
- /package/dist/{indieauth → util}/client-id.d.ts +0 -0
- /package/dist/{indieauth → util}/client-id.js +0 -0
- /package/dist/{webmention → util}/public-address.d.ts +0 -0
- /package/dist/{webmention → util}/public-address.js +0 -0
- /package/dist/{env.js → web/env.js} +0 -0
package/dist/cli.js
CHANGED
|
@@ -1,121 +1,282 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
3
|
-
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
4
|
-
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
5
|
-
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
return path;
|
|
9
|
-
};
|
|
10
2
|
import cluster from 'node:cluster';
|
|
11
3
|
import { existsSync, realpathSync } from 'node:fs';
|
|
12
|
-
import { createRequire } from 'node:module';
|
|
13
4
|
import path from 'node:path';
|
|
14
5
|
import { createInterface } from 'node:readline';
|
|
15
6
|
import { DatabaseSync } from 'node:sqlite';
|
|
16
7
|
import { Writable } from 'node:stream';
|
|
17
8
|
import { pathToFileURL } from 'node:url';
|
|
18
|
-
import { createUser, DuplicateUsernameError, migrateUsersToFile } from './admin/accounts.js';
|
|
19
9
|
import { credentialProblem, emailProblem } from './admin/credentials.js';
|
|
20
|
-
import {
|
|
10
|
+
import { migrateUsersToFile } from './admin/legacy-migrations.js';
|
|
11
|
+
import { adminStoreOwning, openAdminDatabase } from './store/admin-store.js';
|
|
21
12
|
import { databaseFile, discardDatabase } from './cache.js';
|
|
13
|
+
import { CONTENT_SCRATCH_FILES, dataPath } from './files/data-files.js';
|
|
14
|
+
import { compactTime, exportFileName, planSiteExport, writeSiteExport, } from './export/site-export.js';
|
|
15
|
+
import { checkImportTargets, discardStaging, finishSiteImport, importNotes, installArchivedPlugins, placeSiteImport, pluginFailureLine, readSiteManifest, restoreEnabledPlugins, stageSiteImport, } from './export/site-import.js';
|
|
16
|
+
import { CONFIG_FILENAMES, loadConfig, loadResolvedConfig } from './config-loader.js';
|
|
22
17
|
import { resolveConfig } from './config.js';
|
|
23
|
-
import { migrateCommentEmails, migrateCommentKeys } from './comments/
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
18
|
+
import { migrateCommentEmails, migrateCommentKeys } from './comments/migrations.js';
|
|
19
|
+
import { STRIP_METADATA_JOB } from './content/metadata/strip-job.js';
|
|
20
|
+
import { RESEND_JOB } from './federation/resend-job.js';
|
|
21
|
+
import { createUser, DuplicateUsernameError } from './site/users.js';
|
|
22
|
+
import { createCms, settleConfig } from './index.js';
|
|
27
23
|
import { initSite, ownManifest, seedStarterContent } from './init.js';
|
|
24
|
+
import { finishedResult } from './jobs/types.js';
|
|
28
25
|
import { importPluginFolders, scanPluginFolders } from './plugins/folder.js';
|
|
29
26
|
import { ADD_WITH_COMMAND, addPlugin, installedFolders, parsePackageSpec, pluginRegistry, removePlugin, requirementNotes, } from './plugins/install.js';
|
|
30
27
|
import { describeUpgrade, upgradePlugins } from './plugins/upgrade.js';
|
|
28
|
+
import { migratePluginSettings } from './plugins/migrate-settings.js';
|
|
29
|
+
import { siteDataFiles } from './plugins/data.js';
|
|
30
|
+
import { readEnabledPlugins } from './plugins/enabled.js';
|
|
31
31
|
import { pluginSite, sitePluginRegistry } from './plugins/site.js';
|
|
32
|
-
import { askToReload } from './supervisor/control.js';
|
|
32
|
+
import { askToReload, isServing } from './supervisor/control.js';
|
|
33
33
|
import { superviseCluster } from './supervisor/primary.js';
|
|
34
34
|
import { processChannel, superviseWorker } from './supervisor/worker.js';
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
35
|
+
import { DEV_MODE, DEV_MODE_LATCHED } from './settings/dev-mode.js';
|
|
36
|
+
import { MAINTENANCE, MAINTENANCE_FILE } from './settings/maintenance.js';
|
|
37
|
+
import { overridden, sourceLabel } from './settings/registry.js';
|
|
38
|
+
import { createSettings } from './site/namespace.js';
|
|
39
|
+
import { messageOf } from './util/errors.js';
|
|
40
|
+
const COMMANDS = {
|
|
41
|
+
serve: {
|
|
42
|
+
synopsis: ['[serve] [--config <file>]'],
|
|
43
|
+
help: [['serve', ['Start the CMS (the default when no command is given).']]],
|
|
44
|
+
run: serveCommand,
|
|
45
|
+
},
|
|
46
|
+
init: {
|
|
47
|
+
synopsis: ['init <directory>'],
|
|
48
|
+
help: [['init', ['Create a new site in <directory>.']]],
|
|
49
|
+
run: initCommand,
|
|
50
|
+
},
|
|
51
|
+
sync: {
|
|
52
|
+
synopsis: ['sync [--config <file>]'],
|
|
53
|
+
help: [['sync', ['Rebuild the content index once and exit.']]],
|
|
54
|
+
run: syncCommand,
|
|
55
|
+
},
|
|
56
|
+
rebuild: {
|
|
57
|
+
synopsis: ['rebuild [--config <file>]'],
|
|
58
|
+
help: [
|
|
59
|
+
[
|
|
60
|
+
'rebuild',
|
|
61
|
+
[
|
|
62
|
+
'Delete data/geekity.db and build it again from the files.',
|
|
63
|
+
'Everything in it is derived, so this is always safe with the',
|
|
64
|
+
'site stopped; sessions and delivery outcomes start empty.',
|
|
65
|
+
],
|
|
66
|
+
],
|
|
67
|
+
],
|
|
68
|
+
run: rebuildCommand,
|
|
69
|
+
},
|
|
70
|
+
resend: {
|
|
71
|
+
synopsis: ['resend (--all | <slug>...) [--config <file>]'],
|
|
72
|
+
help: [
|
|
73
|
+
[
|
|
74
|
+
'resend',
|
|
75
|
+
[
|
|
76
|
+
'Send announced posts to every follower and relay again, as',
|
|
77
|
+
'they read now: an Update for a post still published, a',
|
|
78
|
+
'Delete for one withdrawn. --all resends every post the site',
|
|
79
|
+
'has announced; this is how posts federated before a new',
|
|
80
|
+
'federation feature (such as quote posts) pick it up.',
|
|
81
|
+
],
|
|
82
|
+
],
|
|
83
|
+
],
|
|
84
|
+
run: resendCommand,
|
|
85
|
+
},
|
|
86
|
+
maintenance: {
|
|
87
|
+
synopsis: ['maintenance (on [--until <time>] | off | status) [--config <file>]'],
|
|
88
|
+
help: [
|
|
89
|
+
[
|
|
90
|
+
'maintenance',
|
|
91
|
+
[
|
|
92
|
+
'Take the public site down on purpose, or bring it back.',
|
|
93
|
+
'While on, pages, feeds, sitemaps and inbox deliveries answer',
|
|
94
|
+
'503 with Retry-After; the admin, /healthz and signed-in',
|
|
95
|
+
'users are let through. A running site notices within a',
|
|
96
|
+
'second, with no restart.',
|
|
97
|
+
],
|
|
98
|
+
],
|
|
99
|
+
],
|
|
100
|
+
run: maintenanceCommand,
|
|
101
|
+
},
|
|
102
|
+
'dev-mode': {
|
|
103
|
+
synopsis: ['dev-mode (on | off | status) [--config <file>]'],
|
|
104
|
+
help: [
|
|
105
|
+
[
|
|
106
|
+
'dev-mode',
|
|
107
|
+
[
|
|
108
|
+
'Hold everything the site would send to the outside world',
|
|
109
|
+
'(ActivityPub deliveries and relay follows, webmentions,',
|
|
110
|
+
'rssCloud and WebSub pings, IndexNow, email) while it is',
|
|
111
|
+
'built or migrated, and record each one in',
|
|
112
|
+
'data/dev-mode.jsonl. off takes the site live: nothing held',
|
|
113
|
+
'is sent then, and the record says when it went live.',
|
|
114
|
+
],
|
|
115
|
+
],
|
|
116
|
+
],
|
|
117
|
+
run: devModeCommand,
|
|
118
|
+
},
|
|
119
|
+
settings: {
|
|
120
|
+
synopsis: [
|
|
121
|
+
'settings list [<namespace>] [--config <file>]',
|
|
122
|
+
'settings get <namespace.key> [--config <file>]',
|
|
123
|
+
'settings set <namespace.key> (<value> | --unset) [--config <file>]',
|
|
124
|
+
'settings migrate-plugins [--config <file>]',
|
|
125
|
+
],
|
|
126
|
+
help: [
|
|
127
|
+
[
|
|
128
|
+
'settings list',
|
|
129
|
+
[
|
|
130
|
+
'Print every runtime setting: its value in effect, where',
|
|
131
|
+
'that value came from (env, config, file or default) and',
|
|
132
|
+
'what it does. A secret prints as (set) or (not set).',
|
|
133
|
+
"Each running plugin's settings follow the core ones, as",
|
|
134
|
+
'@geekity/plugin-llm.default_model.',
|
|
135
|
+
],
|
|
136
|
+
],
|
|
137
|
+
['settings get', ['Print one value in effect, and what overrides it, if', 'anything.']],
|
|
138
|
+
[
|
|
139
|
+
'settings set',
|
|
140
|
+
[
|
|
141
|
+
'Store one value, or remove it with --unset so the default',
|
|
142
|
+
'applies. A setting the environment or the config overrides',
|
|
143
|
+
'is refused. A secret set here is left in the shell history.',
|
|
144
|
+
],
|
|
145
|
+
],
|
|
146
|
+
[
|
|
147
|
+
'settings migrate-plugins',
|
|
148
|
+
[
|
|
149
|
+
"Move each plugin's settings out of content/_data/site.json",
|
|
150
|
+
'into data/plugins/<name>/settings.json, keeping enabled',
|
|
151
|
+
'where it is. A server does this when it starts; run it',
|
|
152
|
+
'with the site stopped to do it first. Safe to run twice.',
|
|
153
|
+
],
|
|
154
|
+
],
|
|
155
|
+
],
|
|
156
|
+
run: settingsCommand,
|
|
157
|
+
},
|
|
158
|
+
'strip-metadata': {
|
|
159
|
+
synopsis: ['strip-metadata [--config <file>]'],
|
|
160
|
+
help: [
|
|
161
|
+
[
|
|
162
|
+
'strip-metadata',
|
|
163
|
+
[
|
|
164
|
+
'Remove location and camera metadata (EXIF, XMP, IPTC, a',
|
|
165
|
+
"video's location) from files already in content/uploads.",
|
|
166
|
+
'New uploads are stripped as they arrive; this is for the',
|
|
167
|
+
'ones from before. Safe to run again: a clean file is left',
|
|
168
|
+
'as it is.',
|
|
169
|
+
],
|
|
170
|
+
],
|
|
171
|
+
],
|
|
172
|
+
run: stripMetadataCommand,
|
|
173
|
+
},
|
|
174
|
+
export: {
|
|
175
|
+
synopsis: [
|
|
176
|
+
'export [--out <file>] [--with-credentials] [--without-content] [--list] [--config <file>]',
|
|
177
|
+
],
|
|
178
|
+
help: [
|
|
179
|
+
[
|
|
180
|
+
'export',
|
|
181
|
+
[
|
|
182
|
+
'Write the site to a .tar.gz: content/ and every file in',
|
|
183
|
+
'data/ the site cannot rebuild, with manifest.json first.',
|
|
184
|
+
'Credentials are left out unless --with-credentials is given.',
|
|
185
|
+
'It only reads, so it runs while the site serves. It prints',
|
|
186
|
+
'the deliveries waiting in the queue, which are never',
|
|
187
|
+
'exported. --list prints what each file in data/ is and',
|
|
188
|
+
'writes nothing.',
|
|
189
|
+
],
|
|
190
|
+
],
|
|
191
|
+
],
|
|
192
|
+
run: exportCommand,
|
|
193
|
+
},
|
|
194
|
+
import: {
|
|
195
|
+
synopsis: ['import <file> [--replace] [--dev-mode] [--new-base-url] [--config <file>]'],
|
|
196
|
+
help: [
|
|
197
|
+
[
|
|
198
|
+
'import',
|
|
199
|
+
[
|
|
200
|
+
'Restore a site from an archive geekity export wrote, with the',
|
|
201
|
+
'site stopped. Every file is checked against the manifest and',
|
|
202
|
+
'unpacked beside content/ and data/ before it replaces them.',
|
|
203
|
+
'Folder plugins are installed from the npm registry at the',
|
|
204
|
+
'versions the archive records, and the database is rebuilt.',
|
|
205
|
+
'It exits 1 when a plugin could not be installed, naming it',
|
|
206
|
+
'and the command to retry.',
|
|
207
|
+
],
|
|
208
|
+
],
|
|
209
|
+
],
|
|
210
|
+
sharedWithPlugins: true,
|
|
211
|
+
run: importCommand,
|
|
212
|
+
},
|
|
213
|
+
user: {
|
|
214
|
+
synopsis: ['user add <username> [--password <pw>] [--email <address>] [--config <file>]'],
|
|
215
|
+
help: [
|
|
216
|
+
[
|
|
217
|
+
'user add',
|
|
218
|
+
['Create an admin user, so a site can get its first login', 'without the setup screen.'],
|
|
219
|
+
],
|
|
220
|
+
],
|
|
221
|
+
run: userCommand,
|
|
222
|
+
},
|
|
223
|
+
plugin: {
|
|
224
|
+
synopsis: [
|
|
225
|
+
'plugin (add <package>[@version] | remove <package>) [--config <file>]',
|
|
226
|
+
'plugin upgrade [<package>...] [--check] [--config <file>]',
|
|
227
|
+
],
|
|
228
|
+
help: [
|
|
229
|
+
[
|
|
230
|
+
'plugin add',
|
|
231
|
+
[
|
|
232
|
+
"Install a plugin package's bundle from the npm registry",
|
|
233
|
+
'(npm_config_registry, or registry.npmjs.org) into the',
|
|
234
|
+
'plugins folder, GEEKITY_PLUGINS_DIR. It installs only the',
|
|
235
|
+
'package named, and names any plugin it requires that is',
|
|
236
|
+
'missing. Reload on the Plugins screen loads it.',
|
|
237
|
+
],
|
|
238
|
+
],
|
|
239
|
+
[
|
|
240
|
+
'plugin remove',
|
|
241
|
+
[
|
|
242
|
+
"Delete a plugin's folder from the plugins folder. Reload on",
|
|
243
|
+
'the Plugins screen unloads it. It refuses a plugin the site',
|
|
244
|
+
'has enabled: disable it first.',
|
|
245
|
+
],
|
|
246
|
+
],
|
|
247
|
+
[
|
|
248
|
+
'plugin upgrade',
|
|
249
|
+
[
|
|
250
|
+
'Bring each plugin in the plugins folder, or only the ones',
|
|
251
|
+
'named, up to its newest version that this core and the',
|
|
252
|
+
'other installed plugins can run, installed as plugin add',
|
|
253
|
+
'installs one. Plugins that must move together do. It says,',
|
|
254
|
+
'for each plugin, what it upgraded, or why it held a newer',
|
|
255
|
+
'version back. --check reports and installs nothing.',
|
|
256
|
+
],
|
|
257
|
+
],
|
|
258
|
+
],
|
|
259
|
+
run: pluginFolderCommand,
|
|
260
|
+
},
|
|
261
|
+
};
|
|
50
262
|
/**
|
|
51
263
|
* The options one command reads out of {@link ParsedArgs.flags}, each of which
|
|
52
264
|
* carries a value.
|
|
53
265
|
*/
|
|
54
|
-
const VALUE_FLAGS = ['until'];
|
|
266
|
+
const VALUE_FLAGS = ['until', 'out'];
|
|
55
267
|
/** The options that are simply on or off. */
|
|
56
|
-
const SWITCH_FLAGS = [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
geekity strip-metadata [--config <file>]
|
|
69
|
-
geekity user add <username> [--password <pw>] [--email <address>] [--config <file>]
|
|
70
|
-
geekity plugin (add <package>[@version] | remove <package>) [--config <file>]
|
|
71
|
-
geekity plugin upgrade [<package>...] [--check] [--config <file>]
|
|
72
|
-
|
|
73
|
-
Commands:
|
|
74
|
-
serve Start the CMS (the default when no command is given).
|
|
75
|
-
init Create a new site in <directory>.
|
|
76
|
-
sync Rebuild the content index once and exit.
|
|
77
|
-
rebuild Delete data/geekity.db and build it again from the files.
|
|
78
|
-
Everything in it is derived, so this is always safe with the
|
|
79
|
-
site stopped; sessions and delivery outcomes start empty.
|
|
80
|
-
resend Send announced posts to every follower and relay again, as
|
|
81
|
-
they read now: an Update for a post still published, a
|
|
82
|
-
Delete for one withdrawn. --all resends every post the site
|
|
83
|
-
has announced; this is how posts federated before a new
|
|
84
|
-
federation feature (such as quote posts) pick it up.
|
|
85
|
-
maintenance Take the public site down on purpose, or bring it back.
|
|
86
|
-
While on, pages, feeds, sitemaps and inbox deliveries answer
|
|
87
|
-
503 with Retry-After; the admin, /healthz and signed-in
|
|
88
|
-
users are let through. A running site notices within a
|
|
89
|
-
second, with no restart.
|
|
90
|
-
dev-mode Hold everything the site would send to the outside world
|
|
91
|
-
(ActivityPub deliveries and relay follows, webmentions,
|
|
92
|
-
rssCloud and WebSub pings, IndexNow, email) while it is
|
|
93
|
-
built or migrated, and record each one in
|
|
94
|
-
data/dev-mode.jsonl. off takes the site live: nothing held
|
|
95
|
-
is sent then, and the record says when it went live.
|
|
96
|
-
strip-metadata Remove location and camera metadata (EXIF, XMP, IPTC, a
|
|
97
|
-
video's location) from files already in content/uploads.
|
|
98
|
-
New uploads are stripped as they arrive; this is for the
|
|
99
|
-
ones from before. Safe to run again: a clean file is left
|
|
100
|
-
as it is.
|
|
101
|
-
user add Create an admin user, so a site can get its first login
|
|
102
|
-
without the setup screen.
|
|
103
|
-
plugin add Install a plugin package's bundle from the npm registry
|
|
104
|
-
(npm_config_registry, or registry.npmjs.org) into the
|
|
105
|
-
plugins folder, GEEKITY_PLUGINS_DIR. It installs only the
|
|
106
|
-
package named, and names any plugin it requires that is
|
|
107
|
-
missing. Reload on the Plugins screen loads it.
|
|
108
|
-
plugin remove Delete a plugin's folder from the plugins folder. Reload on
|
|
109
|
-
the Plugins screen unloads it. It refuses a plugin the site
|
|
110
|
-
has enabled: disable it first.
|
|
111
|
-
plugin upgrade Bring each plugin in the plugins folder, or only the ones
|
|
112
|
-
named, up to its newest version that this core and the
|
|
113
|
-
other installed plugins can run, installed as plugin add
|
|
114
|
-
installs one. Plugins that must move together do. It says,
|
|
115
|
-
for each plugin, what it upgraded, or why it held a newer
|
|
116
|
-
version back. --check reports and installs nothing.
|
|
117
|
-
|
|
118
|
-
Options:
|
|
268
|
+
const SWITCH_FLAGS = [
|
|
269
|
+
'all',
|
|
270
|
+
'check',
|
|
271
|
+
'unset',
|
|
272
|
+
'with-credentials',
|
|
273
|
+
'without-content',
|
|
274
|
+
'list',
|
|
275
|
+
'replace',
|
|
276
|
+
'dev-mode',
|
|
277
|
+
'new-base-url',
|
|
278
|
+
];
|
|
279
|
+
const OPTIONS_HELP = `Options:
|
|
119
280
|
--config <file> Config file to load. Defaults to the first of
|
|
120
281
|
${CONFIG_FILENAMES.join(', ')} found in the working directory.
|
|
121
282
|
--password <pw> The new user's password. Left off, it is asked for without
|
|
@@ -128,8 +289,24 @@ Options:
|
|
|
128
289
|
ISO 8601 time such as 2026-09-28T14:00:00Z. It is the
|
|
129
290
|
Retry-After a client is sent, and the maintenance page
|
|
130
291
|
says it.
|
|
292
|
+
--unset With settings set: remove the stored value.
|
|
131
293
|
--all With resend: every announced post rather than named ones.
|
|
132
294
|
--check With plugin upgrade: say what would change, install nothing.
|
|
295
|
+
--out <file> With export: the archive to write. Defaults to
|
|
296
|
+
geekity-<host>-<time>.tar.gz in the working directory.
|
|
297
|
+
--with-credentials
|
|
298
|
+
With export: include the API keys and logins kept in
|
|
299
|
+
data/ (mail.json, akismet.json, each plugin's secrets).
|
|
300
|
+
--without-content
|
|
301
|
+
With export: leave content/ out.
|
|
302
|
+
--list With export: print each file data/ may hold, its class
|
|
303
|
+
and what is lost without it, and write nothing.
|
|
304
|
+
--replace With import: move what content/ and data/ hold into
|
|
305
|
+
<dir>/.geekity-before-import-<time> when they hold a site.
|
|
306
|
+
--dev-mode With import: turn dev mode on, for a staging copy of a
|
|
307
|
+
live site.
|
|
308
|
+
--new-base-url With import: accept a base URL in effect that differs
|
|
309
|
+
from the one the archive was exported from.
|
|
133
310
|
-h, --help Show this help.
|
|
134
311
|
-v, --version Show the installed version.
|
|
135
312
|
|
|
@@ -247,143 +424,30 @@ export function parseArgs(argv) {
|
|
|
247
424
|
return { command: command ?? 'serve', configPath, password, email, flags, args };
|
|
248
425
|
}
|
|
249
426
|
function isCommand(value) {
|
|
250
|
-
return
|
|
251
|
-
}
|
|
252
|
-
/** Extensions that need TypeScript support in the loader. */
|
|
253
|
-
const TYPESCRIPT_EXTENSIONS = new Set(['.ts', '.mts', '.cts']);
|
|
254
|
-
/**
|
|
255
|
-
* Load a config module, returning `{}` when the site has no config file.
|
|
256
|
-
*
|
|
257
|
-
* A TypeScript config is imported directly first. That is all it takes on Node
|
|
258
|
-
* 24, which strips types without a flag, and inside this repository, where
|
|
259
|
-
* the CLI already runs under tsx. A Node started with stripping disabled — and
|
|
260
|
-
* any file carrying TypeScript syntax that stripping cannot erase — falls back to
|
|
261
|
-
* registering tsx from the *site's* own dependencies, which is where a site
|
|
262
|
-
* scaffolded by `geekity init` has it. A site with neither writes
|
|
263
|
-
* `geekity.config.js` instead; it is in the candidate list for exactly that.
|
|
264
|
-
*/
|
|
265
|
-
export async function loadConfig(cwd, configPath) {
|
|
266
|
-
const candidates = configPath === undefined
|
|
267
|
-
? CONFIG_FILENAMES.map((name) => path.resolve(cwd, name))
|
|
268
|
-
: [path.resolve(cwd, configPath)];
|
|
269
|
-
for (const candidate of candidates) {
|
|
270
|
-
const href = pathToFileURL(candidate).href;
|
|
271
|
-
let module;
|
|
272
|
-
try {
|
|
273
|
-
module = (await import(__rewriteRelativeImportExtension(href)));
|
|
274
|
-
}
|
|
275
|
-
catch (error) {
|
|
276
|
-
if (isModuleNotFound(error, candidate))
|
|
277
|
-
continue;
|
|
278
|
-
if (!needsTypeScriptLoader(error, candidate))
|
|
279
|
-
throw error;
|
|
280
|
-
await registerTypeScriptLoader(cwd, candidate);
|
|
281
|
-
module = (await import(__rewriteRelativeImportExtension(href)));
|
|
282
|
-
}
|
|
283
|
-
return module.default ?? {};
|
|
284
|
-
}
|
|
285
|
-
if (configPath !== undefined) {
|
|
286
|
-
throw new Error(`Config file not found: ${path.resolve(cwd, configPath)}`);
|
|
287
|
-
}
|
|
288
|
-
return {};
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* The site's own tsx, as the directory the package was installed into, or
|
|
292
|
-
* `undefined` when the site does not have one.
|
|
293
|
-
*
|
|
294
|
-
* Node's resolver is deliberately not asked: this has to be the tsx the *site*
|
|
295
|
-
* installed, and a resolver anchored anywhere else — or patched by a tsx that
|
|
296
|
-
* is already loaded, which is what happens inside this repository — would
|
|
297
|
-
* happily answer with somebody else's copy.
|
|
298
|
-
*/
|
|
299
|
-
export function findSiteTsx(cwd) {
|
|
300
|
-
let directory = path.resolve(cwd);
|
|
301
|
-
for (;;) {
|
|
302
|
-
const candidate = path.join(directory, 'node_modules', 'tsx');
|
|
303
|
-
if (existsSync(path.join(candidate, 'package.json')))
|
|
304
|
-
return candidate;
|
|
305
|
-
const parent = path.dirname(directory);
|
|
306
|
-
if (parent === directory)
|
|
307
|
-
return undefined;
|
|
308
|
-
directory = parent;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Teach this process to import TypeScript, using the tsx installed alongside
|
|
313
|
-
* the site.
|
|
314
|
-
*
|
|
315
|
-
* tsx is the site's rather than this package's because the CMS does not depend
|
|
316
|
-
* on it at runtime: a site that runs `server.ts` already has it, and a site
|
|
317
|
-
* that does not want it writes its config in JavaScript instead.
|
|
318
|
-
*/
|
|
319
|
-
export async function registerTypeScriptLoader(cwd, configFile) {
|
|
320
|
-
const tsx = findSiteTsx(cwd);
|
|
321
|
-
if (tsx === undefined) {
|
|
322
|
-
throw new Error(`Could not load ${configFile}: this Node cannot import TypeScript on its own and tsx is ` +
|
|
323
|
-
'not installed in this site. Either add it (pnpm add -D tsx), or write the config as ' +
|
|
324
|
-
'geekity.config.js instead.');
|
|
325
|
-
}
|
|
326
|
-
const fromTsx = createRequire(path.join(tsx, 'package.json'));
|
|
327
|
-
const api = (await import(__rewriteRelativeImportExtension(pathToFileURL(fromTsx.resolve('tsx/esm/api')).href)));
|
|
328
|
-
api.register();
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* Whether an import failed because the loader could not handle TypeScript.
|
|
332
|
-
*
|
|
333
|
-
* `ERR_UNKNOWN_FILE_EXTENSION` is Node before type stripping was on by
|
|
334
|
-
* default; `ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX` is a file using `enum` or
|
|
335
|
-
* `namespace`, which stripping refuses because erasing it is not enough.
|
|
336
|
-
*/
|
|
337
|
-
function needsTypeScriptLoader(error, candidate) {
|
|
338
|
-
if (!TYPESCRIPT_EXTENSIONS.has(path.extname(candidate).toLowerCase()))
|
|
339
|
-
return false;
|
|
340
|
-
const code = error?.code;
|
|
341
|
-
return code === 'ERR_UNKNOWN_FILE_EXTENSION' || code === 'ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX';
|
|
342
|
-
}
|
|
343
|
-
function isModuleNotFound(error, candidate) {
|
|
344
|
-
return (typeof error === 'object' &&
|
|
345
|
-
error !== null &&
|
|
346
|
-
'code' in error &&
|
|
347
|
-
error.code === 'ERR_MODULE_NOT_FOUND' &&
|
|
348
|
-
String(error.message ?? '').includes(candidate));
|
|
427
|
+
return Object.hasOwn(COMMANDS, value);
|
|
349
428
|
}
|
|
350
429
|
/** Run one command. Resolves with the exit code the process should use. */
|
|
351
430
|
async function main(argv) {
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
|
|
431
|
+
const words = leadingWords(argv);
|
|
432
|
+
const first = words[0];
|
|
433
|
+
if (first !== undefined && !argv.some(isHelpOrVersion)) {
|
|
434
|
+
if (!isCommand(first) || (await pluginExtends(first, words, configFlag(argv)))) {
|
|
435
|
+
return await pluginCommand(argv);
|
|
436
|
+
}
|
|
355
437
|
}
|
|
356
|
-
const
|
|
357
|
-
if (command === 'help') {
|
|
358
|
-
process.stdout.write(await usage(configPath));
|
|
438
|
+
const parsed = parseArgs(argv);
|
|
439
|
+
if (parsed.command === 'help') {
|
|
440
|
+
process.stdout.write(await usage(parsed.configPath));
|
|
359
441
|
return 0;
|
|
360
442
|
}
|
|
361
|
-
if (command === 'version') {
|
|
443
|
+
if (parsed.command === 'version') {
|
|
362
444
|
process.stdout.write(`${ownManifest().version}\n`);
|
|
363
445
|
return 0;
|
|
364
446
|
}
|
|
365
|
-
|
|
366
|
-
return init(args);
|
|
367
|
-
if (command === 'user')
|
|
368
|
-
return userCommand(args, configPath, password, email);
|
|
369
|
-
if (command === 'sync')
|
|
370
|
-
return syncCommand(configPath);
|
|
371
|
-
if (command === 'rebuild')
|
|
372
|
-
return rebuildCommand(configPath);
|
|
373
|
-
if (command === 'resend')
|
|
374
|
-
return resendCommand(args, configPath, flags);
|
|
375
|
-
if (command === 'maintenance')
|
|
376
|
-
return maintenanceCommand(args, configPath, flags);
|
|
377
|
-
if (command === 'dev-mode')
|
|
378
|
-
return devModeCommand(args, configPath);
|
|
379
|
-
if (command === 'strip-metadata')
|
|
380
|
-
return stripMetadataCommand(configPath);
|
|
381
|
-
if (command === 'plugin')
|
|
382
|
-
return pluginFolderCommand(args, configPath, flags);
|
|
383
|
-
return serveCommand(configPath);
|
|
447
|
+
return COMMANDS[parsed.command].run(parsed);
|
|
384
448
|
}
|
|
385
449
|
/** `geekity init <directory>`: scaffold a new site. */
|
|
386
|
-
async function
|
|
450
|
+
async function initCommand({ args }) {
|
|
387
451
|
const directory = args[0];
|
|
388
452
|
if (directory === undefined) {
|
|
389
453
|
throw new Error('geekity init <directory> needs the directory to create.');
|
|
@@ -401,64 +465,205 @@ async function init(args) {
|
|
|
401
465
|
].join('\n'));
|
|
402
466
|
return 0;
|
|
403
467
|
}
|
|
404
|
-
|
|
405
|
-
* `geekity maintenance on|off|status` (TASK-130).
|
|
406
|
-
*
|
|
407
|
-
* Only the file under `data/` is touched, so this works the same with the
|
|
408
|
-
* site running or stopped: a running site re-reads it within a second.
|
|
409
|
-
*/
|
|
410
|
-
async function maintenanceCommand(args, configPath, flags) {
|
|
468
|
+
async function maintenanceCommand({ args, configPath, flags }) {
|
|
411
469
|
const action = args[0];
|
|
412
|
-
const config =
|
|
413
|
-
const
|
|
470
|
+
const config = await loadResolvedConfig(configPath);
|
|
471
|
+
const settings = createSettings({ config });
|
|
414
472
|
if (action === 'on') {
|
|
415
473
|
const until = untilFlag(text(flags, 'until'));
|
|
416
|
-
await
|
|
474
|
+
await setOrThrow(settings, 'maintenance', { on: true, until: until?.toISOString() ?? '' });
|
|
475
|
+
const file = dataPath(config.dataDir, MAINTENANCE_FILE);
|
|
417
476
|
process.stdout.write(`Maintenance mode is on (${file}).${untilLine(until)}\n`);
|
|
418
477
|
return 0;
|
|
419
478
|
}
|
|
420
479
|
if (action === 'off') {
|
|
421
|
-
await
|
|
422
|
-
|
|
480
|
+
if (overridden((await settings.resolve(MAINTENANCE.on)).source)) {
|
|
481
|
+
throw new Error(`Maintenance mode is still on.${forcedLine(true)}`);
|
|
482
|
+
}
|
|
483
|
+
await setOrThrow(settings, 'maintenance', { on: false });
|
|
484
|
+
process.stdout.write('Maintenance mode is off.\n');
|
|
423
485
|
return 0;
|
|
424
486
|
}
|
|
425
487
|
if (action === 'status') {
|
|
426
|
-
const
|
|
427
|
-
if (
|
|
488
|
+
const on = await settings.resolve(MAINTENANCE.on);
|
|
489
|
+
if (!on.value) {
|
|
428
490
|
process.stdout.write('Maintenance mode is off.\n');
|
|
429
491
|
}
|
|
430
492
|
else {
|
|
431
|
-
|
|
493
|
+
const until = await settings.get(MAINTENANCE.until);
|
|
494
|
+
process.stdout.write(`Maintenance mode is on.${untilLine(until === '' ? undefined : new Date(until))}${forcedLine(overridden(on.source))}\n`);
|
|
432
495
|
}
|
|
433
496
|
return 0;
|
|
434
497
|
}
|
|
435
498
|
throw new Error('geekity maintenance needs on, off or status.');
|
|
436
499
|
}
|
|
437
|
-
async function devModeCommand(args, configPath) {
|
|
500
|
+
async function devModeCommand({ args, configPath }) {
|
|
438
501
|
const action = args[0];
|
|
439
|
-
const config =
|
|
502
|
+
const config = await loadResolvedConfig(configPath);
|
|
503
|
+
const settings = createSettings({ config });
|
|
440
504
|
if (action === 'on') {
|
|
441
|
-
|
|
505
|
+
await setOrThrow(settings, 'dev_mode', { on: true });
|
|
442
506
|
process.stdout.write('Dev mode is on: nothing the site does is sent until `geekity dev-mode off`.\n');
|
|
443
507
|
return 0;
|
|
444
508
|
}
|
|
445
509
|
if (action === 'off') {
|
|
446
510
|
if (config.devMode) {
|
|
447
|
-
throw new Error(
|
|
448
|
-
'Remove it, then run geekity dev-mode off again.');
|
|
511
|
+
throw new Error(`${DEV_MODE_LATCHED} Remove it, then run geekity dev-mode off again.`);
|
|
449
512
|
}
|
|
450
|
-
const wasOn =
|
|
513
|
+
const wasOn = await settings.get(DEV_MODE.on);
|
|
514
|
+
await setOrThrow(settings, 'dev_mode', { on: false });
|
|
451
515
|
process.stdout.write(wasOn
|
|
452
516
|
? 'Dev mode is off: the site is live. Nothing held while it was on will be sent.\n'
|
|
453
517
|
: 'Dev mode was already off: the site is live.\n');
|
|
454
518
|
return 0;
|
|
455
519
|
}
|
|
456
520
|
if (action === 'status') {
|
|
457
|
-
process.stdout.write(
|
|
521
|
+
process.stdout.write((await settings.get(DEV_MODE.on)) ? 'Dev mode is on.\n' : 'Dev mode is off.\n');
|
|
458
522
|
return 0;
|
|
459
523
|
}
|
|
460
524
|
throw new Error('geekity dev-mode needs on, off or status.');
|
|
461
525
|
}
|
|
526
|
+
async function settingsCommand({ args, configPath, flags }) {
|
|
527
|
+
const [action, name, value] = args;
|
|
528
|
+
const config = await loadResolvedConfig(configPath);
|
|
529
|
+
if (action === 'migrate-plugins' && name === undefined) {
|
|
530
|
+
const moved = migratePluginSettings({
|
|
531
|
+
contentDir: config.contentDir,
|
|
532
|
+
dataDir: config.dataDir,
|
|
533
|
+
log: (line) => process.stdout.write(`${line}\n`),
|
|
534
|
+
});
|
|
535
|
+
if (moved.length === 0) {
|
|
536
|
+
process.stdout.write('No plugin settings are left in content/_data/site.json.\n');
|
|
537
|
+
}
|
|
538
|
+
return 0;
|
|
539
|
+
}
|
|
540
|
+
const request = settingsRequest(action, name, value, flags['unset'] === true);
|
|
541
|
+
if (request === undefined) {
|
|
542
|
+
throw new Error('geekity settings needs list [<namespace>], get <namespace.key>, set <namespace.key> with a value or --unset, or migrate-plugins.');
|
|
543
|
+
}
|
|
544
|
+
const settings = await settingsWithRunningPlugins(config);
|
|
545
|
+
if (request.action === 'list') {
|
|
546
|
+
const refs = settings.list().filter((ref) => name === undefined || ref.namespace === name);
|
|
547
|
+
if (refs.length === 0)
|
|
548
|
+
throw new Error(`There is no settings namespace ${String(name)}.`);
|
|
549
|
+
const rows = await Promise.all(refs.map((ref) => settingRow(settings, ref)));
|
|
550
|
+
process.stdout.write(table(rows));
|
|
551
|
+
return 0;
|
|
552
|
+
}
|
|
553
|
+
const ref = settingNamed(settings, request.name);
|
|
554
|
+
if (request.action === 'get') {
|
|
555
|
+
const resolved = await settings.resolve(ref);
|
|
556
|
+
const lines = [shown(ref, resolved.value)];
|
|
557
|
+
if (overridden(resolved.source)) {
|
|
558
|
+
const held = resolved.stored === undefined ? 'nothing' : shown(ref, resolved.stored);
|
|
559
|
+
lines.push(`overridden by ${sourceLabel(resolved.source)}; the file holds ${held}`);
|
|
560
|
+
}
|
|
561
|
+
process.stdout.write(`${lines.join('\n')}\n`);
|
|
562
|
+
return 0;
|
|
563
|
+
}
|
|
564
|
+
const { type } = ref.declaration;
|
|
565
|
+
let stored;
|
|
566
|
+
if (request.value !== undefined) {
|
|
567
|
+
const parsed = type.fromText(request.value);
|
|
568
|
+
if (!parsed.ok)
|
|
569
|
+
throw new Error(`${request.name} ${parsed.problem}.`);
|
|
570
|
+
stored = type.toJson(parsed.value);
|
|
571
|
+
}
|
|
572
|
+
await setOrThrow(settings, ref.namespace, { [ref.key]: stored });
|
|
573
|
+
process.stdout.write(table([await settingRow(settings, ref)]));
|
|
574
|
+
return 0;
|
|
575
|
+
}
|
|
576
|
+
function settingsRequest(action, name, value, unset) {
|
|
577
|
+
if (action === 'list')
|
|
578
|
+
return { action };
|
|
579
|
+
if (name === undefined)
|
|
580
|
+
return undefined;
|
|
581
|
+
if (action === 'get')
|
|
582
|
+
return { action, name };
|
|
583
|
+
if (action === 'set' && (value !== undefined) !== unset)
|
|
584
|
+
return { action, name, value };
|
|
585
|
+
return undefined;
|
|
586
|
+
}
|
|
587
|
+
async function settingsWithRunningPlugins(config) {
|
|
588
|
+
migratePluginSettings({
|
|
589
|
+
contentDir: config.contentDir,
|
|
590
|
+
dataDir: config.dataDir,
|
|
591
|
+
log: (line) => process.stderr.write(`${line}\n`),
|
|
592
|
+
});
|
|
593
|
+
const settings = createSettings({ config });
|
|
594
|
+
let registry;
|
|
595
|
+
try {
|
|
596
|
+
registry = await loadSitePlugins(config, settings);
|
|
597
|
+
}
|
|
598
|
+
catch (error) {
|
|
599
|
+
process.stderr.write(`Plugin settings are not listed: ${messageOf(error)}\n`);
|
|
600
|
+
return settings;
|
|
601
|
+
}
|
|
602
|
+
const enabled = readEnabledPlugins(config.contentDir);
|
|
603
|
+
const running = registry.active(enabled);
|
|
604
|
+
for (const entry of registry.plugins) {
|
|
605
|
+
const { name } = entry.plugin;
|
|
606
|
+
const declared = entry.settingsNamespace !== undefined;
|
|
607
|
+
const unremarkable = !declared && !enabled.has(name) && entry.problem === undefined;
|
|
608
|
+
if (running.has(name) || unremarkable)
|
|
609
|
+
continue;
|
|
610
|
+
const unlisted = declared ? ' Its settings are not listed.' : '';
|
|
611
|
+
process.stderr.write(`${name} ${whyNotRunning(entry, enabled)}${unlisted}\n`);
|
|
612
|
+
if (declared)
|
|
613
|
+
settings.unregister(name);
|
|
614
|
+
}
|
|
615
|
+
return settings;
|
|
616
|
+
}
|
|
617
|
+
function whyNotRunning(entry, enabled) {
|
|
618
|
+
if (entry.problem !== undefined)
|
|
619
|
+
return `did not load: ${entry.problem}`;
|
|
620
|
+
if (enabled.has(entry.plugin.name)) {
|
|
621
|
+
return 'is enabled but not running, because a plugin it requires is not running.';
|
|
622
|
+
}
|
|
623
|
+
return 'is installed but not enabled.';
|
|
624
|
+
}
|
|
625
|
+
function settingNamed(settings, name) {
|
|
626
|
+
const dot = name.lastIndexOf('.');
|
|
627
|
+
const found = settings
|
|
628
|
+
.list()
|
|
629
|
+
.find((ref) => ref.namespace === name.slice(0, dot) && ref.key === name.slice(dot + 1));
|
|
630
|
+
if (found === undefined) {
|
|
631
|
+
throw new Error(`There is no setting ${name}. geekity settings list names them.`);
|
|
632
|
+
}
|
|
633
|
+
return found;
|
|
634
|
+
}
|
|
635
|
+
async function setOrThrow(settings, namespace, changes) {
|
|
636
|
+
const result = await settings.set(namespace, new Map(Object.entries(changes)), 'cli');
|
|
637
|
+
if (!result.ok)
|
|
638
|
+
throw new Error(Object.values(result.problems).join(' '));
|
|
639
|
+
}
|
|
640
|
+
function shown(ref, value) {
|
|
641
|
+
if (ref.declaration.secret === true) {
|
|
642
|
+
return value === ref.declaration.default ? '(not set)' : '(set)';
|
|
643
|
+
}
|
|
644
|
+
return ref.declaration.type.toText(value);
|
|
645
|
+
}
|
|
646
|
+
async function settingRow(settings, ref) {
|
|
647
|
+
const resolved = await settings.resolve(ref);
|
|
648
|
+
let source = sourceLabel(resolved.source);
|
|
649
|
+
if (overridden(resolved.source) && resolved.stored !== undefined) {
|
|
650
|
+
source += ` (file: ${shown(ref, resolved.stored)})`;
|
|
651
|
+
}
|
|
652
|
+
if (ref.declaration.env === false)
|
|
653
|
+
source += ', not overridable';
|
|
654
|
+
return [
|
|
655
|
+
`${ref.namespace}.${ref.key}`,
|
|
656
|
+
shown(ref, resolved.value),
|
|
657
|
+
source,
|
|
658
|
+
ref.declaration.description,
|
|
659
|
+
];
|
|
660
|
+
}
|
|
661
|
+
function table(rows) {
|
|
662
|
+
const widths = rows[0]?.map((_, column) => Math.max(...rows.map((row) => row[column]?.length ?? 0))) ?? [];
|
|
663
|
+
return rows
|
|
664
|
+
.map((row) => `${row.map((cell, column) => (column === row.length - 1 ? cell : cell.padEnd(widths[column] ?? 0))).join(' ')}\n`)
|
|
665
|
+
.join('');
|
|
666
|
+
}
|
|
462
667
|
function untilFlag(value) {
|
|
463
668
|
if (value === undefined)
|
|
464
669
|
return undefined;
|
|
@@ -476,28 +681,52 @@ function forcedLine(forced) {
|
|
|
476
681
|
? ' GEEKITY_MAINTENANCE or the maintenance setting keeps it on until the site restarts without it.'
|
|
477
682
|
: '';
|
|
478
683
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
process.stderr.write(
|
|
684
|
+
/**
|
|
685
|
+
* Run one job in this process and return its result, or say on standard
|
|
686
|
+
* error why there is none. A job of the same name that is already active
|
|
687
|
+
* stops it before it is queued. A queued job counts only while a server is up
|
|
688
|
+
* to run it: one a command left queued when it died runs when a server next
|
|
689
|
+
* starts, and is no reason to refuse while none is.
|
|
690
|
+
*/
|
|
691
|
+
async function runJobHere(config, job, payload, what, prepare) {
|
|
692
|
+
const cms = createCms(config);
|
|
693
|
+
let status;
|
|
694
|
+
try {
|
|
695
|
+
await prepare?.(cms);
|
|
696
|
+
const enqueued = await cms.jobs.enqueueUnlessActive(job, payload, {
|
|
697
|
+
countQueued: await isServing(config.dataDir),
|
|
698
|
+
});
|
|
699
|
+
if (!enqueued.queued) {
|
|
700
|
+
process.stderr.write(`A ${job.name} job is already ${enqueued.active.state}, so this one did not start. ` +
|
|
701
|
+
`Run the command again once it finishes.\n`);
|
|
702
|
+
return undefined;
|
|
496
703
|
}
|
|
704
|
+
status = await cms.jobs.run(enqueued.id);
|
|
705
|
+
}
|
|
706
|
+
finally {
|
|
707
|
+
await cms.close();
|
|
708
|
+
}
|
|
709
|
+
const result = finishedResult(job, status);
|
|
710
|
+
if (result === undefined) {
|
|
711
|
+
const problem = status.state === 'failed' ? status.error : `The job ended ${status.state}.`;
|
|
712
|
+
process.stderr.write(`The ${what} did not finish: ${problem}\n`);
|
|
713
|
+
}
|
|
714
|
+
return result;
|
|
715
|
+
}
|
|
716
|
+
async function stripMetadataCommand({ configPath }) {
|
|
717
|
+
const config = await loadResolvedConfig(configPath, (loaded) => ({ ...loaded, watch: false }));
|
|
718
|
+
const report = await runJobHere(config, STRIP_METADATA_JOB, null, 'sweep');
|
|
719
|
+
if (report === undefined)
|
|
720
|
+
return 1;
|
|
721
|
+
for (const file of report.stripped) {
|
|
722
|
+
process.stdout.write(`${file.path}: removed ${file.removed.join(', ')}\n`);
|
|
497
723
|
}
|
|
498
|
-
|
|
499
|
-
`${
|
|
500
|
-
|
|
724
|
+
for (const file of report.unreadable) {
|
|
725
|
+
process.stderr.write(`${file.path}: ${file.problem} Left as it was.\n`);
|
|
726
|
+
}
|
|
727
|
+
process.stdout.write(`Checked ${count(report.checked, 'file')}: ${String(report.stripped.length)} stripped, ` +
|
|
728
|
+
`${String(report.clean)} already clean, ${String(report.unreadable.length)} unreadable\n`);
|
|
729
|
+
return report.unreadable.length === 0 ? 0 : 1;
|
|
501
730
|
}
|
|
502
731
|
/**
|
|
503
732
|
* `geekity sync`: bring the index into line with the files once and stop.
|
|
@@ -505,9 +734,8 @@ async function stripMetadataCommand(configPath) {
|
|
|
505
734
|
* Watching is forced off whatever the config says, because a one-shot scan
|
|
506
735
|
* that then sat in a watcher would never exit.
|
|
507
736
|
*/
|
|
508
|
-
async function syncCommand(configPath) {
|
|
509
|
-
const
|
|
510
|
-
const cms = createCms({ ...config, watch: false });
|
|
737
|
+
async function syncCommand({ configPath }) {
|
|
738
|
+
const cms = createCms(await loadResolvedConfig(configPath, (config) => ({ ...config, watch: false })));
|
|
511
739
|
try {
|
|
512
740
|
const result = await cms.sync();
|
|
513
741
|
process.stdout.write(`Scanned ${String(result.scanned)}: ${String(result.created)} created, ` +
|
|
@@ -532,44 +760,39 @@ async function syncCommand(configPath) {
|
|
|
532
760
|
* Mastodon keeps the copy of a post it first fetched, so a property added
|
|
533
761
|
* later — the quote policy (TASK-125) is the one that made this a command —
|
|
534
762
|
* reaches a post already out only through an `Update`. This is the resend
|
|
535
|
-
* button on the federation screen, for every post at once
|
|
536
|
-
*
|
|
763
|
+
* button on the federation screen, for every post at once, and it runs the
|
|
764
|
+
* same resend job (TASK-393). Delivery runs with no queue, so each activity
|
|
765
|
+
* has been posted before the process exits.
|
|
537
766
|
*/
|
|
538
|
-
async function resendCommand(args, configPath, flags) {
|
|
767
|
+
async function resendCommand({ args, configPath, flags }) {
|
|
539
768
|
const all = flags['all'] === true;
|
|
540
769
|
if (all === args.length > 0) {
|
|
541
770
|
throw new Error('geekity resend needs either --all or the slugs of the posts to resend, and not both.');
|
|
542
771
|
}
|
|
543
|
-
const config = await
|
|
544
|
-
|
|
545
|
-
...config,
|
|
772
|
+
const config = await loadResolvedConfig(configPath, (loaded) => ({
|
|
773
|
+
...loaded,
|
|
546
774
|
watch: false,
|
|
547
|
-
federation: { ...
|
|
548
|
-
});
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
process.stdout.write(`${slug}: ${report.activityType} to ${String(reached)} of ` +
|
|
566
|
-
`${String(report.deliveries.length)} inboxes\n`);
|
|
775
|
+
federation: { ...loaded.federation, queue: null },
|
|
776
|
+
}));
|
|
777
|
+
const report = await runJobHere(config, RESEND_JOB, { slugs: all ? 'all' : args, webmentions: false }, 'resend', (cms) => cms.sync());
|
|
778
|
+
if (report === undefined)
|
|
779
|
+
return 1;
|
|
780
|
+
let failed = 0;
|
|
781
|
+
for (const post of report.posts) {
|
|
782
|
+
const activity = post.resent ? post.activity : null;
|
|
783
|
+
if (activity === null) {
|
|
784
|
+
process.stderr.write(`${post.slug}: nothing to resend, no announced post has that slug.\n`);
|
|
785
|
+
failed += 1;
|
|
786
|
+
}
|
|
787
|
+
else if (activity.heldByDevMode) {
|
|
788
|
+
process.stdout.write(`${post.slug}: ${activity.activityType} held by dev mode, nothing sent\n`);
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
process.stdout.write(`${post.slug}: ${activity.activityType} to ${String(activity.reached)} of ` +
|
|
792
|
+
`${String(activity.inboxes)} inboxes\n`);
|
|
567
793
|
}
|
|
568
|
-
return failed === 0 ? 0 : 1;
|
|
569
|
-
}
|
|
570
|
-
finally {
|
|
571
|
-
await cms.close();
|
|
572
794
|
}
|
|
795
|
+
return failed === 0 ? 0 : 1;
|
|
573
796
|
}
|
|
574
797
|
/**
|
|
575
798
|
* `geekity rebuild`: throw the database away and read it back out of the files.
|
|
@@ -590,9 +813,8 @@ async function resendCommand(args, configPath, flags) {
|
|
|
590
813
|
* Watching is forced off for the reason `sync` forces it off: a one-shot
|
|
591
814
|
* command that sat in a watcher would never exit.
|
|
592
815
|
*/
|
|
593
|
-
async function rebuildCommand(configPath) {
|
|
594
|
-
const
|
|
595
|
-
const config = resolveConfig(loaded);
|
|
816
|
+
async function rebuildCommand({ configPath }) {
|
|
817
|
+
const config = await loadResolvedConfig(configPath, (loaded) => ({ ...loaded, watch: false }));
|
|
596
818
|
const file = databaseFile(config.dataDir);
|
|
597
819
|
if (databaseInUse(config.dataDir)) {
|
|
598
820
|
process.stderr.write(`${file} is in use: something else has it open, most likely the site itself. Stop the ` +
|
|
@@ -600,11 +822,14 @@ async function rebuildCommand(configPath) {
|
|
|
600
822
|
'writing to a file nothing can find.\n');
|
|
601
823
|
return 1;
|
|
602
824
|
}
|
|
825
|
+
return (await rebuildDatabase(config)) > 0 ? 1 : 0;
|
|
826
|
+
}
|
|
827
|
+
async function rebuildDatabase(config) {
|
|
603
828
|
discardDatabase(config.dataDir);
|
|
604
|
-
const cms = createCms(
|
|
829
|
+
const cms = createCms(config);
|
|
605
830
|
try {
|
|
606
831
|
const result = await cms.sync();
|
|
607
|
-
process.stdout.write(`Rebuilt ${
|
|
832
|
+
process.stdout.write(`Rebuilt ${databaseFile(config.dataDir)} from the files.\n` +
|
|
608
833
|
`Scanned ${String(result.scanned)}: ${String(result.created)} created, ` +
|
|
609
834
|
`${String(result.updated)} updated, ${String(result.removed)} removed, ` +
|
|
610
835
|
`${String(result.unchanged)} unchanged, ${String(result.failed)} failed\n` +
|
|
@@ -615,14 +840,130 @@ async function rebuildCommand(configPath) {
|
|
|
615
840
|
process.stderr.write(`${String(result.failed)} file${result.failed === 1 ? '' : 's'} could not be parsed and ` +
|
|
616
841
|
`${result.failed === 1 ? 'was' : 'were'} left out of the index; the warnings above name ` +
|
|
617
842
|
`${result.failed === 1 ? 'it' : 'them'}.\n`);
|
|
618
|
-
return 1;
|
|
619
843
|
}
|
|
620
|
-
return
|
|
844
|
+
return result.failed;
|
|
621
845
|
}
|
|
622
846
|
finally {
|
|
623
847
|
await cms.close();
|
|
624
848
|
}
|
|
625
849
|
}
|
|
850
|
+
async function importCommand({ args, configPath, flags }) {
|
|
851
|
+
const [file, ...extra] = args;
|
|
852
|
+
if (file === undefined) {
|
|
853
|
+
throw new Error('geekity import needs one archive: geekity import <file>.');
|
|
854
|
+
}
|
|
855
|
+
if (extra.length > 0) {
|
|
856
|
+
throw new Error(`geekity import takes one archive, and no plugin on this site adds "import ${file}".`);
|
|
857
|
+
}
|
|
858
|
+
const unsettled = resolveConfig({
|
|
859
|
+
...(await loadConfig(process.cwd(), configPath)),
|
|
860
|
+
watch: false,
|
|
861
|
+
});
|
|
862
|
+
const { contentDir, dataDir } = unsettled;
|
|
863
|
+
if (databaseInUse(dataDir) || (await isServing(dataDir))) {
|
|
864
|
+
process.stderr.write(`The site is running: ${dataDir} is in use. Stop it and run geekity import again.\n`);
|
|
865
|
+
return 1;
|
|
866
|
+
}
|
|
867
|
+
const archive = path.resolve(file);
|
|
868
|
+
const targets = { contentDir, dataDir };
|
|
869
|
+
const settings = createSettings({ config: unsettled });
|
|
870
|
+
const archived = await readSiteManifest(archive);
|
|
871
|
+
const { manifest } = archived;
|
|
872
|
+
const occupied = checkImportTargets(archived, targets, settings).filter((target) => target.state === 'occupied');
|
|
873
|
+
if (occupied.length > 0 && flags['replace'] !== true) {
|
|
874
|
+
process.stderr.write(`${occupied.map((target) => target.dir).join(' and ')} already ${occupied.length === 1 ? 'holds' : 'hold'} a site. ` +
|
|
875
|
+
'Import into empty folders, or give --replace to move what they hold into <dir>/.geekity-before-import-<time> first.\n');
|
|
876
|
+
return 1;
|
|
877
|
+
}
|
|
878
|
+
const staged = await stageSiteImport({ archive, archived, targets, settings });
|
|
879
|
+
const inEffect = await settleConfig(Object.freeze({ ...unsettled, contentDir: staged.content ?? contentDir }));
|
|
880
|
+
if (inEffect.baseUrl !== manifest.baseUrl && flags['new-base-url'] !== true) {
|
|
881
|
+
await discardStaging(staged);
|
|
882
|
+
process.stderr.write(`The base URL in effect is ${inEffect.baseUrl}, and the archive was exported from ${manifest.baseUrl}. ` +
|
|
883
|
+
'Actor ids are built from the base URL, so followers would not follow the site to a new address. ' +
|
|
884
|
+
`Set GEEKITY_BASE_URL, or baseUrl in the config, to ${manifest.baseUrl}, ` +
|
|
885
|
+
`or give --new-base-url to import it at ${inEffect.baseUrl}.\n`);
|
|
886
|
+
return 1;
|
|
887
|
+
}
|
|
888
|
+
for (const skipped of staged.skipped) {
|
|
889
|
+
process.stderr.write(`Left out ${skipped.path}: ${skipped.why}.\n`);
|
|
890
|
+
}
|
|
891
|
+
for (const aside of await placeSiteImport(staged, { stamp: compactTime(unsettled.now()) })) {
|
|
892
|
+
process.stdout.write(`Moved what was there into ${aside}.\n`);
|
|
893
|
+
}
|
|
894
|
+
process.stdout.write(`Restored ${count(manifest.files.length - staged.skipped.length, 'file')} from ${archive}.\n`);
|
|
895
|
+
const config = await settleConfig(unsettled);
|
|
896
|
+
if (flags['dev-mode'] === true) {
|
|
897
|
+
await setOrThrow(createSettings({ config }), 'dev_mode', { on: true });
|
|
898
|
+
process.stdout.write('Dev mode is on: nothing the site does is sent until `geekity dev-mode off`.\n');
|
|
899
|
+
}
|
|
900
|
+
const failures = await installArchivedPlugins(manifest, {
|
|
901
|
+
pluginsDir: config.pluginsDir,
|
|
902
|
+
registry: pluginRegistry(process.env),
|
|
903
|
+
coreVersion: ownManifest().version,
|
|
904
|
+
});
|
|
905
|
+
for (const plugin of manifest.plugins) {
|
|
906
|
+
if (plugin.source === 'folder' && !failures.some((failed) => failed.name === plugin.name)) {
|
|
907
|
+
process.stdout.write(`Installed ${plugin.name} ${plugin.version}.\n`);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
await restoreEnabledPlugins(manifest, config.contentDir);
|
|
911
|
+
await rebuildDatabase(config);
|
|
912
|
+
await finishSiteImport(targets);
|
|
913
|
+
process.stdout.write(importNotes(manifest)
|
|
914
|
+
.map((note) => `${note}\n`)
|
|
915
|
+
.join(''));
|
|
916
|
+
for (const failed of failures)
|
|
917
|
+
process.stderr.write(`${pluginFailureLine(failed)}\n`);
|
|
918
|
+
return failures.length > 0 ? 1 : 0;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* It runs beside a serving site: no migration runs and no database is opened
|
|
922
|
+
* but the queue, read-only, to count what waits in it.
|
|
923
|
+
*/
|
|
924
|
+
async function exportCommand({ configPath, flags }) {
|
|
925
|
+
const config = await loadResolvedConfig(configPath, (loaded) => ({ ...loaded, watch: false }));
|
|
926
|
+
const settings = createSettings({ config });
|
|
927
|
+
const plugins = await loadSitePlugins(config, settings);
|
|
928
|
+
if (flags['list'] === true) {
|
|
929
|
+
const declarations = siteDataFiles({ dataDir: config.dataDir, settings, plugins });
|
|
930
|
+
process.stdout.write(table([
|
|
931
|
+
...declarations.map((each) => [`data/${each.pattern}`, each.dataClass.kind, each.lost]),
|
|
932
|
+
['content/**', 'kept', 'The site: its documents, uploads and _data.'],
|
|
933
|
+
...CONTENT_SCRATCH_FILES.map((each) => [
|
|
934
|
+
`content/${each.pattern}`,
|
|
935
|
+
each.dataClass.kind,
|
|
936
|
+
each.lost,
|
|
937
|
+
]),
|
|
938
|
+
]));
|
|
939
|
+
return 0;
|
|
940
|
+
}
|
|
941
|
+
const plan = await planSiteExport({ config, settings, plugins }, {
|
|
942
|
+
withCredentials: flags['with-credentials'] === true,
|
|
943
|
+
withContent: flags['without-content'] !== true,
|
|
944
|
+
});
|
|
945
|
+
const { deliveries } = plan.site.pending;
|
|
946
|
+
process.stdout.write(`${count(deliveries, 'delivery is', 'deliveries are')} waiting in data/queue.sqlite. ` +
|
|
947
|
+
'They are not exported: before a move, wait until none are.\n' +
|
|
948
|
+
'The archive holds actor keys, password hashes and personal data. ' +
|
|
949
|
+
'Store it as carefully as data/.\n');
|
|
950
|
+
const now = config.now();
|
|
951
|
+
const out = path.resolve(text(flags, 'out') ?? exportFileName(config.baseUrl, now));
|
|
952
|
+
const manifest = await writeSiteExport(plan, { out, now });
|
|
953
|
+
for (const file of manifest.undeclared) {
|
|
954
|
+
process.stderr.write(`Left out ${file}: no declaration says what it is.\n`);
|
|
955
|
+
}
|
|
956
|
+
for (const entry of manifest.notCarried) {
|
|
957
|
+
process.stderr.write(`Left out ${entry.path}: it is ${entry.why}, and an export holds only regular files.\n`);
|
|
958
|
+
}
|
|
959
|
+
if (manifest.credentialsLeftOut.length > 0) {
|
|
960
|
+
process.stdout.write(`Credentials left out: ${manifest.credentialsLeftOut.join(', ')}. ` +
|
|
961
|
+
'--with-credentials includes them.\n');
|
|
962
|
+
}
|
|
963
|
+
const bytes = manifest.files.reduce((total, file) => total + file.size, 0);
|
|
964
|
+
process.stdout.write(`Wrote ${out}: ${count(manifest.files.length, 'file')}, ${count(bytes, 'byte')}.\n`);
|
|
965
|
+
return 0;
|
|
966
|
+
}
|
|
626
967
|
/** "1 follower", "2 followers". The plural is the singular plus s unless told. */
|
|
627
968
|
/** How many comments the files hold, whatever a moderator has done with them. */
|
|
628
969
|
function totalComments(admin) {
|
|
@@ -689,10 +1030,10 @@ const SQLITE_LOCKED = 6;
|
|
|
689
1030
|
* to show and the setup screen. It happens here rather than in `createCms` so
|
|
690
1031
|
* a site that builds its own server never has content written for it.
|
|
691
1032
|
*/
|
|
692
|
-
async function serveCommand(configPath) {
|
|
1033
|
+
async function serveCommand({ configPath }) {
|
|
693
1034
|
if (cluster.isWorker)
|
|
694
1035
|
return serveWorker(configPath);
|
|
695
|
-
const resolved =
|
|
1036
|
+
const resolved = await loadResolvedConfig(configPath);
|
|
696
1037
|
if (resolved.seedContent &&
|
|
697
1038
|
(await seedStarterContent({ contentDir: resolved.contentDir, baseUrl: resolved.baseUrl }))) {
|
|
698
1039
|
process.stdout.write(`Seeded ${resolved.contentDir} with the starter site\n`);
|
|
@@ -714,22 +1055,28 @@ async function serveWorker(configPath) {
|
|
|
714
1055
|
for (const signal of ['SIGINT', 'SIGTERM'])
|
|
715
1056
|
process.on(signal, () => undefined);
|
|
716
1057
|
try {
|
|
717
|
-
|
|
718
|
-
|
|
1058
|
+
// The access log is on here and off in `createCms`: a server that answers
|
|
1059
|
+
// the internet should be able to say what it answered, while a CMS embedded
|
|
1060
|
+
// in somebody else's app has no business writing to their stdout uninvited.
|
|
1061
|
+
// Named as a config value rather than forced, so `GEEKITY_ACCESS_LOG` still
|
|
1062
|
+
// wins and a site that wrote `accessLog: false` still gets silence.
|
|
1063
|
+
const config = await loadResolvedConfig(configPath, (site) => ({
|
|
1064
|
+
...site,
|
|
1065
|
+
accessLog: site.accessLog ?? true,
|
|
1066
|
+
}));
|
|
1067
|
+
const loaded = scanPluginFolders(config.pluginsDir);
|
|
719
1068
|
const worker = superviseWorker({
|
|
720
1069
|
channel,
|
|
721
1070
|
loaded,
|
|
722
1071
|
exit: (code) => process.exit(code),
|
|
723
1072
|
log: (line) => process.stderr.write(`${line}\n`),
|
|
724
1073
|
});
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
// wins and a site that wrote `accessLog: false` still gets silence.
|
|
730
|
-
const cms = createCms({ ...config, accessLog: config.accessLog ?? true }, { folderPlugins: await importPluginFolders(loaded), supervision: worker.supervision });
|
|
1074
|
+
const cms = createCms(config, {
|
|
1075
|
+
folderPlugins: await importPluginFolders(loaded),
|
|
1076
|
+
supervision: worker.supervision,
|
|
1077
|
+
});
|
|
731
1078
|
const { port } = await cms.serve();
|
|
732
|
-
if (
|
|
1079
|
+
if (await cms.settings.get(DEV_MODE.on)) {
|
|
733
1080
|
process.stdout.write('Dev mode is on: ActivityPub, webmentions, feed pings, IndexNow and email are held ' +
|
|
734
1081
|
'and recorded in data/dev-mode.jsonl. `geekity dev-mode off` takes the site live.\n');
|
|
735
1082
|
}
|
|
@@ -737,18 +1084,18 @@ async function serveWorker(configPath) {
|
|
|
737
1084
|
worker.serving(cms);
|
|
738
1085
|
}
|
|
739
1086
|
catch (error) {
|
|
740
|
-
const message =
|
|
1087
|
+
const message = messageOf(error);
|
|
741
1088
|
channel.send({ type: 'boot-failed', error: message }, () => process.exit(1));
|
|
742
1089
|
}
|
|
743
1090
|
return 0;
|
|
744
1091
|
}
|
|
745
|
-
async function pluginFolderCommand(args, configPath, flags) {
|
|
1092
|
+
async function pluginFolderCommand({ args, configPath, flags }) {
|
|
746
1093
|
const [action, ...names] = args;
|
|
747
1094
|
const spec = names.length === 1 ? names[0] : undefined;
|
|
748
1095
|
if (action !== 'upgrade' && action !== 'add' && action !== 'remove') {
|
|
749
1096
|
throw new Error(PLUGIN_USAGE);
|
|
750
1097
|
}
|
|
751
|
-
const config =
|
|
1098
|
+
const config = await loadResolvedConfig(configPath);
|
|
752
1099
|
const { pluginsDir } = config;
|
|
753
1100
|
if (pluginsDir === undefined) {
|
|
754
1101
|
throw new Error('geekity plugin needs a plugins folder: set GEEKITY_PLUGINS_DIR, or pluginsDir in the config.');
|
|
@@ -843,7 +1190,7 @@ function upgradeReportText(report) {
|
|
|
843
1190
|
* holding nobody but the user added here — which, the file winning, is what
|
|
844
1191
|
* the next boot would keep. So the same boot migration runs first.
|
|
845
1192
|
*/
|
|
846
|
-
async function userCommand(args, configPath, flagPassword, flagEmail) {
|
|
1193
|
+
async function userCommand({ args, configPath, password: flagPassword, email: flagEmail, }) {
|
|
847
1194
|
const subcommand = args[0];
|
|
848
1195
|
if (subcommand === undefined) {
|
|
849
1196
|
throw new Error('geekity user add <username> needs a subcommand. The only one is: add.');
|
|
@@ -862,11 +1209,18 @@ async function userCommand(args, configPath, flagPassword, flagEmail) {
|
|
|
862
1209
|
process.stderr.write(`${problem}\n`);
|
|
863
1210
|
return 1;
|
|
864
1211
|
}
|
|
865
|
-
const config =
|
|
866
|
-
const
|
|
867
|
-
migrateUsersToFile(
|
|
1212
|
+
const config = await loadResolvedConfig(configPath);
|
|
1213
|
+
const adminDb = openAdminDatabase(config.dataDir, config.now);
|
|
1214
|
+
migrateUsersToFile(adminDb, config.dataDir);
|
|
1215
|
+
const admin = adminStoreOwning(adminDb, databaseFile(config.dataDir), config.now);
|
|
868
1216
|
try {
|
|
869
|
-
const user = await createUser({
|
|
1217
|
+
const user = await createUser({
|
|
1218
|
+
dataDir: config.dataDir,
|
|
1219
|
+
username,
|
|
1220
|
+
password,
|
|
1221
|
+
email,
|
|
1222
|
+
now: config.now(),
|
|
1223
|
+
});
|
|
870
1224
|
process.stdout.write(`Created admin user ${user.username}${user.email === undefined ? '' : ` (${user.email})`}. Sign in at ${LOGIN_URL}.\n`);
|
|
871
1225
|
return 0;
|
|
872
1226
|
}
|
|
@@ -919,17 +1273,26 @@ function configFlag(argv) {
|
|
|
919
1273
|
}
|
|
920
1274
|
return undefined;
|
|
921
1275
|
}
|
|
1276
|
+
async function loadSitePlugins(config, settings) {
|
|
1277
|
+
const folderPlugins = await importPluginFolders(scanPluginFolders(config.pluginsDir));
|
|
1278
|
+
return sitePluginRegistry(config, folderPlugins, settings);
|
|
1279
|
+
}
|
|
922
1280
|
/**
|
|
923
1281
|
* Every command the site's available plugins add, from its config and its
|
|
924
1282
|
* plugins folder, longest words first.
|
|
925
1283
|
*/
|
|
926
1284
|
async function pluginCommands(config) {
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
.plugins.filter((entry) => entry.problem === undefined)
|
|
1285
|
+
return (await loadSitePlugins(config, createSettings({ config }))).plugins
|
|
1286
|
+
.filter((entry) => entry.problem === undefined)
|
|
930
1287
|
.flatMap((entry) => entry.commands.map((command) => ({ plugin: entry.plugin.name, command })))
|
|
931
1288
|
.sort((a, b) => b.command.words.length - a.command.words.length);
|
|
932
1289
|
}
|
|
1290
|
+
async function pluginExtends(first, words, configPath) {
|
|
1291
|
+
if (COMMANDS[first].sharedWithPlugins !== true || words.length < 2)
|
|
1292
|
+
return false;
|
|
1293
|
+
const found = await pluginCommands(await loadResolvedConfig(configPath));
|
|
1294
|
+
return found.some(({ command }) => command.words.every((word, index) => words[index] === word));
|
|
1295
|
+
}
|
|
933
1296
|
/**
|
|
934
1297
|
* Run a command a plugin added (decision-33). It needs no enabling: a
|
|
935
1298
|
* migration command runs before the plugin it prepares for is turned on.
|
|
@@ -939,19 +1302,28 @@ async function pluginCommands(config) {
|
|
|
939
1302
|
* version that kept its accounts in SQLite is migrated first. The comments
|
|
940
1303
|
* are migrated as a boot would migrate them for the same reason: a command
|
|
941
1304
|
* writing comments before any server has would otherwise meet ids the site
|
|
942
|
-
* refuses to store.
|
|
1305
|
+
* refuses to store. Plugin settings still in `site.json` move to
|
|
1306
|
+
* `data/plugins/<name>/` first, so the command reads what a boot would.
|
|
943
1307
|
*/
|
|
944
1308
|
async function pluginCommand(argv) {
|
|
945
1309
|
const configPath = configFlag(argv);
|
|
946
|
-
const config =
|
|
1310
|
+
const config = await loadResolvedConfig(configPath);
|
|
947
1311
|
const words = leadingWords(argv);
|
|
1312
|
+
migratePluginSettings({
|
|
1313
|
+
contentDir: config.contentDir,
|
|
1314
|
+
dataDir: config.dataDir,
|
|
1315
|
+
log: (line) => {
|
|
1316
|
+
console.log(line);
|
|
1317
|
+
},
|
|
1318
|
+
});
|
|
948
1319
|
const found = (await pluginCommands(config)).find(({ command }) => command.words.every((word, index) => words[index] === word));
|
|
949
1320
|
if (found === undefined) {
|
|
950
1321
|
throw new Error(`Unknown command "${words[0] ?? ''}". Run geekity --help to see what is available.`);
|
|
951
1322
|
}
|
|
952
1323
|
const { args, options } = parseCommandArgs(withoutConfig(argv).slice(found.command.words.length), found.command);
|
|
953
|
-
const
|
|
954
|
-
migrateUsersToFile(
|
|
1324
|
+
const adminDb = openAdminDatabase(config.dataDir, config.now);
|
|
1325
|
+
migrateUsersToFile(adminDb, config.dataDir);
|
|
1326
|
+
const admin = adminStoreOwning(adminDb, databaseFile(config.dataDir), config.now);
|
|
955
1327
|
const comments = { contentDir: config.contentDir, dataDir: config.dataDir };
|
|
956
1328
|
migrateCommentEmails(comments);
|
|
957
1329
|
migrateCommentKeys(comments);
|
|
@@ -1025,14 +1397,14 @@ function parseCommandArgs(argv, command) {
|
|
|
1025
1397
|
async function usage(configPath) {
|
|
1026
1398
|
let found;
|
|
1027
1399
|
try {
|
|
1028
|
-
found = await pluginCommands(
|
|
1400
|
+
found = await pluginCommands(await loadResolvedConfig(configPath));
|
|
1029
1401
|
}
|
|
1030
1402
|
catch (error) {
|
|
1031
|
-
process.stderr.write(`Plugin commands are not listed: ${
|
|
1032
|
-
return
|
|
1403
|
+
process.stderr.write(`Plugin commands are not listed: ${messageOf(error)}\n`);
|
|
1404
|
+
return coreUsage();
|
|
1033
1405
|
}
|
|
1034
1406
|
if (found.length === 0)
|
|
1035
|
-
return
|
|
1407
|
+
return coreUsage();
|
|
1036
1408
|
const lines = ['', 'Plugin commands:'];
|
|
1037
1409
|
for (const { plugin, command } of found) {
|
|
1038
1410
|
const synopsis = wrap(`geekity ${[...command.words, command.usage].join(' ').trim()} [--config <file>]`, USAGE_CONTINUATION);
|
|
@@ -1040,18 +1412,31 @@ async function usage(configPath) {
|
|
|
1040
1412
|
lines.push(...wrap(command.summary, HELP_INDENT), `${HELP_INDENT}From ${plugin}.`);
|
|
1041
1413
|
for (const option of command.options ?? []) {
|
|
1042
1414
|
const flag = `--${option.name}${option.value === undefined ? '' : ` ${option.value}`}`;
|
|
1043
|
-
|
|
1044
|
-
const head = ` ${flag}`;
|
|
1045
|
-
if (head.length < HELP_INDENT.length - 1 && described[0] !== undefined) {
|
|
1046
|
-
described[0] = `${head.padEnd(HELP_INDENT.length)}${described[0].trimStart()}`;
|
|
1047
|
-
lines.push(...described);
|
|
1048
|
-
}
|
|
1049
|
-
else {
|
|
1050
|
-
lines.push(head, ...described);
|
|
1051
|
-
}
|
|
1415
|
+
lines.push(...helpEntry(` ${flag}`, wrap(option.description, HELP_INDENT)));
|
|
1052
1416
|
}
|
|
1053
1417
|
}
|
|
1054
|
-
return `${
|
|
1418
|
+
return `${coreUsage()}${lines.join('\n')}\n`;
|
|
1419
|
+
}
|
|
1420
|
+
function coreUsage() {
|
|
1421
|
+
const entries = Object.values(COMMANDS);
|
|
1422
|
+
return [
|
|
1423
|
+
'geekity — the Geekity CMS command line',
|
|
1424
|
+
'',
|
|
1425
|
+
'Usage:',
|
|
1426
|
+
...entries.flatMap((entry) => entry.synopsis.map((line) => ` geekity ${line}`)),
|
|
1427
|
+
'',
|
|
1428
|
+
'Commands:',
|
|
1429
|
+
...entries.flatMap((entry) => entry.help.flatMap(([words, summary]) => helpEntry(` ${words}`, summary.map((line) => `${HELP_INDENT}${line}`)))),
|
|
1430
|
+
'',
|
|
1431
|
+
OPTIONS_HELP,
|
|
1432
|
+
].join('\n');
|
|
1433
|
+
}
|
|
1434
|
+
function helpEntry(head, described) {
|
|
1435
|
+
if (head.length < HELP_INDENT.length - 1 && described[0] !== undefined) {
|
|
1436
|
+
described[0] = `${head.padEnd(HELP_INDENT.length)}${described[0].trimStart()}`;
|
|
1437
|
+
return described;
|
|
1438
|
+
}
|
|
1439
|
+
return [head, ...described];
|
|
1055
1440
|
}
|
|
1056
1441
|
/** Where the help's descriptions start, as the core commands' do. */
|
|
1057
1442
|
const HELP_INDENT = ' '.repeat(19);
|
|
@@ -1159,7 +1544,7 @@ if (isEntryPoint()) {
|
|
|
1159
1544
|
process.exitCode = code;
|
|
1160
1545
|
})
|
|
1161
1546
|
.catch((error) => {
|
|
1162
|
-
process.stderr.write(`${
|
|
1547
|
+
process.stderr.write(`${messageOf(error)}\n`);
|
|
1163
1548
|
process.exit(1);
|
|
1164
1549
|
});
|
|
1165
1550
|
}
|