@crowi/api 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/app.d.ts +8 -0
- package/dist/app.js +65 -0
- package/dist/app.js.map +1 -0
- package/dist/collab/attach.d.ts +33 -0
- package/dist/collab/attach.js +341 -0
- package/dist/collab/attach.js.map +1 -0
- package/dist/collab/extension-redis.d.ts +25 -0
- package/dist/collab/extension-redis.js +133 -0
- package/dist/collab/extension-redis.js.map +1 -0
- package/dist/common/functions/path2name.d.ts +1 -0
- package/dist/common/functions/path2name.js +22 -0
- package/dist/common/functions/path2name.js.map +1 -0
- package/dist/common/functions/renderIcon.d.ts +1 -0
- package/dist/common/functions/renderIcon.js +9 -0
- package/dist/common/functions/renderIcon.js.map +1 -0
- package/dist/controllers/admin.d.ts +3 -0
- package/dist/controllers/admin.js +474 -0
- package/dist/controllers/admin.js.map +1 -0
- package/dist/controllers/attachment.d.ts +4 -0
- package/dist/controllers/attachment.js +200 -0
- package/dist/controllers/attachment.js.map +1 -0
- package/dist/controllers/backlink.d.ts +3 -0
- package/dist/controllers/backlink.js +42 -0
- package/dist/controllers/backlink.js.map +1 -0
- package/dist/controllers/bookmark.d.ts +3 -0
- package/dist/controllers/bookmark.js +100 -0
- package/dist/controllers/bookmark.js.map +1 -0
- package/dist/controllers/comment.d.ts +3 -0
- package/dist/controllers/comment.js +111 -0
- package/dist/controllers/comment.js.map +1 -0
- package/dist/controllers/index.d.ts +25 -0
- package/dist/controllers/index.js +44 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/installer.d.ts +3 -0
- package/dist/controllers/installer.js +48 -0
- package/dist/controllers/installer.js.map +1 -0
- package/dist/controllers/login.d.ts +4 -0
- package/dist/controllers/login.js +438 -0
- package/dist/controllers/login.js.map +1 -0
- package/dist/controllers/logout.d.ts +5 -0
- package/dist/controllers/logout.js +11 -0
- package/dist/controllers/logout.js.map +1 -0
- package/dist/controllers/me.d.ts +4 -0
- package/dist/controllers/me.js +369 -0
- package/dist/controllers/me.js.map +1 -0
- package/dist/controllers/notification.d.ts +3 -0
- package/dist/controllers/notification.js +88 -0
- package/dist/controllers/notification.js.map +1 -0
- package/dist/controllers/page.d.ts +3 -0
- package/dist/controllers/page.js +881 -0
- package/dist/controllers/page.js.map +1 -0
- package/dist/controllers/revision.d.ts +3 -0
- package/dist/controllers/revision.js +91 -0
- package/dist/controllers/revision.js.map +1 -0
- package/dist/controllers/search.d.ts +3 -0
- package/dist/controllers/search.js +93 -0
- package/dist/controllers/search.js.map +1 -0
- package/dist/controllers/share.d.ts +3 -0
- package/dist/controllers/share.js +207 -0
- package/dist/controllers/share.js.map +1 -0
- package/dist/controllers/shareAccess.d.ts +3 -0
- package/dist/controllers/shareAccess.js +28 -0
- package/dist/controllers/shareAccess.js.map +1 -0
- package/dist/controllers/slack.d.ts +3 -0
- package/dist/controllers/slack.js +87 -0
- package/dist/controllers/slack.js.map +1 -0
- package/dist/controllers/tokenAuth.d.ts +10 -0
- package/dist/controllers/tokenAuth.js +292 -0
- package/dist/controllers/tokenAuth.js.map +1 -0
- package/dist/controllers/user.d.ts +3 -0
- package/dist/controllers/user.js +67 -0
- package/dist/controllers/user.js.map +1 -0
- package/dist/controllers/version.d.ts +4 -0
- package/dist/controllers/version.js +19 -0
- package/dist/controllers/version.js.map +1 -0
- package/dist/crowi/express-init.d.ts +4 -0
- package/dist/crowi/express-init.js +101 -0
- package/dist/crowi/express-init.js.map +1 -0
- package/dist/crowi/index.d.ts +245 -0
- package/dist/crowi/index.js +726 -0
- package/dist/crowi/index.js.map +1 -0
- package/dist/events/activity.d.ts +7 -0
- package/dist/events/activity.js +15 -0
- package/dist/events/activity.js.map +1 -0
- package/dist/events/bookmark.d.ts +8 -0
- package/dist/events/bookmark.js +16 -0
- package/dist/events/bookmark.js.map +1 -0
- package/dist/events/comment.d.ts +6 -0
- package/dist/events/comment.js +14 -0
- package/dist/events/comment.js.map +1 -0
- package/dist/events/config.d.ts +6 -0
- package/dist/events/config.js +12 -0
- package/dist/events/config.js.map +1 -0
- package/dist/events/index.d.ts +17 -0
- package/dist/events/index.js +22 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/mention-dispatch.d.ts +44 -0
- package/dist/events/mention-dispatch.js +151 -0
- package/dist/events/mention-dispatch.js.map +1 -0
- package/dist/events/notification.d.ts +7 -0
- package/dist/events/notification.js +15 -0
- package/dist/events/notification.js.map +1 -0
- package/dist/events/page.d.ts +44 -0
- package/dist/events/page.js +134 -0
- package/dist/events/page.js.map +1 -0
- package/dist/events/render-cache.d.ts +24 -0
- package/dist/events/render-cache.js +63 -0
- package/dist/events/render-cache.js.map +1 -0
- package/dist/events/user.d.ts +9 -0
- package/dist/events/user.js +39 -0
- package/dist/events/user.js.map +1 -0
- package/dist/form/admin/app.d.ts +2 -0
- package/dist/form/admin/app.js +9 -0
- package/dist/form/admin/app.js.map +1 -0
- package/dist/form/admin/auth.d.ts +2 -0
- package/dist/form/admin/auth.js +9 -0
- package/dist/form/admin/auth.js.map +1 -0
- package/dist/form/admin/aws.d.ts +2 -0
- package/dist/form/admin/aws.js +13 -0
- package/dist/form/admin/aws.js.map +1 -0
- package/dist/form/admin/github.d.ts +2 -0
- package/dist/form/admin/github.js +15 -0
- package/dist/form/admin/github.js.map +1 -0
- package/dist/form/admin/google.d.ts +2 -0
- package/dist/form/admin/google.js +13 -0
- package/dist/form/admin/google.js.map +1 -0
- package/dist/form/admin/mail.d.ts +2 -0
- package/dist/form/admin/mail.js +13 -0
- package/dist/form/admin/mail.js.map +1 -0
- package/dist/form/admin/sec.d.ts +2 -0
- package/dist/form/admin/sec.js +10 -0
- package/dist/form/admin/sec.js.map +1 -0
- package/dist/form/admin/slackSetting.d.ts +2 -0
- package/dist/form/admin/slackSetting.js +13 -0
- package/dist/form/admin/slackSetting.js.map +1 -0
- package/dist/form/admin/userEdit.d.ts +2 -0
- package/dist/form/admin/userEdit.js +9 -0
- package/dist/form/admin/userEdit.js.map +1 -0
- package/dist/form/admin/userInvite.d.ts +2 -0
- package/dist/form/admin/userInvite.js +9 -0
- package/dist/form/admin/userInvite.js.map +1 -0
- package/dist/form/comment.d.ts +2 -0
- package/dist/form/comment.js +9 -0
- package/dist/form/comment.js.map +1 -0
- package/dist/form/index.d.ts +25 -0
- package/dist/form/index.js +48 -0
- package/dist/form/index.js.map +1 -0
- package/dist/form/invited.d.ts +2 -0
- package/dist/form/invited.js +13 -0
- package/dist/form/invited.js.map +1 -0
- package/dist/form/login.d.ts +2 -0
- package/dist/form/login.js +11 -0
- package/dist/form/login.js.map +1 -0
- package/dist/form/me/apiToken.d.ts +2 -0
- package/dist/form/me/apiToken.js +9 -0
- package/dist/form/me/apiToken.js.map +1 -0
- package/dist/form/me/password.d.ts +2 -0
- package/dist/form/me/password.js +11 -0
- package/dist/form/me/password.js.map +1 -0
- package/dist/form/me/user.d.ts +2 -0
- package/dist/form/me/user.js +9 -0
- package/dist/form/me/user.js.map +1 -0
- package/dist/form/register.d.ts +2 -0
- package/dist/form/register.js +13 -0
- package/dist/form/register.js.map +1 -0
- package/dist/form/revision.d.ts +2 -0
- package/dist/form/revision.js +13 -0
- package/dist/form/revision.js.map +1 -0
- package/dist/hono/app.d.ts +19 -0
- package/dist/hono/app.js +21 -0
- package/dist/hono/app.js.map +1 -0
- package/dist/hono/handlers/_helpers/errors.d.ts +61 -0
- package/dist/hono/handlers/_helpers/errors.js +51 -0
- package/dist/hono/handlers/_helpers/errors.js.map +1 -0
- package/dist/hono/handlers/_helpers/user-shape.d.ts +46 -0
- package/dist/hono/handlers/_helpers/user-shape.js +23 -0
- package/dist/hono/handlers/_helpers/user-shape.js.map +1 -0
- package/dist/hono/handlers/access-token.d.ts +221 -0
- package/dist/hono/handlers/access-token.js +113 -0
- package/dist/hono/handlers/access-token.js.map +1 -0
- package/dist/hono/handlers/activation.d.ts +117 -0
- package/dist/hono/handlers/activation.js +77 -0
- package/dist/hono/handlers/activation.js.map +1 -0
- package/dist/hono/handlers/admin/app.d.ts +123 -0
- package/dist/hono/handlers/admin/app.js +76 -0
- package/dist/hono/handlers/admin/app.js.map +1 -0
- package/dist/hono/handlers/admin/auth.d.ts +127 -0
- package/dist/hono/handlers/admin/auth.js +91 -0
- package/dist/hono/handlers/admin/auth.js.map +1 -0
- package/dist/hono/handlers/admin/mail.d.ts +168 -0
- package/dist/hono/handlers/admin/mail.js +76 -0
- package/dist/hono/handlers/admin/mail.js.map +1 -0
- package/dist/hono/handlers/admin/plugins.d.ts +409 -0
- package/dist/hono/handlers/admin/plugins.js +257 -0
- package/dist/hono/handlers/admin/plugins.js.map +1 -0
- package/dist/hono/handlers/admin/search.d.ts +57 -0
- package/dist/hono/handlers/admin/search.js +55 -0
- package/dist/hono/handlers/admin/search.js.map +1 -0
- package/dist/hono/handlers/admin/security.d.ts +112 -0
- package/dist/hono/handlers/admin/security.js +71 -0
- package/dist/hono/handlers/admin/security.js.map +1 -0
- package/dist/hono/handlers/admin/share.d.ts +106 -0
- package/dist/hono/handlers/admin/share.js +55 -0
- package/dist/hono/handlers/admin/share.js.map +1 -0
- package/dist/hono/handlers/admin/storage.d.ts +55 -0
- package/dist/hono/handlers/admin/storage.js +40 -0
- package/dist/hono/handlers/admin/storage.js.map +1 -0
- package/dist/hono/handlers/admin/users.d.ts +1230 -0
- package/dist/hono/handlers/admin/users.js +316 -0
- package/dist/hono/handlers/admin/users.js.map +1 -0
- package/dist/hono/handlers/adminCrypto.d.ts +110 -0
- package/dist/hono/handlers/adminCrypto.js +151 -0
- package/dist/hono/handlers/adminCrypto.js.map +1 -0
- package/dist/hono/handlers/app.d.ts +26 -0
- package/dist/hono/handlers/app.js +34 -0
- package/dist/hono/handlers/app.js.map +1 -0
- package/dist/hono/handlers/attachment-stream.d.ts +4 -0
- package/dist/hono/handlers/attachment-stream.js +211 -0
- package/dist/hono/handlers/attachment-stream.js.map +1 -0
- package/dist/hono/handlers/attachment.d.ts +687 -0
- package/dist/hono/handlers/attachment.js +566 -0
- package/dist/hono/handlers/attachment.js.map +1 -0
- package/dist/hono/handlers/autocomplete.d.ts +160 -0
- package/dist/hono/handlers/autocomplete.js +181 -0
- package/dist/hono/handlers/autocomplete.js.map +1 -0
- package/dist/hono/handlers/backlink.d.ts +78 -0
- package/dist/hono/handlers/backlink.js +93 -0
- package/dist/hono/handlers/backlink.js.map +1 -0
- package/dist/hono/handlers/bookmark.d.ts +558 -0
- package/dist/hono/handlers/bookmark.js +166 -0
- package/dist/hono/handlers/bookmark.js.map +1 -0
- package/dist/hono/handlers/comment.d.ts +231 -0
- package/dist/hono/handlers/comment.js +191 -0
- package/dist/hono/handlers/comment.js.map +1 -0
- package/dist/hono/handlers/draft.d.ts +136 -0
- package/dist/hono/handlers/draft.js +191 -0
- package/dist/hono/handlers/draft.js.map +1 -0
- package/dist/hono/handlers/emailChange.d.ts +124 -0
- package/dist/hono/handlers/emailChange.js +79 -0
- package/dist/hono/handlers/emailChange.js.map +1 -0
- package/dist/hono/handlers/installer.d.ts +94 -0
- package/dist/hono/handlers/installer.js +93 -0
- package/dist/hono/handlers/installer.js.map +1 -0
- package/dist/hono/handlers/inviteAccept.d.ts +180 -0
- package/dist/hono/handlers/inviteAccept.js +94 -0
- package/dist/hono/handlers/inviteAccept.js.map +1 -0
- package/dist/hono/handlers/me.d.ts +401 -0
- package/dist/hono/handlers/me.js +390 -0
- package/dist/hono/handlers/me.js.map +1 -0
- package/dist/hono/handlers/notification.d.ts +274 -0
- package/dist/hono/handlers/notification.js +224 -0
- package/dist/hono/handlers/notification.js.map +1 -0
- package/dist/hono/handlers/oauth.d.ts +299 -0
- package/dist/hono/handlers/oauth.js +443 -0
- package/dist/hono/handlers/oauth.js.map +1 -0
- package/dist/hono/handlers/page-collab.d.ts +79 -0
- package/dist/hono/handlers/page-collab.js +98 -0
- package/dist/hono/handlers/page-collab.js.map +1 -0
- package/dist/hono/handlers/page-preview.d.ts +48 -0
- package/dist/hono/handlers/page-preview.js +83 -0
- package/dist/hono/handlers/page-preview.js.map +1 -0
- package/dist/hono/handlers/page.d.ts +2059 -0
- package/dist/hono/handlers/page.js +793 -0
- package/dist/hono/handlers/page.js.map +1 -0
- package/dist/hono/handlers/passwordReset.d.ts +181 -0
- package/dist/hono/handlers/passwordReset.js +101 -0
- package/dist/hono/handlers/passwordReset.js.map +1 -0
- package/dist/hono/handlers/presence.d.ts +178 -0
- package/dist/hono/handlers/presence.js +163 -0
- package/dist/hono/handlers/presence.js.map +1 -0
- package/dist/hono/handlers/revision.d.ts +345 -0
- package/dist/hono/handlers/revision.js +202 -0
- package/dist/hono/handlers/revision.js.map +1 -0
- package/dist/hono/handlers/search.d.ts +208 -0
- package/dist/hono/handlers/search.js +152 -0
- package/dist/hono/handlers/search.js.map +1 -0
- package/dist/hono/handlers/tokenAuth.d.ts +369 -0
- package/dist/hono/handlers/tokenAuth.js +240 -0
- package/dist/hono/handlers/tokenAuth.js.map +1 -0
- package/dist/hono/handlers/user.d.ts +710 -0
- package/dist/hono/handlers/user.js +212 -0
- package/dist/hono/handlers/user.js.map +1 -0
- package/dist/hono/index.d.ts +289 -0
- package/dist/hono/index.js +240 -0
- package/dist/hono/index.js.map +1 -0
- package/dist/hono/middleware/admin.d.ts +5 -0
- package/dist/hono/middleware/admin.js +34 -0
- package/dist/hono/middleware/admin.js.map +1 -0
- package/dist/hono/middleware/auth.d.ts +54 -0
- package/dist/hono/middleware/auth.js +142 -0
- package/dist/hono/middleware/auth.js.map +1 -0
- package/dist/hono/middleware/cors.d.ts +3 -0
- package/dist/hono/middleware/cors.js +86 -0
- package/dist/hono/middleware/cors.js.map +1 -0
- package/dist/hono/middleware/default-hook.d.ts +8 -0
- package/dist/hono/middleware/default-hook.js +17 -0
- package/dist/hono/middleware/default-hook.js.map +1 -0
- package/dist/hono/middleware/error-handler.d.ts +2 -0
- package/dist/hono/middleware/error-handler.js +20 -0
- package/dist/hono/middleware/error-handler.js.map +1 -0
- package/dist/hono/middleware/rate-limit.d.ts +57 -0
- package/dist/hono/middleware/rate-limit.js +42 -0
- package/dist/hono/middleware/rate-limit.js.map +1 -0
- package/dist/hono/middleware/require-scope.d.ts +50 -0
- package/dist/hono/middleware/require-scope.js +64 -0
- package/dist/hono/middleware/require-scope.js.map +1 -0
- package/dist/hono/path-rewrite.d.ts +15 -0
- package/dist/hono/path-rewrite.js +59 -0
- package/dist/hono/path-rewrite.js.map +1 -0
- package/dist/mail/i18n/en.d.ts +2 -0
- package/dist/mail/i18n/en.js +66 -0
- package/dist/mail/i18n/en.js.map +1 -0
- package/dist/mail/i18n/index.d.ts +46 -0
- package/dist/mail/i18n/index.js +31 -0
- package/dist/mail/i18n/index.js.map +1 -0
- package/dist/mail/i18n/ja.d.ts +2 -0
- package/dist/mail/i18n/ja.js +66 -0
- package/dist/mail/i18n/ja.js.map +1 -0
- package/dist/mcp/attach.d.ts +25 -0
- package/dist/mcp/attach.js +104 -0
- package/dist/mcp/attach.js.map +1 -0
- package/dist/mcp/dispatch.d.ts +59 -0
- package/dist/mcp/dispatch.js +70 -0
- package/dist/mcp/dispatch.js.map +1 -0
- package/dist/mcp/result.d.ts +40 -0
- package/dist/mcp/result.js +78 -0
- package/dist/mcp/result.js.map +1 -0
- package/dist/mcp/server.d.ts +67 -0
- package/dist/mcp/server.js +113 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/page.d.ts +2 -0
- package/dist/mcp/tools/page.js +256 -0
- package/dist/mcp/tools/page.js.map +1 -0
- package/dist/mcp/tools/search.d.ts +2 -0
- package/dist/mcp/tools/search.js +36 -0
- package/dist/mcp/tools/search.js.map +1 -0
- package/dist/middlewares/accessTokenParser.d.ts +4 -0
- package/dist/middlewares/accessTokenParser.js +29 -0
- package/dist/middlewares/accessTokenParser.js.map +1 -0
- package/dist/middlewares/adminRequired.d.ts +10 -0
- package/dist/middlewares/adminRequired.js +35 -0
- package/dist/middlewares/adminRequired.js.map +1 -0
- package/dist/middlewares/applicationInstalled.d.ts +3 -0
- package/dist/middlewares/applicationInstalled.js +20 -0
- package/dist/middlewares/applicationInstalled.js.map +1 -0
- package/dist/middlewares/applicationNotInstalled.d.ts +3 -0
- package/dist/middlewares/applicationNotInstalled.js +13 -0
- package/dist/middlewares/applicationNotInstalled.js.map +1 -0
- package/dist/middlewares/basicAuth.d.ts +4 -0
- package/dist/middlewares/basicAuth.js +23 -0
- package/dist/middlewares/basicAuth.js.map +1 -0
- package/dist/middlewares/csrfVerify.d.ts +4 -0
- package/dist/middlewares/csrfVerify.js +24 -0
- package/dist/middlewares/csrfVerify.js.map +1 -0
- package/dist/middlewares/encodeSpace.d.ts +3 -0
- package/dist/middlewares/encodeSpace.js +14 -0
- package/dist/middlewares/encodeSpace.js.map +1 -0
- package/dist/middlewares/fileAccessRightOrLoginRequired.d.ts +4 -0
- package/dist/middlewares/fileAccessRightOrLoginRequired.js +29 -0
- package/dist/middlewares/fileAccessRightOrLoginRequired.js.map +1 -0
- package/dist/middlewares/index.d.ts +16 -0
- package/dist/middlewares/index.js +30 -0
- package/dist/middlewares/index.js.map +1 -0
- package/dist/middlewares/jwtAdminRequired.d.ts +8 -0
- package/dist/middlewares/jwtAdminRequired.js +35 -0
- package/dist/middlewares/jwtAdminRequired.js.map +1 -0
- package/dist/middlewares/jwtAuth.d.ts +4 -0
- package/dist/middlewares/jwtAuth.js +104 -0
- package/dist/middlewares/jwtAuth.js.map +1 -0
- package/dist/middlewares/loginChecker.d.ts +4 -0
- package/dist/middlewares/loginChecker.js +32 -0
- package/dist/middlewares/loginChecker.js.map +1 -0
- package/dist/middlewares/loginRequired.d.ts +4 -0
- package/dist/middlewares/loginRequired.js +88 -0
- package/dist/middlewares/loginRequired.js.map +1 -0
- package/dist/migration/cli-api.d.ts +83 -0
- package/dist/migration/cli-api.js +128 -0
- package/dist/migration/cli-api.js.map +1 -0
- package/dist/migration/migrations/index.d.ts +12 -0
- package/dist/migration/migrations/index.js +24 -0
- package/dist/migration/migrations/index.js.map +1 -0
- package/dist/migration/migrations/page-status-default.d.ts +25 -0
- package/dist/migration/migrations/page-status-default.js +79 -0
- package/dist/migration/migrations/page-status-default.js.map +1 -0
- package/dist/migration/migrations/revisions-schema-unify.d.ts +33 -0
- package/dist/migration/migrations/revisions-schema-unify.js +88 -0
- package/dist/migration/migrations/revisions-schema-unify.js.map +1 -0
- package/dist/migration/migrations/user-unique-prepare.d.ts +1 -0
- package/dist/migration/migrations/user-unique-prepare.js +214 -0
- package/dist/migration/migrations/user-unique-prepare.js.map +1 -0
- package/dist/migration/migrations/wikilink-format.d.ts +97 -0
- package/dist/migration/migrations/wikilink-format.js +418 -0
- package/dist/migration/migrations/wikilink-format.js.map +1 -0
- package/dist/migration/rebuild-api.d.ts +50 -0
- package/dist/migration/rebuild-api.js +45 -0
- package/dist/migration/rebuild-api.js.map +1 -0
- package/dist/migration/rebuild-runner.d.ts +64 -0
- package/dist/migration/rebuild-runner.js +42 -0
- package/dist/migration/rebuild-runner.js.map +1 -0
- package/dist/migration/rebuilds/index.d.ts +26 -0
- package/dist/migration/rebuilds/index.js +69 -0
- package/dist/migration/rebuilds/index.js.map +1 -0
- package/dist/migration/registry.d.ts +15 -0
- package/dist/migration/registry.js +96 -0
- package/dist/migration/registry.js.map +1 -0
- package/dist/migration/run-boot-migrations.d.ts +31 -0
- package/dist/migration/run-boot-migrations.js +95 -0
- package/dist/migration/run-boot-migrations.js.map +1 -0
- package/dist/migration/runner.d.ts +120 -0
- package/dist/migration/runner.js +276 -0
- package/dist/migration/runner.js.map +1 -0
- package/dist/migration/types.d.ts +153 -0
- package/dist/migration/types.js +13 -0
- package/dist/migration/types.js.map +1 -0
- package/dist/models/activity.d.ts +34 -0
- package/dist/models/activity.js +263 -0
- package/dist/models/activity.js.map +1 -0
- package/dist/models/attachment.d.ts +25 -0
- package/dist/models/attachment.js +82 -0
- package/dist/models/attachment.js.map +1 -0
- package/dist/models/backlink.d.ts +19 -0
- package/dist/models/backlink.js +138 -0
- package/dist/models/backlink.js.map +1 -0
- package/dist/models/bookmark.d.ts +28 -0
- package/dist/models/bookmark.js +136 -0
- package/dist/models/bookmark.js.map +1 -0
- package/dist/models/comment.d.ts +21 -0
- package/dist/models/comment.js +87 -0
- package/dist/models/comment.js.map +1 -0
- package/dist/models/config-sensitive.d.ts +21 -0
- package/dist/models/config-sensitive.js +71 -0
- package/dist/models/config-sensitive.js.map +1 -0
- package/dist/models/config.d.ts +34 -0
- package/dist/models/config.js +161 -0
- package/dist/models/config.js.map +1 -0
- package/dist/models/index.d.ts +30 -0
- package/dist/models/index.js +55 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/migration-application.d.ts +54 -0
- package/dist/models/migration-application.js +36 -0
- package/dist/models/migration-application.js.map +1 -0
- package/dist/models/notification.d.ts +28 -0
- package/dist/models/notification.js +285 -0
- package/dist/models/notification.js.map +1 -0
- package/dist/models/oauth-authorization-code.d.ts +34 -0
- package/dist/models/oauth-authorization-code.js +100 -0
- package/dist/models/oauth-authorization-code.js.map +1 -0
- package/dist/models/oauth-client.d.ts +36 -0
- package/dist/models/oauth-client.js +56 -0
- package/dist/models/oauth-client.js.map +1 -0
- package/dist/models/oauth-device-code.d.ts +55 -0
- package/dist/models/oauth-device-code.js +158 -0
- package/dist/models/oauth-device-code.js.map +1 -0
- package/dist/models/oauth-refresh-token.d.ts +31 -0
- package/dist/models/oauth-refresh-token.js +118 -0
- package/dist/models/oauth-refresh-token.js.map +1 -0
- package/dist/models/page-yjs-update.d.ts +35 -0
- package/dist/models/page-yjs-update.js +33 -0
- package/dist/models/page-yjs-update.js.map +1 -0
- package/dist/models/page.d.ts +200 -0
- package/dist/models/page.js +1117 -0
- package/dist/models/page.js.map +1 -0
- package/dist/models/personal-access-token.d.ts +30 -0
- package/dist/models/personal-access-token.js +107 -0
- package/dist/models/personal-access-token.js.map +1 -0
- package/dist/models/plugin-render-cache.d.ts +40 -0
- package/dist/models/plugin-render-cache.js +39 -0
- package/dist/models/plugin-render-cache.js.map +1 -0
- package/dist/models/revision.d.ts +145 -0
- package/dist/models/revision.js +241 -0
- package/dist/models/revision.js.map +1 -0
- package/dist/models/share.d.ts +38 -0
- package/dist/models/share.js +137 -0
- package/dist/models/share.js.map +1 -0
- package/dist/models/shareAccess.d.ts +20 -0
- package/dist/models/shareAccess.js +45 -0
- package/dist/models/shareAccess.js.map +1 -0
- package/dist/models/tracking.d.ts +14 -0
- package/dist/models/tracking.js +14 -0
- package/dist/models/tracking.js.map +1 -0
- package/dist/models/updatePost.d.ts +25 -0
- package/dist/models/updatePost.js +87 -0
- package/dist/models/updatePost.js.map +1 -0
- package/dist/models/user.d.ts +144 -0
- package/dist/models/user.js +681 -0
- package/dist/models/user.js.map +1 -0
- package/dist/models/watcher.d.ts +23 -0
- package/dist/models/watcher.js +75 -0
- package/dist/models/watcher.js.map +1 -0
- package/dist/notifications/attach.d.ts +63 -0
- package/dist/notifications/attach.js +426 -0
- package/dist/notifications/attach.js.map +1 -0
- package/dist/notifications/channel.d.ts +13 -0
- package/dist/notifications/channel.js +18 -0
- package/dist/notifications/channel.js.map +1 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/index.js +6 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/plugin-context.d.ts +22 -0
- package/dist/plugin/plugin-context.js +126 -0
- package/dist/plugin/plugin-context.js.map +1 -0
- package/dist/plugin/plugin-manager.d.ts +164 -0
- package/dist/plugin/plugin-manager.js +328 -0
- package/dist/plugin/plugin-manager.js.map +1 -0
- package/dist/plugin/plugin-namespace.d.ts +28 -0
- package/dist/plugin/plugin-namespace.js +53 -0
- package/dist/plugin/plugin-namespace.js.map +1 -0
- package/dist/plugin/registries.d.ts +38 -0
- package/dist/plugin/registries.js +71 -0
- package/dist/plugin/registries.js.map +1 -0
- package/dist/plugin/schema-serializer.d.ts +34 -0
- package/dist/plugin/schema-serializer.js +122 -0
- package/dist/plugin/schema-serializer.js.map +1 -0
- package/dist/plugin/topo-sort.d.ts +15 -0
- package/dist/plugin/topo-sort.js +59 -0
- package/dist/plugin/topo-sort.js.map +1 -0
- package/dist/presence/attach.d.ts +36 -0
- package/dist/presence/attach.js +399 -0
- package/dist/presence/attach.js.map +1 -0
- package/dist/renderer/__fixtures__/echo-embed.d.ts +27 -0
- package/dist/renderer/__fixtures__/echo-embed.js +24 -0
- package/dist/renderer/__fixtures__/echo-embed.js.map +1 -0
- package/dist/renderer/cache/index.d.ts +60 -0
- package/dist/renderer/cache/index.js +219 -0
- package/dist/renderer/cache/index.js.map +1 -0
- package/dist/renderer/cache/mongodb-cache.d.ts +82 -0
- package/dist/renderer/cache/mongodb-cache.js +180 -0
- package/dist/renderer/cache/mongodb-cache.js.map +1 -0
- package/dist/renderer/cache/reservation.d.ts +20 -0
- package/dist/renderer/cache/reservation.js +115 -0
- package/dist/renderer/cache/reservation.js.map +1 -0
- package/dist/renderer/core/_mdast-walk.d.ts +35 -0
- package/dist/renderer/core/_mdast-walk.js +45 -0
- package/dist/renderer/core/_mdast-walk.js.map +1 -0
- package/dist/renderer/core/code-block-dispatch.d.ts +31 -0
- package/dist/renderer/core/code-block-dispatch.js +166 -0
- package/dist/renderer/core/code-block-dispatch.js.map +1 -0
- package/dist/renderer/core/code-blocks.d.ts +12 -0
- package/dist/renderer/core/code-blocks.js +32 -0
- package/dist/renderer/core/code-blocks.js.map +1 -0
- package/dist/renderer/core/embed-tags.d.ts +14 -0
- package/dist/renderer/core/embed-tags.js +154 -0
- package/dist/renderer/core/embed-tags.js.map +1 -0
- package/dist/renderer/core/headings.d.ts +16 -0
- package/dist/renderer/core/headings.js +31 -0
- package/dist/renderer/core/headings.js.map +1 -0
- package/dist/renderer/core/index.d.ts +65 -0
- package/dist/renderer/core/index.js +83 -0
- package/dist/renderer/core/index.js.map +1 -0
- package/dist/renderer/core/mention-resolve.d.ts +39 -0
- package/dist/renderer/core/mention-resolve.js +75 -0
- package/dist/renderer/core/mention-resolve.js.map +1 -0
- package/dist/renderer/core/mentions.d.ts +2 -0
- package/dist/renderer/core/mentions.js +83 -0
- package/dist/renderer/core/mentions.js.map +1 -0
- package/dist/renderer/core/syntax-highlight.d.ts +21 -0
- package/dist/renderer/core/syntax-highlight.js +64 -0
- package/dist/renderer/core/syntax-highlight.js.map +1 -0
- package/dist/renderer/core/url-inline-expand.d.ts +9 -0
- package/dist/renderer/core/url-inline-expand.js +157 -0
- package/dist/renderer/core/url-inline-expand.js.map +1 -0
- package/dist/renderer/core/wikilinks.d.ts +2 -0
- package/dist/renderer/core/wikilinks.js +118 -0
- package/dist/renderer/core/wikilinks.js.map +1 -0
- package/dist/renderer/index.d.ts +67 -0
- package/dist/renderer/index.js +99 -0
- package/dist/renderer/index.js.map +1 -0
- package/dist/renderer/pipeline.d.ts +134 -0
- package/dist/renderer/pipeline.js +203 -0
- package/dist/renderer/pipeline.js.map +1 -0
- package/dist/renderer/registry.d.ts +83 -0
- package/dist/renderer/registry.js +130 -0
- package/dist/renderer/registry.js.map +1 -0
- package/dist/renderer/serialize.d.ts +27 -0
- package/dist/renderer/serialize.js +46 -0
- package/dist/renderer/serialize.js.map +1 -0
- package/dist/renderer/version.d.ts +30 -0
- package/dist/renderer/version.js +34 -0
- package/dist/renderer/version.js.map +1 -0
- package/dist/routes/admin.d.ts +4 -0
- package/dist/routes/admin.js +17 -0
- package/dist/routes/admin.js.map +1 -0
- package/dist/routes/api/admin.d.ts +4 -0
- package/dist/routes/api/admin.js +37 -0
- package/dist/routes/api/admin.js.map +1 -0
- package/dist/routes/api/attachment.d.ts +4 -0
- package/dist/routes/api/attachment.js +19 -0
- package/dist/routes/api/attachment.js.map +1 -0
- package/dist/routes/api/bookmark.d.ts +4 -0
- package/dist/routes/api/bookmark.js +15 -0
- package/dist/routes/api/bookmark.js.map +1 -0
- package/dist/routes/api/comment.d.ts +4 -0
- package/dist/routes/api/comment.js +14 -0
- package/dist/routes/api/comment.js.map +1 -0
- package/dist/routes/api/index.d.ts +4 -0
- package/dist/routes/api/index.js +36 -0
- package/dist/routes/api/index.js.map +1 -0
- package/dist/routes/api/like.d.ts +4 -0
- package/dist/routes/api/like.js +13 -0
- package/dist/routes/api/like.js.map +1 -0
- package/dist/routes/api/notification.d.ts +4 -0
- package/dist/routes/api/notification.js +15 -0
- package/dist/routes/api/notification.js.map +1 -0
- package/dist/routes/api/page.d.ts +4 -0
- package/dist/routes/api/page.js +24 -0
- package/dist/routes/api/page.js.map +1 -0
- package/dist/routes/api/revision.d.ts +4 -0
- package/dist/routes/api/revision.js +14 -0
- package/dist/routes/api/revision.js.map +1 -0
- package/dist/routes/api/share.d.ts +4 -0
- package/dist/routes/api/share.js +16 -0
- package/dist/routes/api/share.js.map +1 -0
- package/dist/routes/api/version.d.ts +4 -0
- package/dist/routes/api/version.js +10 -0
- package/dist/routes/api/version.js.map +1 -0
- package/dist/routes/index.d.ts +4 -0
- package/dist/routes/index.js +71 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/login.d.ts +4 -0
- package/dist/routes/login.js +18 -0
- package/dist/routes/login.js.map +1 -0
- package/dist/routes/me.d.ts +4 -0
- package/dist/routes/me.js +24 -0
- package/dist/routes/me.js.map +1 -0
- package/dist/routes/ts-rest/admin/app.d.ts +4 -0
- package/dist/routes/ts-rest/admin/app.js +67 -0
- package/dist/routes/ts-rest/admin/app.js.map +1 -0
- package/dist/routes/ts-rest/admin/auth.d.ts +4 -0
- package/dist/routes/ts-rest/admin/auth.js +95 -0
- package/dist/routes/ts-rest/admin/auth.js.map +1 -0
- package/dist/routes/ts-rest/admin/index.d.ts +10 -0
- package/dist/routes/ts-rest/admin/index.js +35 -0
- package/dist/routes/ts-rest/admin/index.js.map +1 -0
- package/dist/routes/ts-rest/admin/mail.d.ts +4 -0
- package/dist/routes/ts-rest/admin/mail.js +156 -0
- package/dist/routes/ts-rest/admin/mail.js.map +1 -0
- package/dist/routes/ts-rest/admin/plugins.d.ts +4 -0
- package/dist/routes/ts-rest/admin/plugins.js +317 -0
- package/dist/routes/ts-rest/admin/plugins.js.map +1 -0
- package/dist/routes/ts-rest/admin/search.d.ts +4 -0
- package/dist/routes/ts-rest/admin/search.js +67 -0
- package/dist/routes/ts-rest/admin/search.js.map +1 -0
- package/dist/routes/ts-rest/admin/security.d.ts +4 -0
- package/dist/routes/ts-rest/admin/security.js +114 -0
- package/dist/routes/ts-rest/admin/security.js.map +1 -0
- package/dist/routes/ts-rest/admin/share.d.ts +4 -0
- package/dist/routes/ts-rest/admin/share.js +69 -0
- package/dist/routes/ts-rest/admin/share.js.map +1 -0
- package/dist/routes/ts-rest/admin/storage.d.ts +4 -0
- package/dist/routes/ts-rest/admin/storage.js +59 -0
- package/dist/routes/ts-rest/admin/storage.js.map +1 -0
- package/dist/routes/ts-rest/admin/users.d.ts +4 -0
- package/dist/routes/ts-rest/admin/users.js +215 -0
- package/dist/routes/ts-rest/admin/users.js.map +1 -0
- package/dist/routes/ts-rest/adminCrypto.d.ts +4 -0
- package/dist/routes/ts-rest/adminCrypto.js +111 -0
- package/dist/routes/ts-rest/adminCrypto.js.map +1 -0
- package/dist/routes/ts-rest/app.d.ts +4 -0
- package/dist/routes/ts-rest/app.js +23 -0
- package/dist/routes/ts-rest/app.js.map +1 -0
- package/dist/routes/ts-rest/attachment.d.ts +4 -0
- package/dist/routes/ts-rest/attachment.js +830 -0
- package/dist/routes/ts-rest/attachment.js.map +1 -0
- package/dist/routes/ts-rest/auth.d.ts +4 -0
- package/dist/routes/ts-rest/auth.js +70 -0
- package/dist/routes/ts-rest/auth.js.map +1 -0
- package/dist/routes/ts-rest/autocomplete.d.ts +30 -0
- package/dist/routes/ts-rest/autocomplete.js +189 -0
- package/dist/routes/ts-rest/autocomplete.js.map +1 -0
- package/dist/routes/ts-rest/backlink.d.ts +4 -0
- package/dist/routes/ts-rest/backlink.js +106 -0
- package/dist/routes/ts-rest/backlink.js.map +1 -0
- package/dist/routes/ts-rest/bookmark.d.ts +4 -0
- package/dist/routes/ts-rest/bookmark.js +189 -0
- package/dist/routes/ts-rest/bookmark.js.map +1 -0
- package/dist/routes/ts-rest/comment.d.ts +4 -0
- package/dist/routes/ts-rest/comment.js +217 -0
- package/dist/routes/ts-rest/comment.js.map +1 -0
- package/dist/routes/ts-rest/draft.d.ts +22 -0
- package/dist/routes/ts-rest/draft.js +200 -0
- package/dist/routes/ts-rest/draft.js.map +1 -0
- package/dist/routes/ts-rest/index.d.ts +4 -0
- package/dist/routes/ts-rest/index.js +103 -0
- package/dist/routes/ts-rest/index.js.map +1 -0
- package/dist/routes/ts-rest/installer.d.ts +4 -0
- package/dist/routes/ts-rest/installer.js +77 -0
- package/dist/routes/ts-rest/installer.js.map +1 -0
- package/dist/routes/ts-rest/me.d.ts +4 -0
- package/dist/routes/ts-rest/me.js +410 -0
- package/dist/routes/ts-rest/me.js.map +1 -0
- package/dist/routes/ts-rest/notification.d.ts +4 -0
- package/dist/routes/ts-rest/notification.js +241 -0
- package/dist/routes/ts-rest/notification.js.map +1 -0
- package/dist/routes/ts-rest/page-collab.d.ts +29 -0
- package/dist/routes/ts-rest/page-collab.js +90 -0
- package/dist/routes/ts-rest/page-collab.js.map +1 -0
- package/dist/routes/ts-rest/page-preview.d.ts +26 -0
- package/dist/routes/ts-rest/page-preview.js +80 -0
- package/dist/routes/ts-rest/page-preview.js.map +1 -0
- package/dist/routes/ts-rest/page.d.ts +4 -0
- package/dist/routes/ts-rest/page.js +676 -0
- package/dist/routes/ts-rest/page.js.map +1 -0
- package/dist/routes/ts-rest/presence.d.ts +30 -0
- package/dist/routes/ts-rest/presence.js +155 -0
- package/dist/routes/ts-rest/presence.js.map +1 -0
- package/dist/routes/ts-rest/revision.d.ts +4 -0
- package/dist/routes/ts-rest/revision.js +240 -0
- package/dist/routes/ts-rest/revision.js.map +1 -0
- package/dist/routes/ts-rest/search.d.ts +4 -0
- package/dist/routes/ts-rest/search.js +121 -0
- package/dist/routes/ts-rest/search.js.map +1 -0
- package/dist/routes/ts-rest/tokenAuth.d.ts +4 -0
- package/dist/routes/ts-rest/tokenAuth.js +94 -0
- package/dist/routes/ts-rest/tokenAuth.js.map +1 -0
- package/dist/routes/ts-rest/user.d.ts +4 -0
- package/dist/routes/ts-rest/user.js +307 -0
- package/dist/routes/ts-rest/user.js.map +1 -0
- package/dist/service/config.d.ts +50 -0
- package/dist/service/config.js +202 -0
- package/dist/service/config.js.map +1 -0
- package/dist/service/lru.d.ts +11 -0
- package/dist/service/lru.js +47 -0
- package/dist/service/lru.js.map +1 -0
- package/dist/service/mail.d.ts +107 -0
- package/dist/service/mail.js +220 -0
- package/dist/service/mail.js.map +1 -0
- package/dist/service/notification.d.ts +9 -0
- package/dist/service/notification.js +19 -0
- package/dist/service/notification.js.map +1 -0
- package/dist/service/presence.d.ts +219 -0
- package/dist/service/presence.js +602 -0
- package/dist/service/presence.js.map +1 -0
- package/dist/types/error.d.ts +13 -0
- package/dist/types/error.js +13 -0
- package/dist/types/error.js.map +1 -0
- package/dist/types/express.d.ts +34 -0
- package/dist/types/express.js +50 -0
- package/dist/types/express.js.map +1 -0
- package/dist/types/mongoose-extensions.d.ts +8 -0
- package/dist/types/mongoose-extensions.js +24 -0
- package/dist/types/mongoose-extensions.js.map +1 -0
- package/dist/util/accessTokenParser.d.ts +1 -0
- package/dist/util/accessTokenParser.js +34 -0
- package/dist/util/accessTokenParser.js.map +1 -0
- package/dist/util/activityDefine.d.ts +15 -0
- package/dist/util/activityDefine.js +52 -0
- package/dist/util/activityDefine.js.map +1 -0
- package/dist/util/admin-config.d.ts +57 -0
- package/dist/util/admin-config.js +99 -0
- package/dist/util/admin-config.js.map +1 -0
- package/dist/util/admin-pager.d.ts +24 -0
- package/dist/util/admin-pager.js +73 -0
- package/dist/util/admin-pager.js.map +1 -0
- package/dist/util/apiPaginate.d.ts +11 -0
- package/dist/util/apiPaginate.js +33 -0
- package/dist/util/apiPaginate.js.map +1 -0
- package/dist/util/apiResponse.d.ts +9 -0
- package/dist/util/apiResponse.js +23 -0
- package/dist/util/apiResponse.js.map +1 -0
- package/dist/util/auth.d.ts +11 -0
- package/dist/util/auth.js +48 -0
- package/dist/util/auth.js.map +1 -0
- package/dist/util/auto-watch.d.ts +35 -0
- package/dist/util/auto-watch.js +24 -0
- package/dist/util/auto-watch.js.map +1 -0
- package/dist/util/autocomplete-match.d.ts +44 -0
- package/dist/util/autocomplete-match.js +80 -0
- package/dist/util/autocomplete-match.js.map +1 -0
- package/dist/util/aws-config-migration.d.ts +11 -0
- package/dist/util/aws-config-migration.js +68 -0
- package/dist/util/aws-config-migration.js.map +1 -0
- package/dist/util/boot-reporter.d.ts +130 -0
- package/dist/util/boot-reporter.js +242 -0
- package/dist/util/boot-reporter.js.map +1 -0
- package/dist/util/collab-cap.d.ts +39 -0
- package/dist/util/collab-cap.js +90 -0
- package/dist/util/collab-cap.js.map +1 -0
- package/dist/util/crypto.d.ts +39 -0
- package/dist/util/crypto.js +105 -0
- package/dist/util/crypto.js.map +1 -0
- package/dist/util/dedup-users.d.ts +96 -0
- package/dist/util/dedup-users.js +149 -0
- package/dist/util/dedup-users.js.map +1 -0
- package/dist/util/editor-cap-counter.d.ts +90 -0
- package/dist/util/editor-cap-counter.js +175 -0
- package/dist/util/editor-cap-counter.js.map +1 -0
- package/dist/util/fileUploader.d.ts +55 -0
- package/dist/util/fileUploader.js +70 -0
- package/dist/util/fileUploader.js.map +1 -0
- package/dist/util/formUtil.d.ts +2 -0
- package/dist/util/formUtil.js +15 -0
- package/dist/util/formUtil.js.map +1 -0
- package/dist/util/githubAuth.d.ts +2 -0
- package/dist/util/githubAuth.js +82 -0
- package/dist/util/githubAuth.js.map +1 -0
- package/dist/util/googleAuth.d.ts +2 -0
- package/dist/util/googleAuth.js +85 -0
- package/dist/util/googleAuth.js.map +1 -0
- package/dist/util/jwt.d.ts +50 -0
- package/dist/util/jwt.js +127 -0
- package/dist/util/jwt.js.map +1 -0
- package/dist/util/linkDetector.d.ts +3 -0
- package/dist/util/linkDetector.js +91 -0
- package/dist/util/linkDetector.js.map +1 -0
- package/dist/util/mail-token.d.ts +24 -0
- package/dist/util/mail-token.js +117 -0
- package/dist/util/mail-token.js.map +1 -0
- package/dist/util/mailer.d.ts +7 -0
- package/dist/util/mailer.js +98 -0
- package/dist/util/mailer.js.map +1 -0
- package/dist/util/map-duplicate-key-error.d.ts +26 -0
- package/dist/util/map-duplicate-key-error.js +41 -0
- package/dist/util/map-duplicate-key-error.js.map +1 -0
- package/dist/util/mongoose-paginate.d.ts +10 -0
- package/dist/util/mongoose-paginate.js +23 -0
- package/dist/util/mongoose-paginate.js.map +1 -0
- package/dist/util/notifications-token.d.ts +35 -0
- package/dist/util/notifications-token.js +140 -0
- package/dist/util/notifications-token.js.map +1 -0
- package/dist/util/oauth-client-seed.d.ts +2 -0
- package/dist/util/oauth-client-seed.js +48 -0
- package/dist/util/oauth-client-seed.js.map +1 -0
- package/dist/util/oauth-redirect-uri.d.ts +2 -0
- package/dist/util/oauth-redirect-uri.js +55 -0
- package/dist/util/oauth-redirect-uri.js.map +1 -0
- package/dist/util/page-response.d.ts +113 -0
- package/dist/util/page-response.js +154 -0
- package/dist/util/page-response.js.map +1 -0
- package/dist/util/page-search-index.d.ts +19 -0
- package/dist/util/page-search-index.js +91 -0
- package/dist/util/page-search-index.js.map +1 -0
- package/dist/util/page-status-migration.d.ts +23 -0
- package/dist/util/page-status-migration.js +48 -0
- package/dist/util/page-status-migration.js.map +1 -0
- package/dist/util/path.d.ts +2 -0
- package/dist/util/path.js +12 -0
- package/dist/util/path.js.map +1 -0
- package/dist/util/pkce.d.ts +13 -0
- package/dist/util/pkce.js +30 -0
- package/dist/util/pkce.js.map +1 -0
- package/dist/util/presence-token.d.ts +21 -0
- package/dist/util/presence-token.js +120 -0
- package/dist/util/presence-token.js.map +1 -0
- package/dist/util/rate-limit.d.ts +67 -0
- package/dist/util/rate-limit.js +87 -0
- package/dist/util/rate-limit.js.map +1 -0
- package/dist/util/rebuild-backlink.d.ts +25 -0
- package/dist/util/rebuild-backlink.js +7 -0
- package/dist/util/rebuild-backlink.js.map +1 -0
- package/dist/util/rebuild-renderer.d.ts +31 -0
- package/dist/util/rebuild-renderer.js +7 -0
- package/dist/util/rebuild-renderer.js.map +1 -0
- package/dist/util/redis-opts.d.ts +17 -0
- package/dist/util/redis-opts.js +40 -0
- package/dist/util/redis-opts.js.map +1 -0
- package/dist/util/regex.d.ts +2 -0
- package/dist/util/regex.js +8 -0
- package/dist/util/regex.js.map +1 -0
- package/dist/util/search-rebuild.d.ts +18 -0
- package/dist/util/search-rebuild.js +28 -0
- package/dist/util/search-rebuild.js.map +1 -0
- package/dist/util/ssr.d.ts +3 -0
- package/dist/util/ssr.js +9 -0
- package/dist/util/ssr.js.map +1 -0
- package/dist/util/storage-copy.d.ts +40 -0
- package/dist/util/storage-copy.js +123 -0
- package/dist/util/storage-copy.js.map +1 -0
- package/dist/util/ts-rest-helpers.d.ts +110 -0
- package/dist/util/ts-rest-helpers.js +110 -0
- package/dist/util/ts-rest-helpers.js.map +1 -0
- package/dist/util/url.d.ts +1 -0
- package/dist/util/url.js +11 -0
- package/dist/util/url.js.map +1 -0
- package/dist/util/user-code.d.ts +10 -0
- package/dist/util/user-code.js +55 -0
- package/dist/util/user-code.js.map +1 -0
- package/dist/util/view.d.ts +10 -0
- package/dist/util/view.js +99 -0
- package/dist/util/view.js.map +1 -0
- package/dist/util/watcher-backfill.d.ts +30 -0
- package/dist/util/watcher-backfill.js +43 -0
- package/dist/util/watcher-backfill.js.map +1 -0
- package/dist/util/ws-token.d.ts +24 -0
- package/dist/util/ws-token.js +134 -0
- package/dist/util/ws-token.js.map +1 -0
- package/package.json +106 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import type { PresenceViewer } from '@crowi/api-contract';
|
|
2
|
+
import type Crowi from '../crowi';
|
|
3
|
+
/**
|
|
4
|
+
* RFC-0005 — page-presence service.
|
|
5
|
+
*
|
|
6
|
+
* Tracks which users are currently *viewing* a page (the live-presence
|
|
7
|
+
* row above the page title). Editor-side presence (peer cursors,
|
|
8
|
+
* typing badges) is RFC-0003's concern and lives in `@crowi/collab`.
|
|
9
|
+
*
|
|
10
|
+
* Replaces the RFC-0003 Phase 5 `markEditing` no-op stub that
|
|
11
|
+
* previously occupied this file — the swap point the stub's comment
|
|
12
|
+
* promised. The collab package still calls into presence through a
|
|
13
|
+
* dependency-injected adapter (`createPresenceCollabDeps` below) so
|
|
14
|
+
* `@crowi/collab` never imports `@crowi/api`.
|
|
15
|
+
*
|
|
16
|
+
* Wire-level design:
|
|
17
|
+
*
|
|
18
|
+
* - Viewer hash: `crowi:presence:viewers:<pageId>` — a Redis hash,
|
|
19
|
+
* one field per viewing `userId`, value a JSON blob with the
|
|
20
|
+
* viewer's denormalised identity + `joinedAt` + `lastHeartbeatAt`.
|
|
21
|
+
* - TTL: the hash carries a *key-level* `EXPIRE` (re-applied on every
|
|
22
|
+
* write) so an idle page's hash evaporates. Per-*field* TTL would
|
|
23
|
+
* need `HEXPIRE` (Redis 7.4 / node-redis v5) which this codebase's
|
|
24
|
+
* node-redis v4.7 does not expose — instead each field stores
|
|
25
|
+
* `lastHeartbeatAt` and `listViewers` filters out entries whose
|
|
26
|
+
* last heartbeat is older than `VIEWER_TTL_MS`, sweeping the stale
|
|
27
|
+
* fields from the hash as a side effect.
|
|
28
|
+
* - Pub/sub: `crowi:presence:updates` carries `<pageId>` strings.
|
|
29
|
+
* When a viewer joins / leaves on api instance A, A publishes the
|
|
30
|
+
* pageId; every instance (including A) re-broadcasts the fresh
|
|
31
|
+
* viewer list to its locally-connected clients. Same
|
|
32
|
+
* Redis-as-shared-state pattern as RFC-0003.
|
|
33
|
+
* - `isEditing`: NOT stored in the viewer hash. It is derived at
|
|
34
|
+
* `listViewers` time from a dedicated, short-lived *editing hash*
|
|
35
|
+
* `crowi:presence:editing:<pageId>` — one field per editor
|
|
36
|
+
* connection (`<userId>:<socketId>`), value `lastSeenAt`
|
|
37
|
+
* (epoch-ms). The collab process refreshes its own fields every
|
|
38
|
+
* `EDITING_REFRESH_MS`; a field older than `EDITING_TTL_MS` is
|
|
39
|
+
* considered stale and swept. This replaces the earlier design
|
|
40
|
+
* that joined the RFC-0003 editor-cap Set: that Set is a *soft
|
|
41
|
+
* concurrency-limit counter* with a 24h key TTL whose members are
|
|
42
|
+
* only SREM'd on a clean `onDisconnect`, so an api crash / restart
|
|
43
|
+
* could leave stale members for up to 24h and paint the `✏️` badge
|
|
44
|
+
* on plain viewers. The editing hash self-heals: when the editing
|
|
45
|
+
* process dies it stops refreshing, and every field ages out
|
|
46
|
+
* within `EDITING_TTL_MS`.
|
|
47
|
+
*
|
|
48
|
+
* Fail-soft posture: when `crowi.redis` is null (REDIS_URL unset,
|
|
49
|
+
* single-instance dev) presence degrades to an in-process-only store
|
|
50
|
+
* with no cross-instance fan-out. The `/presence` WebSocket still works
|
|
51
|
+
* for viewers connected to the same process.
|
|
52
|
+
*/
|
|
53
|
+
/** Redis key prefix for the per-page viewer hash. */
|
|
54
|
+
declare const VIEWER_HASH_PREFIX = "crowi:presence:viewers:";
|
|
55
|
+
/** Redis pub/sub channel for cross-instance viewer-list invalidation. */
|
|
56
|
+
declare const PRESENCE_UPDATES_CHANNEL = "crowi:presence:updates";
|
|
57
|
+
/**
|
|
58
|
+
* Redis key prefix for the per-page *editing hash* — the presence-owned
|
|
59
|
+
* short-lived editing signal that drives the `✏️` badge. One field per
|
|
60
|
+
* editor connection (`<userId>:<socketId>`), value `lastSeenAt`.
|
|
61
|
+
*/
|
|
62
|
+
declare const EDITING_HASH_PREFIX = "crowi:presence:editing:";
|
|
63
|
+
/**
|
|
64
|
+
* A viewer entry is considered live for 30s after its last heartbeat.
|
|
65
|
+
* The browser heartbeats every 15s, so a viewer normally refreshes
|
|
66
|
+
* twice within the window; a single dropped heartbeat does not evict.
|
|
67
|
+
*/
|
|
68
|
+
declare const VIEWER_TTL_MS = 30000;
|
|
69
|
+
/**
|
|
70
|
+
* An editing-hash field is considered live for 30s after its last
|
|
71
|
+
* refresh. The collab process refreshes every `EDITING_REFRESH_MS`
|
|
72
|
+
* (10s) so a healthy editor field stays comfortably fresh; once the
|
|
73
|
+
* editing process dies and stops refreshing, the field ages out within
|
|
74
|
+
* this window and the badge disappears.
|
|
75
|
+
*/
|
|
76
|
+
declare const EDITING_TTL_MS = 30000;
|
|
77
|
+
/**
|
|
78
|
+
* Interval at which the collab→presence adapter refreshes the
|
|
79
|
+
* `lastSeenAt` of every live editor connection it owns. Well under
|
|
80
|
+
* `EDITING_TTL_MS` so a single missed tick does not age a field out.
|
|
81
|
+
*/
|
|
82
|
+
declare const EDITING_REFRESH_MS = 10000;
|
|
83
|
+
/** Identity fields a caller supplies when a viewer joins. */
|
|
84
|
+
export interface ViewerIdentity {
|
|
85
|
+
userId: string;
|
|
86
|
+
username: string;
|
|
87
|
+
displayName: string;
|
|
88
|
+
avatarUrl: string | null;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Minimum node-redis v4 surface the presence service leans on. Keeps
|
|
92
|
+
* the test-mock surface narrow and documents exactly which commands a
|
|
93
|
+
* fake must implement.
|
|
94
|
+
*/
|
|
95
|
+
export interface PresenceRedisClient {
|
|
96
|
+
hSet(key: string, field: string, value: string): Promise<number>;
|
|
97
|
+
hGet(key: string, field: string): Promise<string | null | undefined>;
|
|
98
|
+
hGetAll(key: string): Promise<Record<string, string>>;
|
|
99
|
+
hDel(key: string, field: string | string[]): Promise<number>;
|
|
100
|
+
expire(key: string, seconds: number): Promise<boolean | number>;
|
|
101
|
+
publish(channel: string, message: string): Promise<number>;
|
|
102
|
+
duplicate(): PresenceRedisClient;
|
|
103
|
+
connect(): Promise<unknown>;
|
|
104
|
+
disconnect(): Promise<unknown>;
|
|
105
|
+
subscribe(channel: string, listener: (message: string) => void): Promise<void>;
|
|
106
|
+
isOpen?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Public surface of the presence service. The `/presence` WebSocket
|
|
110
|
+
* handler holds one process-shared instance (see `getPresenceService`);
|
|
111
|
+
* `@crowi/collab` is wired to `markEditing` / `unmarkEditing` via
|
|
112
|
+
* dependency injection so the collab package never imports `@crowi/api`.
|
|
113
|
+
*/
|
|
114
|
+
export interface PresenceService {
|
|
115
|
+
/**
|
|
116
|
+
* Register (or refresh) a viewer for a page. Idempotent — re-calling
|
|
117
|
+
* for the same `userId` updates `lastHeartbeatAt` and dedupes
|
|
118
|
+
* multiple tabs to a single hash field. Publishes a viewer-list
|
|
119
|
+
* change so every instance re-broadcasts.
|
|
120
|
+
*/
|
|
121
|
+
join(pageId: string, viewer: ViewerIdentity): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Refresh a viewer's `lastHeartbeatAt` (and the hash key TTL). Called
|
|
124
|
+
* on every client heartbeat. Returns `false` when the viewer was not
|
|
125
|
+
* present (e.g. swept while the socket was briefly idle) so the
|
|
126
|
+
* handler can re-`join`.
|
|
127
|
+
*/
|
|
128
|
+
heartbeat(pageId: string, userId: string): Promise<boolean>;
|
|
129
|
+
/**
|
|
130
|
+
* Remove a viewer from a page. Idempotent. Publishes a viewer-list
|
|
131
|
+
* change. The handler calls this on WebSocket close.
|
|
132
|
+
*/
|
|
133
|
+
leave(pageId: string, userId: string): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Current live viewer list for a page, with `isEditing` derived from
|
|
136
|
+
* the short-lived editing hash. Stale entries (heartbeat older than
|
|
137
|
+
* `VIEWER_TTL_MS`) are filtered out and swept from the hash.
|
|
138
|
+
*/
|
|
139
|
+
listViewers(pageId: string): Promise<PresenceViewer[]>;
|
|
140
|
+
/**
|
|
141
|
+
* Collab `onAuthenticate` integration point — a user opened the
|
|
142
|
+
* editor for this page on connection `socketId`. Records an editing
|
|
143
|
+
* signal in the editing hash and publishes a viewer-list change so
|
|
144
|
+
* the editor immediately picks up an `✏️` badge.
|
|
145
|
+
*/
|
|
146
|
+
markEditing(pageId: string, userId: string, socketId: string): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Keep-alive for a live editor connection — refreshes the editing
|
|
149
|
+
* hash field's `lastSeenAt` so it does not age past `EDITING_TTL_MS`.
|
|
150
|
+
* Unlike `markEditing` this does NOT publish a viewer-list change
|
|
151
|
+
* (the editing set did not change), so periodic refreshes do not
|
|
152
|
+
* trigger redundant broadcasts.
|
|
153
|
+
*/
|
|
154
|
+
refreshEditing(pageId: string, userId: string, socketId: string): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* Collab `onDisconnect` integration point — a user closed the editor
|
|
157
|
+
* on connection `socketId`. Removes the editing-hash field and
|
|
158
|
+
* publishes a viewer-list change so the `✏️` badge clears on the next
|
|
159
|
+
* broadcast.
|
|
160
|
+
*/
|
|
161
|
+
unmarkEditing(pageId: string, userId: string, socketId: string): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Subscribe to viewer-list change notifications. The listener is
|
|
164
|
+
* invoked with a `pageId` whenever that page's viewer list may have
|
|
165
|
+
* changed (local or cross-instance). Returns an unsubscribe fn.
|
|
166
|
+
*/
|
|
167
|
+
onViewersChanged(listener: (pageId: string) => void): () => void;
|
|
168
|
+
/** Tear down the dedicated pub/sub subscriber client. */
|
|
169
|
+
shutdown(): Promise<void>;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Build a presence service.
|
|
173
|
+
*
|
|
174
|
+
* - `redis` present → cross-instance mode: viewer state in Redis,
|
|
175
|
+
* change notifications fan out via pub/sub.
|
|
176
|
+
* - `redis` null → single-instance mode: viewer state in a
|
|
177
|
+
* process-local Map, change notifications are emitted directly.
|
|
178
|
+
*
|
|
179
|
+
* The two modes share the same `PresenceService` surface so the
|
|
180
|
+
* `/presence` handler never branches on Redis availability.
|
|
181
|
+
*/
|
|
182
|
+
export declare function createPresenceService(redis: PresenceRedisClient | null): Promise<PresenceService>;
|
|
183
|
+
export declare function getPresenceService(crowi: Crowi): Promise<PresenceService>;
|
|
184
|
+
/**
|
|
185
|
+
* Collab → presence wiring. `@crowi/collab` is crowi-agnostic, so the
|
|
186
|
+
* api hands it this adapter via `createCollabServer`'s `presence`
|
|
187
|
+
* option. Each call resolves the process-shared presence service
|
|
188
|
+
* lazily and forwards; errors are swallowed because presence is
|
|
189
|
+
* advisory and must never block a collab connection.
|
|
190
|
+
*
|
|
191
|
+
* The adapter also owns a periodic *refresher*: it tracks every live
|
|
192
|
+
* editor connection of *this* process in an in-process Map and, on a
|
|
193
|
+
* `setInterval`, calls `service.refreshEditing` for each so the Redis
|
|
194
|
+
* editing hash field never ages past `EDITING_TTL_MS` while the editor
|
|
195
|
+
* is connected. This is the self-heal mechanism — when the process
|
|
196
|
+
* dies the Map and interval die with it, nothing refreshes the editing
|
|
197
|
+
* hash, and every field ages out within `EDITING_TTL_MS` so the `✏️`
|
|
198
|
+
* badge disappears on plain viewers. A clean disconnect removes the
|
|
199
|
+
* field immediately via `unmarkEditing`. In a multi-instance
|
|
200
|
+
* deployment each instance refreshes only its own connections, so the
|
|
201
|
+
* scheme stays correct under load balancing.
|
|
202
|
+
*/
|
|
203
|
+
export interface PresenceCollabDeps {
|
|
204
|
+
markEditing(pageId: string, userId: string, socketId: string): Promise<void>;
|
|
205
|
+
unmarkEditing(pageId: string, userId: string, socketId: string): Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* Stop the periodic editing-hash refresher. Called from the collab
|
|
208
|
+
* `shutdown()` so a graceful api teardown does not leak a timer.
|
|
209
|
+
*/
|
|
210
|
+
shutdown(): void;
|
|
211
|
+
}
|
|
212
|
+
export declare function createPresenceCollabDeps(crowi: Crowi): PresenceCollabDeps;
|
|
213
|
+
/**
|
|
214
|
+
* Test helper — inject a pre-built service or reset to lazy. Pass a
|
|
215
|
+
* fake to exercise the `/presence` handler / collab wiring without
|
|
216
|
+
* Redis; pass `null` to clear the cache.
|
|
217
|
+
*/
|
|
218
|
+
export declare const _setPresenceServiceForTesting: (service: PresenceService | null) => void;
|
|
219
|
+
export { PRESENCE_UPDATES_CHANNEL, VIEWER_HASH_PREFIX, VIEWER_TTL_MS, EDITING_HASH_PREFIX, EDITING_TTL_MS, EDITING_REFRESH_MS };
|