Skip to content

Commit

Permalink
Merge pull request #9567 from weseek/master
Browse files Browse the repository at this point in the history
Release v7.1.9
  • Loading branch information
mergify[bot] authored Feb 3, 2025
2 parents 862370e + 67c10c3 commit c94229a
Show file tree
Hide file tree
Showing 34 changed files with 699 additions and 368 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- release/**
- rc/**
- changeset-release/**
- mergify/merge-queue/**
- tmp-mergify/merge-queue/**
paths:
- .github/mergify.yml
- .github/workflows/ci-app.yml
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/reusable-app-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ jobs:
run: |
pnpm install --frozen-lockfile
- name: Cache/Restore dist
uses: actions/cache@v4
with:
path: |
**/.turbo
**/dist
**/node_modules/.cache/turbo
${{ github.workspace }}/apps/app/.next
key: dist-app-prod-${{ runner.OS }}-node${{ inputs.node-version }}-${{ github.sha }}
restore-keys: |
dist-app-prod-${{ runner.OS }}-node${{ inputs.node-version }}-
- name: Build
working-directory: ./apps/app
run: |
Expand Down Expand Up @@ -315,7 +303,9 @@ jobs:
pnpm install --frozen-lockfile
- name: Merge into HTML Report
run: pnpm playwright merge-reports --reporter html ./all-blob-reports
run: |
mkdir -p all-blob-reports
pnpm playwright merge-reports --reporter html ./all-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@v4
Expand Down
10 changes: 0 additions & 10 deletions apps/app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
'weseek/react',
],
plugins: [
'regex',
],
settings: {
// resolve path aliases by eslint-import-resolver-typescript
Expand All @@ -17,15 +16,6 @@ module.exports = {
name: 'axios',
message: 'Please use src/utils/axios instead.',
}],
'regex/invalid': ['error', [
{
regex: '\\?\\<\\!',
message: 'Do not use any negative lookbehind',
}, {
regex: '\\?\\<\\=',
message: 'Do not use any Positive lookbehind',
},
]],
'@typescript-eslint/no-var-requires': 'off',

// set 'warn' temporarily -- 2021.08.02 Yuki Takei
Expand Down
8 changes: 3 additions & 5 deletions apps/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@growi/app",
"version": "7.1.8",
"version": "7.1.9-RC.0",
"license": "MIT",
"private": "true",
"scripts": {
Expand Down Expand Up @@ -114,7 +114,6 @@
"ejs": "^3.1.10",
"esa-node": "^0.2.2",
"escape-string-regexp": "^4.0.0",
"eslint-plugin-regex": "^1.8.0",
"expose-gc": "^1.0.0",
"express": "^4.20.0",
"express-bunyan-logger": "^1.3.3",
Expand All @@ -135,7 +134,7 @@
"is-iso-date": "^0.0.1",
"js-tiktoken": "^1.0.15",
"js-yaml": "^4.1.0",
"katex": "^0.16.11",
"katex": "^0.16.21",
"ldapjs": "^3.0.2",
"lucene-query-parser": "^1.2.0",
"markdown-table": "^3.0.3",
Expand All @@ -150,7 +149,7 @@
"migrate-mongo": "^11.0.0",
"mkdirp": "^1.0.3",
"mongodb": "^4.17.2",
"mongoose": "^6.11.3",
"mongoose": "^6.13.6",
"mongoose-gridfs": "^1.2.42",
"mongoose-paginate-v2": "^1.3.9",
"mongoose-unique-validator": "^2.0.3",
Expand Down Expand Up @@ -283,7 +282,6 @@
"downshift": "^8.2.3",
"eazy-logger": "^3.1.0",
"eslint-plugin-jest": "^26.5.3",
"eslint-plugin-regex": "^1.8.0",
"fslightbox-react": "^1.7.6",
"handsontable": "=6.2.2",
"happy-dom": "^15.7.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ import type {
import { pagePathUtils } from '@growi/core/dist/utils';
import { GlobalCodeMirrorEditorKey } from '@growi/editor';
import { useCodeMirrorEditorIsolated } from '@growi/editor/dist/client/stores/codemirror-editor';
import { auto } from '@popperjs/core';
import { useTranslation } from 'next-i18next';
import dynamic from 'next/dynamic';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { useTranslation } from 'next-i18next';
import Sticky from 'react-stickynode';
import { DropdownItem, UncontrolledTooltip } from 'reactstrap';

Expand All @@ -22,11 +21,6 @@ import { toastSuccess, toastError, toastWarning } from '~/client/util/toastr';
import { GroundGlassBar } from '~/components/Navbar/GroundGlassBar';
import type { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
import { useShouldExpandContent } from '~/services/layout/use-should-expand-content';
import {
useCurrentPathname,
useCurrentUser, useIsGuestUser, useIsReadOnlyUser, useIsLocalAccountRegistrationEnabled, useIsSharedUser, useShareLinkId,
} from '~/stores-universal/context';
import { useEditorMode } from '~/stores-universal/ui';
import {
usePageAccessoriesModal, PageAccessoriesModalContents, type IPageForPageDuplicateModal,
usePageDuplicateModal, usePageRenameModal, usePageDeleteModal, usePagePresentationModal,
Expand All @@ -40,6 +34,11 @@ import {
useIsAbleToChangeEditorMode,
useIsDeviceLargerThanMd,
} from '~/stores/ui';
import {
useCurrentPathname,
useCurrentUser, useIsGuestUser, useIsReadOnlyUser, useIsLocalAccountRegistrationEnabled, useIsSharedUser, useShareLinkId,
} from '~/stores-universal/context';
import { useEditorMode } from '~/stores-universal/ui';

import { NotAvailable } from '../NotAvailable';
import { Skeleton } from '../Skeleton';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@
}
}
}

@media print {
.grw-page-path-nav-sticky :global {
.sticky-inner-wrapper {
position: static !important;
}
}
}
2 changes: 1 addition & 1 deletion apps/app/src/components/Layout/BasicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const BasicLayout = ({ children, className }: Props): JSX.Element => {
return (
<RawLayout className={`${moduleClass} ${className ?? ''}`}>
<div className="page-wrapper flex-row">
<div className="z-2">
<div className="z-2 d-print-none">
<Sidebar />
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use '@growi/core-styles/scss/bootstrap/init' as bs;

.page-content-footer :global {
border-top: solid 1px transparent;
border-top: solid 1px var(--bs-border-color);
.page-meta {
font-size: 0.95em;
}
Expand Down
10 changes: 4 additions & 6 deletions apps/app/src/components/PageView/PageContentFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ export const PageContentFooter = (props: PageContentFooterProps): JSX.Element =>
}

return (
<div className={`${styles['page-content-footer']} page-content-footer py-4 d-edit-none d-print-none}`}>
<div className="container-lg grw-container-convertible">
<div className="page-meta">
<AuthorInfo user={creator} date={createdAt} mode="create" locate="footer" />
<AuthorInfo user={lastUpdateUser} date={updatedAt} mode="update" locate="footer" />
</div>
<div className={`${styles['page-content-footer']} my-4 pt-4 d-edit-none d-print-none}`}>
<div className="page-meta">
<AuthorInfo user={creator} date={createdAt} mode="create" locate="footer" />
<AuthorInfo user={lastUpdateUser} date={updatedAt} mode="update" locate="footer" />
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/components/PageView/PageViewLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const PageViewLayout = (props: Props): JSX.Element => {
</div>

{ footerContents != null && (
<footer className={`footer d-edit-none wide-gutter-x-lg ${fluidLayoutClass}`}>
<footer className={`footer d-edit-none container-lg wide-gutter-x-lg ${fluidLayoutClass}`}>
{footerContents}
</footer>
) }
Expand Down
5 changes: 1 addition & 4 deletions apps/app/src/pages/share/[[...path]].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ superjson.registerCustom<IShareLinkRelatedPage, string>(
{
isApplicable: (v): v is IShareLinkRelatedPage => {
return v != null
&& v.toObject != null
&& v.lastUpdateUser != null
&& v.creator != null
&& v.revision != null;
&& v.toObject != null;
},
serialize: (v) => { return superjson.stringify(v.toObject()) },
deserialize: (v) => { return superjson.parse(v) },
Expand Down
15 changes: 15 additions & 0 deletions apps/app/src/server/routes/apiv3/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ module.exports = (crowi) => {
const activityEvent = crowi.event('activity');
const addActivity = generateAddActivityMiddleware(crowi);

/**
* @swagger
* /logout:
* post:
* tags: [Users]
* security:
* - cookieAuth: []
* summary: Logout user
* description: Logout the currently authenticated user
* responses:
* 200:
* description: Successfully logged out
* 500:
* description: Internal server error
*/
router.post('/', addActivity, async(req, res) => {
req.session.destroy();

Expand Down
100 changes: 88 additions & 12 deletions apps/app/src/server/routes/apiv3/markdown-setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,37 @@ const validator = {
*
* components:
* schemas:
* MarkdownParams:
* description: MarkdownParams
* type: object
* properties:
* isEnabledLinebreaks:
* type: boolean
* description: enable lineBreak
* isEnabledLinebreaksInComments:
* type: boolean
* description: enable lineBreak in comment
* adminPreferredIndentSize:
* type: number
* description: preferred indent size
* isIndentSizeForced:
* type: boolean
* description: force indent size
* isEnabledXss:
* type: boolean
* description: enable xss
* xssOption:
* type: number
* description: number of xss option
* tagWhitelist:
* type: array
* description: array of tag whitelist
* items:
* type: string
* description: tag whitelist
* attrWhitelist:
* type: string
* description: attr whitelist
* LineBreakParams:
* description: LineBreakParams
* type: object
Expand All @@ -61,7 +92,7 @@ const validator = {
* description: XssParams
* type: object
* properties:
* isEnabledPrevention:
* isEnabledXss:
* type: boolean
* description: enable xss
* xssOption:
Expand All @@ -74,11 +105,18 @@ const validator = {
* type: string
* description: tag whitelist
* attrWhitelist:
* type: array
* description: array of attr whitelist
* items:
* type: string
* description: attr whitelist
* type: string
* description: attr whitelist
* IndentParams:
* description: IndentParams
* type: object
* properties:
* adminPreferredIndentSize:
* type: number
* description: preferred indent size
* isIndentSizeForced:
* type: boolean
* description: force indent size
*/

module.exports = (crowi) => {
Expand All @@ -94,9 +132,10 @@ module.exports = (crowi) => {
* /markdown-setting:
* get:
* tags: [MarkDownSetting]
* security:
* - cookieAuth: []
* operationId: getMarkdownSetting
* summary: /markdown-setting
* description: Get markdown parameters
* summary: Get markdown parameters
* responses:
* 200:
* description: params of markdown
Expand All @@ -107,6 +146,7 @@ module.exports = (crowi) => {
* markdownParams:
* type: object
* description: markdown params
* $ref: '#/components/schemas/MarkdownParams'
*/
router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
const markdownParams = {
Expand All @@ -129,9 +169,10 @@ module.exports = (crowi) => {
* /markdown-setting/lineBreak:
* put:
* tags: [MarkDownSetting]
* security:
* - cookieAuth: []
* operationId: updateLineBreakMarkdownSetting
* summary: /markdown-setting/lineBreak
* description: Update lineBreak setting
* summary: Update lineBreak setting
* requestBody:
* required: true
* content:
Expand All @@ -144,7 +185,11 @@ module.exports = (crowi) => {
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/LineBreakParams'
* type: object
* properties:
* lineBreaksParams:
* type: object
* $ref: '#/components/schemas/LineBreakParams'
*/
router.put('/lineBreak', loginRequiredStrictly, adminRequired, addActivity, validator.lineBreak, apiV3FormValidator, async(req, res) => {

Expand Down Expand Up @@ -173,6 +218,35 @@ module.exports = (crowi) => {

});

/**
* @swagger
*
* /markdown-setting/indent:
* put:
* tags: [MarkDownSetting]
* security:
* - cookieAuth: []
* operationId: updateIndentMarkdownSetting
* summary: Update indent setting
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/IndentParams'
* responses:
* 200:
* description: Succeeded to update indent setting
* content:
* application/json:
* schema:
* type: object
* properties:
* indentParams:
* type: object
* description: indent params
* $ref: '#/components/schemas/IndentParams'
*/
router.put('/indent', loginRequiredStrictly, adminRequired, addActivity, validator.indent, apiV3FormValidator, async(req, res) => {

const requestIndentParams = {
Expand Down Expand Up @@ -206,8 +280,10 @@ module.exports = (crowi) => {
* /markdown-setting/xss:
* put:
* tags: [MarkDownSetting]
* security:
* - cookieAuth: []
* operationId: updateXssMarkdownSetting
* summary: /markdown-setting/xss
* summary: Update XSS setting
* description: Update xss
* requestBody:
* required: true
Expand Down
Loading

0 comments on commit c94229a

Please sign in to comment.