@michaelthielemann/kestrel 4.1.3 → 5.0.2
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 -201
- package/dist/boot.d.ts +45 -0
- package/dist/boot.js +284 -0
- package/dist/cast.d.ts +3 -0
- package/dist/cast.js +6 -0
- package/dist/catalogue.d.ts +11 -0
- package/dist/catalogue.js +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +55 -0
- package/dist/context.d.ts +62 -0
- package/dist/context.js +61 -0
- package/dist/dataflow.d.ts +3 -0
- package/dist/dataflow.js +65 -0
- package/dist/defineConfig.d.ts +162 -0
- package/dist/defineConfig.js +42 -0
- package/dist/defineContract.d.ts +12 -0
- package/dist/defineContract.js +16 -0
- package/dist/defineModule.d.ts +75 -0
- package/dist/defineModule.js +9 -0
- package/dist/definePipeline.d.ts +7 -0
- package/dist/definePipeline.js +11 -0
- package/dist/errors.d.ts +26 -0
- package/dist/errors.js +48 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +14 -0
- package/dist/load.d.ts +7 -0
- package/dist/load.js +79 -0
- package/dist/logger.d.ts +18 -0
- package/dist/logger.js +36 -0
- package/dist/registry.d.ts +14 -0
- package/dist/registry.js +87 -0
- package/dist/result.d.ts +19 -0
- package/dist/result.js +19 -0
- package/dist/runner.d.ts +29 -0
- package/dist/runner.js +133 -0
- package/dist/schema.d.ts +7 -0
- package/dist/schema.js +142 -0
- package/dist/sort.d.ts +2 -0
- package/dist/sort.js +50 -0
- package/dist/testing/runPipeline.d.ts +9 -0
- package/dist/testing/runPipeline.js +22 -0
- package/dist/triggers/allowlist.d.ts +9 -0
- package/dist/triggers/allowlist.js +49 -0
- package/dist/triggers/cron.d.ts +10 -0
- package/dist/triggers/cron.js +44 -0
- package/dist/triggers/cronMatch.d.ts +10 -0
- package/dist/triggers/cronMatch.js +68 -0
- package/dist/triggers/http.d.ts +59 -0
- package/dist/triggers/http.js +300 -0
- package/package.json +25 -151
- package/NOTICE +0 -12
- package/kestrel.config.ts +0 -28
- package/layers/access/nuxt.config.ts +0 -5
- package/layers/access/server/middleware/00.ip-allowlist.ts +0 -52
- package/layers/access/server/middleware/access-guard.ts +0 -32
- package/layers/access/server/types.d.ts +0 -7
- package/layers/admin/app/components/AdminAccount.vue +0 -212
- package/layers/admin/app/components/AdminNav.vue +0 -44
- package/layers/admin/app/components/BlockFields.vue +0 -67
- package/layers/admin/app/components/BlockPreview.vue +0 -413
- package/layers/admin/app/components/BlockTree.vue +0 -433
- package/layers/admin/app/components/BlocksBody.vue +0 -163
- package/layers/admin/app/components/CollectionDeleteDialog.vue +0 -38
- package/layers/admin/app/components/CollectionEditor.vue +0 -324
- package/layers/admin/app/components/CollectionList.vue +0 -429
- package/layers/admin/app/components/CollectionListBulkBar.vue +0 -62
- package/layers/admin/app/components/CollectionListColumnsPanel.vue +0 -37
- package/layers/admin/app/components/CollectionListFilterPanel.vue +0 -145
- package/layers/admin/app/components/CollectionListPager.vue +0 -70
- package/layers/admin/app/components/CollectionListTable.vue +0 -347
- package/layers/admin/app/components/EditorStatus.vue +0 -211
- package/layers/admin/app/components/EditorUnsupported.vue +0 -28
- package/layers/admin/app/components/FieldsBody.vue +0 -23
- package/layers/admin/app/components/LocaleBar.vue +0 -107
- package/layers/admin/app/components/PageFields.vue +0 -129
- package/layers/admin/app/components/PageFieldsPane.vue +0 -39
- package/layers/admin/app/components/SeoFields.vue +0 -210
- package/layers/admin/app/components/SingletonEditor.vue +0 -93
- package/layers/admin/app/composables/useAuth.ts +0 -68
- package/layers/admin/app/composables/useBlockTree.ts +0 -95
- package/layers/admin/app/composables/useBlocks.ts +0 -7
- package/layers/admin/app/composables/useCachedResource.ts +0 -35
- package/layers/admin/app/composables/useCollectionOps.ts +0 -102
- package/layers/admin/app/composables/useCollections.ts +0 -6
- package/layers/admin/app/composables/useContentLocales.ts +0 -23
- package/layers/admin/app/composables/useEditForm.ts +0 -402
- package/layers/admin/app/composables/useLinkResolver.ts +0 -40
- package/layers/admin/app/composables/useListBatchActions.ts +0 -78
- package/layers/admin/app/composables/useListColumns.ts +0 -53
- package/layers/admin/app/composables/useListFilterDraft.ts +0 -129
- package/layers/admin/app/composables/useListRows.ts +0 -75
- package/layers/admin/app/composables/useListSelection.ts +0 -28
- package/layers/admin/app/composables/useListUrlState.ts +0 -53
- package/layers/admin/app/composables/usePendingPublishPoll.ts +0 -15
- package/layers/admin/app/composables/usePreviewViewport.ts +0 -30
- package/layers/admin/app/composables/usePublishStatus.ts +0 -107
- package/layers/admin/app/composables/useRailCollapsed.ts +0 -14
- package/layers/admin/app/composables/useTheme.ts +0 -36
- package/layers/admin/app/composables/useToolbarPanel.ts +0 -38
- package/layers/admin/app/composables/useUnsavedGuard.ts +0 -22
- package/layers/admin/app/layouts/admin.vue +0 -266
- package/layers/admin/app/middleware/admin-auth.ts +0 -4
- package/layers/admin/app/pages/admin/[collection]/[id].vue +0 -203
- package/layers/admin/app/pages/admin/[collection]/index.vue +0 -62
- package/layers/admin/app/pages/admin/index.vue +0 -118
- package/layers/admin/app/pages/admin/login.vue +0 -68
- package/layers/admin/app/pages/admin/media.vue +0 -28
- package/layers/admin/app/pages/admin/references.vue +0 -146
- package/layers/admin/app/plugins/admin-style-guard.client.ts +0 -76
- package/layers/admin/app/plugins/reauth.client.ts +0 -20
- package/layers/admin/app/utils/admin-style-guard.ts +0 -20
- package/layers/admin/app/utils/block-tree.ts +0 -214
- package/layers/admin/app/utils/collection-ops.ts +0 -69
- package/layers/admin/app/utils/dead-refs.ts +0 -30
- package/layers/admin/app/utils/edit-form.ts +0 -267
- package/layers/admin/app/utils/editor-expose.ts +0 -36
- package/layers/admin/app/utils/editor-form-context.ts +0 -82
- package/layers/admin/app/utils/editor-registry.ts +0 -20
- package/layers/admin/app/utils/field-keys.ts +0 -11
- package/layers/admin/app/utils/list-cell.ts +0 -46
- package/layers/admin/app/utils/list-columns.ts +0 -142
- package/layers/admin/app/utils/list-query.ts +0 -96
- package/layers/admin/app/utils/nav-active.ts +0 -9
- package/layers/admin/app/utils/populate-blocks.ts +0 -288
- package/layers/admin/app/utils/preview-channel.ts +0 -62
- package/layers/admin/app/utils/preview-viewport.ts +0 -80
- package/layers/admin/app/utils/reauth.ts +0 -67
- package/layers/admin/app/utils/record-title.ts +0 -15
- package/layers/admin/app/utils/register-builtin-editors.ts +0 -9
- package/layers/admin/app/utils/safe-redirect.ts +0 -12
- package/layers/admin/nuxt.config.ts +0 -20
- package/layers/auth/nuxt.config.ts +0 -1
- package/layers/auth/server/plugins/01.register-auth-pipelines.ts +0 -7
- package/layers/collections/nuxt.config.ts +0 -1
- package/layers/collections/server/plugins/01.register.ts +0 -29
- package/layers/collections/server/plugins/02.register-relation-populate.ts +0 -18
- package/layers/core/app/composables/layouts.ts +0 -5
- package/layers/core/app/utils/field-factories.ts +0 -129
- package/layers/core/app/utils/layouts.ts +0 -38
- package/layers/core/modules/auto-discovery/extract-block.ts +0 -179
- package/layers/core/modules/auto-discovery/index.ts +0 -112
- package/layers/core/modules/auto-discovery/package-registry.ts +0 -19
- package/layers/core/modules/auto-discovery/scan.ts +0 -170
- package/layers/core/modules/auto-discovery/virtual.d.ts +0 -20
- package/layers/core/modules/component-namespace/index.ts +0 -44
- package/layers/core/modules/component-namespace/shared.ts +0 -24
- package/layers/core/modules/kestrel/app-shell.ts +0 -55
- package/layers/core/modules/kestrel/auto-imports.ts +0 -44
- package/layers/core/modules/kestrel/index.ts +0 -144
- package/layers/core/modules/plugin-order/index.ts +0 -69
- package/layers/core/modules/plugin-order/plugin-order.ts +0 -273
- package/layers/core/nuxt.config.ts +0 -10
- package/layers/core/server/api/[...path].ts +0 -98
- package/layers/core/server/plugins/00.config.ts +0 -12
- package/layers/core/server/plugins/00.migrate.ts +0 -12
- package/layers/core/server/plugins/01.register-introspection-pipeline.ts +0 -5
- package/layers/core/server/plugins/01.register-openapi-pipeline.ts +0 -5
- package/layers/core/server/plugins/01.register-tooling-pipelines.ts +0 -5
- package/layers/core/server/plugins/02.schema-sync.ts +0 -58
- package/layers/core/server/plugins/04.outbox-worker.ts +0 -31
- package/layers/core/server/plugins/05.reindex-refs.ts +0 -5
- package/layers/core/server/routes/__kestrel/dashboard.get.ts +0 -29
- package/layers/core/server/tasks/db/migrate-module.ts +0 -83
- package/layers/core/server/tasks/db/migrate-revisions.ts +0 -20
- package/layers/core/server/tasks/db/migrate.ts +0 -50
- package/layers/core/server/utils/server-config.ts +0 -81
- package/layers/fields/nuxt.config.ts +0 -1
- package/layers/fields/server/plugins/01.register-blocks-pipeline.ts +0 -7
- package/layers/fields/server/plugins/01.register-field-populate.ts +0 -11
- package/layers/media/app/components/KestrelImg.vue +0 -94
- package/layers/media/app/components/MediaConflictDialog.vue +0 -35
- package/layers/media/app/components/MediaDeleteDialog.vue +0 -52
- package/layers/media/app/components/MediaGrid.vue +0 -113
- package/layers/media/app/components/MediaImage.vue +0 -70
- package/layers/media/app/components/MediaLibrary.vue +0 -456
- package/layers/media/app/components/MediaNewFolderDialog.vue +0 -32
- package/layers/media/app/components/MediaPathBar.vue +0 -163
- package/layers/media/app/components/MediaPicker.vue +0 -19
- package/layers/media/app/components/MediaRenameDialog.vue +0 -32
- package/layers/media/app/components/MediaTable.vue +0 -75
- package/layers/media/app/components/MediaThumb.vue +0 -25
- package/layers/media/app/components/MediaToolbar.vue +0 -90
- package/layers/media/app/components/MediaUploadDialog.vue +0 -87
- package/layers/media/app/components/MediaViewer.vue +0 -137
- package/layers/media/app/components/field/Media.vue +0 -263
- package/layers/media/app/composables/useBlurUp.ts +0 -55
- package/layers/media/app/composables/useMediaClipboard.ts +0 -14
- package/layers/media/app/composables/useMediaContextMenu.ts +0 -56
- package/layers/media/app/composables/useMediaDnd.ts +0 -56
- package/layers/media/app/composables/useMediaLibrary.ts +0 -152
- package/layers/media/app/composables/useMediaOps.ts +0 -50
- package/layers/media/app/composables/useMediaRelocate.ts +0 -39
- package/layers/media/app/composables/useMediaResolver.ts +0 -50
- package/layers/media/app/composables/useMediaUpload.ts +0 -93
- package/layers/media/app/composables/useMediaVariant.ts +0 -34
- package/layers/media/app/plugins/field-media.client.ts +0 -6
- package/layers/media/app/utils/ai-disclosure.ts +0 -19
- package/layers/media/app/utils/dnd.ts +0 -69
- package/layers/media/app/utils/library.ts +0 -81
- package/layers/media/app/utils/ops.ts +0 -60
- package/layers/media/app/utils/picture-model.ts +0 -125
- package/layers/media/app/utils/thumbhash.ts +0 -19
- package/layers/media/app/utils/variant-name.ts +0 -20
- package/layers/media/nuxt.config.ts +0 -7
- package/layers/media/server/middleware/ondemand-variants.ts +0 -38
- package/layers/media/server/plugins/01.register-media-pipelines.ts +0 -7
- package/layers/media/server/plugins/02.register-media.ts +0 -22
- package/layers/media/server/plugins/04.variant-capture.ts +0 -27
- package/layers/media/server/plugins/05.media-cleanup.ts +0 -5
- package/layers/media/server/tasks/media/backfill.ts +0 -17
- package/layers/public/app/app.vue +0 -5
- package/layers/public/app/components/BlockRenderer.vue +0 -56
- package/layers/public/app/components/KestrelLink.vue +0 -26
- package/layers/public/app/components/KestrelPreviewBridge.vue +0 -133
- package/layers/public/app/composables/public-page.ts +0 -24
- package/layers/public/app/error.vue +0 -12
- package/layers/public/app/layouts/default.vue +0 -5
- package/layers/public/app/pages/[...slug].vue +0 -239
- package/layers/public/app/pages/__kestrel/preview.vue +0 -46
- package/layers/public/app/utils/block-edit-context.ts +0 -16
- package/layers/public/app/utils/json-ld.ts +0 -139
- package/layers/public/app/utils/link-href.ts +0 -46
- package/layers/public/app/utils/page-head.ts +0 -84
- package/layers/public/app/utils/page-layout.ts +0 -18
- package/layers/public/app/utils/preview-protocol.ts +0 -117
- package/layers/public/app/utils/public-route.ts +0 -46
- package/layers/public/app/utils/site-head.ts +0 -43
- package/layers/public/modules/deploy-output/index.ts +0 -80
- package/layers/public/modules/prerender-routes/discover.ts +0 -37
- package/layers/public/modules/prerender-routes/index.ts +0 -88
- package/layers/public/modules/prerender-routes/routes.ts +0 -16
- package/layers/public/modules/prune-media/index.ts +0 -48
- package/layers/public/modules/prune-media/prune-media.ts +0 -81
- package/layers/public/nuxt.config.ts +0 -14
- package/layers/public/server/delivery-live/serve.ts +0 -111
- package/layers/public/server/middleware/delivery-live-catchall.ts +0 -7
- package/layers/public/server/pipelines/index.ts +0 -23
- package/layers/public/server/plugins/00.ensure-snapshot-triggers.ts +0 -14
- package/layers/public/server/plugins/01.register-public-pipelines.ts +0 -7
- package/layers/public/server/plugins/02.register-links.ts +0 -16
- package/layers/public/server/plugins/03.redirects.ts +0 -55
- package/layers/public/server/plugins/05.plan-publish.ts +0 -5
- package/layers/public/server/plugins/zz.publish.ts +0 -127
- package/layers/public/server/routes/llms-full.txt.get.ts +0 -99
- package/layers/public/server/routes/llms.txt.get.ts +0 -66
- package/layers/public/server/routes/redirects.json.get.ts +0 -58
- package/layers/public/server/routes/robots.txt.get.ts +0 -11
- package/layers/public/server/routes/sitemap.xml.get.ts +0 -79
- package/layers/public/server/tasks/publish/run.ts +0 -32
- package/layers/public/server/utils/publish/render-live.ts +0 -26
- package/layers/ui/app/assets/scss/_base.scss +0 -16
- package/layers/ui/app/assets/scss/_datepicker.scss +0 -82
- package/layers/ui/app/assets/scss/_mixins.scss +0 -50
- package/layers/ui/app/assets/scss/_reset.scss +0 -65
- package/layers/ui/app/assets/scss/_tokens.scss +0 -183
- package/layers/ui/app/assets/scss/main.scss +0 -4
- package/layers/ui/app/components/field/Boolean.vue +0 -30
- package/layers/ui/app/components/field/Choice.vue +0 -73
- package/layers/ui/app/components/field/Datetime.vue +0 -98
- package/layers/ui/app/components/field/DeadRefNote.vue +0 -28
- package/layers/ui/app/components/field/Json.vue +0 -62
- package/layers/ui/app/components/field/Layout.vue +0 -138
- package/layers/ui/app/components/field/Link.vue +0 -112
- package/layers/ui/app/components/field/LinkInternalPicker.vue +0 -95
- package/layers/ui/app/components/field/Number.vue +0 -30
- package/layers/ui/app/components/field/Relation.vue +0 -49
- package/layers/ui/app/components/field/Renderer.vue +0 -30
- package/layers/ui/app/components/field/Repeater.vue +0 -460
- package/layers/ui/app/components/field/Richtext.vue +0 -26
- package/layers/ui/app/components/field/Slug.vue +0 -65
- package/layers/ui/app/components/field/Text.vue +0 -35
- package/layers/ui/app/components/field/Unsupported.vue +0 -34
- package/layers/ui/app/components/ui/Alert.vue +0 -50
- package/layers/ui/app/components/ui/Brand.vue +0 -22
- package/layers/ui/app/components/ui/Button.vue +0 -116
- package/layers/ui/app/components/ui/ButtonGroup.vue +0 -96
- package/layers/ui/app/components/ui/Checkbox.vue +0 -53
- package/layers/ui/app/components/ui/CheckboxGroup.vue +0 -51
- package/layers/ui/app/components/ui/Combobox.vue +0 -345
- package/layers/ui/app/components/ui/DatePicker.vue +0 -92
- package/layers/ui/app/components/ui/DateRangePicker.vue +0 -100
- package/layers/ui/app/components/ui/Dialog.vue +0 -107
- package/layers/ui/app/components/ui/EmptyState.vue +0 -46
- package/layers/ui/app/components/ui/Field.vue +0 -58
- package/layers/ui/app/components/ui/Fieldset.vue +0 -65
- package/layers/ui/app/components/ui/Icon.vue +0 -44
- package/layers/ui/app/components/ui/Menu.vue +0 -54
- package/layers/ui/app/components/ui/NumberInput.vue +0 -175
- package/layers/ui/app/components/ui/Richtext.vue +0 -141
- package/layers/ui/app/components/ui/RichtextToolbar.vue +0 -251
- package/layers/ui/app/components/ui/Select.vue +0 -52
- package/layers/ui/app/components/ui/TextInput.vue +0 -111
- package/layers/ui/app/components/ui/Textarea.vue +0 -39
- package/layers/ui/app/components/ui/TimeInput.vue +0 -18
- package/layers/ui/app/components/ui/Toasts.vue +0 -103
- package/layers/ui/app/components/ui/Tooltip.vue +0 -45
- package/layers/ui/app/composables/useAdminLang.ts +0 -8
- package/layers/ui/app/composables/useDragReorder.ts +0 -41
- package/layers/ui/app/composables/useEchoGuard.ts +0 -28
- package/layers/ui/app/composables/useLinkField.ts +0 -70
- package/layers/ui/app/composables/useRecordOptions.ts +0 -84
- package/layers/ui/app/composables/useRepeater.ts +0 -99
- package/layers/ui/app/composables/useT.ts +0 -32
- package/layers/ui/app/composables/useToast.ts +0 -46
- package/layers/ui/app/i18n/de.ts +0 -432
- package/layers/ui/app/i18n/en.ts +0 -434
- package/layers/ui/app/utils/boolean-field.ts +0 -10
- package/layers/ui/app/utils/field-component.ts +0 -22
- package/layers/ui/app/utils/field-empty.ts +0 -21
- package/layers/ui/app/utils/field-registry.ts +0 -36
- package/layers/ui/app/utils/humanize.ts +0 -14
- package/layers/ui/app/utils/icons.ts +0 -143
- package/layers/ui/app/utils/iso-date.ts +0 -18
- package/layers/ui/app/utils/localized.ts +0 -13
- package/layers/ui/app/utils/record-context.ts +0 -15
- package/layers/ui/app/utils/reorder.ts +0 -8
- package/layers/ui/app/utils/richtext-preserve-class.ts +0 -31
- package/layers/ui/app/utils/useFieldA11y.ts +0 -40
- package/layers/ui/nuxt.config.ts +0 -9
- package/nuxt.config.ts +0 -108
- package/scripts/consumer-template-ci.mjs +0 -160
- package/scripts/copy-create-payload.mjs +0 -49
- package/scripts/coverage-all.mjs +0 -163
- package/scripts/dashboard.mjs +0 -89
- package/scripts/hash-password.mjs +0 -29
- package/scripts/kestrel.mjs +0 -240
- package/scripts/lib/cli.mjs +0 -129
- package/scripts/lib/coverage-model.mjs +0 -51
- package/scripts/lib/password.mjs +0 -19
- package/scripts/lib/scaffold.mjs +0 -205
- package/scripts/port-graph.mjs +0 -350
- package/scripts/typecheck.mjs +0 -62
- package/templates/starter/README.md +0 -65
- package/templates/starter/_env.example +0 -17
- package/templates/starter/_gitignore +0 -26
- package/templates/starter/_package.json +0 -22
- package/templates/starter/app/app.vue +0 -7
- package/templates/starter/app/blocks/Prose.vue +0 -13
- package/templates/starter/app/layouts/default.vue +0 -6
- package/templates/starter/nuxt.config.ts +0 -23
- package/templates/starter/pnpm-workspace.yaml +0 -8
- package/templates/starter/tsconfig.json +0 -3
package/scripts/typecheck.mjs
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// Typecheck gate. vitest/esbuild and `nuxt build` do NOT typecheck, so real type errors slip through
|
|
2
|
-
// every other gate — this is the one that catches them. It typechecks the PLAYGROUND, which composes
|
|
3
|
-
// the engine layers + both galleries extensions + a real consumer app/server, so this single run covers
|
|
4
|
-
// app, `.vue`, modules, config AND server code.
|
|
5
|
-
//
|
|
6
|
-
// Two passes, because Nuxt 4 splits the tsconfig by environment:
|
|
7
|
-
// 1. `tsc` over the Nitro server project (the app aggregator EXCLUDES server dirs).
|
|
8
|
-
// 2. `vue-tsc` (via `nuxt typecheck`) over the app/`.vue`/modules/config aggregator.
|
|
9
|
-
// Both exclude `*.test.ts` (vitest covers those at runtime) via the nuxt.config `typescript.tsConfig.exclude`
|
|
10
|
-
// and the derived server config below.
|
|
11
|
-
import { execFileSync } from 'node:child_process'
|
|
12
|
-
import { readFileSync, writeFileSync } from 'node:fs'
|
|
13
|
-
import { dirname, join } from 'node:path'
|
|
14
|
-
import { fileURLToPath } from 'node:url'
|
|
15
|
-
|
|
16
|
-
const root = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
17
|
-
const playground = join(root, 'playground')
|
|
18
|
-
const bin = (name) => join(root, 'node_modules', '.bin', name)
|
|
19
|
-
const env = { ...process.env, CI: 'true', NUXT_TELEMETRY_DISABLED: '1' }
|
|
20
|
-
|
|
21
|
-
// 1. (Re)generate the Nuxt/Nitro tsconfigs for the playground.
|
|
22
|
-
execFileSync(bin('nuxt'), ['prepare'], { cwd: playground, stdio: 'inherit', env })
|
|
23
|
-
|
|
24
|
-
// 2. Server (Nitro) project — derive a test-excluding config alongside the generated one so its relative
|
|
25
|
-
// include/paths still resolve.
|
|
26
|
-
const generated = join(playground, '.nuxt', 'tsconfig.server.json')
|
|
27
|
-
const cfg = JSON.parse(readFileSync(generated, 'utf8'))
|
|
28
|
-
cfg.exclude = [...(cfg.exclude ?? []), '../../**/*.test.ts', '../**/*.test.ts']
|
|
29
|
-
const gateConfig = join(playground, '.nuxt', 'tsconfig.typecheck.json')
|
|
30
|
-
writeFileSync(gateConfig, JSON.stringify(cfg, null, 2))
|
|
31
|
-
// Both passes always run, and the gate fails at the END: aborting on the first one hides every error of
|
|
32
|
-
// the other, and the two cover disjoint file sets — a red server pass would report zero app errors.
|
|
33
|
-
const failed = []
|
|
34
|
-
function pass(label, cmd, args) {
|
|
35
|
-
console.log(`› typechecking ${label}…`)
|
|
36
|
-
try {
|
|
37
|
-
execFileSync(bin(cmd), args, { cwd: playground, stdio: 'inherit', env })
|
|
38
|
-
} catch {
|
|
39
|
-
failed.push(label)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
pass('server (Nitro) project', 'tsc', ['--noEmit', '-p', gateConfig])
|
|
44
|
-
// 3. App / `.vue` / modules / config — vue-tsc via `nuxt typecheck` (needs the committed root tsconfig.json).
|
|
45
|
-
pass('app + .vue (vue-tsc)', 'nuxt', ['typecheck'])
|
|
46
|
-
|
|
47
|
-
// 4. Standalone workspace packages have their own tsconfig, outside the playground project. Globbed by
|
|
48
|
-
// pnpm's own filter (topological order, every current and future `@michaelthielemann/kestrel-*` package, `create-kestrel`
|
|
49
|
-
// excluded by name) rather than a hand-written list per package — the class of drift a hand list invites
|
|
50
|
-
// (a package silently missing from this one script) is the exact failure mode this rail exists to avoid.
|
|
51
|
-
console.log('› typechecking packages (@michaelthielemann/kestrel-*)…')
|
|
52
|
-
try {
|
|
53
|
-
execFileSync('pnpm', ['--filter', '@michaelthielemann/kestrel-*', '-r', 'typecheck'], { cwd: root, stdio: 'inherit', env })
|
|
54
|
-
} catch {
|
|
55
|
-
failed.push('packages (@michaelthielemann/kestrel-*)')
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (failed.length) {
|
|
59
|
-
console.error(`\n✗ typecheck failed: ${failed.join(', ')}`)
|
|
60
|
-
process.exit(1)
|
|
61
|
-
}
|
|
62
|
-
console.log('\n✓ typecheck passed (app + .vue + server; *.test.ts excluded)')
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# {{name}}
|
|
2
|
-
|
|
3
|
-
A [Kestrel](https://github.com/MichaelThielemann/kestrel) site — a collection-driven CMS that renders
|
|
4
|
-
published content to static HTML.
|
|
5
|
-
|
|
6
|
-
```bash
|
|
7
|
-
pnpm install
|
|
8
|
-
pnpm dev
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Admin: <http://localhost:3000/admin> — sign in with the password you chose while scaffolding.
|
|
12
|
-
Forgot it? `pnpm hash-password` prints a fresh hash for `KESTREL_ADMIN_PASSWORD_HASH` in `.env`.
|
|
13
|
-
|
|
14
|
-
## What is here
|
|
15
|
-
|
|
16
|
-
| Path | What it does |
|
|
17
|
-
| --- | --- |
|
|
18
|
-
| `nuxt.config.ts` | Composes Kestrel (`extends`) and holds every non-secret setting under `kestrel: {}` |
|
|
19
|
-
| `.env` | Session secret + admin password hash. **Never commit it** — `.env.example` is the committed copy |
|
|
20
|
-
| `app/app.vue` | The app root. Keep `<NuxtLayout>` and `<NuxtPage />` or the admin stops rendering |
|
|
21
|
-
| `app/layouts/default.vue` | Your public site frame — header, nav, footer |
|
|
22
|
-
| `app/blocks/Prose.vue` | One block type for the page builder: schema and display in a single file |
|
|
23
|
-
| `.data/` | The SQLite database, uploads and published output. Gitignored |
|
|
24
|
-
|
|
25
|
-
## Add a collection
|
|
26
|
-
|
|
27
|
-
Drop a file in `server/collections/`; the table is created on the next dev start and the collection
|
|
28
|
-
shows up in the admin. Nothing to register.
|
|
29
|
-
|
|
30
|
-
```ts
|
|
31
|
-
// server/collections/posts.ts
|
|
32
|
-
export default defineCollection({
|
|
33
|
-
name: 'posts',
|
|
34
|
-
mode: 'multi',
|
|
35
|
-
pageLike: true, // gives records a `path` so they render to static HTML
|
|
36
|
-
status: true, // draft / published
|
|
37
|
-
seo: true,
|
|
38
|
-
blocks: { enabled: true },
|
|
39
|
-
fields: { title: { type: 'text', required: true } },
|
|
40
|
-
})
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Publish
|
|
44
|
-
|
|
45
|
-
Run `pnpm dev` at least once first: the database schema is derived from your collections and created on
|
|
46
|
-
a dev boot, and a production build never touches it. Generating against a database that does not exist
|
|
47
|
-
yet succeeds but emits an empty site plus `no such table` errors.
|
|
48
|
-
|
|
49
|
-
There are two ways to get static files out, and this project has **both** enabled:
|
|
50
|
-
|
|
51
|
-
- **One-shot:** `pnpm generate` renders everything published into `.output/public/`.
|
|
52
|
-
- **Incremental (the default at runtime):** a production run (`pnpm build && pnpm preview`) publishes on
|
|
53
|
-
boot and re-renders only the pages each content write affects, into `.data/published/`. Turn it off with
|
|
54
|
-
`kestrel: { output: { auto: false } }` in `nuxt.config.ts` if you only want the one-shot flow.
|
|
55
|
-
|
|
56
|
-
Either way, serve the resulting directory from any static host. The editing origin is not meant to be
|
|
57
|
-
public. Set `siteUrl` in `nuxt.config.ts` to the real public origin first — it is baked into canonical
|
|
58
|
-
URLs, `sitemap.xml` and `llms.txt` at build time.
|
|
59
|
-
|
|
60
|
-
## Health check
|
|
61
|
-
|
|
62
|
-
`pnpm doctor` checks this project for the things that silently break a Kestrel site: a missing
|
|
63
|
-
`extends`, an `app.vue` that renders no pages, unset auth env.
|
|
64
|
-
|
|
65
|
-
Full documentation: <https://github.com/MichaelThielemann/kestrel#documentation>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Auth/session is env-only — secrets never belong in a committed config file. `.env.example` is the
|
|
2
|
-
# committed copy of this template; `.env` holds the real values and is gitignored.
|
|
3
|
-
#
|
|
4
|
-
# The two below are read per request. Every other KESTREL_* var is read once when the app is BUILT
|
|
5
|
-
# (dev start / build / generate) and frozen into runtimeConfig — see docs/configuration.md.
|
|
6
|
-
|
|
7
|
-
# Session signing secret, >= 32 bytes. Required in production. Generate: kestrel secret
|
|
8
|
-
KESTREL_SESSION_SECRET=
|
|
9
|
-
|
|
10
|
-
# Admin password hash. Without it /admin renders but sign-in answers 503. Generate: kestrel hash-password
|
|
11
|
-
KESTREL_ADMIN_PASSWORD_HASH=
|
|
12
|
-
|
|
13
|
-
# Drops the __Host- cookie prefix and the Secure flag. Plain-HTTP localhost ONLY; rejected in production.
|
|
14
|
-
KESTREL_SECURE_COOKIES=false
|
|
15
|
-
|
|
16
|
-
# Optional: session lifetime in seconds (default 604800 = 7 days)
|
|
17
|
-
# KESTREL_SESSION_MAX_AGE=604800
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
node_modules
|
|
3
|
-
|
|
4
|
-
# Nuxt / Nitro build output
|
|
5
|
-
.nuxt
|
|
6
|
-
.nitro
|
|
7
|
-
.cache
|
|
8
|
-
.output
|
|
9
|
-
dist
|
|
10
|
-
|
|
11
|
-
# Secrets
|
|
12
|
-
.env
|
|
13
|
-
.env.*
|
|
14
|
-
!.env.example
|
|
15
|
-
|
|
16
|
-
# Runtime database, uploads and published output
|
|
17
|
-
.data
|
|
18
|
-
*.sqlite
|
|
19
|
-
*.sqlite-shm
|
|
20
|
-
*.sqlite-wal
|
|
21
|
-
|
|
22
|
-
# Logs
|
|
23
|
-
*.log
|
|
24
|
-
|
|
25
|
-
# OS / editor
|
|
26
|
-
.DS_Store
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{name}}",
|
|
3
|
-
"private": true,
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "nuxt dev",
|
|
7
|
-
"build": "nuxt build",
|
|
8
|
-
"preview": "nuxt preview",
|
|
9
|
-
"generate": "nuxt generate",
|
|
10
|
-
"typecheck": "nuxt prepare && nuxt typecheck && tsc -p .nuxt/tsconfig.server.json --noEmit",
|
|
11
|
-
"hash-password": "kestrel hash-password",
|
|
12
|
-
"doctor": "kestrel doctor"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@michaelthielemann/kestrel": "{{version}}"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"nuxt": "{{nuxtVersion}}",
|
|
19
|
-
"typescript": "{{typescriptVersion}}",
|
|
20
|
-
"vue-tsc": "{{vueTscVersion}}"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
// One SFC is one block type: the filename names it, defineProps is its schema. Add a sibling to add one.
|
|
3
|
-
defineProps({
|
|
4
|
-
body: richtextField({ required: true }),
|
|
5
|
-
})
|
|
6
|
-
defineBlock({ label: { en: 'Prose' }, icon: 'file-text' })
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<!-- richtext is sanitized server-side on write -->
|
|
11
|
-
<!-- eslint-disable-next-line vue/no-v-html -- sanitized via sanitizeRichtext (sanitize-html allowlist) in packages/kestrel-fields/src/server/field-registry/index.ts -->
|
|
12
|
-
<div class="block-prose" v-html="body" />
|
|
13
|
-
</template>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export default defineNuxtConfig({
|
|
2
|
-
compatibilityDate: '2026-06-02',
|
|
3
|
-
future: { compatibilityVersion: 4 },
|
|
4
|
-
// This one line composes the whole CMS. Opt-in extension layers go after it.
|
|
5
|
-
extends: ['@michaelthielemann/kestrel'],
|
|
6
|
-
// Not inherited from an extended layer, so it has to be repeated here.
|
|
7
|
-
typescript: { tsConfig: { compilerOptions: { noUncheckedIndexedAccess: false } } },
|
|
8
|
-
nitro: { typescript: { tsConfig: { compilerOptions: { noUncheckedIndexedAccess: false } } } },
|
|
9
|
-
// Auth/session is env-only, see `.env`. Every key here is optional.
|
|
10
|
-
kestrel: {
|
|
11
|
-
db: '.data/db.sqlite',
|
|
12
|
-
// Baked into canonical URLs, hreflang, sitemap.xml and llms.txt at build time. Set it to the public
|
|
13
|
-
// origin before the first real deploy — or leave it to KESTREL_SITE_URL per environment.
|
|
14
|
-
siteUrl: 'http://localhost:3000',
|
|
15
|
-
siteName: '{{name}}',
|
|
16
|
-
media: { uploadDir: '.data/uploads' },
|
|
17
|
-
// locales: ['en', 'de'],
|
|
18
|
-
// collections: { pages: false },
|
|
19
|
-
// Answer-engine extras, both off until you opt in: articleMeta publishes author/date/keywords,
|
|
20
|
-
// llmsFull serves /llms-full.txt (every published page's full body in one file).
|
|
21
|
-
// seo: { articleMeta: true, llmsFull: true },
|
|
22
|
-
},
|
|
23
|
-
})
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# pnpm blocks dependency build scripts unless they are listed here, and Kestrel's SQLite driver and image
|
|
2
|
-
# pipeline are native — without this `pnpm install` completes but the app cannot start. Delete this file
|
|
3
|
-
# if you use npm or yarn. (`pnpm.onlyBuiltDependencies` in package.json is silently ignored on pnpm 11.)
|
|
4
|
-
allowBuilds:
|
|
5
|
-
'@parcel/watcher': true
|
|
6
|
-
better-sqlite3: true
|
|
7
|
-
esbuild: true
|
|
8
|
-
sharp: true
|