@crowi/api 2.0.0-alpha.0 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hono/handlers/access-token.d.ts +55 -55
- package/dist/hono/handlers/activation.d.ts +27 -27
- package/dist/hono/handlers/admin/app.d.ts +26 -26
- package/dist/hono/handlers/admin/auth.d.ts +24 -24
- package/dist/hono/handlers/admin/mail.d.ts +30 -30
- package/dist/hono/handlers/admin/plugins.d.ts +112 -112
- package/dist/hono/handlers/admin/search.d.ts +21 -21
- package/dist/hono/handlers/admin/security.d.ts +24 -24
- package/dist/hono/handlers/admin/storage.d.ts +19 -19
- package/dist/hono/handlers/admin/users.d.ts +399 -281
- package/dist/hono/handlers/admin/users.js +28 -0
- package/dist/hono/handlers/admin/users.js.map +1 -1
- package/dist/hono/handlers/adminCrypto.d.ts +32 -32
- package/dist/hono/handlers/app.d.ts +12 -8
- package/dist/hono/handlers/app.js +42 -1
- package/dist/hono/handlers/app.js.map +1 -1
- package/dist/hono/handlers/attachment-stream.js +23 -0
- package/dist/hono/handlers/attachment-stream.js.map +1 -1
- package/dist/hono/handlers/attachment.d.ts +180 -180
- package/dist/hono/handlers/autocomplete.d.ts +45 -45
- package/dist/hono/handlers/backlink.d.ts +33 -33
- package/dist/hono/handlers/bookmark.d.ts +95 -95
- package/dist/hono/handlers/comment.d.ts +55 -55
- package/dist/hono/handlers/draft.d.ts +27 -27
- package/dist/hono/handlers/draft.js +10 -0
- package/dist/hono/handlers/draft.js.map +1 -1
- package/dist/hono/handlers/emailChange.d.ts +25 -25
- package/dist/hono/handlers/installer.d.ts +16 -16
- package/dist/hono/handlers/inviteAccept.d.ts +37 -37
- package/dist/hono/handlers/me.d.ts +92 -92
- package/dist/hono/handlers/notification.d.ts +94 -94
- package/dist/hono/handlers/oauth.d.ts +58 -58
- package/dist/hono/handlers/page-collab.d.ts +20 -20
- package/dist/hono/handlers/page-preview.d.ts +7 -7
- package/dist/hono/handlers/page.d.ts +575 -324
- package/dist/hono/handlers/page.js +123 -6
- package/dist/hono/handlers/page.js.map +1 -1
- package/dist/hono/handlers/passwordReset.d.ts +37 -37
- package/dist/hono/handlers/presence.d.ts +44 -44
- package/dist/hono/handlers/revision.d.ts +99 -99
- package/dist/hono/handlers/search.d.ts +64 -64
- package/dist/hono/handlers/tokenAuth.d.ts +80 -80
- package/dist/hono/handlers/user.d.ts +102 -102
- package/dist/hono/handlers/user.js +15 -5
- package/dist/hono/handlers/user.js.map +1 -1
- package/dist/hono/index.d.ts +94 -94
- package/dist/mcp/result.d.ts +52 -11
- package/dist/mcp/result.js +66 -1
- package/dist/mcp/result.js.map +1 -1
- package/dist/mcp/tools/page.js +30 -5
- package/dist/mcp/tools/page.js.map +1 -1
- package/dist/mcp/tools/search.d.ts +12 -0
- package/dist/mcp/tools/search.js +21 -5
- package/dist/mcp/tools/search.js.map +1 -1
- package/dist/migration/helpers.d.ts +13 -0
- package/dist/migration/helpers.js +29 -0
- package/dist/migration/helpers.js.map +1 -0
- package/dist/migration/migrations/files-url-to-attachments.d.ts +35 -0
- package/dist/migration/migrations/files-url-to-attachments.js +291 -0
- package/dist/migration/migrations/files-url-to-attachments.js.map +1 -0
- package/dist/migration/migrations/index.js +6 -0
- package/dist/migration/migrations/index.js.map +1 -1
- package/dist/migration/migrations/published-current-revision.d.ts +47 -0
- package/dist/migration/migrations/published-current-revision.js +90 -0
- package/dist/migration/migrations/published-current-revision.js.map +1 -0
- package/dist/migration/migrations/relocate-reserved-api-paths.d.ts +3 -0
- package/dist/migration/migrations/relocate-reserved-api-paths.js +135 -0
- package/dist/migration/migrations/relocate-reserved-api-paths.js.map +1 -0
- package/dist/migration/migrations/wikilink-format.d.ts +0 -11
- package/dist/migration/migrations/wikilink-format.js +5 -156
- package/dist/migration/migrations/wikilink-format.js.map +1 -1
- package/dist/migration/migrations/wikilink-html-recover.d.ts +116 -0
- package/dist/migration/migrations/wikilink-html-recover.js +314 -0
- package/dist/migration/migrations/wikilink-html-recover.js.map +1 -0
- package/dist/models/page.d.ts +3 -0
- package/dist/models/page.js +40 -2
- package/dist/models/page.js.map +1 -1
- package/dist/models/user.d.ts +1 -0
- package/dist/models/user.js +40 -21
- package/dist/models/user.js.map +1 -1
- package/dist/renderer/core/headings.d.ts +12 -1
- package/dist/renderer/core/headings.js +48 -8
- package/dist/renderer/core/headings.js.map +1 -1
- package/dist/renderer/pipeline.d.ts +6 -0
- package/dist/renderer/pipeline.js.map +1 -1
- package/dist/util/page-response.js +19 -2
- package/dist/util/page-response.js.map +1 -1
- package/dist/util/replace-url.d.ts +85 -0
- package/dist/util/replace-url.js +251 -0
- package/dist/util/replace-url.js.map +1 -0
- package/package.json +13 -5
- package/public/images/file-not-found.png +0 -0
- package/views/mail/activation.mjml +9 -0
- package/views/mail/activation.text +13 -0
- package/views/mail/adminApprovalPending.mjml +7 -0
- package/views/mail/adminApprovalPending.text +11 -0
- package/views/mail/emailChange.mjml +9 -0
- package/views/mail/emailChange.text +13 -0
- package/views/mail/invite.mjml +9 -0
- package/views/mail/invite.text +13 -0
- package/views/mail/layout.mjml +38 -0
- package/views/mail/passwordChanged.mjml +4 -0
- package/views/mail/passwordChanged.text +9 -0
- package/views/mail/passwordReset.mjml +9 -0
- package/views/mail/passwordReset.text +13 -0
- package/views/mail/test.mjml +2 -0
- package/views/mail/test.text +7 -0
- package/dist/common/functions/path2name.d.ts +0 -1
- package/dist/common/functions/path2name.js +0 -22
- package/dist/common/functions/path2name.js.map +0 -1
- package/dist/common/functions/renderIcon.d.ts +0 -1
- package/dist/common/functions/renderIcon.js +0 -9
- package/dist/common/functions/renderIcon.js.map +0 -1
- package/dist/controllers/admin.d.ts +0 -3
- package/dist/controllers/admin.js +0 -474
- package/dist/controllers/admin.js.map +0 -1
- package/dist/controllers/attachment.d.ts +0 -4
- package/dist/controllers/attachment.js +0 -200
- package/dist/controllers/attachment.js.map +0 -1
- package/dist/controllers/backlink.d.ts +0 -3
- package/dist/controllers/backlink.js +0 -42
- package/dist/controllers/backlink.js.map +0 -1
- package/dist/controllers/bookmark.d.ts +0 -3
- package/dist/controllers/bookmark.js +0 -100
- package/dist/controllers/bookmark.js.map +0 -1
- package/dist/controllers/comment.d.ts +0 -3
- package/dist/controllers/comment.js +0 -111
- package/dist/controllers/comment.js.map +0 -1
- package/dist/controllers/index.d.ts +0 -25
- package/dist/controllers/index.js +0 -44
- package/dist/controllers/index.js.map +0 -1
- package/dist/controllers/installer.d.ts +0 -3
- package/dist/controllers/installer.js +0 -48
- package/dist/controllers/installer.js.map +0 -1
- package/dist/controllers/login.d.ts +0 -4
- package/dist/controllers/login.js +0 -438
- package/dist/controllers/login.js.map +0 -1
- package/dist/controllers/logout.d.ts +0 -5
- package/dist/controllers/logout.js +0 -11
- package/dist/controllers/logout.js.map +0 -1
- package/dist/controllers/me.d.ts +0 -4
- package/dist/controllers/me.js +0 -369
- package/dist/controllers/me.js.map +0 -1
- package/dist/controllers/notification.d.ts +0 -3
- package/dist/controllers/notification.js +0 -88
- package/dist/controllers/notification.js.map +0 -1
- package/dist/controllers/page.d.ts +0 -3
- package/dist/controllers/page.js +0 -881
- package/dist/controllers/page.js.map +0 -1
- package/dist/controllers/revision.d.ts +0 -3
- package/dist/controllers/revision.js +0 -91
- package/dist/controllers/revision.js.map +0 -1
- package/dist/controllers/search.d.ts +0 -3
- package/dist/controllers/search.js +0 -93
- package/dist/controllers/search.js.map +0 -1
- package/dist/controllers/share.d.ts +0 -3
- package/dist/controllers/share.js +0 -207
- package/dist/controllers/share.js.map +0 -1
- package/dist/controllers/shareAccess.d.ts +0 -3
- package/dist/controllers/shareAccess.js +0 -28
- package/dist/controllers/shareAccess.js.map +0 -1
- package/dist/controllers/slack.d.ts +0 -3
- package/dist/controllers/slack.js +0 -87
- package/dist/controllers/slack.js.map +0 -1
- package/dist/controllers/tokenAuth.d.ts +0 -10
- package/dist/controllers/tokenAuth.js +0 -292
- package/dist/controllers/tokenAuth.js.map +0 -1
- package/dist/controllers/user.d.ts +0 -3
- package/dist/controllers/user.js +0 -67
- package/dist/controllers/user.js.map +0 -1
- package/dist/controllers/version.d.ts +0 -4
- package/dist/controllers/version.js +0 -19
- package/dist/controllers/version.js.map +0 -1
- package/dist/crowi/express-init.d.ts +0 -4
- package/dist/crowi/express-init.js +0 -101
- package/dist/crowi/express-init.js.map +0 -1
- package/dist/form/admin/app.d.ts +0 -2
- package/dist/form/admin/app.js +0 -9
- package/dist/form/admin/app.js.map +0 -1
- package/dist/form/admin/auth.d.ts +0 -2
- package/dist/form/admin/auth.js +0 -9
- package/dist/form/admin/auth.js.map +0 -1
- package/dist/form/admin/aws.d.ts +0 -2
- package/dist/form/admin/aws.js +0 -13
- package/dist/form/admin/aws.js.map +0 -1
- package/dist/form/admin/github.d.ts +0 -2
- package/dist/form/admin/github.js +0 -15
- package/dist/form/admin/github.js.map +0 -1
- package/dist/form/admin/google.d.ts +0 -2
- package/dist/form/admin/google.js +0 -13
- package/dist/form/admin/google.js.map +0 -1
- package/dist/form/admin/mail.d.ts +0 -2
- package/dist/form/admin/mail.js +0 -13
- package/dist/form/admin/mail.js.map +0 -1
- package/dist/form/admin/sec.d.ts +0 -2
- package/dist/form/admin/sec.js +0 -10
- package/dist/form/admin/sec.js.map +0 -1
- package/dist/form/admin/slackSetting.d.ts +0 -2
- package/dist/form/admin/slackSetting.js +0 -13
- package/dist/form/admin/slackSetting.js.map +0 -1
- package/dist/form/admin/userEdit.d.ts +0 -2
- package/dist/form/admin/userEdit.js +0 -9
- package/dist/form/admin/userEdit.js.map +0 -1
- package/dist/form/admin/userInvite.d.ts +0 -2
- package/dist/form/admin/userInvite.js +0 -9
- package/dist/form/admin/userInvite.js.map +0 -1
- package/dist/form/comment.d.ts +0 -2
- package/dist/form/comment.js +0 -9
- package/dist/form/comment.js.map +0 -1
- package/dist/form/index.d.ts +0 -25
- package/dist/form/index.js +0 -48
- package/dist/form/index.js.map +0 -1
- package/dist/form/invited.d.ts +0 -2
- package/dist/form/invited.js +0 -13
- package/dist/form/invited.js.map +0 -1
- package/dist/form/login.d.ts +0 -2
- package/dist/form/login.js +0 -11
- package/dist/form/login.js.map +0 -1
- package/dist/form/me/apiToken.d.ts +0 -2
- package/dist/form/me/apiToken.js +0 -9
- package/dist/form/me/apiToken.js.map +0 -1
- package/dist/form/me/password.d.ts +0 -2
- package/dist/form/me/password.js +0 -11
- package/dist/form/me/password.js.map +0 -1
- package/dist/form/me/user.d.ts +0 -2
- package/dist/form/me/user.js +0 -9
- package/dist/form/me/user.js.map +0 -1
- package/dist/form/register.d.ts +0 -2
- package/dist/form/register.js +0 -13
- package/dist/form/register.js.map +0 -1
- package/dist/form/revision.d.ts +0 -2
- package/dist/form/revision.js +0 -13
- package/dist/form/revision.js.map +0 -1
- package/dist/hono/handlers/admin/share.d.ts +0 -106
- package/dist/hono/handlers/admin/share.js +0 -55
- package/dist/hono/handlers/admin/share.js.map +0 -1
- package/dist/middlewares/accessTokenParser.d.ts +0 -4
- package/dist/middlewares/accessTokenParser.js +0 -29
- package/dist/middlewares/accessTokenParser.js.map +0 -1
- package/dist/middlewares/adminRequired.d.ts +0 -10
- package/dist/middlewares/adminRequired.js +0 -35
- package/dist/middlewares/adminRequired.js.map +0 -1
- package/dist/middlewares/applicationInstalled.d.ts +0 -3
- package/dist/middlewares/applicationInstalled.js +0 -20
- package/dist/middlewares/applicationInstalled.js.map +0 -1
- package/dist/middlewares/applicationNotInstalled.d.ts +0 -3
- package/dist/middlewares/applicationNotInstalled.js +0 -13
- package/dist/middlewares/applicationNotInstalled.js.map +0 -1
- package/dist/middlewares/basicAuth.d.ts +0 -4
- package/dist/middlewares/basicAuth.js +0 -23
- package/dist/middlewares/basicAuth.js.map +0 -1
- package/dist/middlewares/csrfVerify.d.ts +0 -4
- package/dist/middlewares/csrfVerify.js +0 -24
- package/dist/middlewares/csrfVerify.js.map +0 -1
- package/dist/middlewares/encodeSpace.d.ts +0 -3
- package/dist/middlewares/encodeSpace.js +0 -14
- package/dist/middlewares/encodeSpace.js.map +0 -1
- package/dist/middlewares/fileAccessRightOrLoginRequired.d.ts +0 -4
- package/dist/middlewares/fileAccessRightOrLoginRequired.js +0 -29
- package/dist/middlewares/fileAccessRightOrLoginRequired.js.map +0 -1
- package/dist/middlewares/index.d.ts +0 -16
- package/dist/middlewares/index.js +0 -30
- package/dist/middlewares/index.js.map +0 -1
- package/dist/middlewares/jwtAdminRequired.d.ts +0 -8
- package/dist/middlewares/jwtAdminRequired.js +0 -35
- package/dist/middlewares/jwtAdminRequired.js.map +0 -1
- package/dist/middlewares/jwtAuth.d.ts +0 -4
- package/dist/middlewares/jwtAuth.js +0 -104
- package/dist/middlewares/jwtAuth.js.map +0 -1
- package/dist/middlewares/loginChecker.d.ts +0 -4
- package/dist/middlewares/loginChecker.js +0 -32
- package/dist/middlewares/loginChecker.js.map +0 -1
- package/dist/middlewares/loginRequired.d.ts +0 -4
- package/dist/middlewares/loginRequired.js +0 -88
- package/dist/middlewares/loginRequired.js.map +0 -1
- package/dist/routes/admin.d.ts +0 -4
- package/dist/routes/admin.js +0 -17
- package/dist/routes/admin.js.map +0 -1
- package/dist/routes/api/admin.d.ts +0 -4
- package/dist/routes/api/admin.js +0 -37
- package/dist/routes/api/admin.js.map +0 -1
- package/dist/routes/api/attachment.d.ts +0 -4
- package/dist/routes/api/attachment.js +0 -19
- package/dist/routes/api/attachment.js.map +0 -1
- package/dist/routes/api/bookmark.d.ts +0 -4
- package/dist/routes/api/bookmark.js +0 -15
- package/dist/routes/api/bookmark.js.map +0 -1
- package/dist/routes/api/comment.d.ts +0 -4
- package/dist/routes/api/comment.js +0 -14
- package/dist/routes/api/comment.js.map +0 -1
- package/dist/routes/api/index.d.ts +0 -4
- package/dist/routes/api/index.js +0 -36
- package/dist/routes/api/index.js.map +0 -1
- package/dist/routes/api/like.d.ts +0 -4
- package/dist/routes/api/like.js +0 -13
- package/dist/routes/api/like.js.map +0 -1
- package/dist/routes/api/notification.d.ts +0 -4
- package/dist/routes/api/notification.js +0 -15
- package/dist/routes/api/notification.js.map +0 -1
- package/dist/routes/api/page.d.ts +0 -4
- package/dist/routes/api/page.js +0 -24
- package/dist/routes/api/page.js.map +0 -1
- package/dist/routes/api/revision.d.ts +0 -4
- package/dist/routes/api/revision.js +0 -14
- package/dist/routes/api/revision.js.map +0 -1
- package/dist/routes/api/share.d.ts +0 -4
- package/dist/routes/api/share.js +0 -16
- package/dist/routes/api/share.js.map +0 -1
- package/dist/routes/api/version.d.ts +0 -4
- package/dist/routes/api/version.js +0 -10
- package/dist/routes/api/version.js.map +0 -1
- package/dist/routes/index.d.ts +0 -4
- package/dist/routes/index.js +0 -71
- package/dist/routes/index.js.map +0 -1
- package/dist/routes/login.d.ts +0 -4
- package/dist/routes/login.js +0 -18
- package/dist/routes/login.js.map +0 -1
- package/dist/routes/me.d.ts +0 -4
- package/dist/routes/me.js +0 -24
- package/dist/routes/me.js.map +0 -1
- package/dist/routes/ts-rest/admin/app.d.ts +0 -4
- package/dist/routes/ts-rest/admin/app.js +0 -67
- package/dist/routes/ts-rest/admin/app.js.map +0 -1
- package/dist/routes/ts-rest/admin/auth.d.ts +0 -4
- package/dist/routes/ts-rest/admin/auth.js +0 -95
- package/dist/routes/ts-rest/admin/auth.js.map +0 -1
- package/dist/routes/ts-rest/admin/index.d.ts +0 -10
- package/dist/routes/ts-rest/admin/index.js +0 -35
- package/dist/routes/ts-rest/admin/index.js.map +0 -1
- package/dist/routes/ts-rest/admin/mail.d.ts +0 -4
- package/dist/routes/ts-rest/admin/mail.js +0 -156
- package/dist/routes/ts-rest/admin/mail.js.map +0 -1
- package/dist/routes/ts-rest/admin/plugins.d.ts +0 -4
- package/dist/routes/ts-rest/admin/plugins.js +0 -317
- package/dist/routes/ts-rest/admin/plugins.js.map +0 -1
- package/dist/routes/ts-rest/admin/search.d.ts +0 -4
- package/dist/routes/ts-rest/admin/search.js +0 -67
- package/dist/routes/ts-rest/admin/search.js.map +0 -1
- package/dist/routes/ts-rest/admin/security.d.ts +0 -4
- package/dist/routes/ts-rest/admin/security.js +0 -114
- package/dist/routes/ts-rest/admin/security.js.map +0 -1
- package/dist/routes/ts-rest/admin/share.d.ts +0 -4
- package/dist/routes/ts-rest/admin/share.js +0 -69
- package/dist/routes/ts-rest/admin/share.js.map +0 -1
- package/dist/routes/ts-rest/admin/storage.d.ts +0 -4
- package/dist/routes/ts-rest/admin/storage.js +0 -59
- package/dist/routes/ts-rest/admin/storage.js.map +0 -1
- package/dist/routes/ts-rest/admin/users.d.ts +0 -4
- package/dist/routes/ts-rest/admin/users.js +0 -215
- package/dist/routes/ts-rest/admin/users.js.map +0 -1
- package/dist/routes/ts-rest/adminCrypto.d.ts +0 -4
- package/dist/routes/ts-rest/adminCrypto.js +0 -111
- package/dist/routes/ts-rest/adminCrypto.js.map +0 -1
- package/dist/routes/ts-rest/app.d.ts +0 -4
- package/dist/routes/ts-rest/app.js +0 -23
- package/dist/routes/ts-rest/app.js.map +0 -1
- package/dist/routes/ts-rest/attachment.d.ts +0 -4
- package/dist/routes/ts-rest/attachment.js +0 -830
- package/dist/routes/ts-rest/attachment.js.map +0 -1
- package/dist/routes/ts-rest/auth.d.ts +0 -4
- package/dist/routes/ts-rest/auth.js +0 -70
- package/dist/routes/ts-rest/auth.js.map +0 -1
- package/dist/routes/ts-rest/autocomplete.d.ts +0 -30
- package/dist/routes/ts-rest/autocomplete.js +0 -189
- package/dist/routes/ts-rest/autocomplete.js.map +0 -1
- package/dist/routes/ts-rest/backlink.d.ts +0 -4
- package/dist/routes/ts-rest/backlink.js +0 -106
- package/dist/routes/ts-rest/backlink.js.map +0 -1
- package/dist/routes/ts-rest/bookmark.d.ts +0 -4
- package/dist/routes/ts-rest/bookmark.js +0 -189
- package/dist/routes/ts-rest/bookmark.js.map +0 -1
- package/dist/routes/ts-rest/comment.d.ts +0 -4
- package/dist/routes/ts-rest/comment.js +0 -217
- package/dist/routes/ts-rest/comment.js.map +0 -1
- package/dist/routes/ts-rest/draft.d.ts +0 -22
- package/dist/routes/ts-rest/draft.js +0 -200
- package/dist/routes/ts-rest/draft.js.map +0 -1
- package/dist/routes/ts-rest/index.d.ts +0 -4
- package/dist/routes/ts-rest/index.js +0 -103
- package/dist/routes/ts-rest/index.js.map +0 -1
- package/dist/routes/ts-rest/installer.d.ts +0 -4
- package/dist/routes/ts-rest/installer.js +0 -77
- package/dist/routes/ts-rest/installer.js.map +0 -1
- package/dist/routes/ts-rest/me.d.ts +0 -4
- package/dist/routes/ts-rest/me.js +0 -410
- package/dist/routes/ts-rest/me.js.map +0 -1
- package/dist/routes/ts-rest/notification.d.ts +0 -4
- package/dist/routes/ts-rest/notification.js +0 -241
- package/dist/routes/ts-rest/notification.js.map +0 -1
- package/dist/routes/ts-rest/page-collab.d.ts +0 -29
- package/dist/routes/ts-rest/page-collab.js +0 -90
- package/dist/routes/ts-rest/page-collab.js.map +0 -1
- package/dist/routes/ts-rest/page-preview.d.ts +0 -26
- package/dist/routes/ts-rest/page-preview.js +0 -80
- package/dist/routes/ts-rest/page-preview.js.map +0 -1
- package/dist/routes/ts-rest/page.d.ts +0 -4
- package/dist/routes/ts-rest/page.js +0 -676
- package/dist/routes/ts-rest/page.js.map +0 -1
- package/dist/routes/ts-rest/presence.d.ts +0 -30
- package/dist/routes/ts-rest/presence.js +0 -155
- package/dist/routes/ts-rest/presence.js.map +0 -1
- package/dist/routes/ts-rest/revision.d.ts +0 -4
- package/dist/routes/ts-rest/revision.js +0 -240
- package/dist/routes/ts-rest/revision.js.map +0 -1
- package/dist/routes/ts-rest/search.d.ts +0 -4
- package/dist/routes/ts-rest/search.js +0 -121
- package/dist/routes/ts-rest/search.js.map +0 -1
- package/dist/routes/ts-rest/tokenAuth.d.ts +0 -4
- package/dist/routes/ts-rest/tokenAuth.js +0 -94
- package/dist/routes/ts-rest/tokenAuth.js.map +0 -1
- package/dist/routes/ts-rest/user.d.ts +0 -4
- package/dist/routes/ts-rest/user.js +0 -307
- package/dist/routes/ts-rest/user.js.map +0 -1
- package/dist/types/express.d.ts +0 -34
- package/dist/types/express.js +0 -50
- package/dist/types/express.js.map +0 -1
- package/dist/util/accessTokenParser.d.ts +0 -1
- package/dist/util/accessTokenParser.js +0 -34
- package/dist/util/accessTokenParser.js.map +0 -1
- package/dist/util/apiPaginate.d.ts +0 -11
- package/dist/util/apiPaginate.js +0 -33
- package/dist/util/apiPaginate.js.map +0 -1
- package/dist/util/apiResponse.d.ts +0 -9
- package/dist/util/apiResponse.js +0 -23
- package/dist/util/apiResponse.js.map +0 -1
- package/dist/util/auth.d.ts +0 -11
- package/dist/util/auth.js +0 -48
- package/dist/util/auth.js.map +0 -1
- package/dist/util/aws-config-migration.d.ts +0 -11
- package/dist/util/aws-config-migration.js +0 -68
- package/dist/util/aws-config-migration.js.map +0 -1
- package/dist/util/formUtil.d.ts +0 -2
- package/dist/util/formUtil.js +0 -15
- package/dist/util/formUtil.js.map +0 -1
- package/dist/util/githubAuth.d.ts +0 -2
- package/dist/util/githubAuth.js +0 -82
- package/dist/util/githubAuth.js.map +0 -1
- package/dist/util/googleAuth.d.ts +0 -2
- package/dist/util/googleAuth.js +0 -85
- package/dist/util/googleAuth.js.map +0 -1
- package/dist/util/mailer.d.ts +0 -7
- package/dist/util/mailer.js +0 -98
- package/dist/util/mailer.js.map +0 -1
- package/dist/util/page-status-migration.d.ts +0 -23
- package/dist/util/page-status-migration.js +0 -48
- package/dist/util/page-status-migration.js.map +0 -1
- package/dist/util/ssr.d.ts +0 -3
- package/dist/util/ssr.js +0 -9
- package/dist/util/ssr.js.map +0 -1
- package/dist/util/view.d.ts +0 -10
- package/dist/util/view.js +0 -99
- package/dist/util/view.js.map +0 -1
package/dist/controllers/page.js
DELETED
|
@@ -1,881 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const mongoose_1 = require("mongoose");
|
|
7
|
-
const debug_1 = __importDefault(require("debug"));
|
|
8
|
-
const apiResponse_1 = __importDefault(require("../util/apiResponse"));
|
|
9
|
-
const path_1 = require("../util/path");
|
|
10
|
-
const error_1 = require("../types/error");
|
|
11
|
-
const express_1 = require("../types/express");
|
|
12
|
-
exports.default = (crowi) => {
|
|
13
|
-
const debug = (0, debug_1.default)('crowi:routes:page');
|
|
14
|
-
const Page = crowi.model('Page');
|
|
15
|
-
const User = crowi.model('User');
|
|
16
|
-
const Bookmark = crowi.model('Bookmark');
|
|
17
|
-
const Watcher = crowi.model('Watcher');
|
|
18
|
-
const actions = {};
|
|
19
|
-
const api = (actions.api = {});
|
|
20
|
-
// register page events
|
|
21
|
-
const pageEvent = crowi.event('Page');
|
|
22
|
-
pageEvent.on('update', function (page, user) {
|
|
23
|
-
/*
|
|
24
|
-
const io = crowi.getIo()
|
|
25
|
-
if (io) {
|
|
26
|
-
io.sockets.emit('page edited', { page, user })
|
|
27
|
-
}
|
|
28
|
-
*/
|
|
29
|
-
});
|
|
30
|
-
function getPathFromRequest(req) {
|
|
31
|
-
let path;
|
|
32
|
-
path = '/' + (req.params[0] || '');
|
|
33
|
-
path = (0, path_1.decodeSpace)(path);
|
|
34
|
-
path = path.replace(/\.md$/, '');
|
|
35
|
-
return path;
|
|
36
|
-
}
|
|
37
|
-
// TODO: total とかでちゃんと計算する
|
|
38
|
-
function generatePager(options) {
|
|
39
|
-
let next = null;
|
|
40
|
-
let prev = null;
|
|
41
|
-
const offset = parseInt(String(options.offset), 10);
|
|
42
|
-
const limit = parseInt(String(options.limit), 10);
|
|
43
|
-
const length = options.length || 0;
|
|
44
|
-
if (offset > 0) {
|
|
45
|
-
prev = offset - limit;
|
|
46
|
-
if (prev < 0) {
|
|
47
|
-
prev = 0;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (length < limit) {
|
|
51
|
-
next = null;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
next = offset + limit;
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
prev: prev,
|
|
58
|
-
next: next,
|
|
59
|
-
offset: offset,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
// routing
|
|
63
|
-
actions.pageListShow = async function (req, res) {
|
|
64
|
-
const user = req.user;
|
|
65
|
-
const limit = 50;
|
|
66
|
-
const offset = (0, express_1.getQueryAsNumber)(req.query.offset, 0);
|
|
67
|
-
const SEENER_THRESHOLD = 10;
|
|
68
|
-
let path = getPathFromRequest(req);
|
|
69
|
-
path = path + (path == '/' ? '' : '/');
|
|
70
|
-
debug('Page list show', path);
|
|
71
|
-
const pagerOptions = { offset, limit };
|
|
72
|
-
const queryOptions = { offset, limit: limit + 1 };
|
|
73
|
-
try {
|
|
74
|
-
const [portalPage, pageList] = (await Promise.all([
|
|
75
|
-
Page.findPortalPage(path, req.user, req.query.revision),
|
|
76
|
-
Page.findListByStartWith(path, req.user, queryOptions),
|
|
77
|
-
// FIXME: A bug of Promise.all type. It was introduced by TypeScript 3.7.3.
|
|
78
|
-
// https://github.com/microsoft/TypeScript/pull/33707
|
|
79
|
-
]));
|
|
80
|
-
if (pageList.length > limit) {
|
|
81
|
-
pageList.pop();
|
|
82
|
-
}
|
|
83
|
-
if (portalPage) {
|
|
84
|
-
crowi.lru.add(user._id.toString(), portalPage._id.toString());
|
|
85
|
-
}
|
|
86
|
-
pagerOptions.length = pageList.length;
|
|
87
|
-
res.json({
|
|
88
|
-
path,
|
|
89
|
-
page: portalPage || null,
|
|
90
|
-
pages: pageList,
|
|
91
|
-
pager: generatePager(pagerOptions),
|
|
92
|
-
viewConfig: {
|
|
93
|
-
seener_threshold: SEENER_THRESHOLD,
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
catch (err) {
|
|
98
|
-
debug('Error on rendering pageListShow', err);
|
|
99
|
-
res.status(500).json({ error: 'Error on rendering pageListShow' });
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
actions.deletedPageListShow = function (req, res) {
|
|
103
|
-
const path = '/trash' + getPathFromRequest(req);
|
|
104
|
-
const limit = 50;
|
|
105
|
-
const offset = (0, express_1.getQueryAsNumber)(req.query.offset, 0);
|
|
106
|
-
// index page
|
|
107
|
-
const pagerOptions = { offset, limit };
|
|
108
|
-
const queryOptions = {
|
|
109
|
-
offset,
|
|
110
|
-
limit: limit + 1,
|
|
111
|
-
includeDeletedPage: true,
|
|
112
|
-
};
|
|
113
|
-
const renderVars = {
|
|
114
|
-
page: null,
|
|
115
|
-
path,
|
|
116
|
-
pages: [],
|
|
117
|
-
};
|
|
118
|
-
Page.findListByStartWith(path, req.user, queryOptions)
|
|
119
|
-
.then(function (pageList) {
|
|
120
|
-
if (pageList.length > limit) {
|
|
121
|
-
pageList.pop();
|
|
122
|
-
}
|
|
123
|
-
pagerOptions.length = pageList.length;
|
|
124
|
-
renderVars.pager = generatePager(pagerOptions);
|
|
125
|
-
renderVars.pages = pageList;
|
|
126
|
-
res.json(renderVars);
|
|
127
|
-
})
|
|
128
|
-
.catch(function (err) {
|
|
129
|
-
debug('Error on rendering deletedPageListShow', err);
|
|
130
|
-
res.status(500).json({ error: 'Error on rendering deletedPageListShow' });
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
async function renderPage(pageData, req, res) {
|
|
134
|
-
const user = req.user;
|
|
135
|
-
// create page
|
|
136
|
-
if (!pageData) {
|
|
137
|
-
return res.json({
|
|
138
|
-
author: {},
|
|
139
|
-
page: false,
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
crowi.lru.add(user._id.toString(), pageData._id.toString());
|
|
143
|
-
if (pageData.redirectTo) {
|
|
144
|
-
return res.redirect(encodeURI(pageData.redirectTo + '?redirectFrom=' + pageData.path));
|
|
145
|
-
}
|
|
146
|
-
const isNonExistentUserTrashPage = await Page.isNonExistentUserTrashPage(pageData.path);
|
|
147
|
-
const renderVars = {
|
|
148
|
-
path: pageData.path,
|
|
149
|
-
page: pageData,
|
|
150
|
-
revision: pageData.revision || {},
|
|
151
|
-
author: pageData.revision.author || false,
|
|
152
|
-
isNonExistentUserTrashPage,
|
|
153
|
-
};
|
|
154
|
-
return res.json(renderVars);
|
|
155
|
-
}
|
|
156
|
-
actions.userPageShow = async function (req, res) {
|
|
157
|
-
const user = req.user;
|
|
158
|
-
const username = req.params.username;
|
|
159
|
-
const path = `/user/${username}`;
|
|
160
|
-
res.locals.path = path;
|
|
161
|
-
debug('path', path);
|
|
162
|
-
// check page existance
|
|
163
|
-
let pageData;
|
|
164
|
-
try {
|
|
165
|
-
pageData = await Page.findPage(path, req.user, req.query.revision);
|
|
166
|
-
crowi.lru.add(user._id.toString(), pageData._id.toString());
|
|
167
|
-
if (pageData.redirectTo) {
|
|
168
|
-
return res.redirect(encodeURI(pageData.redirectTo + '?redirectFrom=' + pageData.path));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
catch (e) {
|
|
172
|
-
// for B.C.: Old Crowi has no user page
|
|
173
|
-
return renderPage(null, req, res); // show create
|
|
174
|
-
}
|
|
175
|
-
let pageUser = null;
|
|
176
|
-
let bookmarkList = [];
|
|
177
|
-
let createdList = [];
|
|
178
|
-
let isNonExistentUserPage = false;
|
|
179
|
-
try {
|
|
180
|
-
// user いない場合
|
|
181
|
-
pageUser = await User.findUserByUsername(username);
|
|
182
|
-
[bookmarkList, createdList] = await Promise.all([
|
|
183
|
-
Bookmark.findByUser(pageUser, { limit: 10, populatePage: true, requestUser: req.user }),
|
|
184
|
-
Page.findListByCreator(pageUser, { limit: 10 }, req.user),
|
|
185
|
-
]);
|
|
186
|
-
}
|
|
187
|
-
catch (e) {
|
|
188
|
-
isNonExistentUserPage = true;
|
|
189
|
-
debug('Error while loading user page.', username);
|
|
190
|
-
}
|
|
191
|
-
return res.json({
|
|
192
|
-
username,
|
|
193
|
-
bookmarkList,
|
|
194
|
-
createdList,
|
|
195
|
-
pageUser,
|
|
196
|
-
path: pageData.path,
|
|
197
|
-
page: pageData,
|
|
198
|
-
revision: pageData.revision || {},
|
|
199
|
-
author: pageData.revision.author || false,
|
|
200
|
-
isNonExistentUserPage,
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
|
-
actions.pageShow = async function (req, res) {
|
|
204
|
-
const path = getPathFromRequest(req);
|
|
205
|
-
// FIXME: せっかく getPathFromRequest になってるのにここが生 params[0] だとダサイ
|
|
206
|
-
const isMarkdown = req.params[0].match(/.+\.md$/) || false;
|
|
207
|
-
res.locals.path = path;
|
|
208
|
-
try {
|
|
209
|
-
const page = (await Page.findPage(path, req.user, req.query.revision));
|
|
210
|
-
debug('Page found', page._id, page.path);
|
|
211
|
-
if (isMarkdown) {
|
|
212
|
-
res.set('Content-Type', 'text/plain');
|
|
213
|
-
return res.send(page.revision.body);
|
|
214
|
-
}
|
|
215
|
-
return renderPage(page, req, res);
|
|
216
|
-
}
|
|
217
|
-
catch (err) {
|
|
218
|
-
const normalizedPath = Page.normalizePath(path);
|
|
219
|
-
if (normalizedPath !== path) {
|
|
220
|
-
return res.redirect(normalizedPath);
|
|
221
|
-
}
|
|
222
|
-
// pageShow は /* にマッチしてる最後の砦なので、creatableName でない routing は
|
|
223
|
-
// これ以前に定義されているはずなので、こうしてしまって問題ない。
|
|
224
|
-
if (!Page.isCreatableName(path)) {
|
|
225
|
-
// 削除済みページの場合 /trash 以下に移動しているので creatableName になっていないので、表示を許可
|
|
226
|
-
debug('Page is not creatable name.', path);
|
|
227
|
-
res.redirect('/');
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
if (req.query.revision) {
|
|
231
|
-
return res.redirect(encodeURI(path));
|
|
232
|
-
}
|
|
233
|
-
if (isMarkdown) {
|
|
234
|
-
return res.redirect('/');
|
|
235
|
-
}
|
|
236
|
-
try {
|
|
237
|
-
const portalPage = await Page.hasPortalPage(path + '/', req.user);
|
|
238
|
-
if (portalPage) {
|
|
239
|
-
return res.redirect(encodeURI(path) + '/');
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
const fixed = Page.fixToCreatableName(path);
|
|
243
|
-
if (fixed !== path) {
|
|
244
|
-
debug('fixed page name', fixed);
|
|
245
|
-
res.redirect(encodeURI(fixed));
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
// if guest user, redirect to `/login'
|
|
249
|
-
if (req.user === null) {
|
|
250
|
-
req.session.redirectTo = `${req.path}${req.search}`;
|
|
251
|
-
return res.redirect('/login');
|
|
252
|
-
}
|
|
253
|
-
return renderPage(null, req, res); // show create
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
catch (err) {
|
|
257
|
-
debug('Error on rendering pageShow (redirect to portal or fixed)', err);
|
|
258
|
-
return res.redirect('/');
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
actions.pageEdit = function (req, res) {
|
|
263
|
-
const pageForm = req.body.pageForm;
|
|
264
|
-
const body = pageForm.body;
|
|
265
|
-
const currentRevision = pageForm.currentRevision;
|
|
266
|
-
const grant = pageForm.grant;
|
|
267
|
-
const path = pageForm.path;
|
|
268
|
-
// TODO: make it pluggable
|
|
269
|
-
const notify = pageForm.notify || {};
|
|
270
|
-
debug('notify: ', notify);
|
|
271
|
-
const redirectPath = encodeURI(path);
|
|
272
|
-
let pageData = null;
|
|
273
|
-
let updateOrCreate;
|
|
274
|
-
let previousRevision = false;
|
|
275
|
-
// set to render
|
|
276
|
-
res.locals.pageForm = pageForm;
|
|
277
|
-
// 削除済みページはここで編集不可判定される
|
|
278
|
-
if (!Page.isCreatableName(path)) {
|
|
279
|
-
res.redirect(redirectPath);
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
const ignoreNotFound = true;
|
|
283
|
-
Page.findPage(path, req.user, null, ignoreNotFound)
|
|
284
|
-
.then(function (data) {
|
|
285
|
-
pageData = data;
|
|
286
|
-
if (!req.form.isValid) {
|
|
287
|
-
debug('Form data not valid');
|
|
288
|
-
throw new Error('Form data not valid.');
|
|
289
|
-
}
|
|
290
|
-
if (data && !data.isUpdatable(currentRevision)) {
|
|
291
|
-
debug('Conflict occured');
|
|
292
|
-
req.form.errors.push('page_edit.notice.conflict');
|
|
293
|
-
throw new Error('Conflict.');
|
|
294
|
-
}
|
|
295
|
-
if (data) {
|
|
296
|
-
previousRevision = data.revision;
|
|
297
|
-
return Page.updatePage(data, body, req.user, { grant: grant });
|
|
298
|
-
}
|
|
299
|
-
else {
|
|
300
|
-
// new page
|
|
301
|
-
updateOrCreate = 'create';
|
|
302
|
-
return Page.createPage(path, body, req.user, { grant: grant });
|
|
303
|
-
}
|
|
304
|
-
})
|
|
305
|
-
.then(function (data) {
|
|
306
|
-
// data is a saved page data.
|
|
307
|
-
pageData = data;
|
|
308
|
-
if (!data) {
|
|
309
|
-
throw new Error('Data not found');
|
|
310
|
-
}
|
|
311
|
-
// TODO: move to events
|
|
312
|
-
if (notify.slack) {
|
|
313
|
-
if (notify.slack.on && notify.slack.channel) {
|
|
314
|
-
data
|
|
315
|
-
.updateSlackChannel(notify.slack.channel)
|
|
316
|
-
.then(function () { })
|
|
317
|
-
.catch(function () { });
|
|
318
|
-
if (crowi.slack) {
|
|
319
|
-
notify.slack.channel.split(',').map(function (chan) {
|
|
320
|
-
const message = crowi.slack.prepareSlackMessage(pageData, req.user, chan, updateOrCreate, previousRevision);
|
|
321
|
-
crowi.slack
|
|
322
|
-
.post(message.channel, message.text, message)
|
|
323
|
-
.then(function () { })
|
|
324
|
-
.catch(function () { });
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
return res.redirect(redirectPath);
|
|
330
|
-
})
|
|
331
|
-
.catch(function (err) {
|
|
332
|
-
debug('Page create or edit error.', err);
|
|
333
|
-
if (pageData && !req.form.isValid) {
|
|
334
|
-
return renderPage(pageData, req, res);
|
|
335
|
-
}
|
|
336
|
-
return res.redirect(redirectPath);
|
|
337
|
-
});
|
|
338
|
-
};
|
|
339
|
-
// app.get( '/users/:username([^/]+)/bookmarks' , loginRequired(crowi, app) , page.userBookmarkList);
|
|
340
|
-
actions.userBookmarkList = function (req, res) {
|
|
341
|
-
const username = req.params.username;
|
|
342
|
-
const limit = 50;
|
|
343
|
-
const offset = (0, express_1.getQueryAsNumber)(req.query.offset, 0);
|
|
344
|
-
const renderVars = {};
|
|
345
|
-
const pagerOptions = { offset, limit };
|
|
346
|
-
const queryOptions = { offset, limit: limit + 1, populatePage: true, requestUser: req.user };
|
|
347
|
-
User.findUserByUsername(username)
|
|
348
|
-
.then(function (user) {
|
|
349
|
-
if (user === null) {
|
|
350
|
-
throw new Error('The user not found.');
|
|
351
|
-
}
|
|
352
|
-
renderVars.pageUser = user;
|
|
353
|
-
return Bookmark.findByUser(user, queryOptions);
|
|
354
|
-
})
|
|
355
|
-
.then(function (bookmarks) {
|
|
356
|
-
if (bookmarks.length > limit) {
|
|
357
|
-
bookmarks.pop();
|
|
358
|
-
}
|
|
359
|
-
pagerOptions.length = bookmarks.length;
|
|
360
|
-
renderVars.pager = generatePager(pagerOptions);
|
|
361
|
-
renderVars.bookmarks = bookmarks;
|
|
362
|
-
return res.json(renderVars);
|
|
363
|
-
})
|
|
364
|
-
.catch(function (err) {
|
|
365
|
-
debug('Error on rendereing bookmark', err);
|
|
366
|
-
res.redirect('/');
|
|
367
|
-
});
|
|
368
|
-
};
|
|
369
|
-
// app.get( '/users/:username([^/]+)/recent-create' , loginRequired(crowi, app) , page.userRecentCreatedList);
|
|
370
|
-
actions.userRecentCreatedList = function (req, res) {
|
|
371
|
-
const username = req.params.username;
|
|
372
|
-
const limit = 50;
|
|
373
|
-
const offset = (0, express_1.getQueryAsNumber)(req.query.offset, 0);
|
|
374
|
-
const renderVars = {};
|
|
375
|
-
const pagerOptions = { offset, limit };
|
|
376
|
-
const queryOptions = { offset, limit: limit + 1 };
|
|
377
|
-
User.findUserByUsername(username)
|
|
378
|
-
.then(function (user) {
|
|
379
|
-
if (user === null) {
|
|
380
|
-
throw new Error('The user not found.');
|
|
381
|
-
}
|
|
382
|
-
renderVars.pageUser = user;
|
|
383
|
-
return Page.findListByCreator(user, queryOptions, req.user);
|
|
384
|
-
})
|
|
385
|
-
.then(function (pages) {
|
|
386
|
-
if (pages.length > limit) {
|
|
387
|
-
pages.pop();
|
|
388
|
-
}
|
|
389
|
-
pagerOptions.length = pages.length;
|
|
390
|
-
renderVars.pager = generatePager(pagerOptions);
|
|
391
|
-
renderVars.pages = pages;
|
|
392
|
-
return res.json(renderVars);
|
|
393
|
-
})
|
|
394
|
-
.catch(function (err) {
|
|
395
|
-
debug('Error on rendereing recent-created', err);
|
|
396
|
-
res.redirect('/');
|
|
397
|
-
});
|
|
398
|
-
};
|
|
399
|
-
/**
|
|
400
|
-
* redirector
|
|
401
|
-
*/
|
|
402
|
-
api.redirector = function (req, res) {
|
|
403
|
-
const id = req.params.id;
|
|
404
|
-
Page.findPageById(id)
|
|
405
|
-
.then(function (pageData) {
|
|
406
|
-
const isGranted = pageData.isGrantedFor(req.user);
|
|
407
|
-
if (pageData.grant == Page.GRANT_RESTRICTED && !isGranted) {
|
|
408
|
-
return Page.pushToGrantedUsers(pageData, req.user);
|
|
409
|
-
}
|
|
410
|
-
if (!isGranted) {
|
|
411
|
-
throw new Error('Page is not granted for the user.');
|
|
412
|
-
}
|
|
413
|
-
return Promise.resolve(pageData);
|
|
414
|
-
})
|
|
415
|
-
.then(function (page) {
|
|
416
|
-
return res.redirect(encodeURI(page.path));
|
|
417
|
-
})
|
|
418
|
-
.catch(function (err) {
|
|
419
|
-
return res.redirect('/');
|
|
420
|
-
});
|
|
421
|
-
};
|
|
422
|
-
/**
|
|
423
|
-
* @api {get} /pages.list List pages by user
|
|
424
|
-
* @apiName ListPage
|
|
425
|
-
* @apiGroup Page
|
|
426
|
-
*
|
|
427
|
-
* @apiParam {String} path
|
|
428
|
-
* @apiParam {String} user
|
|
429
|
-
*/
|
|
430
|
-
api.list = function (req, res) {
|
|
431
|
-
const username = (0, express_1.getQueryAsString)(req.query.user) || null;
|
|
432
|
-
const path = (0, express_1.getQueryAsString)(req.query.path) || null;
|
|
433
|
-
const limit = parseInt((0, express_1.getQueryAsString)(req.query.limit), 10) || 50;
|
|
434
|
-
const offset = parseInt((0, express_1.getQueryAsString)(req.query.offset), 10) || 0;
|
|
435
|
-
const pagerOptions = { offset, limit };
|
|
436
|
-
const queryOptions = { offset, limit: limit + 1 };
|
|
437
|
-
// Accepts only one of these
|
|
438
|
-
if (username === null && path === null) {
|
|
439
|
-
return res.json(apiResponse_1.default.error('Parameter user or path is required.'));
|
|
440
|
-
}
|
|
441
|
-
if (username !== null && path !== null) {
|
|
442
|
-
return res.json(apiResponse_1.default.error('Parameter user or path is required.'));
|
|
443
|
-
}
|
|
444
|
-
let pageFetcher;
|
|
445
|
-
if (path === null) {
|
|
446
|
-
pageFetcher = Page.findListByCreator(username, req.user, queryOptions); // by username
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
pageFetcher = Page.findListByStartWith(path, req.user, queryOptions); // by path
|
|
450
|
-
}
|
|
451
|
-
pageFetcher
|
|
452
|
-
.then(function (pages) {
|
|
453
|
-
pagerOptions.length = pages.length;
|
|
454
|
-
const result = {
|
|
455
|
-
pages: pages.slice(0, limit),
|
|
456
|
-
pager: generatePager(pagerOptions),
|
|
457
|
-
};
|
|
458
|
-
return res.json(apiResponse_1.default.success(result));
|
|
459
|
-
})
|
|
460
|
-
.catch(function (err) {
|
|
461
|
-
return res.json(apiResponse_1.default.error(err));
|
|
462
|
-
});
|
|
463
|
-
};
|
|
464
|
-
/**
|
|
465
|
-
* @api {post} /pages.create Create new page
|
|
466
|
-
* @apiName CreatePage
|
|
467
|
-
* @apiGroup Page
|
|
468
|
-
*
|
|
469
|
-
* @apiParam {String} body
|
|
470
|
-
* @apiParam {String} path
|
|
471
|
-
* @apiParam {String} grant
|
|
472
|
-
*/
|
|
473
|
-
api.create = function (req, res) {
|
|
474
|
-
const body = req.body.body || null;
|
|
475
|
-
const pagePath = req.body.path || null;
|
|
476
|
-
const grant = req.body.grant || null;
|
|
477
|
-
if (body === null || pagePath === null) {
|
|
478
|
-
return res.json(apiResponse_1.default.error('Parameters body and path are required.'));
|
|
479
|
-
}
|
|
480
|
-
const ignoreNotFound = true;
|
|
481
|
-
Page.findPage(pagePath, req.user, null, ignoreNotFound)
|
|
482
|
-
.then(function (data) {
|
|
483
|
-
if (data !== null) {
|
|
484
|
-
throw new Error('Page exists');
|
|
485
|
-
}
|
|
486
|
-
return Page.createPage(pagePath, body, req.user, { grant: grant });
|
|
487
|
-
})
|
|
488
|
-
.then(function (data) {
|
|
489
|
-
if (!data) {
|
|
490
|
-
throw new Error('Failed to create page.');
|
|
491
|
-
}
|
|
492
|
-
const result = { page: data.toObject() };
|
|
493
|
-
return res.json(apiResponse_1.default.success(result));
|
|
494
|
-
})
|
|
495
|
-
.catch(function (err) {
|
|
496
|
-
return res.json(apiResponse_1.default.error(err));
|
|
497
|
-
});
|
|
498
|
-
};
|
|
499
|
-
/**
|
|
500
|
-
* @api {post} /pages.update Update page
|
|
501
|
-
* @apiName UpdatePage
|
|
502
|
-
* @apiGroup Page
|
|
503
|
-
*
|
|
504
|
-
* @apiParam {String} body
|
|
505
|
-
* @apiParam {String} page_id
|
|
506
|
-
* @apiParam {String} revision_id
|
|
507
|
-
* @apiParam {String} grant
|
|
508
|
-
*
|
|
509
|
-
* In the case of the page exists:
|
|
510
|
-
* - If revision_id is specified => update the page,
|
|
511
|
-
* - If revision_id is not specified => force update by the new contents.
|
|
512
|
-
*/
|
|
513
|
-
api.update = function (req, res) {
|
|
514
|
-
const pageBody = req.body.body || null;
|
|
515
|
-
const pageId = req.body.page_id || null;
|
|
516
|
-
const revisionId = req.body.revision_id || null;
|
|
517
|
-
const grant = req.body.grant || null;
|
|
518
|
-
if (pageId === null || pageBody === null) {
|
|
519
|
-
return res.json(apiResponse_1.default.error('page_id and body are required.'));
|
|
520
|
-
}
|
|
521
|
-
Page.findPageByIdAndGrantedUser(pageId, req.user)
|
|
522
|
-
.then(function (pageData) {
|
|
523
|
-
if (pageData && revisionId !== null && !pageData.isUpdatable(revisionId)) {
|
|
524
|
-
throw new Error('Revision error.');
|
|
525
|
-
}
|
|
526
|
-
const grantOption = { grant: pageData.grant };
|
|
527
|
-
if (grant !== null) {
|
|
528
|
-
grantOption.grant = grant;
|
|
529
|
-
}
|
|
530
|
-
return Page.updatePage(pageData, pageBody, req.user, grantOption);
|
|
531
|
-
})
|
|
532
|
-
.then(function (pageData) {
|
|
533
|
-
const result = {
|
|
534
|
-
page: pageData.toObject(),
|
|
535
|
-
};
|
|
536
|
-
return res.json(apiResponse_1.default.success(result));
|
|
537
|
-
})
|
|
538
|
-
.catch(function (err) {
|
|
539
|
-
debug('error on _api/pages.update', err);
|
|
540
|
-
return res.json(apiResponse_1.default.error(err));
|
|
541
|
-
});
|
|
542
|
-
};
|
|
543
|
-
/**
|
|
544
|
-
* @api {get} /pages.get Get page data
|
|
545
|
-
* @apiName GetPage
|
|
546
|
-
* @apiGroup Page
|
|
547
|
-
*
|
|
548
|
-
* @apiParam {String} page_id
|
|
549
|
-
* @apiParam {String} path
|
|
550
|
-
* @apiParam {String} revision_id
|
|
551
|
-
*/
|
|
552
|
-
api.get = function (req, res) {
|
|
553
|
-
const pagePath = (0, express_1.getQueryAsString)(req.query.path) || null;
|
|
554
|
-
const pageId = (0, express_1.getQueryAsString)(req.query.page_id) || null; // TODO: handling
|
|
555
|
-
const revisionId = (0, express_1.getQueryAsString)(req.query.revision_id) || null;
|
|
556
|
-
if (!pageId && !pagePath) {
|
|
557
|
-
return res.json(apiResponse_1.default.error(new Error('Parameter path or page_id is required.')));
|
|
558
|
-
}
|
|
559
|
-
let pageFinder;
|
|
560
|
-
if (pageId) {
|
|
561
|
-
// prioritized
|
|
562
|
-
pageFinder = Page.findPageByIdAndGrantedUser(pageId, req.user);
|
|
563
|
-
}
|
|
564
|
-
else if (pagePath) {
|
|
565
|
-
pageFinder = Page.findPage(pagePath, req.user, revisionId);
|
|
566
|
-
}
|
|
567
|
-
pageFinder
|
|
568
|
-
.then(function (page) {
|
|
569
|
-
const result = { page };
|
|
570
|
-
return res.json(apiResponse_1.default.success(result));
|
|
571
|
-
})
|
|
572
|
-
.catch(function (err) {
|
|
573
|
-
return res.json(apiResponse_1.default.error(err));
|
|
574
|
-
});
|
|
575
|
-
};
|
|
576
|
-
/**
|
|
577
|
-
* @api {post} /pages.seen Mark as seen user
|
|
578
|
-
* @apiName SeenPage
|
|
579
|
-
* @apiGroup Page
|
|
580
|
-
*
|
|
581
|
-
* @apiParam {String} page_id Page Id.
|
|
582
|
-
*/
|
|
583
|
-
api.seen = function (req, res) {
|
|
584
|
-
const pageId = req.body.page_id;
|
|
585
|
-
if (!pageId) {
|
|
586
|
-
return res.json(apiResponse_1.default.error('page_id required'));
|
|
587
|
-
}
|
|
588
|
-
Page.findPageByIdAndGrantedUser(pageId, req.user)
|
|
589
|
-
.then(function (page) {
|
|
590
|
-
return page.seen(req.user);
|
|
591
|
-
})
|
|
592
|
-
.then(function (seenUser) {
|
|
593
|
-
const result = { seenUser };
|
|
594
|
-
return res.json(apiResponse_1.default.success(result));
|
|
595
|
-
})
|
|
596
|
-
.catch(function (err) {
|
|
597
|
-
debug('Seen user update error', err);
|
|
598
|
-
return res.json(apiResponse_1.default.error(err));
|
|
599
|
-
});
|
|
600
|
-
};
|
|
601
|
-
/**
|
|
602
|
-
* @api {post} /likes.add Like page
|
|
603
|
-
* @apiName LikePage
|
|
604
|
-
* @apiGroup Page
|
|
605
|
-
*
|
|
606
|
-
* @apiParam {String} page_id Page Id.
|
|
607
|
-
*/
|
|
608
|
-
api.like = function (req, res) {
|
|
609
|
-
const id = req.body.page_id;
|
|
610
|
-
Page.findPageByIdAndGrantedUser(id, req.user)
|
|
611
|
-
.then(function (pageData) {
|
|
612
|
-
return pageData.like(req.user);
|
|
613
|
-
})
|
|
614
|
-
.then(function (data) {
|
|
615
|
-
const result = { page: data };
|
|
616
|
-
return res.json(apiResponse_1.default.success(result));
|
|
617
|
-
})
|
|
618
|
-
.catch(function (err) {
|
|
619
|
-
debug('Like failed', err);
|
|
620
|
-
return res.json(apiResponse_1.default.error({}));
|
|
621
|
-
});
|
|
622
|
-
};
|
|
623
|
-
/**
|
|
624
|
-
* @api {post} /likes.remove Unlike page
|
|
625
|
-
* @apiName UnlikePage
|
|
626
|
-
* @apiGroup Page
|
|
627
|
-
*
|
|
628
|
-
* @apiParam {String} page_id Page Id.
|
|
629
|
-
*/
|
|
630
|
-
api.unlike = function (req, res) {
|
|
631
|
-
const id = req.body.page_id;
|
|
632
|
-
Page.findPageByIdAndGrantedUser(id, req.user)
|
|
633
|
-
.then(function (pageData) {
|
|
634
|
-
return pageData.unlike(req.user);
|
|
635
|
-
})
|
|
636
|
-
.then(function (data) {
|
|
637
|
-
const result = { page: data };
|
|
638
|
-
return res.json(apiResponse_1.default.success(result));
|
|
639
|
-
})
|
|
640
|
-
.catch(function (err) {
|
|
641
|
-
debug('Unlike failed', err);
|
|
642
|
-
return res.json(apiResponse_1.default.error({}));
|
|
643
|
-
});
|
|
644
|
-
};
|
|
645
|
-
/**
|
|
646
|
-
* @api {get} /pages.updatePost
|
|
647
|
-
* @apiName Get UpdatePost setting list
|
|
648
|
-
* @apiGroup Page
|
|
649
|
-
*
|
|
650
|
-
* @apiParam {String} path
|
|
651
|
-
*/
|
|
652
|
-
api.getUpdatePost = function (req, res) {
|
|
653
|
-
const path = req.query.path;
|
|
654
|
-
const UpdatePost = crowi.model('UpdatePost');
|
|
655
|
-
if (!path) {
|
|
656
|
-
return res.json(apiResponse_1.default.error({}));
|
|
657
|
-
}
|
|
658
|
-
UpdatePost.findSettingsByPath(path)
|
|
659
|
-
.then(function (data) {
|
|
660
|
-
data = data.map(function (e) {
|
|
661
|
-
return e.channel;
|
|
662
|
-
});
|
|
663
|
-
debug('Found updatePost data', data);
|
|
664
|
-
const result = { updatePost: data };
|
|
665
|
-
return res.json(apiResponse_1.default.success(result));
|
|
666
|
-
})
|
|
667
|
-
.catch(function (err) {
|
|
668
|
-
debug('Error occured while get setting', err);
|
|
669
|
-
return res.json(apiResponse_1.default.error({}));
|
|
670
|
-
});
|
|
671
|
-
};
|
|
672
|
-
/**
|
|
673
|
-
* @api {post} /pages.remove Remove page
|
|
674
|
-
* @apiName RemovePage
|
|
675
|
-
* @apiGroup Page
|
|
676
|
-
*
|
|
677
|
-
* @apiParam {String} page_id Page Id.
|
|
678
|
-
* @apiParam {String} revision_id
|
|
679
|
-
*/
|
|
680
|
-
api.remove = function (req, res) {
|
|
681
|
-
const pageId = req.body.page_id;
|
|
682
|
-
const previousRevision = req.body.revision_id || null;
|
|
683
|
-
// get completely flag
|
|
684
|
-
const isCompletely = req.body.completely !== undefined;
|
|
685
|
-
Page.findPageByIdAndGrantedUser(pageId, req.user)
|
|
686
|
-
.then(function (pageData) {
|
|
687
|
-
debug('Delete page', pageData._id, pageData.path);
|
|
688
|
-
if (isCompletely) {
|
|
689
|
-
return Page.completelyDeletePage(pageData, req.user);
|
|
690
|
-
}
|
|
691
|
-
// else
|
|
692
|
-
if (!pageData.isUpdatable(previousRevision)) {
|
|
693
|
-
throw new Error("Someone could update this page, so couldn't delete.");
|
|
694
|
-
}
|
|
695
|
-
return Page.deletePage(pageData, req.user);
|
|
696
|
-
})
|
|
697
|
-
.then(function (page) {
|
|
698
|
-
debug('Page deleted', page.path);
|
|
699
|
-
const result = { page };
|
|
700
|
-
return res.json(apiResponse_1.default.success(result));
|
|
701
|
-
})
|
|
702
|
-
.catch(function (err) {
|
|
703
|
-
debug('Error occured while get setting', err, err.stack);
|
|
704
|
-
return res.json(apiResponse_1.default.error('Failed to delete page.'));
|
|
705
|
-
});
|
|
706
|
-
};
|
|
707
|
-
/**
|
|
708
|
-
* @api {post} /pages.revertRemove Revert removed page
|
|
709
|
-
* @apiName RevertRemovePage
|
|
710
|
-
* @apiGroup Page
|
|
711
|
-
*
|
|
712
|
-
* @apiParam {String} page_id Page Id.
|
|
713
|
-
*/
|
|
714
|
-
api.revertRemove = function (req, res) {
|
|
715
|
-
const pageId = req.body.page_id;
|
|
716
|
-
Page.findPageByIdAndGrantedUser(pageId, req.user)
|
|
717
|
-
.then(function (pageData) {
|
|
718
|
-
// TODO: これでいいんだっけ
|
|
719
|
-
return Page.revertDeletedPage(pageData, req.user);
|
|
720
|
-
})
|
|
721
|
-
.then(function (page) {
|
|
722
|
-
debug('Complete to revert deleted page', page.path);
|
|
723
|
-
const result = { page };
|
|
724
|
-
return res.json(apiResponse_1.default.success(result));
|
|
725
|
-
})
|
|
726
|
-
.catch(function (err) {
|
|
727
|
-
debug('Error occured while get setting', err, err.stack);
|
|
728
|
-
return res.json(apiResponse_1.default.error('Failed to revert deleted page.'));
|
|
729
|
-
});
|
|
730
|
-
};
|
|
731
|
-
/**
|
|
732
|
-
* @api {post} /pages.rename Rename page
|
|
733
|
-
* @apiName RenamePage
|
|
734
|
-
* @apiGroup Page
|
|
735
|
-
*
|
|
736
|
-
* @apiParam {String} page_id Page Id.
|
|
737
|
-
* @apiParam {String} path
|
|
738
|
-
* @apiParam {String} revision_id
|
|
739
|
-
* @apiParam {String} new_path
|
|
740
|
-
* @apiParam {Bool} create_redirect
|
|
741
|
-
*/
|
|
742
|
-
api.rename = async function (req, res) {
|
|
743
|
-
const { page_id: pageId, revision_id: previousRevision = null, new_path: newPath, create_redirect: createRedirect, move_trees: moveTrees } = req.body;
|
|
744
|
-
const newPagePath = Page.normalizePath(newPath);
|
|
745
|
-
const newPageIsPortal = newPagePath.endsWith('/');
|
|
746
|
-
const options = {
|
|
747
|
-
createRedirectPage: (!newPageIsPortal && createRedirect) || 0,
|
|
748
|
-
moveUnderTrees: moveTrees || 0,
|
|
749
|
-
};
|
|
750
|
-
if (!Page.isCreatableName(newPagePath)) {
|
|
751
|
-
return res.json(apiResponse_1.default.error(`このページ名は作成できません (${newPagePath})`));
|
|
752
|
-
}
|
|
753
|
-
const rename = async function () {
|
|
754
|
-
try {
|
|
755
|
-
const page = await Page.findPageById(pageId);
|
|
756
|
-
if (!page.isUpdatable(previousRevision)) {
|
|
757
|
-
return res.json(apiResponse_1.default.error(new Error("Someone could update this page, so couldn't delete.")));
|
|
758
|
-
}
|
|
759
|
-
await Page.rename(page, newPagePath, req.user, options);
|
|
760
|
-
const result = { page };
|
|
761
|
-
return res.json(apiResponse_1.default.success(result));
|
|
762
|
-
}
|
|
763
|
-
catch (err) {
|
|
764
|
-
return res.json(apiResponse_1.default.error('Failed to update page.'));
|
|
765
|
-
}
|
|
766
|
-
};
|
|
767
|
-
try {
|
|
768
|
-
const page = await Page.findPageByPath(newPagePath);
|
|
769
|
-
if (page.isUnlinkable(req.user)) {
|
|
770
|
-
try {
|
|
771
|
-
await page.unlink(req.user);
|
|
772
|
-
rename();
|
|
773
|
-
}
|
|
774
|
-
catch (err) {
|
|
775
|
-
res.json(apiResponse_1.default.error(err));
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
else {
|
|
779
|
-
// can't rename to that path when page found and can't remove it
|
|
780
|
-
return res.json(apiResponse_1.default.error(`このページ名は作成できません (${newPagePath})。ページが存在します。`));
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
catch (err) {
|
|
784
|
-
rename();
|
|
785
|
-
}
|
|
786
|
-
};
|
|
787
|
-
api.renameTree = async function (req, res) {
|
|
788
|
-
const { path, new_path: newPath, create_redirect: createRedirect = 0 } = req.body;
|
|
789
|
-
const options = { createRedirectPage: createRedirect };
|
|
790
|
-
const paths = await Page.findChildrenByPath(path, req.user, {});
|
|
791
|
-
const pathMap = Page.getPathMap(paths, path, newPath);
|
|
792
|
-
const [error, errors] = await Page.checkPagesRenamable(Object.values(pathMap), req.user);
|
|
793
|
-
if (error) {
|
|
794
|
-
const info = { errors, path_map: pathMap };
|
|
795
|
-
return res.json(apiResponse_1.default.error('rename_tree.error.can_not_move', info));
|
|
796
|
-
}
|
|
797
|
-
try {
|
|
798
|
-
const result = await Page.renameTree(pathMap, req.user, options);
|
|
799
|
-
return res.json(apiResponse_1.default.success({ pages: result }));
|
|
800
|
-
}
|
|
801
|
-
catch (err) {
|
|
802
|
-
return res.json(apiResponse_1.default.error(err));
|
|
803
|
-
}
|
|
804
|
-
};
|
|
805
|
-
api.checkTreeRenamable = async function (req, res) {
|
|
806
|
-
const { path, new_path: newPath } = req.body;
|
|
807
|
-
const paths = await Page.findChildrenByPath(path, req.user, {});
|
|
808
|
-
const pathMap = Page.getPathMap(paths, path, newPath);
|
|
809
|
-
const [error, errors] = await Page.checkPagesRenamable(Object.values(pathMap), req.user);
|
|
810
|
-
if (error) {
|
|
811
|
-
const info = { errors, path_map: pathMap };
|
|
812
|
-
return res.json(apiResponse_1.default.error('rename_tree.error.can_not_move', info));
|
|
813
|
-
}
|
|
814
|
-
return res.json(apiResponse_1.default.success({ path_map: pathMap }));
|
|
815
|
-
};
|
|
816
|
-
/**
|
|
817
|
-
* @api {post} /pages.unlink Remove the redirecting page
|
|
818
|
-
* @apiName UnlinkPage
|
|
819
|
-
* @apiGroup Page
|
|
820
|
-
*
|
|
821
|
-
* @apiParam {String} page_id Page Id.
|
|
822
|
-
* @apiParam {String} revision_id
|
|
823
|
-
*/
|
|
824
|
-
api.unlink = async function (req, res) {
|
|
825
|
-
const { page_id: pageId } = req.body;
|
|
826
|
-
try {
|
|
827
|
-
const page = await Page.findPageByIdAndGrantedUser(pageId, req.user);
|
|
828
|
-
debug('Unlink page', page._id, page.path);
|
|
829
|
-
await Page.removeRedirectOriginPageByPath(page.path);
|
|
830
|
-
debug('Redirect Page deleted', page.path);
|
|
831
|
-
const result = { page };
|
|
832
|
-
return res.json(apiResponse_1.default.success(result));
|
|
833
|
-
}
|
|
834
|
-
catch (err) {
|
|
835
|
-
const error = (0, error_1.asCustomError)(err);
|
|
836
|
-
debug('Error occured while get setting', error, error.stack);
|
|
837
|
-
return res.json(apiResponse_1.default.error('Failed to delete redirect page.'));
|
|
838
|
-
}
|
|
839
|
-
};
|
|
840
|
-
api.watchStatus = async function (req, res) {
|
|
841
|
-
const pageIdStr = (0, express_1.getQueryAsString)(req.query.page_id);
|
|
842
|
-
const { _id: userId } = req.user;
|
|
843
|
-
try {
|
|
844
|
-
// @ts-ignore - TypeScriptの型定義が正しくないため無視
|
|
845
|
-
const pageId = new mongoose_1.Types.ObjectId(pageIdStr);
|
|
846
|
-
const watcher = await Watcher.findByUserIdAndTargetId(userId, pageId);
|
|
847
|
-
const getDefaultStatus = async () => {
|
|
848
|
-
const page = await Page.findById(pageIdStr);
|
|
849
|
-
if (!page)
|
|
850
|
-
throw new Error('Page not found');
|
|
851
|
-
const targetUsers = await page.getNotificationTargetUsers();
|
|
852
|
-
return targetUsers.some((user) => user.toString() === userId.toString());
|
|
853
|
-
};
|
|
854
|
-
const watching = watcher ? watcher.isWatching() : await getDefaultStatus();
|
|
855
|
-
const result = { watching };
|
|
856
|
-
return res.json(apiResponse_1.default.success(result));
|
|
857
|
-
}
|
|
858
|
-
catch (err) {
|
|
859
|
-
const error = (0, error_1.asCustomError)(err);
|
|
860
|
-
debug('Error occured while get setting', error, error.stack);
|
|
861
|
-
return res.json(apiResponse_1.default.error('Failed to fetch watch status.'));
|
|
862
|
-
}
|
|
863
|
-
};
|
|
864
|
-
api.watch = async function (req, res) {
|
|
865
|
-
const { page_id: pageId } = req.body;
|
|
866
|
-
const { _id: userId } = req.user;
|
|
867
|
-
const status = req.body.status ? Watcher.STATUS_WATCH : Watcher.STATUS_IGNORE;
|
|
868
|
-
try {
|
|
869
|
-
const watcher = await Watcher.watchByPageId(userId, pageId, status);
|
|
870
|
-
const result = { watcher };
|
|
871
|
-
return res.json(apiResponse_1.default.success(result));
|
|
872
|
-
}
|
|
873
|
-
catch (err) {
|
|
874
|
-
const error = (0, error_1.asCustomError)(err);
|
|
875
|
-
debug('Error occured while update watch status', error, error.stack);
|
|
876
|
-
return res.json(apiResponse_1.default.error('Failed to watch this page.'));
|
|
877
|
-
}
|
|
878
|
-
};
|
|
879
|
-
return actions;
|
|
880
|
-
};
|
|
881
|
-
//# sourceMappingURL=page.js.map
|