canopycms 0.0.63 → 0.0.65
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 +153 -19
- package/dist/ai/generate.d.ts +4 -5
- package/dist/ai/generate.js +0 -1
- package/dist/ai/handler.d.ts +3 -4
- package/dist/ai/handler.js +0 -1
- package/dist/ai/index.d.ts +7 -8
- package/dist/ai/index.js +0 -1
- package/dist/ai/json-to-markdown.d.ts +1 -2
- package/dist/ai/json-to-markdown.js +11 -2
- package/dist/ai/resolve-branch.d.ts +1 -2
- package/dist/ai/resolve-branch.js +0 -1
- package/dist/ai/strip-mdx.d.ts +0 -1
- package/dist/ai/strip-mdx.js +0 -1
- package/dist/ai/to-plain-text.d.ts +4 -1
- package/dist/ai/to-plain-text.js +47 -1
- package/dist/ai/transform-components.d.ts +1 -2
- package/dist/ai/transform-components.js +0 -1
- package/dist/ai/types.d.ts +1 -2
- package/dist/ai/types.js +0 -1
- package/dist/api/admin-branch-health.d.ts +7 -8
- package/dist/api/admin-branch-health.js +0 -1
- package/dist/api/admin.d.ts +16 -17
- package/dist/api/admin.js +0 -1
- package/dist/api/assets.d.ts +8 -9
- package/dist/api/assets.js +9 -1
- package/dist/api/branch-merge.d.ts +3 -4
- package/dist/api/branch-merge.js +0 -1
- package/dist/api/branch-review.d.ts +5 -6
- package/dist/api/branch-review.js +0 -1
- package/dist/api/branch-status.d.ts +15 -16
- package/dist/api/branch-status.js +0 -1
- package/dist/api/branch-withdraw.d.ts +3 -4
- package/dist/api/branch-withdraw.js +0 -1
- package/dist/api/branch.d.ts +13 -14
- package/dist/api/branch.js +0 -1
- package/dist/api/client.d.ts +14 -15
- package/dist/api/client.js +0 -1
- package/dist/api/comments.d.ts +11 -12
- package/dist/api/comments.js +0 -1
- package/dist/api/content.d.ts +22 -24
- package/dist/api/content.js +132 -18
- package/dist/api/entries-constants.d.ts +0 -1
- package/dist/api/entries-constants.js +0 -1
- package/dist/api/entries.d.ts +12 -13
- package/dist/api/entries.js +12 -2
- package/dist/api/github-sync.d.ts +2 -3
- package/dist/api/github-sync.js +0 -1
- package/dist/api/groups.d.ts +6 -7
- package/dist/api/groups.js +0 -1
- package/dist/api/guards.d.ts +2 -3
- package/dist/api/guards.js +0 -1
- package/dist/api/index.d.ts +18 -19
- package/dist/api/index.js +0 -1
- package/dist/api/permissions.d.ts +10 -11
- package/dist/api/permissions.js +0 -1
- package/dist/api/reference-options.d.ts +3 -4
- package/dist/api/reference-options.js +0 -1
- package/dist/api/request-body-hash.d.ts +0 -1
- package/dist/api/request-body-hash.js +0 -1
- package/dist/api/resolve-references.d.ts +6 -7
- package/dist/api/resolve-references.js +24 -6
- package/dist/api/route-builder.d.ts +2 -3
- package/dist/api/route-builder.js +0 -1
- package/dist/api/schema.d.ts +43 -44
- package/dist/api/schema.js +0 -1
- package/dist/api/settings-helpers.d.ts +2 -3
- package/dist/api/settings-helpers.js +0 -1
- package/dist/api/types.d.ts +6 -7
- package/dist/api/types.js +0 -1
- package/dist/api/user.d.ts +2 -3
- package/dist/api/user.js +0 -1
- package/dist/api/validators.d.ts +3 -4
- package/dist/api/validators.js +0 -1
- package/dist/assets/asset-prefixes.d.ts +1 -2
- package/dist/assets/asset-prefixes.js +0 -1
- package/dist/assets/asset-src.d.ts +17 -5
- package/dist/assets/asset-src.js +15 -3
- package/dist/assets/asset-url.d.ts +28 -7
- package/dist/assets/asset-url.js +20 -15
- package/dist/assets/factory.d.ts +2 -3
- package/dist/assets/factory.js +0 -2
- package/dist/assets/finalize.d.ts +2 -3
- package/dist/assets/finalize.js +0 -1
- package/dist/assets/index.d.ts +12 -13
- package/dist/assets/index.js +0 -1
- package/dist/assets/keys.d.ts +1 -2
- package/dist/assets/keys.js +0 -1
- package/dist/assets/pipeline.d.ts +1 -2
- package/dist/assets/pipeline.js +0 -1
- package/dist/assets/store-local.d.ts +1 -2
- package/dist/assets/store-local.js +0 -1
- package/dist/assets/store-s3.d.ts +2 -4
- package/dist/assets/store-s3.js +0 -1
- package/dist/assets/svg-sanitizer.d.ts +0 -1
- package/dist/assets/svg-sanitizer.js +0 -1
- package/dist/assets/transform-directives.d.ts +0 -1
- package/dist/assets/transform-directives.js +0 -1
- package/dist/assets/transform.d.ts +1 -2
- package/dist/assets/transform.js +0 -1
- package/dist/assets/types.d.ts +0 -1
- package/dist/assets/types.js +0 -1
- package/dist/auth/cache.d.ts +2 -3
- package/dist/auth/cache.js +0 -1
- package/dist/auth/caching-auth-plugin.d.ts +3 -4
- package/dist/auth/caching-auth-plugin.js +0 -1
- package/dist/auth/context-helpers.d.ts +1 -2
- package/dist/auth/context-helpers.js +0 -1
- package/dist/auth/file-based-auth-cache.d.ts +3 -4
- package/dist/auth/file-based-auth-cache.js +14 -3
- package/dist/auth/index.d.ts +6 -7
- package/dist/auth/index.js +0 -1
- package/dist/auth/plugin.d.ts +3 -4
- package/dist/auth/plugin.js +0 -1
- package/dist/auth/types.d.ts +1 -2
- package/dist/auth/types.js +0 -1
- package/dist/authorization/branch.d.ts +4 -5
- package/dist/authorization/branch.js +0 -1
- package/dist/authorization/content.d.ts +6 -7
- package/dist/authorization/content.js +0 -1
- package/dist/authorization/groups/index.d.ts +2 -3
- package/dist/authorization/groups/index.js +0 -1
- package/dist/authorization/groups/loader.d.ts +3 -4
- package/dist/authorization/groups/loader.js +0 -1
- package/dist/authorization/groups/schema.d.ts +1 -2
- package/dist/authorization/groups/schema.js +0 -1
- package/dist/authorization/helpers.d.ts +0 -1
- package/dist/authorization/helpers.js +0 -1
- package/dist/authorization/index.d.ts +11 -12
- package/dist/authorization/index.js +0 -1
- package/dist/authorization/path.d.ts +4 -5
- package/dist/authorization/path.js +0 -1
- package/dist/authorization/permissions/index.d.ts +2 -3
- package/dist/authorization/permissions/index.js +0 -1
- package/dist/authorization/permissions/loader.d.ts +4 -5
- package/dist/authorization/permissions/loader.js +0 -1
- package/dist/authorization/permissions/schema.d.ts +2 -3
- package/dist/authorization/permissions/schema.js +0 -1
- package/dist/authorization/protected-branch.d.ts +2 -3
- package/dist/authorization/protected-branch.js +0 -1
- package/dist/authorization/settings-file-store.d.ts +1 -2
- package/dist/authorization/settings-file-store.js +0 -1
- package/dist/authorization/types.d.ts +6 -7
- package/dist/authorization/types.js +0 -1
- package/dist/authorization/validation.d.ts +1 -2
- package/dist/authorization/validation.js +0 -1
- package/dist/branch-health.d.ts +22 -3
- package/dist/branch-health.js +6 -2
- package/dist/branch-metadata.d.ts +2 -3
- package/dist/branch-metadata.js +0 -1
- package/dist/branch-registry.d.ts +1 -2
- package/dist/branch-registry.js +0 -1
- package/dist/branch-schema-cache.d.ts +4 -5
- package/dist/branch-schema-cache.js +0 -1
- package/dist/branch-workspace.d.ts +4 -5
- package/dist/branch-workspace.js +0 -1
- package/dist/build/generate-ai-content.d.ts +21 -5
- package/dist/build/generate-ai-content.js +98 -6
- package/dist/build/index.d.ts +2 -3
- package/dist/build/index.js +0 -1
- package/dist/build-canopy.d.ts +5 -6
- package/dist/build-canopy.js +0 -1
- package/dist/build-mode.d.ts +1 -2
- package/dist/build-mode.js +0 -1
- package/dist/cli/cli.d.ts +18 -2
- package/dist/cli/cli.js +1172 -490
- package/dist/cli/generate-ai-content.d.ts +0 -1
- package/dist/cli/generate-ai-content.js +1000 -360
- package/dist/cli/init.d.ts +1 -2
- package/dist/cli/init.js +43 -6
- package/dist/cli/migrate.d.ts +5 -3
- package/dist/cli/migrate.js +5 -3
- package/dist/cli/project-detect.d.ts +5 -2
- package/dist/cli/project-detect.js +5 -1
- package/dist/cli/project-root.d.ts +0 -1
- package/dist/cli/project-root.js +0 -1
- package/dist/cli/sync.d.ts +0 -1
- package/dist/cli/sync.js +0 -1
- package/dist/cli/template-files/Dockerfile.cms.template +8 -2
- package/dist/cli/template-files/cms-stack.ts.template +33 -6
- package/dist/cli/template-files/deploy-cms.yml.template +29 -14
- package/dist/cli/templates.d.ts +0 -1
- package/dist/cli/templates.js +0 -1
- package/dist/client.d.ts +13 -14
- package/dist/client.js +0 -1
- package/dist/comment-store.d.ts +0 -1
- package/dist/comment-store.js +0 -1
- package/dist/config/flatten.d.ts +1 -2
- package/dist/config/flatten.js +0 -1
- package/dist/config/helpers.d.ts +3 -4
- package/dist/config/helpers.js +2 -2
- package/dist/config/index.d.ts +10 -11
- package/dist/config/index.js +0 -1
- package/dist/config/schemas/collection.d.ts +0 -1
- package/dist/config/schemas/collection.js +0 -1
- package/dist/config/schemas/config.d.ts +7 -4
- package/dist/config/schemas/config.js +12 -1
- package/dist/config/schemas/field.d.ts +3 -1
- package/dist/config/schemas/field.js +5 -1
- package/dist/config/schemas/media.d.ts +0 -1
- package/dist/config/schemas/media.js +0 -1
- package/dist/config/schemas/permissions.d.ts +0 -1
- package/dist/config/schemas/permissions.js +0 -1
- package/dist/config/types.d.ts +55 -9
- package/dist/config/types.js +0 -1
- package/dist/config/validation.d.ts +1 -2
- package/dist/config/validation.js +0 -1
- package/dist/config.d.ts +2 -3
- package/dist/config.js +0 -1
- package/dist/content-id-index.d.ts +1 -2
- package/dist/content-id-index.js +0 -1
- package/dist/content-index-generation.d.ts +0 -1
- package/dist/content-index-generation.js +0 -1
- package/dist/content-index-registry.d.ts +0 -1
- package/dist/content-index-registry.js +0 -1
- package/dist/content-listing.d.ts +75 -59
- package/dist/content-listing.js +76 -83
- package/dist/content-reader.d.ts +4 -5
- package/dist/content-reader.js +22 -3
- package/dist/content-store.d.ts +137 -6
- package/dist/content-store.js +294 -22
- package/dist/content-tree.d.ts +15 -5
- package/dist/content-tree.js +27 -8
- package/dist/context.d.ts +9 -6
- package/dist/context.js +0 -1
- package/dist/dev-content-watcher.d.ts +12 -3
- package/dist/dev-content-watcher.js +120 -30
- package/dist/editor/BranchManager.d.ts +4 -5
- package/dist/editor/BranchManager.js +0 -1
- package/dist/editor/CanopyEditor.d.ts +2 -3
- package/dist/editor/CanopyEditor.js +1 -2
- package/dist/editor/CanopyEditorPage.d.ts +2 -3
- package/dist/editor/CanopyEditorPage.js +0 -1
- package/dist/editor/CommentsPanel.d.ts +2 -3
- package/dist/editor/CommentsPanel.js +0 -1
- package/dist/editor/Editor.d.ts +13 -8
- package/dist/editor/Editor.js +4 -5
- package/dist/editor/EditorPanes.d.ts +0 -1
- package/dist/editor/EditorPanes.js +0 -1
- package/dist/editor/EntryNavigator.d.ts +1 -2
- package/dist/editor/EntryNavigator.js +0 -1
- package/dist/editor/FormRenderer.d.ts +2 -3
- package/dist/editor/FormRenderer.js +22 -3
- package/dist/editor/GroupManager.d.ts +2 -3
- package/dist/editor/GroupManager.js +0 -1
- package/dist/editor/PermissionManager.d.ts +2 -3
- package/dist/editor/PermissionManager.js +0 -1
- package/dist/editor/admin/SystemHealthPanel.d.ts +0 -1
- package/dist/editor/admin/SystemHealthPanel.js +0 -1
- package/dist/editor/admin/useSystemHealth.d.ts +2 -3
- package/dist/editor/admin/useSystemHealth.js +0 -1
- package/dist/editor/canopy-path.d.ts +0 -1
- package/dist/editor/canopy-path.js +0 -1
- package/dist/editor/client-reference-resolver.d.ts +13 -4
- package/dist/editor/client-reference-resolver.js +18 -8
- package/dist/editor/comments/BranchComments.d.ts +2 -3
- package/dist/editor/comments/BranchComments.js +0 -1
- package/dist/editor/comments/EntryComments.d.ts +1 -2
- package/dist/editor/comments/EntryComments.js +0 -1
- package/dist/editor/comments/FieldWrapper.d.ts +1 -2
- package/dist/editor/comments/FieldWrapper.js +0 -1
- package/dist/editor/comments/InlineCommentThread.d.ts +2 -3
- package/dist/editor/comments/InlineCommentThread.js +0 -1
- package/dist/editor/comments/ThreadCarousel.d.ts +2 -3
- package/dist/editor/comments/ThreadCarousel.js +0 -1
- package/dist/editor/components/ConfirmDeleteModal.d.ts +0 -1
- package/dist/editor/components/ConfirmDeleteModal.js +0 -1
- package/dist/editor/components/EditorFooter.d.ts +0 -1
- package/dist/editor/components/EditorFooter.js +0 -1
- package/dist/editor/components/EditorHeader.d.ts +4 -5
- package/dist/editor/components/EditorHeader.js +0 -1
- package/dist/editor/components/EditorSidebar.d.ts +1 -2
- package/dist/editor/components/EditorSidebar.js +0 -1
- package/dist/editor/components/EntryCreateModal.d.ts +0 -1
- package/dist/editor/components/EntryCreateModal.js +21 -10
- package/dist/editor/components/RenameEntryModal.d.ts +0 -1
- package/dist/editor/components/RenameEntryModal.js +0 -1
- package/dist/editor/components/UserBadge.d.ts +2 -3
- package/dist/editor/components/UserBadge.js +0 -1
- package/dist/editor/components/index.d.ts +3 -4
- package/dist/editor/components/index.js +0 -1
- package/dist/editor/context/ApiClientContext.d.ts +9 -3
- package/dist/editor/context/ApiClientContext.js +8 -4
- package/dist/editor/context/AssetContext.d.ts +26 -2
- package/dist/editor/context/AssetContext.js +23 -3
- package/dist/editor/context/EditorStateContext.d.ts +1 -2
- package/dist/editor/context/EditorStateContext.js +0 -1
- package/dist/editor/context/SWRProvider.d.ts +0 -1
- package/dist/editor/context/SWRProvider.js +0 -1
- package/dist/editor/context/index.d.ts +4 -5
- package/dist/editor/context/index.js +0 -1
- package/dist/editor/editor-config.d.ts +2 -3
- package/dist/editor/editor-config.js +0 -1
- package/dist/editor/editor-utils.d.ts +22 -10
- package/dist/editor/editor-utils.js +41 -10
- package/dist/editor/fields/BlockField.d.ts +1 -2
- package/dist/editor/fields/BlockField.js +0 -1
- package/dist/editor/fields/CodeField.d.ts +0 -1
- package/dist/editor/fields/CodeField.js +0 -1
- package/dist/editor/fields/DateTimeField.d.ts +0 -1
- package/dist/editor/fields/DateTimeField.js +0 -1
- package/dist/editor/fields/ImageField.d.ts +1 -2
- package/dist/editor/fields/ImageField.js +0 -1
- package/dist/editor/fields/InlineGroupField.d.ts +2 -3
- package/dist/editor/fields/InlineGroupField.js +0 -1
- package/dist/editor/fields/MarkdownField.d.ts +0 -1
- package/dist/editor/fields/MarkdownField.js +0 -1
- package/dist/editor/fields/MdxImageDialog.d.ts +0 -1
- package/dist/editor/fields/MdxImageDialog.js +0 -1
- package/dist/editor/fields/NumberField.d.ts +0 -1
- package/dist/editor/fields/NumberField.js +0 -1
- package/dist/editor/fields/NumberListField.d.ts +0 -1
- package/dist/editor/fields/NumberListField.js +0 -1
- package/dist/editor/fields/ObjectField.d.ts +11 -2
- package/dist/editor/fields/ObjectField.js +3 -4
- package/dist/editor/fields/ReferenceField.d.ts +0 -1
- package/dist/editor/fields/ReferenceField.js +8 -3
- package/dist/editor/fields/SelectField.d.ts +0 -1
- package/dist/editor/fields/SelectField.js +0 -1
- package/dist/editor/fields/StringListField.d.ts +0 -1
- package/dist/editor/fields/StringListField.js +0 -1
- package/dist/editor/fields/TextField.d.ts +0 -1
- package/dist/editor/fields/TextField.js +0 -1
- package/dist/editor/fields/ToggleField.d.ts +0 -1
- package/dist/editor/fields/ToggleField.js +0 -1
- package/dist/editor/fields/entry-link/EntryLinkContext.d.ts +1 -2
- package/dist/editor/fields/entry-link/EntryLinkContext.js +0 -1
- package/dist/editor/fields/entry-link/InsertEntryLink.d.ts +0 -1
- package/dist/editor/fields/entry-link/InsertEntryLink.js +0 -1
- package/dist/editor/fields/entry-link/index.d.ts +2 -3
- package/dist/editor/fields/entry-link/index.js +0 -1
- package/dist/editor/group-manager/ExternalGroupsTab.d.ts +1 -2
- package/dist/editor/group-manager/ExternalGroupsTab.js +0 -1
- package/dist/editor/group-manager/GroupCard.d.ts +1 -2
- package/dist/editor/group-manager/GroupCard.js +0 -1
- package/dist/editor/group-manager/GroupForm.d.ts +1 -2
- package/dist/editor/group-manager/GroupForm.js +0 -1
- package/dist/editor/group-manager/InternalGroupsTab.d.ts +1 -2
- package/dist/editor/group-manager/InternalGroupsTab.js +0 -1
- package/dist/editor/group-manager/MemberList.d.ts +1 -2
- package/dist/editor/group-manager/MemberList.js +0 -1
- package/dist/editor/group-manager/hooks/useExternalGroupSearch.d.ts +1 -2
- package/dist/editor/group-manager/hooks/useExternalGroupSearch.js +0 -1
- package/dist/editor/group-manager/hooks/useGroupState.d.ts +1 -2
- package/dist/editor/group-manager/hooks/useGroupState.js +0 -1
- package/dist/editor/group-manager/hooks/useUserSearch.d.ts +1 -2
- package/dist/editor/group-manager/hooks/useUserSearch.js +0 -1
- package/dist/editor/group-manager/index.d.ts +5 -6
- package/dist/editor/group-manager/index.js +0 -1
- package/dist/editor/group-manager/types.d.ts +4 -5
- package/dist/editor/group-manager/types.js +0 -1
- package/dist/editor/hooks/index.d.ts +14 -15
- package/dist/editor/hooks/index.js +0 -1
- package/dist/editor/hooks/useBranchActions.d.ts +0 -1
- package/dist/editor/hooks/useBranchActions.js +0 -1
- package/dist/editor/hooks/useBranchManager.d.ts +4 -5
- package/dist/editor/hooks/useBranchManager.js +0 -1
- package/dist/editor/hooks/useBranchesData.d.ts +2 -3
- package/dist/editor/hooks/useBranchesData.js +0 -1
- package/dist/editor/hooks/useCommentSystem.d.ts +2 -3
- package/dist/editor/hooks/useCommentSystem.js +0 -1
- package/dist/editor/hooks/useCommentsData.d.ts +2 -3
- package/dist/editor/hooks/useCommentsData.js +0 -1
- package/dist/editor/hooks/useDraftManager.d.ts +3 -4
- package/dist/editor/hooks/useDraftManager.js +0 -1
- package/dist/editor/hooks/useEditorLayout.d.ts +1 -2
- package/dist/editor/hooks/useEditorLayout.js +0 -1
- package/dist/editor/hooks/useEntriesData.d.ts +3 -5
- package/dist/editor/hooks/useEntriesData.js +0 -3
- package/dist/editor/hooks/useEntryLinkResolution.d.ts +2 -3
- package/dist/editor/hooks/useEntryLinkResolution.js +0 -1
- package/dist/editor/hooks/useEntryManager.d.ts +5 -7
- package/dist/editor/hooks/useEntryManager.js +8 -3
- package/dist/editor/hooks/useGroupManager.d.ts +2 -3
- package/dist/editor/hooks/useGroupManager.js +0 -1
- package/dist/editor/hooks/usePermissionManager.d.ts +2 -3
- package/dist/editor/hooks/usePermissionManager.js +0 -1
- package/dist/editor/hooks/useReferenceResolution.d.ts +1 -2
- package/dist/editor/hooks/useReferenceResolution.js +8 -3
- package/dist/editor/hooks/useSchemaManager.d.ts +2 -3
- package/dist/editor/hooks/useSchemaManager.js +0 -1
- package/dist/editor/hooks/useUserContext.d.ts +1 -2
- package/dist/editor/hooks/useUserContext.js +8 -3
- package/dist/editor/hooks/useUserMetadata.d.ts +2 -3
- package/dist/editor/hooks/useUserMetadata.js +0 -1
- package/dist/editor/media/AssetCard.d.ts +1 -2
- package/dist/editor/media/AssetCard.js +0 -1
- package/dist/editor/media/CropStep.d.ts +1 -2
- package/dist/editor/media/CropStep.js +0 -1
- package/dist/editor/media/MediaLibrary.d.ts +1 -2
- package/dist/editor/media/MediaLibrary.js +0 -1
- package/dist/editor/media/MediaLibraryBody.d.ts +1 -2
- package/dist/editor/media/MediaLibraryBody.js +0 -1
- package/dist/editor/media/crop-math.d.ts +1 -2
- package/dist/editor/media/crop-math.js +0 -1
- package/dist/editor/media/upload-asset.d.ts +2 -3
- package/dist/editor/media/upload-asset.js +0 -1
- package/dist/editor/media/upload-constants.d.ts +0 -1
- package/dist/editor/media/upload-constants.js +0 -1
- package/dist/editor/media/useAssetUpload.d.ts +1 -2
- package/dist/editor/media/useAssetUpload.js +0 -1
- package/dist/editor/media/xhr-upload.d.ts +0 -1
- package/dist/editor/media/xhr-upload.js +0 -1
- package/dist/editor/permission-manager/GroupSelector.d.ts +1 -2
- package/dist/editor/permission-manager/GroupSelector.js +0 -1
- package/dist/editor/permission-manager/PermissionEditor.d.ts +1 -2
- package/dist/editor/permission-manager/PermissionEditor.js +0 -1
- package/dist/editor/permission-manager/PermissionLevelBadge.d.ts +1 -2
- package/dist/editor/permission-manager/PermissionLevelBadge.js +0 -1
- package/dist/editor/permission-manager/PermissionTree.d.ts +1 -2
- package/dist/editor/permission-manager/PermissionTree.js +0 -1
- package/dist/editor/permission-manager/UserSelector.d.ts +1 -2
- package/dist/editor/permission-manager/UserSelector.js +0 -1
- package/dist/editor/permission-manager/constants.d.ts +1 -2
- package/dist/editor/permission-manager/constants.js +0 -1
- package/dist/editor/permission-manager/hooks/useGroupsAndUsers.d.ts +1 -2
- package/dist/editor/permission-manager/hooks/useGroupsAndUsers.js +0 -1
- package/dist/editor/permission-manager/hooks/usePermissionTree.d.ts +2 -3
- package/dist/editor/permission-manager/hooks/usePermissionTree.js +0 -1
- package/dist/editor/permission-manager/index.d.ts +4 -5
- package/dist/editor/permission-manager/index.js +0 -1
- package/dist/editor/permission-manager/types.d.ts +3 -4
- package/dist/editor/permission-manager/types.js +0 -1
- package/dist/editor/permission-manager/utils.d.ts +2 -3
- package/dist/editor/permission-manager/utils.js +0 -1
- package/dist/editor/preview-bridge.d.ts +1 -2
- package/dist/editor/preview-bridge.js +0 -1
- package/dist/editor/relative-time.d.ts +0 -1
- package/dist/editor/relative-time.js +0 -1
- package/dist/editor/schema-editor/CollectionEditor.d.ts +4 -5
- package/dist/editor/schema-editor/CollectionEditor.js +0 -1
- package/dist/editor/schema-editor/EntryTypeEditor.d.ts +2 -3
- package/dist/editor/schema-editor/EntryTypeEditor.js +0 -1
- package/dist/editor/schema-editor/index.d.ts +2 -3
- package/dist/editor/schema-editor/index.js +0 -1
- package/dist/editor/theme.d.ts +0 -1
- package/dist/editor/theme.js +0 -1
- package/dist/editor/utils/env.d.ts +0 -1
- package/dist/editor/utils/env.js +0 -1
- package/dist/entry-link-resolver.d.ts +1 -2
- package/dist/entry-link-resolver.js +0 -1
- package/dist/entry-schema-registry.d.ts +3 -4
- package/dist/entry-schema-registry.js +6 -2
- package/dist/entry-schema.d.ts +114 -3
- package/dist/entry-schema.js +46 -1
- package/dist/git-manager.d.ts +1 -2
- package/dist/git-manager.js +0 -1
- package/dist/github-service.d.ts +1 -2
- package/dist/github-service.js +0 -1
- package/dist/http/handler.d.ts +6 -7
- package/dist/http/handler.js +0 -1
- package/dist/http/index.d.ts +6 -7
- package/dist/http/index.js +0 -1
- package/dist/http/router.d.ts +2 -3
- package/dist/http/router.js +0 -1
- package/dist/http/types.d.ts +0 -1
- package/dist/http/types.js +0 -1
- package/dist/id.d.ts +2 -3
- package/dist/id.js +0 -1
- package/dist/index.d.ts +17 -18
- package/dist/index.js +0 -1
- package/dist/operating-mode/client-safe-strategy.d.ts +1 -2
- package/dist/operating-mode/client-safe-strategy.js +0 -1
- package/dist/operating-mode/client-unsafe-strategy.d.ts +1 -2
- package/dist/operating-mode/client-unsafe-strategy.js +0 -1
- package/dist/operating-mode/client.d.ts +3 -4
- package/dist/operating-mode/client.js +0 -1
- package/dist/operating-mode/deployment-name-fixtures.d.ts +0 -1
- package/dist/operating-mode/deployment-name-fixtures.js +0 -1
- package/dist/operating-mode/deployment-name.d.ts +0 -1
- package/dist/operating-mode/deployment-name.js +0 -1
- package/dist/operating-mode/index.d.ts +5 -6
- package/dist/operating-mode/index.js +0 -1
- package/dist/operating-mode/mode-env.d.ts +1 -2
- package/dist/operating-mode/mode-env.js +0 -1
- package/dist/operating-mode/types.d.ts +2 -3
- package/dist/operating-mode/types.js +0 -1
- package/dist/paths/branch-name.d.ts +1 -2
- package/dist/paths/branch-name.js +0 -1
- package/dist/paths/branch.d.ts +3 -4
- package/dist/paths/branch.js +0 -1
- package/dist/paths/index.d.ts +8 -9
- package/dist/paths/index.js +0 -1
- package/dist/paths/normalize-server.d.ts +1 -2
- package/dist/paths/normalize-server.js +0 -1
- package/dist/paths/normalize.d.ts +1 -2
- package/dist/paths/normalize.js +0 -1
- package/dist/paths/resolve.d.ts +2 -3
- package/dist/paths/resolve.js +0 -1
- package/dist/paths/types.d.ts +0 -1
- package/dist/paths/types.js +0 -1
- package/dist/paths/validation.d.ts +1 -2
- package/dist/paths/validation.js +0 -1
- package/dist/reference-resolver.d.ts +3 -4
- package/dist/reference-resolver.js +0 -1
- package/dist/resolve-canopy-user.d.ts +3 -4
- package/dist/resolve-canopy-user.js +0 -1
- package/dist/resource-generation.d.ts +0 -1
- package/dist/resource-generation.js +0 -1
- package/dist/schema/index.d.ts +3 -4
- package/dist/schema/index.js +0 -1
- package/dist/schema/meta-loader.d.ts +3 -4
- package/dist/schema/meta-loader.js +3 -3
- package/dist/schema/resolver.d.ts +2 -3
- package/dist/schema/resolver.js +0 -1
- package/dist/schema/schema-store-types.d.ts +2 -3
- package/dist/schema/schema-store-types.js +0 -1
- package/dist/schema/schema-store.d.ts +6 -7
- package/dist/schema/schema-store.js +33 -1
- package/dist/schema/types.d.ts +1 -2
- package/dist/schema/types.js +0 -1
- package/dist/server.d.ts +54 -45
- package/dist/server.js +11 -3
- package/dist/services.d.ts +10 -11
- package/dist/services.js +0 -1
- package/dist/settings-workspace.d.ts +12 -15
- package/dist/settings-workspace.js +10 -13
- package/dist/static/index.d.ts +164 -6
- package/dist/static/index.js +242 -7
- package/dist/static/seo.d.ts +8 -30
- package/dist/static/seo.js +19 -46
- package/dist/sync-core.d.ts +0 -1
- package/dist/sync-core.js +0 -1
- package/dist/task-queue/index.d.ts +2 -3
- package/dist/task-queue/index.js +0 -1
- package/dist/task-queue/task-queue.d.ts +1 -2
- package/dist/task-queue/task-queue.js +10 -2
- package/dist/task-queue/types.d.ts +0 -1
- package/dist/task-queue/types.js +0 -1
- package/dist/types.d.ts +3 -4
- package/dist/types.js +0 -1
- package/dist/url-collision.d.ts +86 -0
- package/dist/url-collision.js +186 -0
- package/dist/url-path-resolver.d.ts +11 -2
- package/dist/url-path-resolver.js +37 -5
- package/dist/user.d.ts +3 -4
- package/dist/user.js +0 -1
- package/dist/utils/async-mutex.d.ts +0 -1
- package/dist/utils/async-mutex.js +0 -1
- package/dist/utils/atomic-write.d.ts +0 -1
- package/dist/utils/atomic-write.js +0 -1
- package/dist/utils/body-field.d.ts +12 -2
- package/dist/utils/body-field.js +17 -1
- package/dist/utils/content-serialize.d.ts +37 -0
- package/dist/utils/content-serialize.js +429 -0
- package/dist/utils/content-write-lock.d.ts +12 -16
- package/dist/utils/content-write-lock.js +38 -22
- package/dist/utils/debug.d.ts +0 -1
- package/dist/utils/debug.js +0 -1
- package/dist/utils/entry-url.d.ts +17 -1
- package/dist/utils/entry-url.js +21 -3
- package/dist/utils/error.d.ts +0 -1
- package/dist/utils/error.js +0 -1
- package/dist/utils/flatten-group-fields.d.ts +1 -2
- package/dist/utils/flatten-group-fields.js +0 -1
- package/dist/utils/format.d.ts +1 -2
- package/dist/utils/format.js +0 -1
- package/dist/utils/fs.d.ts +7 -1
- package/dist/utils/fs.js +16 -1
- package/dist/utils/git.d.ts +18 -2
- package/dist/utils/git.js +61 -1
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/logger.js +0 -1
- package/dist/utils/occ-json-write.d.ts +0 -1
- package/dist/utils/occ-json-write.js +0 -1
- package/dist/utils/provisioning-lock.d.ts +17 -4
- package/dist/utils/provisioning-lock.js +94 -14
- package/dist/utils/sanitize-href.d.ts +2 -3
- package/dist/utils/sanitize-href.js +2 -3
- package/dist/utils/title-field.d.ts +1 -2
- package/dist/utils/title-field.js +0 -1
- package/dist/utils/typed-filename.d.ts +61 -0
- package/dist/utils/typed-filename.js +92 -0
- package/dist/utils/url-prefix.d.ts +121 -0
- package/dist/utils/url-prefix.js +158 -0
- package/dist/validation/block-structural-keys.d.ts +42 -0
- package/dist/validation/block-structural-keys.js +44 -0
- package/dist/validation/deletion-checker.d.ts +4 -5
- package/dist/validation/deletion-checker.js +0 -1
- package/dist/validation/entry-link-validator.d.ts +2 -3
- package/dist/validation/entry-link-validator.js +0 -1
- package/dist/validation/entry-type-reference-validator.d.ts +1 -2
- package/dist/validation/entry-type-reference-validator.js +0 -1
- package/dist/validation/entry-validator.d.ts +23 -2
- package/dist/validation/entry-validator.js +34 -2
- package/dist/validation/field-traversal.d.ts +28 -4
- package/dist/validation/field-traversal.js +24 -7
- package/dist/validation/reference-validator.d.ts +2 -3
- package/dist/validation/reference-validator.js +0 -1
- package/dist/worker/cms-worker.d.ts +31 -2
- package/dist/worker/cms-worker.js +321 -13
- package/dist/worker/log.d.ts +0 -1
- package/dist/worker/log.js +0 -1
- package/dist/worker/task-queue-config.d.ts +1 -2
- package/dist/worker/task-queue-config.js +0 -1
- package/dist/worker/task-queue.d.ts +3 -4
- package/dist/worker/task-queue.js +0 -1
- package/dist/worker/worker-status.d.ts +1 -2
- package/dist/worker/worker-status.js +0 -1
- package/package.json +3 -6
- package/dist/ai/generate.d.ts.map +0 -1
- package/dist/ai/generate.js.map +0 -1
- package/dist/ai/handler.d.ts.map +0 -1
- package/dist/ai/handler.js.map +0 -1
- package/dist/ai/index.d.ts.map +0 -1
- package/dist/ai/index.js.map +0 -1
- package/dist/ai/json-to-markdown.d.ts.map +0 -1
- package/dist/ai/json-to-markdown.js.map +0 -1
- package/dist/ai/resolve-branch.d.ts.map +0 -1
- package/dist/ai/resolve-branch.js.map +0 -1
- package/dist/ai/strip-mdx.d.ts.map +0 -1
- package/dist/ai/strip-mdx.js.map +0 -1
- package/dist/ai/to-plain-text.d.ts.map +0 -1
- package/dist/ai/to-plain-text.js.map +0 -1
- package/dist/ai/transform-components.d.ts.map +0 -1
- package/dist/ai/transform-components.js.map +0 -1
- package/dist/ai/types.d.ts.map +0 -1
- package/dist/ai/types.js.map +0 -1
- package/dist/api/__test__/mock-client.d.ts +0 -231
- package/dist/api/__test__/mock-client.d.ts.map +0 -1
- package/dist/api/__test__/mock-client.js +0 -388
- package/dist/api/__test__/mock-client.js.map +0 -1
- package/dist/api/admin-branch-health.d.ts.map +0 -1
- package/dist/api/admin-branch-health.js.map +0 -1
- package/dist/api/admin.d.ts.map +0 -1
- package/dist/api/admin.js.map +0 -1
- package/dist/api/assets.d.ts.map +0 -1
- package/dist/api/assets.js.map +0 -1
- package/dist/api/branch-merge.d.ts.map +0 -1
- package/dist/api/branch-merge.js.map +0 -1
- package/dist/api/branch-review.d.ts.map +0 -1
- package/dist/api/branch-review.js.map +0 -1
- package/dist/api/branch-status.d.ts.map +0 -1
- package/dist/api/branch-status.js.map +0 -1
- package/dist/api/branch-withdraw.d.ts.map +0 -1
- package/dist/api/branch-withdraw.js.map +0 -1
- package/dist/api/branch.d.ts.map +0 -1
- package/dist/api/branch.js.map +0 -1
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/client.js.map +0 -1
- package/dist/api/comments.d.ts.map +0 -1
- package/dist/api/comments.js.map +0 -1
- package/dist/api/content.d.ts.map +0 -1
- package/dist/api/content.js.map +0 -1
- package/dist/api/entries-constants.d.ts.map +0 -1
- package/dist/api/entries-constants.js.map +0 -1
- package/dist/api/entries.d.ts.map +0 -1
- package/dist/api/entries.js.map +0 -1
- package/dist/api/github-sync.d.ts.map +0 -1
- package/dist/api/github-sync.js.map +0 -1
- package/dist/api/groups.d.ts.map +0 -1
- package/dist/api/groups.js.map +0 -1
- package/dist/api/guards.d.ts.map +0 -1
- package/dist/api/guards.js.map +0 -1
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js.map +0 -1
- package/dist/api/permissions.d.ts.map +0 -1
- package/dist/api/permissions.js.map +0 -1
- package/dist/api/reference-options.d.ts.map +0 -1
- package/dist/api/reference-options.js.map +0 -1
- package/dist/api/request-body-hash.d.ts.map +0 -1
- package/dist/api/request-body-hash.js.map +0 -1
- package/dist/api/resolve-references.d.ts.map +0 -1
- package/dist/api/resolve-references.js.map +0 -1
- package/dist/api/route-builder.d.ts.map +0 -1
- package/dist/api/route-builder.js.map +0 -1
- package/dist/api/schema.d.ts.map +0 -1
- package/dist/api/schema.js.map +0 -1
- package/dist/api/settings-helpers.d.ts.map +0 -1
- package/dist/api/settings-helpers.js.map +0 -1
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js.map +0 -1
- package/dist/api/user.d.ts.map +0 -1
- package/dist/api/user.js.map +0 -1
- package/dist/api/validators.d.ts.map +0 -1
- package/dist/api/validators.js.map +0 -1
- package/dist/assets/asset-prefixes.d.ts.map +0 -1
- package/dist/assets/asset-prefixes.js.map +0 -1
- package/dist/assets/asset-src.d.ts.map +0 -1
- package/dist/assets/asset-src.js.map +0 -1
- package/dist/assets/asset-url.d.ts.map +0 -1
- package/dist/assets/asset-url.js.map +0 -1
- package/dist/assets/factory.d.ts.map +0 -1
- package/dist/assets/factory.js.map +0 -1
- package/dist/assets/finalize.d.ts.map +0 -1
- package/dist/assets/finalize.js.map +0 -1
- package/dist/assets/index.d.ts.map +0 -1
- package/dist/assets/index.js.map +0 -1
- package/dist/assets/keys.d.ts.map +0 -1
- package/dist/assets/keys.js.map +0 -1
- package/dist/assets/pipeline.d.ts.map +0 -1
- package/dist/assets/pipeline.js.map +0 -1
- package/dist/assets/store-local.d.ts.map +0 -1
- package/dist/assets/store-local.js.map +0 -1
- package/dist/assets/store-s3.d.ts.map +0 -1
- package/dist/assets/store-s3.js.map +0 -1
- package/dist/assets/svg-sanitizer.d.ts.map +0 -1
- package/dist/assets/svg-sanitizer.js.map +0 -1
- package/dist/assets/transform-directives.d.ts.map +0 -1
- package/dist/assets/transform-directives.js.map +0 -1
- package/dist/assets/transform.d.ts.map +0 -1
- package/dist/assets/transform.js.map +0 -1
- package/dist/assets/types.d.ts.map +0 -1
- package/dist/assets/types.js.map +0 -1
- package/dist/auth/cache.d.ts.map +0 -1
- package/dist/auth/cache.js.map +0 -1
- package/dist/auth/caching-auth-plugin.d.ts.map +0 -1
- package/dist/auth/caching-auth-plugin.js.map +0 -1
- package/dist/auth/context-helpers.d.ts.map +0 -1
- package/dist/auth/context-helpers.js.map +0 -1
- package/dist/auth/file-based-auth-cache.d.ts.map +0 -1
- package/dist/auth/file-based-auth-cache.js.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/plugin.d.ts.map +0 -1
- package/dist/auth/plugin.js.map +0 -1
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js.map +0 -1
- package/dist/authorization/branch.d.ts.map +0 -1
- package/dist/authorization/branch.js.map +0 -1
- package/dist/authorization/content.d.ts.map +0 -1
- package/dist/authorization/content.js.map +0 -1
- package/dist/authorization/groups/index.d.ts.map +0 -1
- package/dist/authorization/groups/index.js.map +0 -1
- package/dist/authorization/groups/loader.d.ts.map +0 -1
- package/dist/authorization/groups/loader.js.map +0 -1
- package/dist/authorization/groups/schema.d.ts.map +0 -1
- package/dist/authorization/groups/schema.js.map +0 -1
- package/dist/authorization/helpers.d.ts.map +0 -1
- package/dist/authorization/helpers.js.map +0 -1
- package/dist/authorization/index.d.ts.map +0 -1
- package/dist/authorization/index.js.map +0 -1
- package/dist/authorization/path.d.ts.map +0 -1
- package/dist/authorization/path.js.map +0 -1
- package/dist/authorization/permissions/index.d.ts.map +0 -1
- package/dist/authorization/permissions/index.js.map +0 -1
- package/dist/authorization/permissions/loader.d.ts.map +0 -1
- package/dist/authorization/permissions/loader.js.map +0 -1
- package/dist/authorization/permissions/schema.d.ts.map +0 -1
- package/dist/authorization/permissions/schema.js.map +0 -1
- package/dist/authorization/protected-branch.d.ts.map +0 -1
- package/dist/authorization/protected-branch.js.map +0 -1
- package/dist/authorization/settings-file-store.d.ts.map +0 -1
- package/dist/authorization/settings-file-store.js.map +0 -1
- package/dist/authorization/test-utils.d.ts +0 -26
- package/dist/authorization/test-utils.d.ts.map +0 -1
- package/dist/authorization/test-utils.js +0 -23
- package/dist/authorization/test-utils.js.map +0 -1
- package/dist/authorization/types.d.ts.map +0 -1
- package/dist/authorization/types.js.map +0 -1
- package/dist/authorization/validation.d.ts.map +0 -1
- package/dist/authorization/validation.js.map +0 -1
- package/dist/branch-health.d.ts.map +0 -1
- package/dist/branch-health.js.map +0 -1
- package/dist/branch-metadata.d.ts.map +0 -1
- package/dist/branch-metadata.js.map +0 -1
- package/dist/branch-registry.d.ts.map +0 -1
- package/dist/branch-registry.js.map +0 -1
- package/dist/branch-schema-cache.d.ts.map +0 -1
- package/dist/branch-schema-cache.js.map +0 -1
- package/dist/branch-workspace.d.ts.map +0 -1
- package/dist/branch-workspace.js.map +0 -1
- package/dist/build/generate-ai-content.d.ts.map +0 -1
- package/dist/build/generate-ai-content.js.map +0 -1
- package/dist/build/index.d.ts.map +0 -1
- package/dist/build/index.js.map +0 -1
- package/dist/build-canopy.d.ts.map +0 -1
- package/dist/build-canopy.js.map +0 -1
- package/dist/build-mode.d.ts.map +0 -1
- package/dist/build-mode.js.map +0 -1
- package/dist/cli/cli.d.ts.map +0 -1
- package/dist/cli/cli.js.map +0 -1
- package/dist/cli/generate-ai-content.d.ts.map +0 -1
- package/dist/cli/generate-ai-content.js.map +0 -1
- package/dist/cli/init.d.ts.map +0 -1
- package/dist/cli/init.js.map +0 -1
- package/dist/cli/migrate.d.ts.map +0 -1
- package/dist/cli/migrate.js.map +0 -1
- package/dist/cli/project-detect.d.ts.map +0 -1
- package/dist/cli/project-detect.js.map +0 -1
- package/dist/cli/project-root.d.ts.map +0 -1
- package/dist/cli/project-root.js.map +0 -1
- package/dist/cli/sync.d.ts.map +0 -1
- package/dist/cli/sync.js.map +0 -1
- package/dist/cli/templates.d.ts.map +0 -1
- package/dist/cli/templates.js.map +0 -1
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/comment-store.d.ts.map +0 -1
- package/dist/comment-store.js.map +0 -1
- package/dist/config/flatten.d.ts.map +0 -1
- package/dist/config/flatten.js.map +0 -1
- package/dist/config/helpers.d.ts.map +0 -1
- package/dist/config/helpers.js.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/schemas/collection.d.ts.map +0 -1
- package/dist/config/schemas/collection.js.map +0 -1
- package/dist/config/schemas/config.d.ts.map +0 -1
- package/dist/config/schemas/config.js.map +0 -1
- package/dist/config/schemas/field.d.ts.map +0 -1
- package/dist/config/schemas/field.js.map +0 -1
- package/dist/config/schemas/media.d.ts.map +0 -1
- package/dist/config/schemas/media.js.map +0 -1
- package/dist/config/schemas/permissions.d.ts.map +0 -1
- package/dist/config/schemas/permissions.js.map +0 -1
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js.map +0 -1
- package/dist/config/validation.d.ts.map +0 -1
- package/dist/config/validation.js.map +0 -1
- package/dist/config-test.d.ts +0 -20
- package/dist/config-test.d.ts.map +0 -1
- package/dist/config-test.js +0 -49
- package/dist/config-test.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/content-id-index.d.ts.map +0 -1
- package/dist/content-id-index.js.map +0 -1
- package/dist/content-index-generation.d.ts.map +0 -1
- package/dist/content-index-generation.js.map +0 -1
- package/dist/content-index-registry.d.ts.map +0 -1
- package/dist/content-index-registry.js.map +0 -1
- package/dist/content-listing.d.ts.map +0 -1
- package/dist/content-listing.js.map +0 -1
- package/dist/content-reader.d.ts.map +0 -1
- package/dist/content-reader.js.map +0 -1
- package/dist/content-store.d.ts.map +0 -1
- package/dist/content-store.js.map +0 -1
- package/dist/content-tree.d.ts.map +0 -1
- package/dist/content-tree.js.map +0 -1
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/dev-content-watcher.d.ts.map +0 -1
- package/dist/dev-content-watcher.js.map +0 -1
- package/dist/editor/BranchManager.d.ts.map +0 -1
- package/dist/editor/BranchManager.js.map +0 -1
- package/dist/editor/CanopyEditor.d.ts.map +0 -1
- package/dist/editor/CanopyEditor.js.map +0 -1
- package/dist/editor/CanopyEditorPage.d.ts.map +0 -1
- package/dist/editor/CanopyEditorPage.js.map +0 -1
- package/dist/editor/CommentsPanel.d.ts.map +0 -1
- package/dist/editor/CommentsPanel.js.map +0 -1
- package/dist/editor/Editor.d.ts.map +0 -1
- package/dist/editor/Editor.js.map +0 -1
- package/dist/editor/EditorPanes.d.ts.map +0 -1
- package/dist/editor/EditorPanes.js.map +0 -1
- package/dist/editor/EntryNavigator.d.ts.map +0 -1
- package/dist/editor/EntryNavigator.js.map +0 -1
- package/dist/editor/FormRenderer.d.ts.map +0 -1
- package/dist/editor/FormRenderer.js.map +0 -1
- package/dist/editor/GroupManager.d.ts.map +0 -1
- package/dist/editor/GroupManager.js.map +0 -1
- package/dist/editor/PermissionManager.d.ts.map +0 -1
- package/dist/editor/PermissionManager.js.map +0 -1
- package/dist/editor/admin/SystemHealthPanel.d.ts.map +0 -1
- package/dist/editor/admin/SystemHealthPanel.js.map +0 -1
- package/dist/editor/admin/useSystemHealth.d.ts.map +0 -1
- package/dist/editor/admin/useSystemHealth.js.map +0 -1
- package/dist/editor/canopy-path.d.ts.map +0 -1
- package/dist/editor/canopy-path.js.map +0 -1
- package/dist/editor/client-reference-resolver.d.ts.map +0 -1
- package/dist/editor/client-reference-resolver.js.map +0 -1
- package/dist/editor/comments/BranchComments.d.ts.map +0 -1
- package/dist/editor/comments/BranchComments.js.map +0 -1
- package/dist/editor/comments/EntryComments.d.ts.map +0 -1
- package/dist/editor/comments/EntryComments.js.map +0 -1
- package/dist/editor/comments/FieldWrapper.d.ts.map +0 -1
- package/dist/editor/comments/FieldWrapper.js.map +0 -1
- package/dist/editor/comments/InlineCommentThread.d.ts.map +0 -1
- package/dist/editor/comments/InlineCommentThread.js.map +0 -1
- package/dist/editor/comments/ThreadCarousel.d.ts.map +0 -1
- package/dist/editor/comments/ThreadCarousel.js.map +0 -1
- package/dist/editor/components/ConfirmDeleteModal.d.ts.map +0 -1
- package/dist/editor/components/ConfirmDeleteModal.js.map +0 -1
- package/dist/editor/components/EditorFooter.d.ts.map +0 -1
- package/dist/editor/components/EditorFooter.js.map +0 -1
- package/dist/editor/components/EditorHeader.d.ts.map +0 -1
- package/dist/editor/components/EditorHeader.js.map +0 -1
- package/dist/editor/components/EditorSidebar.d.ts.map +0 -1
- package/dist/editor/components/EditorSidebar.js.map +0 -1
- package/dist/editor/components/EntryCreateModal.d.ts.map +0 -1
- package/dist/editor/components/EntryCreateModal.js.map +0 -1
- package/dist/editor/components/RenameEntryModal.d.ts.map +0 -1
- package/dist/editor/components/RenameEntryModal.js.map +0 -1
- package/dist/editor/components/UserBadge.d.ts.map +0 -1
- package/dist/editor/components/UserBadge.js.map +0 -1
- package/dist/editor/components/index.d.ts.map +0 -1
- package/dist/editor/components/index.js.map +0 -1
- package/dist/editor/context/ApiClientContext.d.ts.map +0 -1
- package/dist/editor/context/ApiClientContext.js.map +0 -1
- package/dist/editor/context/AssetContext.d.ts.map +0 -1
- package/dist/editor/context/AssetContext.js.map +0 -1
- package/dist/editor/context/EditorStateContext.d.ts.map +0 -1
- package/dist/editor/context/EditorStateContext.js.map +0 -1
- package/dist/editor/context/SWRProvider.d.ts.map +0 -1
- package/dist/editor/context/SWRProvider.js.map +0 -1
- package/dist/editor/context/index.d.ts.map +0 -1
- package/dist/editor/context/index.js.map +0 -1
- package/dist/editor/editor-config.d.ts.map +0 -1
- package/dist/editor/editor-config.js.map +0 -1
- package/dist/editor/editor-utils.d.ts.map +0 -1
- package/dist/editor/editor-utils.js.map +0 -1
- package/dist/editor/fields/BlockField.d.ts.map +0 -1
- package/dist/editor/fields/BlockField.js.map +0 -1
- package/dist/editor/fields/CodeField.d.ts.map +0 -1
- package/dist/editor/fields/CodeField.js.map +0 -1
- package/dist/editor/fields/DateTimeField.d.ts.map +0 -1
- package/dist/editor/fields/DateTimeField.js.map +0 -1
- package/dist/editor/fields/ImageField.d.ts.map +0 -1
- package/dist/editor/fields/ImageField.js.map +0 -1
- package/dist/editor/fields/InlineGroupField.d.ts.map +0 -1
- package/dist/editor/fields/InlineGroupField.js.map +0 -1
- package/dist/editor/fields/MarkdownField.d.ts.map +0 -1
- package/dist/editor/fields/MarkdownField.js.map +0 -1
- package/dist/editor/fields/MdxImageDialog.d.ts.map +0 -1
- package/dist/editor/fields/MdxImageDialog.js.map +0 -1
- package/dist/editor/fields/NumberField.d.ts.map +0 -1
- package/dist/editor/fields/NumberField.js.map +0 -1
- package/dist/editor/fields/NumberListField.d.ts.map +0 -1
- package/dist/editor/fields/NumberListField.js.map +0 -1
- package/dist/editor/fields/ObjectField.d.ts.map +0 -1
- package/dist/editor/fields/ObjectField.js.map +0 -1
- package/dist/editor/fields/ReferenceField.d.ts.map +0 -1
- package/dist/editor/fields/ReferenceField.js.map +0 -1
- package/dist/editor/fields/SelectField.d.ts.map +0 -1
- package/dist/editor/fields/SelectField.js.map +0 -1
- package/dist/editor/fields/StringListField.d.ts.map +0 -1
- package/dist/editor/fields/StringListField.js.map +0 -1
- package/dist/editor/fields/TextField.d.ts.map +0 -1
- package/dist/editor/fields/TextField.js.map +0 -1
- package/dist/editor/fields/ToggleField.d.ts.map +0 -1
- package/dist/editor/fields/ToggleField.js.map +0 -1
- package/dist/editor/fields/entry-link/EntryLinkContext.d.ts.map +0 -1
- package/dist/editor/fields/entry-link/EntryLinkContext.js.map +0 -1
- package/dist/editor/fields/entry-link/InsertEntryLink.d.ts.map +0 -1
- package/dist/editor/fields/entry-link/InsertEntryLink.js.map +0 -1
- package/dist/editor/fields/entry-link/index.d.ts.map +0 -1
- package/dist/editor/fields/entry-link/index.js.map +0 -1
- package/dist/editor/group-manager/ExternalGroupsTab.d.ts.map +0 -1
- package/dist/editor/group-manager/ExternalGroupsTab.js.map +0 -1
- package/dist/editor/group-manager/GroupCard.d.ts.map +0 -1
- package/dist/editor/group-manager/GroupCard.js.map +0 -1
- package/dist/editor/group-manager/GroupForm.d.ts.map +0 -1
- package/dist/editor/group-manager/GroupForm.js.map +0 -1
- package/dist/editor/group-manager/InternalGroupsTab.d.ts.map +0 -1
- package/dist/editor/group-manager/InternalGroupsTab.js.map +0 -1
- package/dist/editor/group-manager/MemberList.d.ts.map +0 -1
- package/dist/editor/group-manager/MemberList.js.map +0 -1
- package/dist/editor/group-manager/hooks/useExternalGroupSearch.d.ts.map +0 -1
- package/dist/editor/group-manager/hooks/useExternalGroupSearch.js.map +0 -1
- package/dist/editor/group-manager/hooks/useGroupState.d.ts.map +0 -1
- package/dist/editor/group-manager/hooks/useGroupState.js.map +0 -1
- package/dist/editor/group-manager/hooks/useUserSearch.d.ts.map +0 -1
- package/dist/editor/group-manager/hooks/useUserSearch.js.map +0 -1
- package/dist/editor/group-manager/index.d.ts.map +0 -1
- package/dist/editor/group-manager/index.js.map +0 -1
- package/dist/editor/group-manager/types.d.ts.map +0 -1
- package/dist/editor/group-manager/types.js.map +0 -1
- package/dist/editor/hooks/__test__/test-utils.d.ts +0 -164
- package/dist/editor/hooks/__test__/test-utils.d.ts.map +0 -1
- package/dist/editor/hooks/__test__/test-utils.js +0 -203
- package/dist/editor/hooks/__test__/test-utils.js.map +0 -1
- package/dist/editor/hooks/index.d.ts.map +0 -1
- package/dist/editor/hooks/index.js.map +0 -1
- package/dist/editor/hooks/useBranchActions.d.ts.map +0 -1
- package/dist/editor/hooks/useBranchActions.js.map +0 -1
- package/dist/editor/hooks/useBranchManager.d.ts.map +0 -1
- package/dist/editor/hooks/useBranchManager.js.map +0 -1
- package/dist/editor/hooks/useBranchesData.d.ts.map +0 -1
- package/dist/editor/hooks/useBranchesData.js.map +0 -1
- package/dist/editor/hooks/useCommentSystem.d.ts.map +0 -1
- package/dist/editor/hooks/useCommentSystem.js.map +0 -1
- package/dist/editor/hooks/useCommentsData.d.ts.map +0 -1
- package/dist/editor/hooks/useCommentsData.js.map +0 -1
- package/dist/editor/hooks/useDraftManager.d.ts.map +0 -1
- package/dist/editor/hooks/useDraftManager.js.map +0 -1
- package/dist/editor/hooks/useEditorLayout.d.ts.map +0 -1
- package/dist/editor/hooks/useEditorLayout.js.map +0 -1
- package/dist/editor/hooks/useEntriesData.d.ts.map +0 -1
- package/dist/editor/hooks/useEntriesData.js.map +0 -1
- package/dist/editor/hooks/useEntryLinkResolution.d.ts.map +0 -1
- package/dist/editor/hooks/useEntryLinkResolution.js.map +0 -1
- package/dist/editor/hooks/useEntryManager.d.ts.map +0 -1
- package/dist/editor/hooks/useEntryManager.js.map +0 -1
- package/dist/editor/hooks/useGroupManager.d.ts.map +0 -1
- package/dist/editor/hooks/useGroupManager.js.map +0 -1
- package/dist/editor/hooks/usePermissionManager.d.ts.map +0 -1
- package/dist/editor/hooks/usePermissionManager.js.map +0 -1
- package/dist/editor/hooks/useReferenceResolution.d.ts.map +0 -1
- package/dist/editor/hooks/useReferenceResolution.js.map +0 -1
- package/dist/editor/hooks/useSchemaManager.d.ts.map +0 -1
- package/dist/editor/hooks/useSchemaManager.js.map +0 -1
- package/dist/editor/hooks/useUserContext.d.ts.map +0 -1
- package/dist/editor/hooks/useUserContext.js.map +0 -1
- package/dist/editor/hooks/useUserMetadata.d.ts.map +0 -1
- package/dist/editor/hooks/useUserMetadata.js.map +0 -1
- package/dist/editor/media/AssetCard.d.ts.map +0 -1
- package/dist/editor/media/AssetCard.js.map +0 -1
- package/dist/editor/media/CropStep.d.ts.map +0 -1
- package/dist/editor/media/CropStep.js.map +0 -1
- package/dist/editor/media/MediaLibrary.d.ts.map +0 -1
- package/dist/editor/media/MediaLibrary.js.map +0 -1
- package/dist/editor/media/MediaLibraryBody.d.ts.map +0 -1
- package/dist/editor/media/MediaLibraryBody.js.map +0 -1
- package/dist/editor/media/crop-math.d.ts.map +0 -1
- package/dist/editor/media/crop-math.js.map +0 -1
- package/dist/editor/media/upload-asset.d.ts.map +0 -1
- package/dist/editor/media/upload-asset.js.map +0 -1
- package/dist/editor/media/upload-constants.d.ts.map +0 -1
- package/dist/editor/media/upload-constants.js.map +0 -1
- package/dist/editor/media/useAssetUpload.d.ts.map +0 -1
- package/dist/editor/media/useAssetUpload.js.map +0 -1
- package/dist/editor/media/xhr-upload.d.ts.map +0 -1
- package/dist/editor/media/xhr-upload.js.map +0 -1
- package/dist/editor/permission-manager/GroupSelector.d.ts.map +0 -1
- package/dist/editor/permission-manager/GroupSelector.js.map +0 -1
- package/dist/editor/permission-manager/PermissionEditor.d.ts.map +0 -1
- package/dist/editor/permission-manager/PermissionEditor.js.map +0 -1
- package/dist/editor/permission-manager/PermissionLevelBadge.d.ts.map +0 -1
- package/dist/editor/permission-manager/PermissionLevelBadge.js.map +0 -1
- package/dist/editor/permission-manager/PermissionTree.d.ts.map +0 -1
- package/dist/editor/permission-manager/PermissionTree.js.map +0 -1
- package/dist/editor/permission-manager/UserSelector.d.ts.map +0 -1
- package/dist/editor/permission-manager/UserSelector.js.map +0 -1
- package/dist/editor/permission-manager/constants.d.ts.map +0 -1
- package/dist/editor/permission-manager/constants.js.map +0 -1
- package/dist/editor/permission-manager/hooks/useGroupsAndUsers.d.ts.map +0 -1
- package/dist/editor/permission-manager/hooks/useGroupsAndUsers.js.map +0 -1
- package/dist/editor/permission-manager/hooks/usePermissionTree.d.ts.map +0 -1
- package/dist/editor/permission-manager/hooks/usePermissionTree.js.map +0 -1
- package/dist/editor/permission-manager/index.d.ts.map +0 -1
- package/dist/editor/permission-manager/index.js.map +0 -1
- package/dist/editor/permission-manager/types.d.ts.map +0 -1
- package/dist/editor/permission-manager/types.js.map +0 -1
- package/dist/editor/permission-manager/utils.d.ts.map +0 -1
- package/dist/editor/permission-manager/utils.js.map +0 -1
- package/dist/editor/preview-bridge.d.ts.map +0 -1
- package/dist/editor/preview-bridge.js.map +0 -1
- package/dist/editor/relative-time.d.ts.map +0 -1
- package/dist/editor/relative-time.js.map +0 -1
- package/dist/editor/schema-editor/CollectionEditor.d.ts.map +0 -1
- package/dist/editor/schema-editor/CollectionEditor.js.map +0 -1
- package/dist/editor/schema-editor/EntryTypeEditor.d.ts.map +0 -1
- package/dist/editor/schema-editor/EntryTypeEditor.js.map +0 -1
- package/dist/editor/schema-editor/index.d.ts.map +0 -1
- package/dist/editor/schema-editor/index.js.map +0 -1
- package/dist/editor/setup-test-dom.d.ts +0 -1
- package/dist/editor/setup-test-dom.d.ts.map +0 -1
- package/dist/editor/setup-test-dom.js +0 -12
- package/dist/editor/setup-test-dom.js.map +0 -1
- package/dist/editor/test-setup.d.ts +0 -6
- package/dist/editor/test-setup.d.ts.map +0 -1
- package/dist/editor/test-setup.js +0 -42
- package/dist/editor/test-setup.js.map +0 -1
- package/dist/editor/theme.d.ts.map +0 -1
- package/dist/editor/theme.js.map +0 -1
- package/dist/editor/utils/env.d.ts.map +0 -1
- package/dist/editor/utils/env.js.map +0 -1
- package/dist/entry-link-resolver.d.ts.map +0 -1
- package/dist/entry-link-resolver.js.map +0 -1
- package/dist/entry-schema-registry.d.ts.map +0 -1
- package/dist/entry-schema-registry.js.map +0 -1
- package/dist/entry-schema.d.ts.map +0 -1
- package/dist/entry-schema.js.map +0 -1
- package/dist/git-manager.d.ts.map +0 -1
- package/dist/git-manager.js.map +0 -1
- package/dist/github-service.d.ts.map +0 -1
- package/dist/github-service.js.map +0 -1
- package/dist/http/handler.d.ts.map +0 -1
- package/dist/http/handler.js.map +0 -1
- package/dist/http/index.d.ts.map +0 -1
- package/dist/http/index.js.map +0 -1
- package/dist/http/router.d.ts.map +0 -1
- package/dist/http/router.js.map +0 -1
- package/dist/http/types.d.ts.map +0 -1
- package/dist/http/types.js.map +0 -1
- package/dist/id.d.ts.map +0 -1
- package/dist/id.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/operating-mode/client-safe-strategy.d.ts.map +0 -1
- package/dist/operating-mode/client-safe-strategy.js.map +0 -1
- package/dist/operating-mode/client-unsafe-strategy.d.ts.map +0 -1
- package/dist/operating-mode/client-unsafe-strategy.js.map +0 -1
- package/dist/operating-mode/client.d.ts.map +0 -1
- package/dist/operating-mode/client.js.map +0 -1
- package/dist/operating-mode/deployment-name-fixtures.d.ts.map +0 -1
- package/dist/operating-mode/deployment-name-fixtures.js.map +0 -1
- package/dist/operating-mode/deployment-name.d.ts.map +0 -1
- package/dist/operating-mode/deployment-name.js.map +0 -1
- package/dist/operating-mode/index.d.ts.map +0 -1
- package/dist/operating-mode/index.js.map +0 -1
- package/dist/operating-mode/mode-env.d.ts.map +0 -1
- package/dist/operating-mode/mode-env.js.map +0 -1
- package/dist/operating-mode/types.d.ts.map +0 -1
- package/dist/operating-mode/types.js.map +0 -1
- package/dist/paths/branch-name.d.ts.map +0 -1
- package/dist/paths/branch-name.js.map +0 -1
- package/dist/paths/branch.d.ts.map +0 -1
- package/dist/paths/branch.js.map +0 -1
- package/dist/paths/index.d.ts.map +0 -1
- package/dist/paths/index.js.map +0 -1
- package/dist/paths/normalize-server.d.ts.map +0 -1
- package/dist/paths/normalize-server.js.map +0 -1
- package/dist/paths/normalize.d.ts.map +0 -1
- package/dist/paths/normalize.js.map +0 -1
- package/dist/paths/resolve.d.ts.map +0 -1
- package/dist/paths/resolve.js.map +0 -1
- package/dist/paths/test-utils.d.ts +0 -22
- package/dist/paths/test-utils.d.ts.map +0 -1
- package/dist/paths/test-utils.js +0 -21
- package/dist/paths/test-utils.js.map +0 -1
- package/dist/paths/types.d.ts.map +0 -1
- package/dist/paths/types.js.map +0 -1
- package/dist/paths/validation.d.ts.map +0 -1
- package/dist/paths/validation.js.map +0 -1
- package/dist/reference-resolver.d.ts.map +0 -1
- package/dist/reference-resolver.js.map +0 -1
- package/dist/resolve-canopy-user.d.ts.map +0 -1
- package/dist/resolve-canopy-user.js.map +0 -1
- package/dist/resource-generation.d.ts.map +0 -1
- package/dist/resource-generation.js.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/meta-loader.d.ts.map +0 -1
- package/dist/schema/meta-loader.js.map +0 -1
- package/dist/schema/resolver.d.ts.map +0 -1
- package/dist/schema/resolver.js.map +0 -1
- package/dist/schema/schema-store-types.d.ts.map +0 -1
- package/dist/schema/schema-store-types.js.map +0 -1
- package/dist/schema/schema-store.d.ts.map +0 -1
- package/dist/schema/schema-store.js.map +0 -1
- package/dist/schema/types.d.ts.map +0 -1
- package/dist/schema/types.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/services.d.ts.map +0 -1
- package/dist/services.js.map +0 -1
- package/dist/settings-workspace.d.ts.map +0 -1
- package/dist/settings-workspace.js.map +0 -1
- package/dist/static/index.d.ts.map +0 -1
- package/dist/static/index.js.map +0 -1
- package/dist/static/seo.d.ts.map +0 -1
- package/dist/static/seo.js.map +0 -1
- package/dist/sync-core.d.ts.map +0 -1
- package/dist/sync-core.js.map +0 -1
- package/dist/task-queue/index.d.ts.map +0 -1
- package/dist/task-queue/index.js.map +0 -1
- package/dist/task-queue/task-queue.d.ts.map +0 -1
- package/dist/task-queue/task-queue.js.map +0 -1
- package/dist/task-queue/types.d.ts.map +0 -1
- package/dist/task-queue/types.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/url-path-resolver.d.ts.map +0 -1
- package/dist/url-path-resolver.js.map +0 -1
- package/dist/user.d.ts.map +0 -1
- package/dist/user.js.map +0 -1
- package/dist/utils/async-mutex.d.ts.map +0 -1
- package/dist/utils/async-mutex.js.map +0 -1
- package/dist/utils/atomic-write.d.ts.map +0 -1
- package/dist/utils/atomic-write.js.map +0 -1
- package/dist/utils/body-field.d.ts.map +0 -1
- package/dist/utils/body-field.js.map +0 -1
- package/dist/utils/content-write-lock.d.ts.map +0 -1
- package/dist/utils/content-write-lock.js.map +0 -1
- package/dist/utils/debug.d.ts.map +0 -1
- package/dist/utils/debug.js.map +0 -1
- package/dist/utils/entry-url.d.ts.map +0 -1
- package/dist/utils/entry-url.js.map +0 -1
- package/dist/utils/error.d.ts.map +0 -1
- package/dist/utils/error.js.map +0 -1
- package/dist/utils/flatten-group-fields.d.ts.map +0 -1
- package/dist/utils/flatten-group-fields.js.map +0 -1
- package/dist/utils/format.d.ts.map +0 -1
- package/dist/utils/format.js.map +0 -1
- package/dist/utils/fs.d.ts.map +0 -1
- package/dist/utils/fs.js.map +0 -1
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/occ-json-write.d.ts.map +0 -1
- package/dist/utils/occ-json-write.js.map +0 -1
- package/dist/utils/provisioning-lock.d.ts.map +0 -1
- package/dist/utils/provisioning-lock.js.map +0 -1
- package/dist/utils/sanitize-href.d.ts.map +0 -1
- package/dist/utils/sanitize-href.js.map +0 -1
- package/dist/utils/title-field.d.ts.map +0 -1
- package/dist/utils/title-field.js.map +0 -1
- package/dist/validation/deletion-checker.d.ts.map +0 -1
- package/dist/validation/deletion-checker.js.map +0 -1
- package/dist/validation/entry-link-validator.d.ts.map +0 -1
- package/dist/validation/entry-link-validator.js.map +0 -1
- package/dist/validation/entry-type-reference-validator.d.ts.map +0 -1
- package/dist/validation/entry-type-reference-validator.js.map +0 -1
- package/dist/validation/entry-validator.d.ts.map +0 -1
- package/dist/validation/entry-validator.js.map +0 -1
- package/dist/validation/field-traversal.d.ts.map +0 -1
- package/dist/validation/field-traversal.js.map +0 -1
- package/dist/validation/reference-validator.d.ts.map +0 -1
- package/dist/validation/reference-validator.js.map +0 -1
- package/dist/worker/cms-worker.d.ts.map +0 -1
- package/dist/worker/cms-worker.js.map +0 -1
- package/dist/worker/log.d.ts.map +0 -1
- package/dist/worker/log.js.map +0 -1
- package/dist/worker/task-queue-config.d.ts.map +0 -1
- package/dist/worker/task-queue-config.js.map +0 -1
- package/dist/worker/task-queue.d.ts.map +0 -1
- package/dist/worker/task-queue.js.map +0 -1
- package/dist/worker/worker-status.d.ts.map +0 -1
- package/dist/worker/worker-status.js.map +0 -1
package/dist/api/content.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BranchSyncingError, ContentStore, ContentStoreError, ContentConflictError, DuplicateContentIdError, getDefaultEntryType, } from '../content-store.js';
|
|
2
|
+
import { BranchSyncingError, ContentStore, ContentStoreError, ContentConflictError, DuplicateContentIdError, UrlPathConflictError, getDefaultEntryType, } from '../content-store.js';
|
|
3
3
|
import { defineEndpoint } from './route-builder.js';
|
|
4
4
|
import { ReferenceValidator } from '../validation/reference-validator.js';
|
|
5
|
-
import { mergeBodyIntoData, normalizeReferenceValues, validateEntryData, } from '../validation/entry-validator.js';
|
|
5
|
+
import { findUnknownKeys, mergeBodyIntoData, normalizeReferenceValues, validateEntryData, } from '../validation/entry-validator.js';
|
|
6
6
|
import { validateEntryLinks } from '../validation/entry-link-validator.js';
|
|
7
7
|
import { branchNameSchema, logicalPathSchema, slugSchema } from './validators.js';
|
|
8
|
+
import { parseSlug } from '../paths/index.js';
|
|
8
9
|
import { getErrorMessage, isNotFoundError, sanitizeErrorMessage } from '../utils/error.js';
|
|
9
10
|
import { isDataOnlyFormat } from '../utils/format.js';
|
|
10
11
|
/**
|
|
@@ -15,6 +16,12 @@ function parseApiPath(apiPath, contentRoot) {
|
|
|
15
16
|
const segments = apiPath.split('/').filter(Boolean);
|
|
16
17
|
return segments[0] === contentRoot ? segments : [contentRoot, ...segments];
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* How many stale field paths the unknown-key warning names before summarising the rest. The
|
|
21
|
+
* editor shows warnings in one notification, so this bounds a schema-wide rename to a readable
|
|
22
|
+
* sentence rather than a wall of paths.
|
|
23
|
+
*/
|
|
24
|
+
const UNKNOWN_KEY_WARNING_LIMIT = 10;
|
|
18
25
|
// ============================================================================
|
|
19
26
|
// Zod Schemas for Validation
|
|
20
27
|
// ============================================================================
|
|
@@ -225,6 +232,29 @@ const writeContentHandler = async (gc, ctx, req, params, body) => {
|
|
|
225
232
|
error: `An entry with slug "${slug}" already exists`,
|
|
226
233
|
};
|
|
227
234
|
}
|
|
235
|
+
// [SLUG] Create-only routability check. `writeContentParamsSchema.path` runs
|
|
236
|
+
// `parseLogicalPath`, which has no charset rule, and `ContentStore.resolvePath` casts the
|
|
237
|
+
// last segment to `Slug` with only `.toLowerCase()` — so nothing on the write chain applied
|
|
238
|
+
// `parseSlug` (only `renameEntry`'s `newSlug` did). A create with, say, `my_post` was
|
|
239
|
+
// accepted, and `assertRoutableSlugs` then failed the adopter's next production build over
|
|
240
|
+
// an entry that would 404 anyway. `store.write()` enforces this authoritatively inside its
|
|
241
|
+
// per-entry lock; this is the cheaper, clearer-messaged fast path — without it a create that
|
|
242
|
+
// is ALSO missing a required field reports the field, never the slug that is the real
|
|
243
|
+
// problem (same reasoning as the create-intent guard above).
|
|
244
|
+
//
|
|
245
|
+
// Create-only on purpose: an entry that already carries a non-conforming slug must stay
|
|
246
|
+
// saveable and renameable, since renaming it is the only way to fix the build.
|
|
247
|
+
if (!exists) {
|
|
248
|
+
const routable = parseSlug(slug);
|
|
249
|
+
if (!routable.ok) {
|
|
250
|
+
return {
|
|
251
|
+
ok: false,
|
|
252
|
+
status: 400,
|
|
253
|
+
error: `Cannot create entry "${slug}": ${routable.error}. An entry whose slug is not ` +
|
|
254
|
+
'addressable as a URL segment would build and then 404 on every visit.',
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
}
|
|
228
258
|
// SCH-H3: enforce maxItems server-side at the create boundary. The editor
|
|
229
259
|
// only gates its "Add" button; a direct API create could otherwise exceed
|
|
230
260
|
// the cap. Best-effort under concurrency: the count-then-create below is
|
|
@@ -278,6 +308,61 @@ const writeContentHandler = async (gc, ctx, req, params, body) => {
|
|
|
278
308
|
// 'warning' issues are returned alongside the successful write.
|
|
279
309
|
let validationWarnings;
|
|
280
310
|
const validateEntry = ctx.services.config.validateEntry;
|
|
311
|
+
// Collapse resolved reference objects back to bare ID strings before PERSISTING, not just
|
|
312
|
+
// before validating (the reference validator gets its own normalized copy above).
|
|
313
|
+
//
|
|
314
|
+
// The editor round-trips whole documents: its GET reads through `store.read()`, whose
|
|
315
|
+
// `resolveReferences` defaults to TRUE, so form state holds `{...target data, id, slug,
|
|
316
|
+
// collection, urlPath}` for every reference field, and a save posts that straight back. Left
|
|
317
|
+
// unnormalized it lands in the content file verbatim — and because resolution only re-resolves
|
|
318
|
+
// a `typeof value === 'string'`, every later read passes the frozen snapshot through and every
|
|
319
|
+
// later save rewrites it. The reference is then permanently severed from its target: renaming
|
|
320
|
+
// or editing the target changes nothing, silently.
|
|
321
|
+
//
|
|
322
|
+
// The mechanism predates reference resolution reaching listings, but `includeBody` makes it
|
|
323
|
+
// materially worse — the snapshot now carries the target's entire prose — and `urlPath` adds a
|
|
324
|
+
// value that goes stale the moment the target is renamed. Normalizing here is schema-driven and
|
|
325
|
+
// idempotent: a payload that already holds ID strings is unchanged.
|
|
326
|
+
const normalizedData = body.data === undefined ? undefined : normalizeReferenceValues(fields, body.data);
|
|
327
|
+
//
|
|
328
|
+
// Computed BEFORE the validateEntry hook and the entry-link scan, not just before the write,
|
|
329
|
+
// so every consumer of the payload agrees with the bytes that land on disk. Otherwise an
|
|
330
|
+
// adopter's hook inspecting a reference field saw a resolved object while the file got an ID
|
|
331
|
+
// string -- and saw it only when the post came from the editor, since a client posting bare
|
|
332
|
+
// IDs already gave the hook bare IDs. Normalizing first makes the hook's input deterministic
|
|
333
|
+
// regardless of caller.
|
|
334
|
+
// Keys with no counterpart in the schema. validateEntryData iterates the SCHEMA, so nothing
|
|
335
|
+
// reported the inverse: a renamed or reshaped field left its old key on disk forever (the
|
|
336
|
+
// editor round-trips the whole record, so every save rewrote it) and the only symptom was a
|
|
337
|
+
// component receiving `undefined`. Adopter request log item 29.
|
|
338
|
+
//
|
|
339
|
+
// Run against normalizedData -- the shape that will actually be persisted -- so the report
|
|
340
|
+
// matches the bytes, and so a resolved reference collapsed back to an ID string cannot be
|
|
341
|
+
// mistaken for anything. A warning, never a rejection: the key is still written (with its
|
|
342
|
+
// comments, see utils/content-serialize.ts), it is just not editable and nothing reads it.
|
|
343
|
+
//
|
|
344
|
+
// ONE issue, not one per key. The editor joins every warning into a single non-auto-closing
|
|
345
|
+
// notification (useEntryManager.ts), so one-per-key repeated the same explanatory sentence
|
|
346
|
+
// once per stale key, on every save, for a condition that is permanent until someone edits the
|
|
347
|
+
// schema. The keys are listed in the message instead, capped so a schema-wide rename cannot
|
|
348
|
+
// produce an unreadable wall of text. Worded for who can actually act: an editor cannot remove
|
|
349
|
+
// a key the form does not render, and cannot change the schema.
|
|
350
|
+
if (normalizedData !== undefined) {
|
|
351
|
+
const unknownKeys = findUnknownKeys(fields, normalizedData);
|
|
352
|
+
if (unknownKeys.length > 0) {
|
|
353
|
+
const shown = unknownKeys.slice(0, UNKNOWN_KEY_WARNING_LIMIT);
|
|
354
|
+
const overflow = unknownKeys.length - shown.length;
|
|
355
|
+
const list = overflow > 0 ? `${shown.join(', ')} (and ${overflow} more)` : shown.join(', ');
|
|
356
|
+
validationWarnings = [
|
|
357
|
+
{
|
|
358
|
+
level: 'warning',
|
|
359
|
+
message: `Saved. ${unknownKeys.length === 1 ? 'One field is' : `${unknownKeys.length} fields are`} ` +
|
|
360
|
+
`not part of this entry type’s schema: ${list}. They are kept in the file, but nothing ` +
|
|
361
|
+
`reads them — ask a developer to add them to the schema or remove them from the content.`,
|
|
362
|
+
},
|
|
363
|
+
];
|
|
364
|
+
}
|
|
365
|
+
}
|
|
281
366
|
if (validateEntry) {
|
|
282
367
|
let issues;
|
|
283
368
|
try {
|
|
@@ -286,7 +371,7 @@ const writeContentHandler = async (gc, ctx, req, params, body) => {
|
|
|
286
371
|
branch: params.branch,
|
|
287
372
|
...(params.entryType ? { entryType: params.entryType } : {}),
|
|
288
373
|
format: body.format,
|
|
289
|
-
data:
|
|
374
|
+
data: normalizedData ?? {},
|
|
290
375
|
body: body.body,
|
|
291
376
|
});
|
|
292
377
|
}
|
|
@@ -308,20 +393,22 @@ const writeContentHandler = async (gc, ctx, req, params, body) => {
|
|
|
308
393
|
.join('; '),
|
|
309
394
|
};
|
|
310
395
|
}
|
|
396
|
+
// Appended, not assigned: the unknown-key scan above may already have found some, and the
|
|
397
|
+
// editor shows the channel as one notification.
|
|
311
398
|
const warnings = issues.filter((issue) => issue.level === 'warning');
|
|
312
399
|
if (warnings.length > 0)
|
|
313
|
-
validationWarnings = warnings;
|
|
400
|
+
validationWarnings = [...(validationWarnings ?? []), ...warnings];
|
|
314
401
|
}
|
|
315
402
|
try {
|
|
316
403
|
const writeInput = isDataOnlyFormat(body.format)
|
|
317
404
|
? {
|
|
318
405
|
format: body.format,
|
|
319
|
-
data:
|
|
406
|
+
data: normalizedData ?? {},
|
|
320
407
|
expectedVersion: body.expectedVersion,
|
|
321
408
|
}
|
|
322
409
|
: {
|
|
323
410
|
format: body.format,
|
|
324
|
-
data:
|
|
411
|
+
data: normalizedData,
|
|
325
412
|
body: body.body ?? '',
|
|
326
413
|
expectedVersion: body.expectedVersion,
|
|
327
414
|
};
|
|
@@ -330,19 +417,32 @@ const writeContentHandler = async (gc, ctx, req, params, body) => {
|
|
|
330
417
|
// we just validated against.
|
|
331
418
|
const result = await store.write(schemaItem.logicalPath, slug, writeInput, entryTypeName);
|
|
332
419
|
// Validate entry links in body content (warnings only, don't block save).
|
|
333
|
-
// Reuses the entry-type fields resolved above for schema validation.
|
|
420
|
+
// Reuses the entry-type fields resolved above for schema validation. Folded into
|
|
421
|
+
// `validationWarnings` (not a separate `entryLinkWarnings` field) so the editor's one
|
|
422
|
+
// save-warnings notification (useEntryManager.ts) is the single place any save-time
|
|
423
|
+
// warning surfaces -- a broken `entry:ID` link used to be computed and returned here
|
|
424
|
+
// with no consumer anywhere in the editor, so it was silently discarded.
|
|
334
425
|
const idIndex = await store.idIndex();
|
|
335
|
-
const linkValidation = validateEntryLinks(
|
|
336
|
-
|
|
337
|
-
|
|
426
|
+
const linkValidation = validateEntryLinks(normalizedData ?? {}, fields, idIndex, body.body);
|
|
427
|
+
if (linkValidation.warnings.length > 0) {
|
|
428
|
+
const linkWarnings = linkValidation.warnings.map((warning) => ({
|
|
429
|
+
level: 'warning',
|
|
430
|
+
message: warning.message,
|
|
431
|
+
fieldPath: warning.fieldPath,
|
|
432
|
+
}));
|
|
433
|
+
validationWarnings = [...(validationWarnings ?? []), ...linkWarnings];
|
|
434
|
+
}
|
|
435
|
+
return { ok: true, status: 200, data: { ...result, validationWarnings } };
|
|
338
436
|
}
|
|
339
437
|
catch (err) {
|
|
340
438
|
if (err instanceof ContentConflictError) {
|
|
341
439
|
// [SYNC-C1] Not an editor-vs-editor collision at all: the branch's
|
|
342
|
-
// working tree is being rebased
|
|
343
|
-
// rather than acknowledged and then rolled back
|
|
344
|
-
//
|
|
345
|
-
//
|
|
440
|
+
// working tree is being rebased. Usually the write was refused outright
|
|
441
|
+
// rather than acknowledged and then rolled back; the one exception is a
|
|
442
|
+
// lock compromised mid-write, where the write DID land but we can no
|
|
443
|
+
// longer prove it was exclusive. Each case carries its own message
|
|
444
|
+
// (retry vs. reload-then-decide), so pass it through -- checked first,
|
|
445
|
+
// since the generic branches below would otherwise blame another editor.
|
|
346
446
|
if (err instanceof BranchSyncingError) {
|
|
347
447
|
return { ok: false, status: 409, error: err.message };
|
|
348
448
|
}
|
|
@@ -355,6 +455,17 @@ const writeContentHandler = async (gc, ctx, req, params, body) => {
|
|
|
355
455
|
if (err instanceof DuplicateContentIdError) {
|
|
356
456
|
return { ok: false, status: 409, error: err.message };
|
|
357
457
|
}
|
|
458
|
+
// [URL] Also not an editor-vs-editor collision, and critically NOT the
|
|
459
|
+
// same-slug case the branch below reports: no entry with this slug
|
|
460
|
+
// exists in this collection (the early `exists` check passed). What
|
|
461
|
+
// exists is a DIFFERENT entry claiming the same URL -- a sibling
|
|
462
|
+
// collection's index entry, or the parent entry this index entry would
|
|
463
|
+
// collide with. Falling through would tell the editor to look for an
|
|
464
|
+
// entry that is not there, and discard the one message that names the
|
|
465
|
+
// actual offender and what to do about it.
|
|
466
|
+
if (err instanceof UrlPathConflictError) {
|
|
467
|
+
return { ok: false, status: 409, error: err.message };
|
|
468
|
+
}
|
|
358
469
|
// The early `exists` short-circuit above catches this in the common
|
|
359
470
|
// case; this is the race-safe fallback for a collision that landed
|
|
360
471
|
// between that check and store.write()'s in-lock stat.
|
|
@@ -490,12 +601,16 @@ const renameEntryHandler = async (gc, ctx, req, params, body) => {
|
|
|
490
601
|
// [SYNC-C1] The rename was refused because the branch is mid-rebase, not
|
|
491
602
|
// because the request was bad -- 409 + retry, never a 400.
|
|
492
603
|
if (err instanceof ContentConflictError) {
|
|
604
|
+
// [URL] A contested-URL refusal must carry its own message. The generic
|
|
605
|
+
// one below tells the editor to reload and retry, which cannot succeed
|
|
606
|
+
// here -- the rename stays refused until they pick a different slug or
|
|
607
|
+
// remove the other claimant -- which is exactly the loop
|
|
608
|
+
// UrlPathConflictError's doc comment exists to prevent.
|
|
609
|
+
const passThrough = err instanceof BranchSyncingError || err instanceof UrlPathConflictError;
|
|
493
610
|
return {
|
|
494
611
|
ok: false,
|
|
495
612
|
status: 409,
|
|
496
|
-
error: err
|
|
497
|
-
? err.message
|
|
498
|
-
: 'Content conflict: entry was modified by another editor',
|
|
613
|
+
error: passThrough ? err.message : 'Content conflict: entry was modified by another editor',
|
|
499
614
|
};
|
|
500
615
|
}
|
|
501
616
|
// C2: same distinction as writeContentHandler above - a ContentStoreError
|
|
@@ -594,4 +709,3 @@ export const CONTENT_ROUTES = {
|
|
|
594
709
|
validateReferences,
|
|
595
710
|
renameEntry,
|
|
596
711
|
};
|
|
597
|
-
//# sourceMappingURL=content.js.map
|
package/dist/api/entries.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { ContentFormat } from '../config';
|
|
3
|
-
import type { ApiResponse } from './types';
|
|
4
|
-
import type { LogicalPath, PhysicalPath, Slug, ContentId } from '../paths/types';
|
|
5
|
-
export { MAX_ENTRIES_PER_PAGE, DEFAULT_ENTRIES_LIMIT } from './entries-constants';
|
|
2
|
+
import type { ContentFormat } from '../config/index.js';
|
|
3
|
+
import type { ApiResponse } from './types.js';
|
|
4
|
+
import type { LogicalPath, PhysicalPath, Slug, ContentId } from '../paths/types.js';
|
|
5
|
+
export { MAX_ENTRIES_PER_PAGE, DEFAULT_ENTRIES_LIMIT } from './entries-constants.js';
|
|
6
6
|
/**
|
|
7
7
|
* Summary of an entry type for client display.
|
|
8
8
|
* Simplified from EntryTypeConfig - doesn't include full field definitions.
|
|
@@ -50,8 +50,8 @@ export type EntriesResponse = ApiResponse<ListEntriesResponse>;
|
|
|
50
50
|
* List entries for a branch
|
|
51
51
|
* GET /:branch/entries
|
|
52
52
|
*/
|
|
53
|
-
export declare const listEntries: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
54
|
-
branch: z.ZodType<import("../paths").BranchName, z.ZodTypeDef, import("../paths").BranchName>;
|
|
53
|
+
export declare const listEntries: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
54
|
+
branch: z.ZodType<import("../paths/index.js").BranchName, z.ZodTypeDef, import("../paths/index.js").BranchName>;
|
|
55
55
|
collection: z.ZodOptional<z.ZodType<LogicalPath, z.ZodTypeDef, LogicalPath>>;
|
|
56
56
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
57
57
|
cursor: z.ZodOptional<z.ZodString>;
|
|
@@ -96,8 +96,8 @@ export type DeleteEntryResponse = ApiResponse<{
|
|
|
96
96
|
* DELETE /:branch/entries/...entryPath
|
|
97
97
|
* Note: Uses catch-all to support paths with slashes (e.g., content/posts/hello-world)
|
|
98
98
|
*/
|
|
99
|
-
export declare const deleteEntry: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
100
|
-
branch: z.ZodType<import("../paths").BranchName, z.ZodTypeDef, import("../paths").BranchName>;
|
|
99
|
+
export declare const deleteEntry: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
100
|
+
branch: z.ZodType<import("../paths/index.js").BranchName, z.ZodTypeDef, import("../paths/index.js").BranchName>;
|
|
101
101
|
entryPath: z.ZodType<LogicalPath, z.ZodTypeDef, LogicalPath>;
|
|
102
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
103
|
branch: string & {
|
|
@@ -118,8 +118,8 @@ export declare const deleteEntry: import("./route-builder").RouteDefinition<z.Zo
|
|
|
118
118
|
* Exported routes for router registration
|
|
119
119
|
*/
|
|
120
120
|
export declare const ENTRY_ROUTES: {
|
|
121
|
-
readonly list: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
122
|
-
branch: z.ZodType<import("../paths").BranchName, z.ZodTypeDef, import("../paths").BranchName>;
|
|
121
|
+
readonly list: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
122
|
+
branch: z.ZodType<import("../paths/index.js").BranchName, z.ZodTypeDef, import("../paths/index.js").BranchName>;
|
|
123
123
|
collection: z.ZodOptional<z.ZodType<LogicalPath, z.ZodTypeDef, LogicalPath>>;
|
|
124
124
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
125
125
|
cursor: z.ZodOptional<z.ZodString>;
|
|
@@ -144,8 +144,8 @@ export declare const ENTRY_ROUTES: {
|
|
|
144
144
|
cursor?: string | undefined;
|
|
145
145
|
limit?: number | undefined;
|
|
146
146
|
}>, undefined, EntriesResponse>;
|
|
147
|
-
readonly delete: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
148
|
-
branch: z.ZodType<import("../paths").BranchName, z.ZodTypeDef, import("../paths").BranchName>;
|
|
147
|
+
readonly delete: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
148
|
+
branch: z.ZodType<import("../paths/index.js").BranchName, z.ZodTypeDef, import("../paths/index.js").BranchName>;
|
|
149
149
|
entryPath: z.ZodType<LogicalPath, z.ZodTypeDef, LogicalPath>;
|
|
150
150
|
}, "strip", z.ZodTypeAny, {
|
|
151
151
|
branch: string & {
|
|
@@ -163,4 +163,3 @@ export declare const ENTRY_ROUTES: {
|
|
|
163
163
|
};
|
|
164
164
|
}>, undefined, DeleteEntryResponse>;
|
|
165
165
|
};
|
|
166
|
-
//# sourceMappingURL=entries.d.ts.map
|
package/dist/api/entries.js
CHANGED
|
@@ -51,7 +51,18 @@ const toCollectionItem = (entry, collection) => {
|
|
|
51
51
|
exists: true,
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* List entries in a single collection, mapped to API CollectionItem type.
|
|
56
|
+
*
|
|
57
|
+
* Deliberately does NOT resolve `reference` fields, unlike the `resolveReferences` option
|
|
58
|
+
* that `listEntries`/`buildContentTree` grew for the same underlying primitive. This is a
|
|
59
|
+
* paginated admin table rendering slug/title/canEdit — it never reads inside a reference —
|
|
60
|
+
* and resolution here would land in the worst possible place: it runs BEFORE pagination
|
|
61
|
+
* (`filterWithAccessControl` walks the full collection, `slice` happens at the end), on a
|
|
62
|
+
* request path, so every keystroke in the admin search box would pay a full ContentId index
|
|
63
|
+
* scan plus one read per distinct referenced entry. Revisit only if a column ever needs to
|
|
64
|
+
* display a reference's content.
|
|
65
|
+
*/
|
|
55
66
|
const listCollectionEntries = async (root, collection) => {
|
|
56
67
|
const entries = await listCollectionEntriesShared(root, collection);
|
|
57
68
|
return entries.map((entry) => toCollectionItem(entry, collection));
|
|
@@ -379,4 +390,3 @@ export const ENTRY_ROUTES = {
|
|
|
379
390
|
list: listEntries,
|
|
380
391
|
delete: deleteEntry,
|
|
381
392
|
};
|
|
382
|
-
//# sourceMappingURL=entries.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ApiContext } from './types';
|
|
2
|
-
import type { BranchContext, SyncStatus } from '../types';
|
|
1
|
+
import type { ApiContext } from './types.js';
|
|
2
|
+
import type { BranchContext, SyncStatus } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Result of a GitHub sync operation.
|
|
5
5
|
* The caller uses this to update branch metadata.
|
|
@@ -19,4 +19,3 @@ export declare function syncSubmitPr(ctx: ApiContext, context: BranchContext): P
|
|
|
19
19
|
* Uses githubService directly if available, otherwise queues a task.
|
|
20
20
|
*/
|
|
21
21
|
export declare function syncConvertToDraft(ctx: ApiContext, context: BranchContext): Promise<void>;
|
|
22
|
-
//# sourceMappingURL=github-sync.d.ts.map
|
package/dist/api/github-sync.js
CHANGED
package/dist/api/groups.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { ApiResponse } from './types';
|
|
3
|
-
import type { CanopyGroupId } from '../types';
|
|
4
|
-
import { type InternalGroup } from '../authorization';
|
|
2
|
+
import type { ApiResponse } from './types.js';
|
|
3
|
+
import type { CanopyGroupId } from '../types.js';
|
|
4
|
+
import { type InternalGroup } from '../authorization/index.js';
|
|
5
5
|
/** Response type for getting internal groups */
|
|
6
6
|
export type InternalGroupsResponse = ApiResponse<{
|
|
7
7
|
groups: InternalGroup[];
|
|
@@ -47,8 +47,8 @@ export interface ExternalGroup {
|
|
|
47
47
|
* Exported routes for router registration
|
|
48
48
|
*/
|
|
49
49
|
export declare const GROUP_ROUTES: {
|
|
50
|
-
readonly getInternal: import("./route-builder").RouteDefinition<undefined, undefined, InternalGroupsResponse>;
|
|
51
|
-
readonly updateInternal: import("./route-builder").RouteDefinition<undefined, z.ZodObject<{
|
|
50
|
+
readonly getInternal: import("./route-builder.js").RouteDefinition<undefined, undefined, InternalGroupsResponse>;
|
|
51
|
+
readonly updateInternal: import("./route-builder.js").RouteDefinition<undefined, z.ZodObject<{
|
|
52
52
|
groups: z.ZodArray<z.ZodObject<{
|
|
53
53
|
id: z.ZodString;
|
|
54
54
|
name: z.ZodString;
|
|
@@ -83,7 +83,7 @@ export declare const GROUP_ROUTES: {
|
|
|
83
83
|
}[];
|
|
84
84
|
expectedContentVersion?: number | undefined;
|
|
85
85
|
}>, UpdateInternalGroupsResponse>;
|
|
86
|
-
readonly searchExternal: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
86
|
+
readonly searchExternal: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
87
87
|
query: z.ZodString;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
89
|
query: string;
|
|
@@ -91,4 +91,3 @@ export declare const GROUP_ROUTES: {
|
|
|
91
91
|
query: string;
|
|
92
92
|
}>, undefined, ExternalGroupsResponse>;
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=groups.d.ts.map
|
package/dist/api/groups.js
CHANGED
package/dist/api/guards.d.ts
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* })
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
import type { BranchContext, BranchContextWithSchema } from '../types';
|
|
19
|
-
import type { ApiContext, ApiRequest, ApiResponse } from './types';
|
|
18
|
+
import type { BranchContext, BranchContextWithSchema } from '../types.js';
|
|
19
|
+
import type { ApiContext, ApiRequest, ApiResponse } from './types.js';
|
|
20
20
|
/** All available guard identifiers */
|
|
21
21
|
export type GuardId = 'branch' | 'branchAccess' | 'schema' | 'branchAccessWithSchema' | 'admin' | 'reviewer' | 'privileged' | 'writableBranch' | 'submittableBranch';
|
|
22
22
|
/** Maps each guard ID to the context it contributes */
|
|
@@ -61,4 +61,3 @@ export type ExecuteGuardsResult<T extends readonly GuardId[]> = {
|
|
|
61
61
|
*/
|
|
62
62
|
export declare function executeGuards<T extends readonly GuardId[]>(guards: T, ctx: ApiContext, req: ApiRequest, params: Record<string, unknown>): Promise<ExecuteGuardsResult<T>>;
|
|
63
63
|
export {};
|
|
64
|
-
//# sourceMappingURL=guards.d.ts.map
|
package/dist/api/guards.js
CHANGED
package/dist/api/index.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
export type { ApiResponse, ApiRequest, ApiContext } from './types';
|
|
2
|
-
export type { BranchResponse, BranchListResponse, BranchDeleteResponse, CreateBranchBody, UpdateBranchAccessBody, } from './branch';
|
|
3
|
-
export type { BranchMergeResponse } from './branch-merge';
|
|
4
|
-
export type { CommentsResponse, AddCommentResponse, ResolveCommentResponse, ListCommentsResponse, } from './comments';
|
|
5
|
-
export type { EntriesResponse, ListEntriesResponse, CollectionItem, ListEntriesParams, DeleteEntryResponse, } from './entries';
|
|
6
|
-
export type { PermissionsResponse, UpdatePermissionsBody, SearchUsersParams, GetUserMetadataResponse, GetUserMetadataParams, } from './permissions';
|
|
7
|
-
export type { UserInfoResponse } from './user';
|
|
8
|
-
export type { AssetRecord, AssetsListResponse, PresignAssetResponse, PresignAssetBody, FinalizeAssetResponse, FinalizeAssetBody, AssetDeleteResponse, ListAssetsParams, DeleteAssetParams, } from './assets';
|
|
9
|
-
export type { InternalGroupsResponse, ExternalGroupsResponse, UpdateInternalGroupsBody, SearchExternalGroupsParams, ExternalGroup, } from './groups';
|
|
10
|
-
export type { ReferenceOptionsResponse } from './reference-options';
|
|
11
|
-
export type { ResolveReferencesResponse } from './resolve-references';
|
|
12
|
-
export type { SchemaResponse, WireEntryType, WireCollectionConfig, WireFlatSchemaItem, CollectionResponse, CreateCollectionResponse, UpdateCollectionResponse, DeleteCollectionResponse, AddEntryTypeResponse, UpdateEntryTypeResponse, RemoveEntryTypeResponse, UpdateOrderResponse, GetSchemaApiResponse, GetCollectionApiResponse, CreateCollectionApiResponse, UpdateCollectionApiResponse, DeleteCollectionApiResponse, AddEntryTypeApiResponse, UpdateEntryTypeApiResponse, RemoveEntryTypeApiResponse, UpdateOrderApiResponse, } from './schema';
|
|
13
|
-
export type { CreateCollectionInput, UpdateCollectionInput, CreateEntryTypeInput, UpdateEntryTypeInput, } from '../schema/schema-store-types';
|
|
14
|
-
export type { EntryTypeSummary } from './entries';
|
|
15
|
-
export type { AdminStatusResponse, AdminStatusData, AdminTasksResponse, AdminTasksData, ListAdminTasksParams, AdminRetryTaskResponse, AdminRetryTaskData, RetryTaskParams, AdminDeleteTaskResponse, AdminDeleteTaskData, DeleteTaskParams, WorkerLiveness, WorkerLivenessState, } from './admin';
|
|
16
|
-
export { USER_ROUTES } from './user';
|
|
17
|
-
export { CanopyApiClient, createApiClient } from './client';
|
|
18
|
-
export type { ApiClientOptions } from './client';
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export type { ApiResponse, ApiRequest, ApiContext } from './types.js';
|
|
2
|
+
export type { BranchResponse, BranchListResponse, BranchDeleteResponse, CreateBranchBody, UpdateBranchAccessBody, } from './branch.js';
|
|
3
|
+
export type { BranchMergeResponse } from './branch-merge.js';
|
|
4
|
+
export type { CommentsResponse, AddCommentResponse, ResolveCommentResponse, ListCommentsResponse, } from './comments.js';
|
|
5
|
+
export type { EntriesResponse, ListEntriesResponse, CollectionItem, ListEntriesParams, DeleteEntryResponse, } from './entries.js';
|
|
6
|
+
export type { PermissionsResponse, UpdatePermissionsBody, SearchUsersParams, GetUserMetadataResponse, GetUserMetadataParams, } from './permissions.js';
|
|
7
|
+
export type { UserInfoResponse } from './user.js';
|
|
8
|
+
export type { AssetRecord, AssetsListResponse, PresignAssetResponse, PresignAssetBody, FinalizeAssetResponse, FinalizeAssetBody, AssetDeleteResponse, ListAssetsParams, DeleteAssetParams, } from './assets.js';
|
|
9
|
+
export type { InternalGroupsResponse, ExternalGroupsResponse, UpdateInternalGroupsBody, SearchExternalGroupsParams, ExternalGroup, } from './groups.js';
|
|
10
|
+
export type { ReferenceOptionsResponse } from './reference-options.js';
|
|
11
|
+
export type { ResolveReferencesResponse } from './resolve-references.js';
|
|
12
|
+
export type { SchemaResponse, WireEntryType, WireCollectionConfig, WireFlatSchemaItem, CollectionResponse, CreateCollectionResponse, UpdateCollectionResponse, DeleteCollectionResponse, AddEntryTypeResponse, UpdateEntryTypeResponse, RemoveEntryTypeResponse, UpdateOrderResponse, GetSchemaApiResponse, GetCollectionApiResponse, CreateCollectionApiResponse, UpdateCollectionApiResponse, DeleteCollectionApiResponse, AddEntryTypeApiResponse, UpdateEntryTypeApiResponse, RemoveEntryTypeApiResponse, UpdateOrderApiResponse, } from './schema.js';
|
|
13
|
+
export type { CreateCollectionInput, UpdateCollectionInput, CreateEntryTypeInput, UpdateEntryTypeInput, } from '../schema/schema-store-types.js';
|
|
14
|
+
export type { EntryTypeSummary } from './entries.js';
|
|
15
|
+
export type { AdminStatusResponse, AdminStatusData, AdminTasksResponse, AdminTasksData, ListAdminTasksParams, AdminRetryTaskResponse, AdminRetryTaskData, RetryTaskParams, AdminDeleteTaskResponse, AdminDeleteTaskData, DeleteTaskParams, WorkerLiveness, WorkerLivenessState, } from './admin.js';
|
|
16
|
+
export { USER_ROUTES } from './user.js';
|
|
17
|
+
export { CanopyApiClient, createApiClient } from './client.js';
|
|
18
|
+
export type { ApiClientOptions } from './client.js';
|
package/dist/api/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { ApiResponse } from './types';
|
|
3
|
-
import type { PathPermission } from '../config';
|
|
4
|
-
import type { UserSearchResult, PermissionGroupOption } from '../auth/types';
|
|
2
|
+
import type { ApiResponse } from './types.js';
|
|
3
|
+
import type { PathPermission } from '../config/index.js';
|
|
4
|
+
import type { UserSearchResult, PermissionGroupOption } from '../auth/types.js';
|
|
5
5
|
/** Response type for getting permissions */
|
|
6
6
|
export type PermissionsResponse = ApiResponse<{
|
|
7
7
|
permissions: PathPermission[];
|
|
@@ -21,7 +21,7 @@ export type GetUserMetadataResponse = ApiResponse<{
|
|
|
21
21
|
}>;
|
|
22
22
|
declare const updatePermissionsBodySchema: z.ZodObject<{
|
|
23
23
|
permissions: z.ZodArray<z.ZodObject<{
|
|
24
|
-
path: z.ZodType<import("../authorization").PermissionPath, z.ZodTypeDef, import("../authorization").PermissionPath>;
|
|
24
|
+
path: z.ZodType<import("../authorization/index.js").PermissionPath, z.ZodTypeDef, import("../authorization/index.js").PermissionPath>;
|
|
25
25
|
read: z.ZodOptional<z.ZodObject<{
|
|
26
26
|
allowedUsers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
27
27
|
allowedGroups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -149,10 +149,10 @@ export type GetUserMetadataParams = z.infer<typeof getUserMetadataParamsSchema>;
|
|
|
149
149
|
* Exported routes for router registration
|
|
150
150
|
*/
|
|
151
151
|
export declare const PERMISSION_ROUTES: {
|
|
152
|
-
readonly get: import("./route-builder").RouteDefinition<undefined, undefined, PermissionsResponse>;
|
|
153
|
-
readonly update: import("./route-builder").RouteDefinition<undefined, z.ZodObject<{
|
|
152
|
+
readonly get: import("./route-builder.js").RouteDefinition<undefined, undefined, PermissionsResponse>;
|
|
153
|
+
readonly update: import("./route-builder.js").RouteDefinition<undefined, z.ZodObject<{
|
|
154
154
|
permissions: z.ZodArray<z.ZodObject<{
|
|
155
|
-
path: z.ZodType<import("../authorization").PermissionPath, z.ZodTypeDef, import("../authorization").PermissionPath>;
|
|
155
|
+
path: z.ZodType<import("../authorization/index.js").PermissionPath, z.ZodTypeDef, import("../authorization/index.js").PermissionPath>;
|
|
156
156
|
read: z.ZodOptional<z.ZodObject<{
|
|
157
157
|
allowedUsers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
158
158
|
allowedGroups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -256,7 +256,7 @@ export declare const PERMISSION_ROUTES: {
|
|
|
256
256
|
}[];
|
|
257
257
|
expectedContentVersion?: number | undefined;
|
|
258
258
|
}>, ApiResponse<unknown>>;
|
|
259
|
-
readonly searchUsers: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
259
|
+
readonly searchUsers: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
260
260
|
q: z.ZodString;
|
|
261
261
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
262
262
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -266,8 +266,8 @@ export declare const PERMISSION_ROUTES: {
|
|
|
266
266
|
q: string;
|
|
267
267
|
limit?: number | undefined;
|
|
268
268
|
}>, undefined, SearchUsersResponse>;
|
|
269
|
-
readonly listGroups: import("./route-builder").RouteDefinition<undefined, undefined, ListGroupsResponse>;
|
|
270
|
-
readonly getUserMetadata: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
269
|
+
readonly listGroups: import("./route-builder.js").RouteDefinition<undefined, undefined, ListGroupsResponse>;
|
|
270
|
+
readonly getUserMetadata: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
271
271
|
userId: z.ZodString;
|
|
272
272
|
}, "strip", z.ZodTypeAny, {
|
|
273
273
|
userId: string;
|
|
@@ -276,4 +276,3 @@ export declare const PERMISSION_ROUTES: {
|
|
|
276
276
|
}>, undefined, GetUserMetadataResponse>;
|
|
277
277
|
};
|
|
278
278
|
export {};
|
|
279
|
-
//# sourceMappingURL=permissions.d.ts.map
|
package/dist/api/permissions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { ApiResponse } from './types';
|
|
2
|
+
import type { ApiResponse } from './types.js';
|
|
3
3
|
/** Response type for reference options */
|
|
4
4
|
export type ReferenceOptionsResponse = ApiResponse<{
|
|
5
5
|
options: Array<{
|
|
@@ -12,8 +12,8 @@ export type ReferenceOptionsResponse = ApiResponse<{
|
|
|
12
12
|
* Exported routes for router registration
|
|
13
13
|
*/
|
|
14
14
|
export declare const REFERENCE_OPTIONS_ROUTES: {
|
|
15
|
-
readonly get: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
16
|
-
branch: z.ZodType<import("../paths").BranchName, z.ZodTypeDef, import("../paths").BranchName>;
|
|
15
|
+
readonly get: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
16
|
+
branch: z.ZodType<import("../paths/index.js").BranchName, z.ZodTypeDef, import("../paths/index.js").BranchName>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
18
|
branch: string & {
|
|
19
19
|
readonly __brand: "BranchName";
|
|
@@ -24,4 +24,3 @@ export declare const REFERENCE_OPTIONS_ROUTES: {
|
|
|
24
24
|
};
|
|
25
25
|
}>, undefined, ReferenceOptionsResponse>;
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=reference-options.d.ts.map
|
|
@@ -30,4 +30,3 @@ export declare function computeContentSha256Hex(body: string): Promise<string |
|
|
|
30
30
|
* known until after the request would already need to be signed.
|
|
31
31
|
*/
|
|
32
32
|
export declare function computeContentSha256HexFromBytes(bytes: BufferSource): Promise<string | undefined>;
|
|
33
|
-
//# sourceMappingURL=request-body-hash.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { ApiResponse } from './types';
|
|
2
|
+
import type { ApiResponse } from './types.js';
|
|
3
3
|
export interface ResolveReferencesBody {
|
|
4
4
|
ids: string[];
|
|
5
5
|
}
|
|
@@ -11,8 +11,8 @@ export type ResolveReferencesResponse = ApiResponse<{
|
|
|
11
11
|
* Exported routes for router registration
|
|
12
12
|
*/
|
|
13
13
|
export declare const RESOLVE_REFERENCES_ROUTES: {
|
|
14
|
-
readonly post: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
15
|
-
branch: z.ZodType<import("../paths").BranchName, z.ZodTypeDef, import("../paths").BranchName>;
|
|
14
|
+
readonly post: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
15
|
+
branch: z.ZodType<import("../paths/index.js").BranchName, z.ZodTypeDef, import("../paths/index.js").BranchName>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
17
|
branch: string & {
|
|
18
18
|
readonly __brand: "BranchName";
|
|
@@ -22,11 +22,10 @@ export declare const RESOLVE_REFERENCES_ROUTES: {
|
|
|
22
22
|
readonly __brand: "BranchName";
|
|
23
23
|
};
|
|
24
24
|
}>, z.ZodObject<{
|
|
25
|
-
ids: z.ZodArray<z.ZodType<import("../paths").ContentId, z.ZodTypeDef, import("../paths").ContentId>, "many">;
|
|
25
|
+
ids: z.ZodArray<z.ZodType<import("../paths/index.js").ContentId, z.ZodTypeDef, import("../paths/index.js").ContentId>, "many">;
|
|
26
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
ids: import("../paths").ContentId[];
|
|
27
|
+
ids: import("../paths/index.js").ContentId[];
|
|
28
28
|
}, {
|
|
29
|
-
ids: import("../paths").ContentId[];
|
|
29
|
+
ids: import("../paths/index.js").ContentId[];
|
|
30
30
|
}>, ResolveReferencesResponse>;
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=resolve-references.d.ts.map
|