Просмотр исходного кода

Merge branch 'master' into feat/180264-180290-add-growi-cloud-link-to-storage-settings

ryota-t 1 неделя назад
Родитель
Сommit
ebf55dce85

+ 5 - 0
.changeset/eight-zebras-design.md

@@ -0,0 +1,5 @@
+---
+'@growi/core': minor
+---
+
+add YJS_WEBSOCKET_BASE_PATH

+ 0 - 2
.github/dependabot.yml

@@ -24,8 +24,6 @@ updates:
       prefix: ci
       prefix: ci
       include: scope
       include: scope
     ignore:
     ignore:
-      - dependency-name: escape-string-regexp
-      - dependency-name: string-width
       - dependency-name: "@handsontable/react"
       - dependency-name: "@handsontable/react"
       - dependency-name: handsontable
       - dependency-name: handsontable
       - dependency-name: typeorm
       - dependency-name: typeorm

+ 5 - 10
.github/workflows/release-subpackages.yml

@@ -14,6 +14,11 @@ on:
     branches:
     branches:
       - master
       - master
 
 
+permissions:
+  id-token: write
+  contents: write
+  pull-requests: write
+
 concurrency:
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}
   group: ${{ github.workflow }}-${{ github.ref }}
   cancel-in-progress: true
   cancel-in-progress: true
@@ -40,14 +45,6 @@ jobs:
         pnpm add turbo --global
         pnpm add turbo --global
         pnpm install --frozen-lockfile
         pnpm install --frozen-lockfile
 
 
-    - name: Setup .npmrc
-      run: |
-        cat << EOF > "$HOME/.npmrc"
-          //registry.npmjs.org/:_authToken=$NPM_TOKEN
-        EOF
-      env:
-        NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
-
     - name: Retrieve changesets information
     - name: Retrieve changesets information
       id: changesets-status
       id: changesets-status
       run: |
       run: |
@@ -61,7 +58,6 @@ jobs:
         pnpm run release-subpackages:snapshot
         pnpm run release-subpackages:snapshot
       env:
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
 
 
 
 
   release-subpackages:
   release-subpackages:
@@ -92,4 +88,3 @@ jobs:
         publish: pnpm run release-subpackages
         publish: pnpm run release-subpackages
       env:
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

+ 0 - 1
apps/app/package.json

@@ -324,7 +324,6 @@
     "@types/url-join": "^4.0.2",
     "@types/url-join": "^4.0.2",
     "@types/uuid": "^10.0.0",
     "@types/uuid": "^10.0.0",
     "@types/ws": "^8.18.1",
     "@types/ws": "^8.18.1",
-    "babel-loader": "^8.2.5",
     "commander": "^14.0.0",
     "commander": "^14.0.0",
     "connect-browser-sync": "^2.1.0",
     "connect-browser-sync": "^2.1.0",
     "eazy-logger": "^3.1.0",
     "eazy-logger": "^3.1.0",

+ 2 - 1
apps/app/public/static/locales/en_US/admin.json

@@ -781,7 +781,8 @@
       "revoke_read_only_access": "Revoke read only access",
       "revoke_read_only_access": "Revoke read only access",
       "grant_read_only_access": "Grant read only access",
       "grant_read_only_access": "Grant read only access",
       "send_invitation_email": "Send invitation email",
       "send_invitation_email": "Send invitation email",
-      "resend_invitation_email": "Resend invitation email"
+      "resend_invitation_email": "Resend invitation email",
+      "deleted_user": "(Deleted User)"
     },
     },
     "reset_password": "Reset Password",
     "reset_password": "Reset Password",
     "reset_password_modal": {
     "reset_password_modal": {

+ 2 - 1
apps/app/public/static/locales/fr_FR/admin.json

@@ -781,7 +781,8 @@
       "revoke_read_only_access": "Révoquer permission de lecture",
       "revoke_read_only_access": "Révoquer permission de lecture",
       "grant_read_only_access": "Permission de lecture-seule",
       "grant_read_only_access": "Permission de lecture-seule",
       "send_invitation_email": "Envoyer courriel d'invitation",
       "send_invitation_email": "Envoyer courriel d'invitation",
-      "resend_invitation_email": "Renvoyer courriel d'invitation"
+      "resend_invitation_email": "Renvoyer courriel d'invitation",
+      "deleted_user": "(Utilisateur supprimé)"
     },
     },
     "reset_password": "Réinitialiser mot de passe",
     "reset_password": "Réinitialiser mot de passe",
     "reset_password_modal": {
     "reset_password_modal": {

+ 2 - 1
apps/app/public/static/locales/ja_JP/admin.json

@@ -790,7 +790,8 @@
       "revoke_read_only_access": "閲覧のみアクセス権を外す",
       "revoke_read_only_access": "閲覧のみアクセス権を外す",
       "grant_read_only_access": "閲覧のみアクセス権を付与する",
       "grant_read_only_access": "閲覧のみアクセス権を付与する",
       "send_invitation_email": "招待メールの送信",
       "send_invitation_email": "招待メールの送信",
-      "resend_invitation_email": "招待メールの再送信"
+      "resend_invitation_email": "招待メールの再送信",
+      "deleted_user": "(削除されたユーザー)"
     },
     },
     "reset_password": "パスワードのリセット",
     "reset_password": "パスワードのリセット",
     "reset_password_modal": {
     "reset_password_modal": {

+ 2 - 1
apps/app/public/static/locales/ko_KR/admin.json

@@ -781,7 +781,8 @@
       "revoke_read_only_access": "읽기 전용 권한 취소",
       "revoke_read_only_access": "읽기 전용 권한 취소",
       "grant_read_only_access": "읽기 전용 권한 부여",
       "grant_read_only_access": "읽기 전용 권한 부여",
       "send_invitation_email": "초대 이메일 전송",
       "send_invitation_email": "초대 이메일 전송",
-      "resend_invitation_email": "초대 이메일 재전송"
+      "resend_invitation_email": "초대 이메일 재전송",
+      "deleted_user": "(삭제된 사용자)"
     },
     },
     "reset_password": "비밀번호 재설정",
     "reset_password": "비밀번호 재설정",
     "reset_password_modal": {
     "reset_password_modal": {

+ 2 - 1
apps/app/public/static/locales/zh_CN/admin.json

@@ -790,7 +790,8 @@
       "revoke_read_only_access": "取消只读访问",
       "revoke_read_only_access": "取消只读访问",
       "grant_read_only_access": "给予只读权限",
       "grant_read_only_access": "给予只读权限",
       "send_invitation_email": "发送邀请邮件",
       "send_invitation_email": "发送邀请邮件",
-      "resend_invitation_email": "重发邀请函"
+      "resend_invitation_email": "重发邀请函",
+      "deleted_user": "(已删除的用户)"
     },
     },
     "reset_password": "重置密码",
     "reset_password": "重置密码",
     "reset_password_modal": {
     "reset_password_modal": {

+ 1 - 0
apps/app/src/client/components/Admin/UserManagement.tsx

@@ -183,6 +183,7 @@ const UserManagement = (props: UserManagementProps) => {
               {renderCheckbox('active', 'Active', 'success')}
               {renderCheckbox('active', 'Active', 'success')}
               {renderCheckbox('suspended', 'Suspended', 'warning')}
               {renderCheckbox('suspended', 'Suspended', 'warning')}
               {renderCheckbox('invited', 'Invited', 'secondary')}
               {renderCheckbox('invited', 'Invited', 'secondary')}
+              {renderCheckbox('deleted', 'Deleted', 'danger')}
             </div>
             </div>
             <div>
             <div>
               {isNotifyCommentShow && (
               {isNotifyCommentShow && (

+ 8 - 1
apps/app/src/client/components/Admin/Users/UserTable.tsx

@@ -5,6 +5,7 @@ import { format as dateFnsFormat } from 'date-fns/format';
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
 
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
+import { UserStatus } from '~/server/models/user/conts';
 
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import { SortIcons } from './SortIcons';
 import { SortIcons } from './SortIcons';
@@ -164,7 +165,13 @@ const UserTable = (props: UserTableProps) => {
                   )}
                   )}
                 </td>
                 </td>
                 <td>
                 <td>
-                  <strong>{user.username}</strong>
+                  {user.status === UserStatus.STATUS_DELETED ? (
+                    <p className="text-secondary">
+                      {t('admin:user_management.user_table.deleted_user')}
+                    </p>
+                  ) : (
+                    <strong>{user.username}</strong>
+                  )}
                 </td>
                 </td>
                 <td>{user.name}</td>
                 <td>{user.name}</td>
                 <td>{user.email}</td>
                 <td>{user.email}</td>

+ 4 - 4
apps/app/src/client/services/AdminUsersContainer.js

@@ -25,8 +25,8 @@ export default class AdminUsersContainer extends Container {
 
 
     this.state = {
     this.state = {
       users: [],
       users: [],
-      sort: 'id',
-      sortOrder: 'asc',
+      sort: 'createdAt',
+      sortOrder: 'desc',
       isPasswordResetModalShown: false,
       isPasswordResetModalShown: false,
       isUserInviteModalShown: false,
       isUserInviteModalShown: false,
       userForPasswordResetModal: null,
       userForPasswordResetModal: null,
@@ -119,8 +119,8 @@ export default class AdminUsersContainer extends Container {
 
 
   async resetAllChanges() {
   async resetAllChanges() {
     await this.setState({
     await this.setState({
-      sort: 'id',
-      sortOrder: 'asc',
+      sort: 'createdAt',
+      sortOrder: 'desc',
       searchText: '',
       searchText: '',
       selectedStatusList: new Set(['all']),
       selectedStatusList: new Set(['all']),
     });
     });

+ 5 - 3
apps/app/src/server/routes/apiv3/users.js

@@ -124,6 +124,7 @@ module.exports = (crowi) => {
     registered: UserStatus.STATUS_REGISTERED,
     registered: UserStatus.STATUS_REGISTERED,
     active: UserStatus.STATUS_ACTIVE,
     active: UserStatus.STATUS_ACTIVE,
     suspended: UserStatus.STATUS_SUSPENDED,
     suspended: UserStatus.STATUS_SUSPENDED,
+    deleted: UserStatus.STATUS_DELETED,
     invited: UserStatus.STATUS_INVITED,
     invited: UserStatus.STATUS_INVITED,
   };
   };
 
 
@@ -149,7 +150,6 @@ module.exports = (crowi) => {
     query('sortOrder').isIn(['asc', 'desc']),
     query('sortOrder').isIn(['asc', 'desc']),
     // validate sort : what column you will sort
     // validate sort : what column you will sort
     query('sort').isIn([
     query('sort').isIn([
-      'id',
       'status',
       'status',
       'username',
       'username',
       'name',
       'name',
@@ -157,7 +157,7 @@ module.exports = (crowi) => {
       'createdAt',
       'createdAt',
       'lastLoginAt',
       'lastLoginAt',
     ]),
     ]),
-    query('page').isInt({ min: 1 }),
+    query('page').isInt({ min: 1 }).toInt(),
     query('forceIncludeAttributes')
     query('forceIncludeAttributes')
       .toArray()
       .toArray()
       .custom((value, { req }) => {
       .custom((value, { req }) => {
@@ -317,7 +317,7 @@ module.exports = (crowi) => {
     validator.statusList,
     validator.statusList,
     apiV3FormValidator,
     apiV3FormValidator,
     async (req, res) => {
     async (req, res) => {
-      const page = parseInt(req.query.page) || 1;
+      const page = req.query.page || 1;
 
 
       // status
       // status
       const forceIncludeAttributes = Array.isArray(
       const forceIncludeAttributes = Array.isArray(
@@ -340,6 +340,8 @@ module.exports = (crowi) => {
       const { sort, sortOrder } = req.query;
       const { sort, sortOrder } = req.query;
       const sortOutput = {
       const sortOutput = {
         [sort]: sortOrder === 'desc' ? -1 : 1,
         [sort]: sortOrder === 'desc' ? -1 : 1,
+        // tiebreaker: ensure stable pagination when the primary sort key has duplicate values
+        _id: 1,
       };
       };
 
 
       //  For more information about the external specification of the User API, see here (https://dev.growi.org/5fd7466a31d89500488248e3)
       //  For more information about the external specification of the User API, see here (https://dev.growi.org/5fd7466a31d89500488248e3)

+ 0 - 54
apps/app/src/server/service/file-uploader/utils/security.ts

@@ -46,57 +46,3 @@ export const defaultContentDispositionSettings: Record<
   'application/x-rar-compressed': 'attachment',
   'application/x-rar-compressed': 'attachment',
   'text/csv': 'attachment',
   'text/csv': 'attachment',
 };
 };
-
-export const strictMimeTypeSettings: Record<string, 'inline' | 'attachment'> = {
-  // Documents
-  'application/pdf': 'attachment',
-  'application/json': 'attachment',
-  'text/plain': 'attachment',
-  'text/csv': 'attachment',
-  'text/html': 'attachment',
-
-  // Images
-  'image/jpeg': 'attachment',
-  'image/png': 'attachment',
-  'image/gif': 'attachment',
-  'image/webp': 'attachment',
-  'image/svg+xml': 'attachment',
-
-  // Audio and Video
-  'audio/mpeg': 'attachment',
-  'video/mp4': 'attachment',
-  'video/webm': 'attachment',
-
-  // Fonts
-  'font/woff2': 'attachment',
-  'font/woff': 'attachment',
-  'font/ttf': 'attachment',
-  'font/otf': 'attachment',
-};
-
-export const laxMimeTypeSettings: Record<string, 'inline' | 'attachment'> = {
-  // Documents
-  'application/pdf': 'inline',
-  'application/json': 'inline',
-  'text/plain': 'inline',
-  'text/csv': 'inline',
-  'text/html': 'attachment',
-
-  // Images
-  'image/jpeg': 'inline',
-  'image/png': 'inline',
-  'image/gif': 'inline',
-  'image/webp': 'inline',
-  'image/svg+xml': 'attachment',
-
-  // Audio and Video
-  'audio/mpeg': 'inline',
-  'video/mp4': 'inline',
-  'video/webm': 'inline',
-
-  // Fonts
-  'font/woff2': 'inline',
-  'font/woff': 'inline',
-  'font/ttf': 'inline',
-  'font/otf': 'inline',
-};

+ 1 - 1
package.json

@@ -55,7 +55,7 @@
     "@types/css-modules": "^1.0.2",
     "@types/css-modules": "^1.0.2",
     "@types/estree": "^1.0.1",
     "@types/estree": "^1.0.1",
     "@types/glob": "^8.1.0",
     "@types/glob": "^8.1.0",
-    "@types/node": "^20.18.3",
+    "@types/node": "^24.0.0",
     "@typescript/native-preview": "7.0.0-dev.20260114.1",
     "@typescript/native-preview": "7.0.0-dev.20260114.1",
     "@vitejs/plugin-react": "^4.3.1",
     "@vitejs/plugin-react": "^4.3.1",
     "@vitest/coverage-v8": "^2.1.1",
     "@vitest/coverage-v8": "^2.1.1",

+ 0 - 6
packages/core/CHANGELOG.md

@@ -1,11 +1,5 @@
 # @growi/core
 # @growi/core
 
 
-## 2.2.0
-
-### Minor Changes
-
-- [#10889](https://github.com/growilabs/growi/pull/10889) [`d4be7e6`](https://github.com/growilabs/growi/commit/d4be7e68c497f168a5e39688ce0ef3760a62c98f) Thanks [@yuki-takei](https://github.com/yuki-takei)! - add YJS_WEBSOCKET_BASE_PATH
-
 ## 2.1.0
 ## 2.1.0
 
 
 ### Minor Changes
 ### Minor Changes

+ 5 - 1
packages/core/package.json

@@ -1,8 +1,12 @@
 {
 {
   "name": "@growi/core",
   "name": "@growi/core",
-  "version": "2.2.0",
+  "version": "2.1.0",
   "description": "GROWI Core Libraries",
   "description": "GROWI Core Libraries",
   "license": "MIT",
   "license": "MIT",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/growilabs/growi"
+  },
   "keywords": [
   "keywords": [
     "growi"
     "growi"
   ],
   ],

+ 0 - 1
packages/editor/package.json

@@ -57,7 +57,6 @@
     "codemirror": "^6.0.1",
     "codemirror": "^6.0.1",
     "csv-to-markdown-table": "^1.4.1",
     "csv-to-markdown-table": "^1.4.1",
     "emoji-mart": "^5.6.0",
     "emoji-mart": "^5.6.0",
-    "eslint-plugin-react-refresh": "^0.4.1",
     "i18next": "^23.16.5",
     "i18next": "^23.16.5",
     "lib0": "^0.2.94",
     "lib0": "^0.2.94",
     "markdown-table": "^3.0.3",
     "markdown-table": "^3.0.3",

+ 0 - 7
packages/pluginkit/CHANGELOG.md

@@ -1,12 +1,5 @@
 # @growi/pluginkit
 # @growi/pluginkit
 
 
-## 1.2.2
-
-### Patch Changes
-
-- Updated dependencies [[`d4be7e6`](https://github.com/growilabs/growi/commit/d4be7e68c497f168a5e39688ce0ef3760a62c98f)]:
-  - @growi/core@2.2.0
-
 ## 1.2.1
 ## 1.2.1
 
 
 ### Patch Changes
 ### Patch Changes

+ 5 - 1
packages/pluginkit/package.json

@@ -1,8 +1,12 @@
 {
 {
   "name": "@growi/pluginkit",
   "name": "@growi/pluginkit",
-  "version": "1.2.2",
+  "version": "1.2.1",
   "description": "Plugin kit for GROWI",
   "description": "Plugin kit for GROWI",
   "license": "MIT",
   "license": "MIT",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/growilabs/growi"
+  },
   "main": "dist/index.cjs",
   "main": "dist/index.cjs",
   "module": "dist/index.js",
   "module": "dist/index.js",
   "types": "dist/index.d.ts",
   "types": "dist/index.d.ts",

Разница между файлами не показана из-за своего большого размера
+ 86 - 377
pnpm-lock.yaml


Некоторые файлы не были показаны из-за большого количества измененных файлов