Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Remove expired deprecations and update development tooling https://github.com/siyuan-note/siyuan/issues/20605

Daniel01e734ca6ce1
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000000..712f9456de
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,25 @@
+version: 2
+updates:
+ - package-ecosystem: npm
+ directory: /app
+ schedule:
+ interval: weekly
+ target-branch: dev
+ open-pull-requests-limit: 5
+ groups:
+ typescript-eslint:
+ patterns:
+ - "@typescript-eslint/*"
+ eslint:
+ patterns:
+ - eslint
+ - "@eslint/*"
+ ignore:
+ - dependency-name: "@types/node"
+ update-types: [version-update:semver-major]
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: weekly
+ target-branch: dev
+ open-pull-requests-limit: 5
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index a696d101c8..100a8863d5 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -180,12 +180,6 @@ jobs:
- name: Check generated contracts and route coverage
run: pnpm run api:check
working-directory: app
- - name: Check legacy coverage does not grow
- # 排除当前提交上的标签,与上一个版本比较旧接口列表。
- run: |
- API_CONTRACT_BASE=$(git describe --tags --match 'v[0-9]*' --abbrev=0 HEAD^)
- pnpm run api:check --base "$API_CONTRACT_BASE"
- working-directory: app
- name: Check application and strict contract types
run: pnpm run typecheck
working-directory: app
diff --git a/AGENTS.md b/AGENTS.md
index 3c59a84bdf..9f5c2cc488 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -131,7 +131,7 @@ Unambiguous mechanical edits with no behavioral or compatibility impact need no
- Do not automatically add newly implemented endpoints to `docs/API.md` or its localized versions (`docs/API.zh-CN.md`, `docs/API.ja.md`); add such documentation only when explicitly requested by the user. Continue maintaining API contracts, generated declarations, and required regression tests. These documentation scope rules take precedence over broader documentation instructions in the maintenance guides
- After changing an existing endpoint's request, response, or documented behavior, check its existing reference entries in `docs/API.md`, `docs/API.zh-CN.md`, and `docs/API.ja.md`. Update affected entries together; do not assume the language versions cover identical endpoints. Newly added endpoints remain documented only on request
- Preserve existing input compatibility, response variants, authorization, and encrypted notebook lease behavior; cover affected behavior with regression tests
- - Remove migrated or deleted routes from `kernel/apicontract/legacy_routes.json`; never add new routes to this legacy list or bypass contract checks with `any` or type assertions
+ - Every route must have a typed contract; remove both the registration and contract when deleting a route, and never bypass contract checks with `any` or type assertions
- After contract changes, run `pnpm run api:generate --petal ../../petal` and `pnpm run api:check --petal ../../petal` from `app/`; synchronize related public declarations in `petal` and do not hand-edit generated declarations or schemas
- Run `pnpm run lint` from `app/`, `go test ./apicontract/...` from `kernel/`, and the applicable API compatibility and route coverage tests described in the maintenance document. Verify that existing CI selections and documented commands discover new regression cases; automatic discovery or coverage by an existing full-suite command satisfies this requirement without a documentation edit. Update CI selections and documented commands only when they would otherwise miss the new tests. Report task-specific verification commands and results in the task response or PR description
diff --git a/app/electron/chromiumSwitches.test.js b/app/electron/chromiumSwitches.test.js
index 9cfb0751f3..e3cf2db59a 100644
--- a/app/electron/chromiumSwitches.test.js
+++ b/app/electron/chromiumSwitches.test.js
@@ -41,6 +41,7 @@ const startup = (args = [], {packaged = true, remote = false} = {}) => {
const context = vm.createContext({
app: {commandLine, isPackaged: packaged},
process: {argv: packaged ? ["SiYuan.exe", ...args] : ["electron.exe", "main.js", ...args]},
+ linuxInputMethodLaunchArguments: packaged ? ["SiYuan.exe", ...args] : ["electron.exe", "main.js", ...args],
appendChromiumSwitch,
remoteKernelTarget: remote ? {mode: "remote"} : undefined,
remoteKernelArgError: undefined,
diff --git a/app/electron/connectionManager.js b/app/electron/connectionManager.js
index bf89b020fc..0514ba0fff 100644
--- a/app/electron/connectionManager.js
+++ b/app/electron/connectionManager.js
@@ -206,7 +206,7 @@ const createConnectionManager = ({confDir, languageDir, restart, currentTarget,
try {
origin = normalizeRemoteKernelOrigin(data.origin);
} catch (error) {
- throw new Error(languages().remoteKernelAddressTip);
+ throw new Error(languages().remoteKernelAddressTip, {cause: error});
}
if (data.cmd === "trust") {
if (typeof data.trustRemoteExtensions !== "boolean") {
diff --git a/app/electron/main.js b/app/electron/main.js
index 1e50302931..15527b6710 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -3084,7 +3084,7 @@ const initRemoteKernel = async (target) => {
storages: remoteKernelActiveStorageTypes,
});
} catch (error) {
- throw new Error("failed to clear remote kernel active storage: " + error.message);
+ throw new Error("failed to clear remote kernel active storage: " + error.message, {cause: error});
}
writeLog("connecting to remote kernel [origin=" + target.origin + "]");
diff --git a/app/eslint.config.mjs b/app/eslint.config.mjs
index 50ea19cddd..5e52fe2f2e 100644
--- a/app/eslint.config.mjs
+++ b/app/eslint.config.mjs
@@ -38,6 +38,8 @@ export default [{
},
rules: {
+ // 条件编译保留的互斥分支会使重复赋值检查误报初始值。
+ "no-useless-assignment": "off",
semi: [2, "always"],
quotes: [2, "double", {
avoidEscape: true,
diff --git a/app/package.json b/app/package.json
index 303574b457..631a8993f0 100644
--- a/app/package.json
+++ b/app/package.json
@@ -6,6 +6,9 @@
"homepage": "https://b3log.org/siyuan",
"main": "./electron/main.js",
"packageManager": "[email protected]",
+ "engines": {
+ "node": "24.x"
+ },
"scripts": {
"lint": "pnpm run typecheck && eslint . --fix --cache && pnpm run css:check && pnpm run menu:check",
"menu:check": "node ../scripts/check-menu-owner.mjs",
@@ -62,25 +65,25 @@
"devDependencies": {
"@breezystack/lamejs": "1.2.7",
"@eslint/eslintrc": "^3.3.1",
- "@eslint/js": "^9.24.0",
- "@types/node": "^18.13.0",
+ "@eslint/js": "^10.0.0",
+ "@types/node": "^24.0.0",
"@types/zxcvbn": "4.4.5",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
+ "@typescript/native": "npm:typescript@^7.0.2",
"blueimp-md5": "^2.19.0",
- "clean-webpack-plugin": "^4.0.0",
"cross-env": "^10.1.0",
"css-loader": "^7.1.2",
"dayjs": "^1.11.5",
- "electron": "44.7.0",
+ "electron": "44.7.2",
"electron-builder": "26.15.7",
"encoding": "^0.1.13",
- "esbuild-loader": "^3.0.1",
- "eslint": "^9.15.0",
+ "esbuild-loader": "^4.5.0",
+ "eslint": "^10.12.0",
"file-loader": "^6.2.0",
"filesize": "^11.0.13",
"globals": "^15.12.0",
- "html-loader": "^2.1.2",
+ "html-loader": "^5.1.0",
"html-webpack-plugin": "^5.5.0",
"iconv-lite": "^0.6.3",
"ifdef-loader": "^2.3.2",
@@ -95,11 +98,11 @@
"sharp": "^0.35.3",
"stylelint": "^17.16.0",
"tsx": "^4.22.4",
- "typescript": "^4.9.5",
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
"unzipper": "0.12.5",
"webpack": "^5.104.1",
"webpack-bundle-analyzer": "^4.5.0",
- "webpack-cli": "^4.10.0"
+ "webpack-cli": "^7.2.3"
},
"dependencies": {
"@electron/remote": "^2.1.3",
diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml
index 5917aa53bf..0957fa4cd1 100644
--- a/app/pnpm-lock.yaml
+++ b/app/pnpm-lock.yaml
@@ -171,7 +171,7 @@ importers:
dependencies:
'@electron/remote':
specifier: ^2.1.3
zxcvbn:
specifier: 4.4.2
version: 4.4.2
@@ -183,26 +183,26 @@ importers:
specifier: ^3.3.1
version: 3.3.5([email protected])
'@eslint/js':
- specifier: ^9.24.0
- version: 9.39.4
+ specifier: ^10.0.0
'@types/node':
- specifier: ^18.13.0
- version: 18.13.0
+ specifier: ^24.0.0
+ version: 24.12.3
'@types/zxcvbn':
specifier: 4.4.5
version: 4.4.5
'@typescript-eslint/eslint-plugin':
specifier: ^8.15.0
'@typescript-eslint/parser':
specifier: ^8.15.0
+ '@typescript/native':
+ specifier: npm:typescript@^7.0.2
blueimp-md5:
specifier: ^2.19.0
version: 2.19.0
- clean-webpack-plugin:
- specifier: ^4.0.0
- version: 4.0.0([email protected])
cross-env:
specifier: ^10.1.0
version: 10.1.0
@@ -213,8 +213,8 @@ importers:
specifier: ^1.11.5
version: 1.11.20
electron:
- specifier: 44.7.0
- version: 44.7.0([email protected])
+ specifier: 44.7.2
+ version: 44.7.2([email protected])
electron-builder:
specifier: 26.15.7
@@ -222,11 +222,11 @@ importers:
specifier: ^0.1.13
version: 0.1.13
esbuild-loader:
- specifier: ^3.0.1
- version: 3.0.1([email protected])
+ specifier: ^4.5.0
+ version: 4.5.0([email protected])
eslint:
- specifier: ^9.15.0
+ specifier: ^10.12.0
file-loader:
specifier: ^6.2.0
version: 6.2.0([email protected])
@@ -237,8 +237,8 @@ importers:
specifier: ^15.12.0
version: 15.12.0
html-loader:
- specifier: ^2.1.2
- version: 2.1.2([email protected])
+ specifier: ^5.1.0
+ version: 5.1.0([email protected])
html-webpack-plugin:
specifier: ^5.5.0
version: 5.6.7([email protected])
@@ -274,28 +274,28 @@ importers:
sharp:
specifier: ^0.35.3
- version: 0.35.3(@types/[email protected])
+ version: 0.35.3(@types/[email protected])
stylelint:
specifier: ^17.16.0
+ version: 17.16.0(@typescript/[email protected])([email protected])
tsx:
specifier: ^4.22.4
version: 4.22.4
typescript:
- specifier: ^4.9.5
- version: 4.9.5
+ specifier: npm:@typescript/typescript6@^6.0.2
+ version: '@typescript/[email protected]'
unzipper:
specifier: 0.12.5
version: 0.12.5
webpack:
specifier: ^5.104.1
webpack-bundle-analyzer:
specifier: ^4.5.0
version: 4.5.0
webpack-cli:
- specifier: ^4.10.0
+ specifier: ^7.2.3
packages:
@@ -360,9 +360,9 @@ packages:
peerDependencies:
postcss-selector-parser: ^7.1.1
- '@discoveryjs/[email protected]':
- resolution: {integrity: sha512-gX9Hx+2BMP5+yXfr4Agb+iBd9YiI729x38wbhfvRSkxQqfXnJUNy1nnyJWetYCvxnL1caWd1HqJnbQwVrgvgeA==}
- engines: {node: '>=10.0.0'}
+ '@discoveryjs/[email protected]':
+ resolution: {integrity: sha512-Xc3VhU02wqZ1HvHRJUwL09HkZSTvidqY5Ya0NXBSYOxAp+Ln9dcJr9fySI+CkONzP3PekQo9WdzCv0PGER/mOA==}
+ engines: {node: '>=14.17.0'}
'@electron-internal/[email protected]':
resolution: {integrity: sha512-OjKpjB7gohtEjZiq6nDx1egqjZJhGPN1iFOIED+NFhB/MMkXw/XRcHjh1DGXKT5z2W9eW7Jy2UKU3gpjvusFTQ==}
@@ -421,192 +421,96 @@ packages:
cpu: [ppc64]
os: [aix]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-YnYSCceN/dUzUr5kdtUzB+wZprCafuD89Hs0Aqv9QSdwhYQybhXTaSTcrl6X/aWThn1a/j0eEpUBGOE7269REg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-bSC9YVUjADDy1gae8RrioINU6e1lCkg3VGVwm0QQ2E1CWcC4gnMce9+B6RpxuSsrsXsk1yojn7sp1fnG8erE2g==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==}
engines: {node: '>=18'}
cpu: [arm]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-MVcYcgSO7pfu/x34uX9u2QIZHmXAB7dEiLQC5bBl5Ryqtpj9lT2sg3gNDEsrPEmimSJW2FXIaxqSQ501YLDsZQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==}
engines: {node: '>=18'}
cpu: [x64]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-bsDRvlbKMQMt6Wl08nHtFz++yoZHsyTOxnjfB2Q95gato+Yi4WnRl13oC2/PJJA9yLCoRv9gqT/EYX0/zDsyMA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [darwin]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==}
engines: {node: '>=18'}
cpu: [arm64]
os: [darwin]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-xh2A5oPrYRfMFz74QXIQTQo8uA+hYzGWJFoeTE8EvoZGHb+idyV4ATaukaUvnnxJiauhs/fPx3vYhU4wiGfosg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [darwin]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [darwin]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-EnUwjRc1inT4ccZh4pB3v1cIhohE2S4YXlt1OvI7sw/+pD+dIE4smwekZlEPIwY6PhU6oDWwITrQQm5S2/iZgg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [freebsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==}
engines: {node: '>=18'}
cpu: [arm64]
os: [freebsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-Uh3HLWGzH6FwpviUcLMKPCbZUAFzv67Wj5MTwK6jn89b576SR2IbEp+tqUHTr8DIl0iDmBAf51MVaP7pw6PY5Q==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [freebsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [freebsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-bUR58IFOMJX523aDVozswnlp5yry7+0cRLCXDsxnUeQYJik1DukMY+apBsLOZJblpH+K7ox7YrKrHmJoWqVR9w==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==}
engines: {node: '>=18'}
cpu: [arm64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-7YdGiurNt7lqO0Bf/U9/arrPWPqdPqcV6JCZda4LZgEn+PTQ5SMEI4MGR52Bfn3+d6bNEGcWFzlIxiQdS48YUw==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==}
engines: {node: '>=18'}
cpu: [arm]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-ujp8uoQCM9FRcbDfkqECoARsLnLfCUhKARTP56TFPog8ie9JG83D5GVKjQ6yVrEVdMie1djH86fm98eY3quQkQ==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==}
engines: {node: '>=18'}
cpu: [ia32]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-y2NX1+X/Nt+izj9bLoiaYB9YXT/LoaQFYvCkVD77G/4F+/yuVXYCWz4SE9yr5CBMbOxOfBcy/xFL4LlOeNlzYQ==}
- engines: {node: '>=12'}
- cpu: [loong64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==}
engines: {node: '>=18'}
cpu: [loong64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-09AXKB1HDOzXD+j3FdXCiL/MWmZP0Ex9eR8DLMBVcHorrWJxWmY8Nms2Nm41iRM64WVx7bA/JVHMv081iP2kUA==}
- engines: {node: '>=12'}
- cpu: [mips64el]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==}
engines: {node: '>=18'}
cpu: [mips64el]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-AmLhMzkM8JuqTIOhxnX4ubh0XWJIznEynRnZAVdA2mMKE6FAfwT2TWKTwdqMG+qEaeyDPtfNoZRpJbD4ZBv0Tg==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==}
engines: {node: '>=18'}
cpu: [ppc64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-Y4Ri62PfavhLQhFbqucysHOmRamlTVK10zPWlqjNbj2XMea+BOs4w6ASKwQwAiqf9ZqcY9Ab7NOU4wIgpxwoSQ==}
- engines: {node: '>=12'}
- cpu: [riscv64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==}
engines: {node: '>=18'}
cpu: [riscv64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-SPUiz4fDbnNEm3JSdUW8pBJ/vkop3M1YwZAVwvdwlFLoJwKEZ9L98l3tzeyMzq27CyepDQ3Qgoba44StgbiN5Q==}
- engines: {node: '>=12'}
- cpu: [s390x]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==}
engines: {node: '>=18'}
cpu: [s390x]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-a3yHLmOodHrzuNgdpB7peFGPx1iJ2x6m+uDvhP2CKdr2CwOaqEFMeSqYAHU7hG+RjCq8r2NFujcd/YsEsFgTGw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==}
engines: {node: '>=18'}
@@ -619,12 +523,6 @@ packages:
cpu: [arm64]
os: [netbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-EanJqcU/4uZIBreTrnbnre2DXgXSa+Gjap7ifRfllpmyAU7YMvaXmljdArptTHmjrkkKm9BK6GH5D5Yo+p6y5A==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [netbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==}
engines: {node: '>=18'}
@@ -637,12 +535,6 @@ packages:
cpu: [arm64]
os: [openbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-xaxeSunhQRsTNGFanoOkkLtnmMn5QbA0qBhNet/XLVsc+OVkpIWPHcr3zTW2gxVU5YOHFbIHR9ODuaUdNza2Vw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [openbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==}
engines: {node: '>=18'}
@@ -655,48 +547,24 @@ packages:
cpu: [arm64]
os: [openharmony]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-gnMnMPg5pfMkZvhHee21KbKdc6W3GR8/JuE0Da1kjwpK6oiFU3nqfHuVPgUX2rsOx9N2SadSQTIYV1CIjYG+xw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [sunos]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [sunos]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-G95n7vP1UnGJPsVdKXllAJPtqjMvFYbN20e8RK8LVLhlTiSOH1sd7+Gt7rm70xiG+I5tM58nYgwWrLs6I1jHqg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==}
engines: {node: '>=18'}
cpu: [arm64]
os: [win32]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-96yEFzLhq5bv9jJo5JhTs1gI+1cKQ83cUpyxHuGqXVwQtY5Eq54ZEsKs8veKtiKwlrNimtckHEkj4mRh4pPjsg==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==}
engines: {node: '>=18'}
cpu: [ia32]
os: [win32]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-n6d8MOyUrNp6G4VSpRcgjs5xj4A91svJSaiwLIDWVWEsZtpN5FA9NlBbZHDmAJc2e8e6SF4tkBD3HAvPF+7igA==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==}
engines: {node: '>=18'}
@@ -713,33 +581,38 @@ packages:
resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
'@eslint/[email protected]':
resolution: {integrity: sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
+ peerDependencies:
+ eslint: ^10.0.0
+ peerDependenciesMeta:
+ eslint:
+ optional: true
- '@eslint/[email protected]':
- resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
'@humanfs/[email protected]':
resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==}
@@ -923,10 +796,6 @@ packages:
cpu: [x64]
os: [win32]
- '@isaacs/[email protected]':
- resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
- engines: {node: '>=12'}
-
'@isaacs/[email protected]':
resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==}
engines: {node: '>=18.0.0'}
@@ -1086,10 +955,6 @@ packages:
resolution: {integrity: sha512-ODOov0sGMJMf3jPonOkgGqPknTsu+DdQ7kD++gz8aI+aFMOMHFbWAA2taqXXVTdP+OTOQR/znGvSpmkeI0WTYQ==}
engines: {node: '>=14.18.0'}
- '@pkgjs/[email protected]':
- resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
- engines: {node: '>=14'}
-
resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==}
@@ -1113,15 +978,15 @@ packages:
resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==}
+
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==}
- '@types/[email protected]':
- resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==}
-
resolution: {integrity: sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==}
@@ -1131,16 +996,9 @@ packages:
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
- '@types/[email protected]':
- resolution: {integrity: sha512-zmPitbQ8+6zNutpwgcQuLcsEpn/Cj54Kbn7L5pX0Os5kdWplB7xPgEh/g+SWOB/qmows2gpuCaPyduq8ZZRnxA==}
- deprecated: This is a stub types definition. minimatch provides its own type definitions, so you do not need this installed.
-
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
- '@types/[email protected]':
- resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==}
-
resolution: {integrity: sha512-8oljBDGun9cIsZRJR6fkihn0TSXJI0UDOOhncYaERq6M0JMDoPLxyscwruJcb4GKS6dvK/d8xebYBg27h/duaQ==}
@@ -1206,6 +1064,130 @@ packages:
resolution: {integrity: sha512-NwjLUnGy8/Zfx23fl50tRC8rYaYnM52xNRYFAXvmiil9yh1+K6aRVQMnzW6gQB/1DLgWt977lYQn7C+wtgXZiA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [ppc64]
+ os: [aix]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [darwin]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [freebsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [loong64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [mips64el]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [ppc64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [riscv64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==}
+ engines: {node: '>=16.20.0'}
+ cpu: [s390x]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [netbsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [netbsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [openbsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [openbsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [sunos]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [win32]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==}
+ hasBin: true
+
'@webassemblyjs/[email protected]':
resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==}
@@ -1251,26 +1233,6 @@ packages:
'@webassemblyjs/[email protected]':
resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==}
- '@webpack-cli/[email protected]':
- resolution: {integrity: sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==}
- peerDependencies:
- webpack: 4.x.x || 5.x.x
- webpack-cli: 4.x.x
-
- '@webpack-cli/[email protected]':
- resolution: {integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==}
- peerDependencies:
- webpack-cli: 4.x.x
-
- '@webpack-cli/[email protected]':
- resolution: {integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==}
- peerDependencies:
- webpack-cli: 4.x.x
- webpack-dev-server: '*'
- peerDependenciesMeta:
- webpack-dev-server:
- optional: true
-
'@xmldom/[email protected]':
resolution: {integrity: sha512-KRYzxepc14G/CEpEGc3Yn+JKaAeT63smlDr+vjB8jRfgTBBI9wRj/nkQEO+ucV8p8I9bfKLWp37uHgFrbntPvw==}
engines: {node: '>=10.0.0'}
@@ -1349,10 +1311,6 @@ packages:
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
engines: {node: '>=8'}
- resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==}
- engines: {node: '>=12'}
-
resolution: {integrity: sha512-C7APoYISPExUmrEntNhDpz9Tccb4uWuEDfLaC0WPPc7/pwzz0WZGznCz/ycPfkkzw6tKOalceD8g6TgHmVz1QA==}
engines: {node: '>=14.0.0'}
@@ -1363,14 +1321,6 @@ packages:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
- resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==}
- engines: {node: '>=0.10.0'}
-
- resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==}
- engines: {node: '>=0.10.0'}
-
resolution: {integrity: sha512-S2s3aOytiKdFRdulw2qPE51MzjzVOisppcVv7jVFR+Kw0kxwvFrDcYA0h7Ndqbmj0HkMIXYWaoj7fli8kgx1eg==}
engines: {node: '>=12.0.0'}
@@ -1517,20 +1467,10 @@ packages:
resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==}
engines: {node: '>=8'}
- resolution: {integrity: sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==}
- engines: {node: '>= 4.0'}
-
resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==}
engines: {node: '>= 10.0'}
- resolution: {integrity: sha512-WuWE1nyTNAyW5T7oNyys2EN0cfP2fdRxhxnIQWiAp0bMabPdHhoGxM8A6YL2GhqwgrPnnaemVE7nv5XJ2Fhh2w==}
- engines: {node: '>=10.0.0'}
- peerDependencies:
- webpack: '>=4.0.0 <6.0.0'
-
resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
engines: {node: '>=12'}
@@ -1549,28 +1489,25 @@ packages:
resolution: {integrity: sha512-AidJptpBJmjTclAp9BkLwJi0T93fo5epJnbaZslpg6QVzpHjAiveF55mE9AcUJiGMqRHgMDY8soMsQtuNYMHfw==}
- resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
-
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
+ resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
+ engines: {node: '>=14'}
+
+ resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==}
+ engines: {node: '>=20'}
+
resolution: {integrity: sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==}
- resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
- engines: {node: '>= 6'}
-
resolution: {integrity: sha512-JrDGPAKjMGSP1G0DUoaceEJ3DZgAfr/q6X7FVk4+U5KxUSKviYGM2k6zWkfyyBHy5rAtzgYJFa1ro2O9PtoxwQ==}
engines: {node: '>= 6'}
- resolution: {integrity: sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA==}
- engines: {node: '>= 10'}
-
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
engines: {node: '>= 10'}
@@ -1673,10 +1610,6 @@ packages:
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
engines: {node: '>= 0.4'}
- resolution: {integrity: sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==}
- engines: {node: '>=6'}
-
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
@@ -1746,9 +1679,6 @@ packages:
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
- resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
-
resolution: {integrity: sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==}
engines: {node: '>=0.10.0'}
@@ -1772,17 +1702,14 @@ packages:
resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==}
engines: {node: '>=8.0.0'}
- resolution: {integrity: sha512-aUq9/zLAAFYc+a9gy6cd0C3Y/N/RmovLCD8TV8LhIzNhuND6HEgsu96jJz9cbAxvckSPv+Trf2PKEjktoZgFkw==}
+ resolution: {integrity: sha512-u3Pbz0Hi1sSSwBMz2v8LiagsfUG4QURPUe/qphM+g4THKP8o4BYdnuboyhlLO8HIC/KfV5rvltyacbP4jEq9yw==}
engines: {node: '>= 22.12.0'}
hasBin: true
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
- resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
-
resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==}
engines: {node: '>= 4'}
@@ -1797,6 +1724,14 @@ packages:
resolution: {integrity: sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==}
+ resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
+ engines: {node: '>=0.12'}
+
+ resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==}
+ engines: {node: '>=0.12'}
+
resolution: {integrity: sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==}
engines: {node: '>=6'}
@@ -1842,16 +1777,11 @@ packages:
resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==}
- resolution: {integrity: sha512-aZfGybqTeuyCd4AsVvWOOfkhIuN+wfZFjMyh3gyQEU1Uvsl8L6vye9HqP93iRa0iTA+6Jclap514PJIC3cLnMA==}
+ resolution: {integrity: sha512-rVYe97IN1+VoealVHQ3STEPbfTm+vvPk7AZPrL53Pt6JUGBhHTnIqyaow7EveMFlmQ2A1bLp7q19sP4PppaCDQ==}
peerDependencies:
webpack: ^4.40.0 || ^5.0.0
- resolution: {integrity: sha512-TKFRp9TxrJDdRWfSsSERKEovm6v30iHnrjlcGhLBOtReE28Yp1VSBRfO3GTaOFMoxsNerx4TjrhzSuma9ha83Q==}
- engines: {node: '>=12'}
- hasBin: true
-
resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==}
engines: {node: '>=18'}
@@ -1869,9 +1799,9 @@ packages:
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
engines: {node: '>=8.0.0'}
- resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
@@ -1881,18 +1811,13 @@ packages:
resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==}
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
- resolution: {integrity: sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.
+ resolution: {integrity: sha512-npHjrHb2o4ehH3mE+YuxABR+0gyb0aVWCIolgJDArwCiHEIsonBm3ZKjel5b0U5+a+MbEvIyRCGCzD3eKKK2NA==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
hasBin: true
peerDependencies:
jiti: '*'
@@ -1904,9 +1829,9 @@ packages:
resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=24}
resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==}
@@ -1970,10 +1895,6 @@ packages:
resolution: {integrity: sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==}
- resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==}
- engines: {node: '>=16.0.0'}
-
resolution: {integrity: sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==}
engines: {node: '>= 10.13.0'}
@@ -1999,10 +1920,6 @@ packages:
resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-EryKbCE/wxpxKniQlyas6PY1I9vwtF3uCBweX+N8KYTCn3Y12RTGtQAJ/bd5pl7kxUAc8v/R3Ake/N17OZiFqA==}
- engines: {node: '>=16'}
-
resolution: {integrity: sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==}
@@ -2013,10 +1930,6 @@ packages:
resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==}
- resolution: {integrity: sha512-lXeSPRCndWPaipZbtI4CkvTZpF6OPsy19dkvf7+5AHeJD+w+iAKPc9Q78xWBmX4SdR+8xrtY9jTXs/YDv8q+Ug==}
- engines: {node: '>=14'}
-
resolution: {integrity: sha512-G6NsmEW15s0Uw9XnCg+33H3ViYRyiM0hMrMhhqQOR8NFc5GhYrI+6I3u7OTw7b91J2g8rtvMBZJDbcGb2YUniw==}
engines: {node: '>= 18'}
@@ -2090,11 +2003,6 @@ packages:
resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
- resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==}
- deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
- hasBin: true
-
resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==}
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
@@ -2127,10 +2035,6 @@ packages:
resolution: {integrity: sha512-c8B/VNLmxRcmqqenRA9t+9IyOjf9+V6lTxPaUJLqOCONdQkWZ0ETYgX0qbtJqPsgCNusT9MZ5Jeidw8Eb9tn2g==}
engines: {node: '>=20'}
- resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==}
- engines: {node: '>=0.10.0'}
-
resolution: {integrity: sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==}
@@ -2172,10 +2076,6 @@ packages:
resolution: {integrity: sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==}
engines: {node: '>=20'}
- resolution: {integrity: sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==}
- engines: {node: '>= 0.4'}
-
resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==}
engines: {node: '>= 0.4'}
@@ -2194,22 +2094,22 @@ packages:
resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-XB4O1+6mpLp4qy/3qg5+1QPZ/uXvWtO64hNAX87sKHwcHkp1LJGU7V3sJ9iVmRACElAZXQ4YOO/Lbkx5kYfl9A==}
- engines: {node: '>= 10.13.0'}
+ resolution: {integrity: sha512-Jb3xwDbsm0W3qlXrCZwcYqYGnYz55hb6aoKQTlzyZPXsPpi6tHXzAfqalecglMQgNvtEfxrCQPaKT90Irt5XDA==}
+ engines: {node: '>= 18.12.0'}
peerDependencies:
webpack: ^5.0.0
- resolution: {integrity: sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==}
- engines: {node: '>=6'}
- hasBin: true
-
resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==}
engines: {node: '>=12'}
hasBin: true
+ resolution: {integrity: sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==}
+ engines: {node: ^14.13.1 || >=16.0.0}
+ hasBin: true
+
resolution: {integrity: sha512-n6l5uca7/y5joxZ3LUePhzmBFUJ+U2YWzhMa8XUTecSeSlQiZdF5XAd/Q3/WUl0VsXgUwWi8I7CNIwdI5WN1SQ==}
engines: {node: '>=20.10'}
@@ -2302,9 +2202,9 @@ packages:
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
- resolution: {integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==}
- engines: {node: '>= 0.10'}
+ resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==}
+ engines: {node: '>=10.13.0'}
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
@@ -2329,18 +2229,6 @@ packages:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
- resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==}
- engines: {node: '>=6'}
-
- resolution: {integrity: sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==}
- engines: {node: '>=6'}
-
- resolution: {integrity: sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==}
- engines: {node: '>=6'}
-
resolution: {integrity: sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==}
engines: {node: '>=12'}
@@ -2379,10 +2267,6 @@ packages:
resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==}
engines: {node: '>=0.10.0'}
- resolution: {integrity: sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==}
- engines: {node: '>=14'}
-
resolution: {integrity: sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==}
engines: {node: '>=10'}
@@ -2407,9 +2291,6 @@ packages:
resolution: {integrity: sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==}
hasBin: true
- resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
-
resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==}
@@ -2440,9 +2321,6 @@ packages:
resolution: {integrity: sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==}
- resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
-
resolution: {integrity: sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==}
@@ -2480,9 +2358,6 @@ packages:
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
-
resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==}
@@ -2496,10 +2371,6 @@ packages:
resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
- resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==}
- engines: {node: 14 || >=16.14}
-
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
engines: {node: '>=10'}
@@ -2648,10 +2519,6 @@ packages:
resolution: {integrity: sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==}
- resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
- engines: {node: '>=0.10.0'}
-
resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==}
engines: {node: '>= 0.4'}
@@ -2675,10 +2542,6 @@ packages:
resolution: {integrity: sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==}
engines: {node: '>=6'}
- resolution: {integrity: sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==}
- engines: {node: '>=10'}
-
resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
engines: {node: '>=10'}
@@ -2691,17 +2554,10 @@ packages:
resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==}
- engines: {node: '>=6'}
-
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
engines: {node: '>=6'}
- resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
-
resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==}
@@ -2713,8 +2569,8 @@ packages:
resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
engines: {node: '>=8'}
- resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==}
+ resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==}
resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==}
@@ -2730,9 +2586,6 @@ packages:
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
engines: {node: '>=0.10.0'}
- resolution: {integrity: sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==}
-
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
@@ -2740,10 +2593,6 @@ packages:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
- resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
- engines: {node: '>=16 || 14 >=14.18'}
-
resolution: {integrity: sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==}
engines: {node: '>=12', npm: '>=6'}
@@ -2759,22 +2608,6 @@ packages:
resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==}
engines: {node: '>=12'}
- resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
- engines: {node: '>=0.10.0'}
-
- resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
- engines: {node: '>=6'}
-
- resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==}
- engines: {node: '>=0.10.0'}
-
- resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==}
- engines: {node: '>=0.10.0'}
-
resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==}
engines: {node: '>=8'}
@@ -2901,9 +2734,9 @@ packages:
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
engines: {node: '>= 14.18.0'}
- resolution: {integrity: sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==}
- engines: {node: '>= 0.10'}
+ resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==}
+ engines: {node: '>= 10.13.0'}
resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==}
@@ -2964,11 +2797,6 @@ packages:
deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
- resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==}
- engines: {node: '>=14'}
- hasBin: true
-
resolution: {integrity: sha512-AEjYvmAhlyxOeB9OqPUzQCo3kuAkNfuDk/HqWbZdFsqDFpapkTjiw+p4svNEoRLvuqNTxqfL+s+gtD4eDgZ+CA==}
engines: {node: '>=8.0'}
@@ -3093,9 +2921,6 @@ packages:
resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==}
-
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
@@ -3126,10 +2951,6 @@ packages:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
- resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
- engines: {node: '>=12'}
-
resolution: {integrity: sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==}
engines: {node: '>=20'}
@@ -3247,11 +3068,6 @@ packages:
uglify-js:
optional: true
- resolution: {integrity: sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==}
- engines: {node: '>=6.0.0'}
- hasBin: true
-
resolution: {integrity: sha512-tPbLXTI6ohPASb/1YViL428oEHu6/qv1OxqYnfaonVCFHqx4+wCd95pHrQWsL5X4pl90CTyW9piSAsS2L0VoMw==}
engines: {node: '>=10'}
@@ -3308,9 +3124,14 @@ packages:
resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==}
engines: {node: '>=16'}
- resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
- engines: {node: '>=4.2.0'}
+ resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==}
+ engines: {node: '>=14.17'}
+ hasBin: true
+
+ resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==}
+ engines: {node: '>=16.20.0'}
hasBin: true
@@ -3369,32 +3190,32 @@ packages:
engines: {node: '>= 10.13.0'}
hasBin: true
- resolution: {integrity: sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==}
- engines: {node: '>=10.13.0'}
+ resolution: {integrity: sha512-vDFU7jrfCctnN7jJQWPl+V26B51GLp11prVZXg50oeonsgeBzSTJEWmXkjHsOjTgMjlPOQM8GWLh33X9RN/0ow==}
+ engines: {node: '>=20.9.0'}
hasBin: true
peerDependencies:
- '@webpack-cli/generators': '*'
- '@webpack-cli/migrate': '*'
- webpack: 4.x.x || 5.x.x
- webpack-bundle-analyzer: '*'
- webpack-dev-server: '*'
+ js-yaml: ^4.0.0 || ^5.0.0
+ json5: ^2.2.3
+ toml: ^3.0.0 || ^4.0.0 || ^5.0.0
+ webpack: ^5.101.0
+ webpack-bundle-analyzer: ^4.0.0 || ^5.0.0
+ webpack-dev-server: ^5.0.0 || ^6.0.0
peerDependenciesMeta:
- '@webpack-cli/generators':
+ js-yaml:
+ optional: true
+ json5:
optional: true
- '@webpack-cli/migrate':
+ toml:
optional: true
webpack-bundle-analyzer:
optional: true
webpack-dev-server:
optional: true
- resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==}
- engines: {node: '>=10.0.0'}
-
- resolution: {integrity: sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==}
+ resolution: {integrity: sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==}
+ engines: {node: '>=18.0.0'}
resolution: {integrity: sha512-eACpxRN02yaawnt+uUNIF7Qje6A9zArxBbcAJjK1PK3S9Ycg5jIuJ8pW4q8EMnwNZCEGltcjkRx1QzOxOkKD8A==}
@@ -3440,10 +3261,6 @@ packages:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
- engines: {node: '>=12'}
-
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
@@ -3545,7 +3362,7 @@ snapshots:
dependencies:
postcss-selector-parser: 7.1.6
- '@discoveryjs/[email protected]': {}
+ '@discoveryjs/[email protected]': {}
'@electron-internal/[email protected]': {}
@@ -3605,9 +3422,9 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
- electron: 44.7.0([email protected])
+ electron: 44.7.2([email protected])
dependencies:
@@ -3642,167 +3459,101 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
dependencies:
eslint-visitor-keys: 3.4.3
'@eslint-community/[email protected]': {}
dependencies:
- '@eslint/object-schema': 2.1.7
+ '@eslint/object-schema': 3.0.5
debug: 4.4.3([email protected])
- minimatch: 3.1.5
+ minimatch: 10.2.5
transitivePeerDependencies:
- supports-color
- '@eslint/[email protected]':
+ '@eslint/[email protected]':
dependencies:
- '@eslint/core': 0.17.0
+ '@eslint/core': 1.2.1
- '@eslint/[email protected]':
+ '@eslint/[email protected]':
dependencies:
'@types/json-schema': 7.0.15
@@ -3820,13 +3571,15 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@eslint/[email protected]': {}
+ optionalDependencies:
- '@eslint/[email protected]': {}
+ '@eslint/[email protected]': {}
- '@eslint/[email protected]':
+ '@eslint/[email protected]':
dependencies:
- '@eslint/core': 0.17.0
+ '@eslint/core': 1.2.1
levn: 0.4.1
'@humanfs/[email protected]':
@@ -3951,15 +3704,6 @@ snapshots:
optional: true
- '@isaacs/[email protected]':
- dependencies:
- string-width: 5.1.2
- string-width-cjs: [email protected]
- strip-ansi: 7.2.0
- strip-ansi-cjs: [email protected]
- wrap-ansi: 8.1.0
- wrap-ansi-cjs: [email protected]
-
'@isaacs/[email protected]':
dependencies:
minipass: 7.1.3
@@ -4103,9 +3847,6 @@ snapshots:
tslib: 2.8.1
webcrypto-core: 1.9.2
- '@pkgjs/[email protected]':
- optional: true
-
'@polka/[email protected]': {}
'@sec-ant/[email protected]': {}
@@ -4128,16 +3869,13 @@ snapshots:
'@types/estree': 1.0.9
'@types/json-schema': 7.0.15
+ '@types/[email protected]': {}
+
'@types/[email protected]': {}
dependencies:
- '@types/node': 18.13.0
-
- '@types/[email protected]':
- dependencies:
- '@types/minimatch': 6.0.0
- '@types/node': 18.13.0
+ '@types/node': 24.12.3
'@types/[email protected]': {}
@@ -4145,54 +3883,48 @@ snapshots:
'@types/[email protected]': {}
- '@types/[email protected]':
- dependencies:
- minimatch: 10.2.5
-
'@types/[email protected]': {}
- '@types/[email protected]': {}
-
dependencies:
undici-types: 7.16.0
'@types/[email protected]': {}
dependencies:
'@eslint-community/regexpp': 4.12.2
'@typescript-eslint/scope-manager': 8.59.2
+ '@typescript-eslint/type-utils': 8.59.2(@typescript/[email protected])([email protected]([email protected])([email protected]))([email protected])
'@typescript-eslint/visitor-keys': 8.59.2
ignore: 7.0.5
natural-compare: 1.4.0
- ts-api-utils: 2.5.0([email protected])
- typescript: 4.9.5
+ ts-api-utils: 2.5.0(@typescript/[email protected])
+ typescript: '@typescript/[email protected]'
transitivePeerDependencies:
- supports-color
dependencies:
'@typescript-eslint/scope-manager': 8.59.2
'@typescript-eslint/types': 8.59.2
- '@typescript-eslint/typescript-estree': 8.59.2([email protected])([email protected])
+ '@typescript-eslint/typescript-estree': 8.59.2(@typescript/[email protected])([email protected])
'@typescript-eslint/visitor-keys': 8.59.2
debug: 4.4.3([email protected])
- typescript: 4.9.5
+ typescript: '@typescript/[email protected]'
transitivePeerDependencies:
- supports-color
+ '@typescript-eslint/[email protected](@typescript/[email protected])([email protected])':
dependencies:
- '@typescript-eslint/tsconfig-utils': 8.59.2([email protected])
+ '@typescript-eslint/tsconfig-utils': 8.59.2(@typescript/[email protected])
'@typescript-eslint/types': 8.59.2
debug: 4.4.3([email protected])
- typescript: 4.9.5
+ typescript: '@typescript/[email protected]'
transitivePeerDependencies:
- supports-color
@@ -4201,47 +3933,47 @@ snapshots:
'@typescript-eslint/types': 8.59.2
'@typescript-eslint/visitor-keys': 8.59.2
- '@typescript-eslint/[email protected]([email protected])':
+ '@typescript-eslint/[email protected](@typescript/[email protected])':
dependencies:
- typescript: 4.9.5
+ typescript: '@typescript/[email protected]'
dependencies:
'@typescript-eslint/types': 8.59.2
- '@typescript-eslint/typescript-estree': 8.59.2([email protected])([email protected])
+ '@typescript-eslint/typescript-estree': 8.59.2(@typescript/[email protected])([email protected])
debug: 4.4.3([email protected])
- ts-api-utils: 2.5.0([email protected])
- typescript: 4.9.5
+ ts-api-utils: 2.5.0(@typescript/[email protected])
+ typescript: '@typescript/[email protected]'
transitivePeerDependencies:
- supports-color
'@typescript-eslint/[email protected]': {}
+ '@typescript-eslint/[email protected](@typescript/[email protected])([email protected])':
dependencies:
- '@typescript-eslint/project-service': 8.59.2([email protected])([email protected])
- '@typescript-eslint/tsconfig-utils': 8.59.2([email protected])
+ '@typescript-eslint/project-service': 8.59.2(@typescript/[email protected])([email protected])
+ '@typescript-eslint/tsconfig-utils': 8.59.2(@typescript/[email protected])
'@typescript-eslint/types': 8.59.2
'@typescript-eslint/visitor-keys': 8.59.2
debug: 4.4.3([email protected])
minimatch: 10.2.5
semver: 7.8.0
tinyglobby: 0.2.16
- ts-api-utils: 2.5.0([email protected])
- typescript: 4.9.5
+ ts-api-utils: 2.5.0(@typescript/[email protected])
+ typescript: '@typescript/[email protected]'
transitivePeerDependencies:
- supports-color
dependencies:
- '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected])([email protected]))
+ '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected])([email protected]))
'@typescript-eslint/scope-manager': 8.59.2
'@typescript-eslint/types': 8.59.2
- '@typescript-eslint/typescript-estree': 8.59.2([email protected])([email protected])
- typescript: 4.9.5
+ '@typescript-eslint/typescript-estree': 8.59.2(@typescript/[email protected])([email protected])
+ typescript: '@typescript/[email protected]'
transitivePeerDependencies:
- supports-color
@@ -4250,6 +3982,70 @@ snapshots:
'@typescript-eslint/types': 8.59.2
eslint-visitor-keys: 5.0.1
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ dependencies:
+ '@typescript/old': [email protected]
+
'@webassemblyjs/[email protected]':
dependencies:
'@webassemblyjs/helper-numbers': 1.13.2
@@ -4326,20 +4122,6 @@ snapshots:
'@webassemblyjs/ast': 1.14.1
'@xtuc/long': 4.2.2
- dependencies:
- webpack-cli: 4.10.0([email protected])([email protected])
-
- dependencies:
- envinfo: 7.21.0
- webpack-cli: 4.10.0([email protected])([email protected])
-
- dependencies:
- webpack-cli: 4.10.0([email protected])([email protected])
-
'@xmldom/[email protected]': {}
'@xmldom/[email protected]': {}
@@ -4405,8 +4187,6 @@ snapshots:
dependencies:
color-convert: 2.0.1
-
dependencies:
'@electron/asar': 3.4.1
@@ -4457,12 +4237,6 @@ snapshots:
- dependencies:
- array-uniq: 1.0.3
-
-
dependencies:
pvtsutils: 1.3.6
@@ -4610,19 +4384,10 @@ snapshots:
- dependencies:
- source-map: 0.6.1
-
dependencies:
source-map: 0.6.1
- dependencies:
- del: 4.1.1
-
dependencies:
string-width: 4.2.0
@@ -4643,19 +4408,17 @@ snapshots:
-
dependencies:
delayed-stream: 1.0.0
@@ -4670,14 +4433,14 @@ snapshots:
dependencies:
env-paths: 2.2.1
import-fresh: 3.3.1
js-yaml: 4.2.0
parse-json: 5.2.0
optionalDependencies:
- typescript: 4.9.5
+ typescript: '@typescript/[email protected]'
optional: true
@@ -4706,7 +4469,7 @@ snapshots:
postcss-value-parser: 4.2.0
semver: 7.8.0
optionalDependencies:
dependencies:
@@ -4753,16 +4516,6 @@ snapshots:
object-keys: 1.1.1
optional: true
- dependencies:
- '@types/glob': 7.2.0
- globby: 6.1.0
- is-path-cwd: 2.2.0
- is-path-in-cwd: 2.1.0
- p-map: 2.1.0
- pify: 4.0.1
- rimraf: 2.6.3
-
@@ -4848,8 +4601,6 @@ snapshots:
-
dependencies:
jake: 10.8.5
@@ -4907,7 +4658,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@electron-internal/extract-zip': 1.0.3
'@electron/get': 4.0.3([email protected])
@@ -4917,8 +4668,6 @@ snapshots:
-
@@ -4932,6 +4681,10 @@ snapshots:
+
+
@@ -4966,38 +4719,13 @@ snapshots:
optional: true
dependencies:
- esbuild: 0.17.6
+ esbuild: 0.28.1
get-tsconfig: 4.14.0
loader-utils: 2.0.4
- webpack-sources: 1.4.3
-
- optionalDependencies:
- '@esbuild/android-arm': 0.17.6
- '@esbuild/android-arm64': 0.17.6
- '@esbuild/android-x64': 0.17.6
- '@esbuild/darwin-arm64': 0.17.6
- '@esbuild/darwin-x64': 0.17.6
- '@esbuild/freebsd-arm64': 0.17.6
- '@esbuild/freebsd-x64': 0.17.6
- '@esbuild/linux-arm': 0.17.6
- '@esbuild/linux-arm64': 0.17.6
- '@esbuild/linux-ia32': 0.17.6
- '@esbuild/linux-loong64': 0.17.6
- '@esbuild/linux-mips64el': 0.17.6
- '@esbuild/linux-ppc64': 0.17.6
- '@esbuild/linux-riscv64': 0.17.6
- '@esbuild/linux-s390x': 0.17.6
- '@esbuild/linux-x64': 0.17.6
- '@esbuild/netbsd-x64': 0.17.6
- '@esbuild/openbsd-x64': 0.17.6
- '@esbuild/sunos-x64': 0.17.6
- '@esbuild/win32-arm64': 0.17.6
- '@esbuild/win32-ia32': 0.17.6
- '@esbuild/win32-x64': 0.17.6
+ webpack-sources: 3.4.1
optionalDependencies:
@@ -5037,8 +4765,10 @@ snapshots:
esrecurse: 4.3.0
estraverse: 4.3.0
dependencies:
+ '@types/esrecurse': 4.3.1
+ '@types/estree': 1.0.9
esrecurse: 4.3.0
estraverse: 5.3.0
@@ -5046,44 +4776,38 @@ snapshots:
-
dependencies:
- '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected])([email protected]))
+ '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected])([email protected]))
'@eslint-community/regexpp': 4.12.2
- '@eslint/config-array': 0.21.2([email protected])
- '@eslint/config-helpers': 0.4.2
- '@eslint/core': 0.17.0
- '@eslint/eslintrc': 3.3.5([email protected])
- '@eslint/js': 9.39.4
- '@eslint/plugin-kit': 0.4.1
+ '@eslint/config-array': 0.23.5([email protected])
+ '@eslint/config-helpers': 0.7.0
+ '@eslint/core': 1.2.1
+ '@eslint/plugin-kit': 0.7.3
'@humanfs/node': 0.16.8
'@humanwhocodes/module-importer': 1.0.1
'@humanwhocodes/retry': 0.4.3
'@types/estree': 1.0.9
ajv: 6.15.0
- chalk: 4.1.2
cross-spawn: 7.0.6
debug: 4.4.3([email protected])
escape-string-regexp: 4.0.0
- eslint-scope: 8.4.0
- eslint-visitor-keys: 4.2.1
- espree: 10.4.0
+ eslint-scope: 9.1.2
+ eslint-visitor-keys: 5.0.1
+ espree: 11.2.0
esquery: 1.7.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
- file-entry-cache: 8.0.0
+ file-entry-cache: 11.1.5
find-up: 5.0.0
glob-parent: 6.0.2
ignore: 5.3.2
imurmurhash: 0.1.4
is-glob: 4.0.3
json-stable-stringify-without-jsonify: 1.0.1
- lodash.merge: 4.6.2
- minimatch: 3.1.5
+ minimatch: 10.2.5
natural-compare: 1.4.0
optionator: 0.9.4
optionalDependencies:
@@ -5097,11 +4821,11 @@ snapshots:
acorn-jsx: 5.3.2([email protected])
eslint-visitor-keys: 4.0.0
dependencies:
acorn: 8.16.0
acorn-jsx: 5.3.2([email protected])
- eslint-visitor-keys: 4.2.1
+ eslint-visitor-keys: 5.0.1
dependencies:
@@ -5151,15 +4875,11 @@ snapshots:
dependencies:
flat-cache: 6.1.23
- dependencies:
- flat-cache: 4.0.0
-
dependencies:
loader-utils: 2.0.4
schema-utils: 3.3.0
dependencies:
@@ -5181,12 +4901,6 @@ snapshots:
locate-path: 6.0.0
path-exists: 4.0.0
- dependencies:
- flatted: 3.4.2
- keyv: 4.5.4
- rimraf: 5.0.5
-
dependencies:
cacheable: 2.5.0
@@ -5197,11 +4911,6 @@ snapshots:
- dependencies:
- cross-spawn: 7.0.6
- signal-exit: 4.1.0
-
@@ -5291,15 +5000,6 @@ snapshots:
- dependencies:
- foreground-child: 3.1.0
- jackspeak: 3.1.2
- minimatch: 9.0.9
- minipass: 7.1.3
- package-json-from-dist: 1.0.1
- path-scurry: 1.11.1
-
dependencies:
fs.realpath: 1.0.0
@@ -5349,14 +5049,6 @@ snapshots:
slash: 5.1.0
unicorn-magic: 0.4.1
- dependencies:
- array-union: 1.0.2
- glob: 7.2.0
- object-assign: 4.1.1
- pify: 2.3.0
- pinkie-promise: 2.0.1
-
@@ -5401,10 +5093,6 @@ snapshots:
dependencies:
hookified: 1.15.1
- dependencies:
- function-bind: 1.1.2
-
dependencies:
function-bind: 1.1.2
@@ -5419,28 +5107,28 @@ snapshots:
dependencies:
lru-cache: 6.0.0
dependencies:
- html-minifier-terser: 5.1.1
- parse5: 6.0.1
+ html-minifier-terser: 7.2.0
+ parse5: 7.3.0
dependencies:
camel-case: 4.1.2
- clean-css: 4.2.4
- commander: 4.1.1
+ clean-css: 5.3.3
+ commander: 8.3.0
he: 1.2.0
param-case: 3.0.4
relateurl: 0.2.7
- terser: 4.6.3
+ terser: 5.47.1
dependencies:
camel-case: 4.1.2
clean-css: 5.3.3
- commander: 8.3.0
- he: 1.2.0
+ commander: 10.0.1
+ entities: 4.5.0
param-case: 3.0.4
relateurl: 0.2.7
terser: 5.47.1
@@ -5455,7 +5143,7 @@ snapshots:
pretty-error: 4.0.0
tapable: 2.3.3
optionalDependencies:
dependencies:
@@ -5533,13 +5221,13 @@ snapshots:
dependencies:
- hasown: 2.0.3
+ hasown: 2.0.4
@@ -5551,16 +5239,6 @@ snapshots:
-
- dependencies:
- is-path-inside: 2.1.0
-
- dependencies:
- path-is-inside: 1.0.2
-
@@ -5583,12 +5261,6 @@ snapshots:
- dependencies:
- '@isaacs/cliui': 8.0.2
- optionalDependencies:
- '@pkgjs/parseargs': 0.11.0
-
dependencies:
async: 3.2.6
@@ -5598,7 +5270,7 @@ snapshots:
dependencies:
- '@types/node': 18.13.0
+ '@types/node': 24.12.3
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -5614,8 +5286,6 @@ snapshots:
dependencies:
argparse: 2.0.1
-
@@ -5643,10 +5313,6 @@ snapshots:
optionalDependencies:
graceful-fs: 4.2.11
- dependencies:
- json-buffer: 3.0.1
-
dependencies:
'@keyv/serialize': 1.1.1
@@ -5684,8 +5350,6 @@ snapshots:
dependencies:
p-locate: 5.0.0
-
@@ -5696,8 +5360,6 @@ snapshots:
-
dependencies:
yallist: 4.0.0
@@ -5740,7 +5402,7 @@ snapshots:
dependencies:
schema-utils: 4.3.3
tapable: 2.3.3
dependencies:
@@ -5825,8 +5487,6 @@ snapshots:
dependencies:
boolbase: 1.0.0
-
optional: true
@@ -5851,10 +5511,6 @@ snapshots:
dependencies:
p-try: 2.2.0
- dependencies:
- p-try: 2.2.0
-
dependencies:
yocto-queue: 0.1.0
@@ -5865,14 +5521,10 @@ snapshots:
dependencies:
- p-limit: 3.0.2
-
+ p-limit: 3.1.0
-
dependencies:
dot-case: 3.0.4
@@ -5889,7 +5541,9 @@ snapshots:
json-parse-even-better-errors: 2.3.1
lines-and-columns: 1.2.4
+ dependencies:
+ entities: 6.0.1
dependencies:
@@ -5902,17 +5556,10 @@ snapshots:
-
- dependencies:
- lru-cache: 10.2.0
- minipass: 7.1.3
-
@@ -5921,16 +5568,6 @@ snapshots:
-
-
- dependencies:
- pinkie: 2.0.4
-
-
dependencies:
find-up: 4.1.0
@@ -6061,7 +5698,7 @@ snapshots:
dependencies:
resolve: 1.22.12
@@ -6114,10 +5751,6 @@ snapshots:
dependencies:
glob: 7.2.0
- dependencies:
- glob: 10.5.0
-
dependencies:
boolean: 3.2.0
@@ -6145,7 +5778,7 @@ snapshots:
neo-async: 2.6.2
optionalDependencies:
sass: 1.99.0
dependencies:
@@ -6190,7 +5823,7 @@ snapshots:
dependencies:
kind-of: 6.0.3
dependencies:
'@img/colour': 1.1.0
detect-libc: 2.1.2
@@ -6221,7 +5854,7 @@ snapshots:
'@img/sharp-win32-arm64': 0.35.3
'@img/sharp-win32-ia32': 0.35.3
'@img/sharp-win32-x64': 0.35.3
- '@types/node': 18.13.0
+ '@types/node': 24.12.3
dependencies:
@@ -6251,8 +5884,6 @@ snapshots:
astral-regex: 2.0.0
is-fullwidth-code-point: 3.0.0
-
@@ -6281,12 +5912,6 @@ snapshots:
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
- dependencies:
- eastasianwidth: 0.2.0
- emoji-regex: 9.2.2
- strip-ansi: 7.2.0
-
dependencies:
get-east-asian-width: 1.7.0
@@ -6310,7 +5935,7 @@ snapshots:
dependencies:
'@csstools/css-calc': 3.4.3(@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])
'@csstools/css-parser-algorithms': 4.0.2(@csstools/[email protected])
@@ -6320,7 +5945,7 @@ snapshots:
'@csstools/selector-resolve-nested': 4.0.2([email protected])
'@csstools/selector-specificity': 6.0.1([email protected])
colord: 2.10.0
- cosmiconfig: 9.0.2([email protected])
+ cosmiconfig: 9.0.2(@typescript/[email protected])
css-functions-list: 3.3.3
css-tree: 3.2.1
debug: 4.4.3([email protected])
@@ -6410,20 +6035,13 @@ snapshots:
jest-worker: 27.4.5
schema-utils: 4.3.3
terser: 5.47.1
optionalDependencies:
clean-css: 5.3.3
esbuild: 0.28.1
html-minifier-terser: 6.1.0
postcss: 8.5.29
- dependencies:
- acorn: 8.16.0
- commander: 2.20.0
- source-map: 0.6.1
- source-map-support: 0.5.21
-
dependencies:
'@jridgewell/source-map': 0.3.11
@@ -6456,9 +6074,9 @@ snapshots:
dependencies:
utf8-byte-length: 1.0.5
dependencies:
- typescript: 4.9.5
+ typescript: '@typescript/[email protected]'
@@ -6477,7 +6095,30 @@ snapshots:
+
+ optionalDependencies:
+ '@typescript/typescript-aix-ppc64': 7.0.2
+ '@typescript/typescript-darwin-arm64': 7.0.2
+ '@typescript/typescript-darwin-x64': 7.0.2
+ '@typescript/typescript-freebsd-arm64': 7.0.2
+ '@typescript/typescript-freebsd-x64': 7.0.2
+ '@typescript/typescript-linux-arm': 7.0.2
+ '@typescript/typescript-linux-arm64': 7.0.2
+ '@typescript/typescript-linux-loong64': 7.0.2
+ '@typescript/typescript-linux-mips64el': 7.0.2
+ '@typescript/typescript-linux-ppc64': 7.0.2
+ '@typescript/typescript-linux-riscv64': 7.0.2
+ '@typescript/typescript-linux-s390x': 7.0.2
+ '@typescript/typescript-linux-x64': 7.0.2
+ '@typescript/typescript-netbsd-arm64': 7.0.2
+ '@typescript/typescript-netbsd-x64': 7.0.2
+ '@typescript/typescript-openbsd-arm64': 7.0.2
+ '@typescript/typescript-openbsd-x64': 7.0.2
+ '@typescript/typescript-sunos-x64': 7.0.2
+ '@typescript/typescript-win32-arm64': 7.0.2
+ '@typescript/typescript-win32-x64': 7.0.2
@@ -6543,38 +6184,31 @@ snapshots:
- bufferutil
- utf-8-validate
dependencies:
- '@discoveryjs/json-ext': 0.5.0
- '@webpack-cli/configtest': 1.2.0([email protected])([email protected])
- '@webpack-cli/info': 1.5.0([email protected])
- '@webpack-cli/serve': 1.7.0([email protected])
- colorette: 2.0.20
- commander: 7.0.0
+ '@discoveryjs/json-ext': 1.1.0
+ commander: 14.0.3
cross-spawn: 7.0.6
- fastest-levenshtein: 1.0.16
+ envinfo: 7.21.0
import-local: 3.2.0
- interpret: 2.2.0
- rechoir: 0.7.1
- webpack-merge: 5.10.0
+ interpret: 3.1.1
+ rechoir: 0.8.0
+ webpack-merge: 6.0.1
optionalDependencies:
+ js-yaml: 4.2.0
+ json5: 2.2.3
webpack-bundle-analyzer: 4.5.0
dependencies:
clone-deep: 4.0.1
flat: 5.0.2
wildcard: 2.0.1
- dependencies:
- source-list-map: 2.0.1
- source-map: 0.6.1
-
dependencies:
'@types/eslint-scope': 3.7.7
'@types/estree': 1.0.9
@@ -6601,7 +6235,7 @@ snapshots:
watchpack: 2.5.1
webpack-sources: 3.4.1
optionalDependencies:
- webpack-cli: 4.10.0([email protected])([email protected])
transitivePeerDependencies:
- '@minify-html/node'
- '@swc/core'
@@ -6642,12 +6276,6 @@ snapshots:
string-width: 4.2.0
strip-ansi: 6.0.0
- dependencies:
- ansi-styles: 6.2.3
- string-width: 5.1.2
- strip-ansi: 7.2.0
-
diff --git a/app/scripts/afterPack.js b/app/scripts/afterPack.js
index b7044b4296..6b88aace33 100644
--- a/app/scripts/afterPack.js
+++ b/app/scripts/afterPack.js
@@ -22,7 +22,7 @@ async function extractPackagedPandoc(appOutDir, packager, platform, arch) {
return;
}
if (error.code === "ENOENT") {
- throw new Error(`Packaged Pandoc archive not found: ${archivePath}`);
+ throw new Error(`Packaged Pandoc archive not found: ${archivePath}`, {cause: error});
}
throw error;
}
@@ -44,7 +44,7 @@ async function extractPackagedPandoc(appOutDir, packager, platform, arch) {
await fsPromises.rm(archivePath);
console.log(`Extracted packaged Pandoc: ${pandocBin}`);
} catch (error) {
- throw new Error(`Failed to extract packaged Pandoc: ${error.message}`);
+ throw new Error(`Failed to extract packaged Pandoc: ${error.message}`, {cause: error});
}
}
diff --git a/app/src/asset/imageOCRStatus.ts b/app/src/asset/imageOCRStatus.ts
index d0d11b2d88..23c54d6ebb 100644
--- a/app/src/asset/imageOCRStatus.ts
+++ b/app/src/asset/imageOCRStatus.ts
@@ -19,7 +19,7 @@ const getImageOCREntry = (path: string) => {
return undefined;
}
return response.data;
- }).catch(() => undefined);
+ }).catch((): undefined => undefined);
const entry = {
expires: Infinity,
result,
diff --git a/app/src/asset/renderAssets.ts b/app/src/asset/renderAssets.ts
index 74dc65c3e9..2282ea14a9 100644
--- a/app/src/asset/renderAssets.ts
+++ b/app/src/asset/renderAssets.ts
@@ -3,7 +3,7 @@ import {Constants} from "../constants";
import {getAllModels} from "../layout/getAll";
/// #endif
import {getAssetExtension} from "../util/pathName";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {escapeAttr, escapeHtml} from "../util/escape";
import {getHTMLAssetIFrameSrc, isHTMLFilePath} from "./html";
import {isBrowserRenderableImagePath} from "../util/imageURL";
diff --git a/app/src/assets.d.ts b/app/src/assets.d.ts
new file mode 100644
index 0000000000..0292a33a0f
--- /dev/null
+++ b/app/src/assets.d.ts
@@ -0,0 +1 @@
+declare module "*.scss";
diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts
index b500c5fafb..3b7c378aa1 100644
--- a/app/src/card/openCard.ts
+++ b/app/src/card/openCard.ts
@@ -19,7 +19,7 @@ import {openFile} from "../editor/util";
import {ipcRenderer} from "electron";
import {getWindowAppearance} from "../window/appearance";
/// #endif
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {getDisplayName, movePathTo} from "../util/pathName";
import type {App} from "../index";
import {resize} from "../protyle/util/resize";
diff --git a/app/src/card/viewCards.ts b/app/src/card/viewCards.ts
index 1c4b72c23a..e1c36f4ce2 100644
--- a/app/src/card/viewCards.ts
+++ b/app/src/card/viewCards.ts
@@ -1,4 +1,4 @@
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {Protyle} from "../protyle";
import {fetchPost} from "../util/fetch";
import {Dialog} from "../dialog";
diff --git a/app/src/command/english.ts b/app/src/command/english.ts
index 40d9790e71..672d37bc73 100644
--- a/app/src/command/english.ts
+++ b/app/src/command/english.ts
@@ -29,7 +29,7 @@ export const initializeEnglishCommandTranslations = (
englishLanguages = languages;
return languages;
})
- .catch(error => {
+ .catch((error): undefined => {
console.warn("Unable to load English command translations:", error);
return undefined;
});
diff --git a/app/src/config/bazaarTab.ts b/app/src/config/bazaarTab.ts
index fe20de6469..d3a78e56a0 100644
--- a/app/src/config/bazaarTab.ts
+++ b/app/src/config/bazaarTab.ts
@@ -69,7 +69,7 @@ export const mountBazaarTab = (
return module;
});
activeMountPromise = mountPromise;
- return mountPromise.then(() => undefined);
+ return mountPromise.then((): undefined => undefined);
};
/** 释放已挂载或正在加载的集市 */
diff --git a/app/src/config/entryVisibility/catalog.ts b/app/src/config/entryVisibility/catalog.ts
index 16d6ccbedc..d5624316a8 100644
--- a/app/src/config/entryVisibility/catalog.ts
+++ b/app/src/config/entryVisibility/catalog.ts
@@ -1335,7 +1335,7 @@ export const refreshToolbarCatalogEntries = (items: IToolbarCatalogEntry[]) => {
const order = mergeEntryOrderPreservingUnknown(DESKTOP_TOOLBAR_ENTRIES.map((item) => item.key), actualOrder);
const children = normalizeToolbarCatalogSeparators([
...toolbarBuiltinChildren.filter(item => item.key.startsWith("mobile-") && item.simple),
- ...order.flatMap((key) => nodes.get(key) || []),
+ ...order.flatMap((key): IEntryCatalogNode | [] => nodes.get(key) || []),
...toolbarBuiltinChildren.filter(item => item.key.startsWith("mobile-") && !item.simple),
]);
const signature = JSON.stringify(children.map((item) => toolbarCatalogNodeSignature(item, pluginLabels)));
diff --git a/app/src/config/entryVisibility/dockOrder.ts b/app/src/config/entryVisibility/dockOrder.ts
index dad42bc251..026a208108 100644
--- a/app/src/config/entryVisibility/dockOrder.ts
+++ b/app/src/config/entryVisibility/dockOrder.ts
@@ -68,7 +68,7 @@ export interface IDockOrderDefaultEntry {
type TDockOrdersByPosition = Partial<Record<TPluginDockPosition, readonly string[]>>;
const createEmptySnapshot = (): TDockOrderSnapshot => Object.fromEntries(
- DOCK_ORDER_SCOPES.map((scope) => [scope, []]),
+ DOCK_ORDER_SCOPES.map((scope): [TDockOrderScope, string[]] => [scope, []]),
) as TDockOrderSnapshot;
const normalizeDockEntryOrderSnapshot = (
diff --git a/app/src/config/entryVisibility/frequentSlashUi.test.ts b/app/src/config/entryVisibility/frequentSlashUi.test.ts
index fe3d3b3e9a..6bda6a12ec 100644
--- a/app/src/config/entryVisibility/frequentSlashUi.test.ts
+++ b/app/src/config/entryVisibility/frequentSlashUi.test.ts
@@ -85,7 +85,9 @@ const loadEditor = (id = "custom", initialEnabled = true, mobile = false) => {
if (allowDiscard) callback();
},
};
- const source = readFileSync(resolve("src/config/entryVisibility/ui.ts"), "utf8");
+ const source = readFileSync(resolve("src/config/entryVisibility/ui.ts"), "utf8")
+ .replace("const createEntryView =", "let createEntryView =")
+ .replace("const removeEntryView =", "let removeEntryView =");
const code = transpileModule(source + `
createEntryView = () => fixtureView;
removeEntryView = () => { fixtureView.closed = true; };
diff --git a/app/src/config/entryVisibility/mobileUi.test.ts b/app/src/config/entryVisibility/mobileUi.test.ts
index 6833be448e..663b920f5a 100644
--- a/app/src/config/entryVisibility/mobileUi.test.ts
+++ b/app/src/config/entryVisibility/mobileUi.test.ts
@@ -468,6 +468,7 @@ const runEntryUiCases = async (mobileBuild: boolean) => {
"config/entryVisibility/profile", "config/entryVisibility/mobileToolbarContext",
"config/entryVisibility/dockOrder", "config/entryVisibility/touchOrder",
"protyle/toolbar/defaults", "mobile/util/toolbarActions", "protyle/wysiwyg/codeBlockUtil", "protyle/gutter/turnIntoMenu",
+ "protyle/wysiwyg/calloutType",
"plugin/dockKey", "plugin/topBarKey", "util/escape", "menus/declarations/imageOCRMenu", "menus/declarations/menuDeclaration"];
if (mobileBuild) {
modules.push("config/setting/windowContext");
diff --git a/app/src/config/entryVisibility/runtime.test.ts b/app/src/config/entryVisibility/runtime.test.ts
index 0831c48637..42de015588 100644
--- a/app/src/config/entryVisibility/runtime.test.ts
+++ b/app/src/config/entryVisibility/runtime.test.ts
@@ -296,7 +296,7 @@ test("visibility edits on a built-in profile leave untouched orders following ca
test("dock visibility menus follow profile scope order instead of the catalog order", () => {
const source = readFileSync(resolve(process.cwd(), "src/config/entryVisibility/runtime.ts"), "utf8");
const compiled = transpileModule(source, {compilerOptions: {module: ModuleKind.CommonJS}}).outputText;
- const current = Object.fromEntries(DOCK_ORDER_SCOPES.map(scope => [scope, []]));
+ const current = Object.fromEntries(DOCK_ORDER_SCOPES.map((scope): [string, string[]] => [scope, []]));
current["dock.order.LeftTop"] = ["file", "outline"];
const config: Config.IEntryVisibility = {version: 6, active: "custom", profiles: [{
id: "custom", name: "Custom", entries: {}, orders: {"dock.order.LeftTop": ["outline", "file"]},
@@ -340,7 +340,7 @@ test("entry profile saves in settings windows send requests and flush pending ch
syncDockBarVisibility: bar.syncDockBarVisibility,
refreshDockCatalog: () => {},
getSettingsOwnerApp: (): undefined => undefined,
- getDockEntryOrderSnapshot: () => Object.fromEntries(DOCK_ORDER_SCOPES.map(scope => [scope, []])),
+ getDockEntryOrderSnapshot: () => Object.fromEntries(DOCK_ORDER_SCOPES.map((scope): [string, string[]] => [scope, []])),
mergeDockEntryOrderSnapshot,
applyDockEntryOrderSnapshot: () => {},
config: {set: (path: string, config: Config.IEntryVisibility, applied: (data: unknown) => void) => {
diff --git a/app/src/config/tabs/accessTab.ts b/app/src/config/tabs/accessTab.ts
index 9ef5df35cf..0585ec3929 100644
--- a/app/src/config/tabs/accessTab.ts
+++ b/app/src/config/tabs/accessTab.ts
@@ -105,7 +105,7 @@ const mountOIDCButton = (root: HTMLElement) => {
root.querySelector("#oidcConfig")?.addEventListener("click", () => {
const config = window.siyuan.config.oidc;
const escape = (value: string) => escapeHtmlTextAndAttr(value);
- let destroyOIDCDialog: () => void = () => undefined;
+ let destroyOIDCDialog: () => void = (): undefined => undefined;
const dialog = new Dialog({
title: window.siyuan.languages.oidcLogin,
content: `<div class="b3-dialog__content" id="oidcConfigForm">
@@ -230,7 +230,7 @@ const mountOIDCButton = (root: HTMLElement) => {
if (validationPollToken && !validationActivating) {
void fetchSyncPost("/api/system/oidc/validateCancel", {
pollToken: validationPollToken,
- }, undefined, false).catch(() => undefined);
+ }, undefined, false).catch((): undefined => undefined);
}
validationPollToken = "";
};
@@ -402,7 +402,7 @@ const mountOIDCButton = (root: HTMLElement) => {
if (response.code === 0 && response.data.pollToken) {
void fetchSyncPost("/api/system/oidc/validateCancel", {
pollToken: response.data.pollToken,
- }, undefined, false).catch(() => undefined);
+ }, undefined, false).catch((): undefined => undefined);
}
return;
}
@@ -411,7 +411,7 @@ const mountOIDCButton = (root: HTMLElement) => {
if (response.code === 0 && response.data.pollToken) {
void fetchSyncPost("/api/system/oidc/validateCancel", {
pollToken: response.data.pollToken,
- }, undefined, false).catch(() => undefined);
+ }, undefined, false).catch((): undefined => undefined);
}
return;
}
diff --git a/app/src/dialog/exitRequest.ts b/app/src/dialog/exitRequest.ts
index 0ca18451cf..caaa5eb45c 100644
--- a/app/src/dialog/exitRequest.ts
+++ b/app/src/dialog/exitRequest.ts
@@ -32,7 +32,7 @@ export const requestSystemExit = (options: {
}
progressLoading({code: 2, msg: ""}, progressID);
return response;
- }).catch(error => {
+ }).catch((error): undefined => {
console.warn("exit request failed", error);
// 请求失败不代表内核已经停止;保留界面供用户重试,并继续接收内核退出事件。
progressLoading({code: 2, msg: ""}, progressID);
diff --git a/app/src/dialog/resizeInput.test.ts b/app/src/dialog/resizeInput.test.ts
index f7a093104d..e0197e8e66 100644
--- a/app/src/dialog/resizeInput.test.ts
+++ b/app/src/dialog/resizeInput.test.ts
@@ -15,7 +15,7 @@ const browserCases = (sources: string[], css: string) => {
const bridge = {} as {initTouchDragBridge: () => void};
new Function("exports", "require", sources[0])(bridge, (id: string) => id === "./touchDragBridgeCore" ? core : {
Constants: {SIZE_DRAG_THRESHOLD: 5, TIMEOUT_LONGPRESS: 500, TIMEOUT_MOUSE_DRAG_DELAY: 150},
- isInAndroid: () => false, ipcRenderer: {on() {}}, stopScrollAnimation() {},
+ isInAndroid: () => false, isInHarmony: () => false, ipcRenderer: {on() {}}, stopScrollAnimation() {},
});
const resize = {} as {moveResize: (element: HTMLElement) => void};
new Function("exports", "require", sources[2])(resize, () => ({
diff --git a/app/src/dialog/tooltipInput.test.ts b/app/src/dialog/tooltipInput.test.ts
index b31acb6045..8461ccb5e8 100644
--- a/app/src/dialog/tooltipInput.test.ts
+++ b/app/src/dialog/tooltipInput.test.ts
@@ -120,7 +120,7 @@ body {margin:0}.file-tree {position:absolute;top:40px;left:40px;width:232px}
for (const event of [undefined, new MouseEvent("mouseover")]) {
for (const interactive of [false, true]) {
tooltip.hideTooltip();
- const showsBefore = pluginShows;
+ const showsBefore: number = pluginShows;
const message = interactive ? '<a href="#test">Interactive</a>' : "Plain";
const context = JSON.stringify({pointerType, tooltipClass, event: !!event, interactive});
tooltip.showTooltip(message, more, tooltipClass, event);
diff --git a/app/src/editor/navigationHistory.test.ts b/app/src/editor/navigationHistory.test.ts
index 024565785a..25219caf1e 100644
--- a/app/src/editor/navigationHistory.test.ts
+++ b/app/src/editor/navigationHistory.test.ts
@@ -149,7 +149,7 @@ for (const fromFileTree of [false, true]) {
model: {}, block: {rootID: id}, path: "/" + id + ".sy",
title: {editElement: title},
element: {classList: {contains: () => false}, contains: (node: unknown) => node === block},
- toolbar: {}, wysiwyg: {element: {firstElementChild: emptyLastDocument && id === "D" ? undefined : block, querySelectorAll: () => []}},
+ toolbar: {}, wysiwyg: {element: {firstElementChild: emptyLastDocument && id === "D" ? undefined : block, querySelectorAll: (): Element[] => []}},
preview: {element: {classList: {contains: () => true}}},
};
});
diff --git a/app/src/emoji/iconValue.ts b/app/src/emoji/iconValue.ts
index 98b8e0036f..fcf3801eb3 100644
--- a/app/src/emoji/iconValue.ts
+++ b/app/src/emoji/iconValue.ts
@@ -12,7 +12,7 @@ const BASE64_IMAGE_MIME_EXTENSIONS: Record<string, string> = {
export type TIconValueKind = "unicode" | "custom" | "dynamic" | "network" | "invalid";
export interface IBase64Image {
- bytes: Uint8Array,
+ bytes: Uint8Array<ArrayBuffer>,
extension: string,
mimeType: string,
}
diff --git a/app/src/emoji/index.ts b/app/src/emoji/index.ts
index d8e24b3492..6531e0fdbd 100644
--- a/app/src/emoji/index.ts
+++ b/app/src/emoji/index.ts
@@ -12,7 +12,7 @@ import {Dialog} from "../dialog";
import {setPosition} from "../util/setPosition";
import {setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
import {getLuteInstance} from "../protyle/render/setLute";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {
bindDynamicIconTarget,
getIconSearchText,
diff --git a/app/src/history/diff.ts b/app/src/history/diff.ts
index 0c942e8878..cf558c7dc1 100644
--- a/app/src/history/diff.ts
+++ b/app/src/history/diff.ts
@@ -5,7 +5,7 @@ import {Constants} from "../constants";
import {disabledProtyle, onGet} from "../protyle/util/onGet";
import {hasClosestByClassName} from "../protyle/util/hasClosest";
import {escapeAttr, escapeHtml} from "../util/escape";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {isMobile} from "../util/functions";
import type {App} from "../index";
import {pathPosix} from "../util/pathName";
diff --git a/app/src/history/doc.ts b/app/src/history/doc.ts
index 66fa33e0c4..20df4ede65 100644
--- a/app/src/history/doc.ts
+++ b/app/src/history/doc.ts
@@ -5,7 +5,7 @@ import {confirmDialog} from "../dialog/confirmDialog";
import {Constants} from "../constants";
import {Protyle} from "../protyle";
import {disabledProtyle, onGet} from "../protyle/util/onGet";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {fetchPost, fetchSyncPost} from "../util/fetch";
import {isMobile} from "../util/functions";
import type {App} from "../index";
diff --git a/app/src/history/docSnapshots.ts b/app/src/history/docSnapshots.ts
index 796469f474..1b64a63048 100644
--- a/app/src/history/docSnapshots.ts
+++ b/app/src/history/docSnapshots.ts
@@ -2,7 +2,7 @@ import type {App} from "../index";
import type {DocHistorySnapshot, DocHistorySnapshotEntry} from "../types/api";
import {fetchSyncPost} from "../util/fetch";
import {escapeAttr, escapeHtml} from "../util/escape";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {openSnapshotDetail} from "./snapshotDetail";
const views = new WeakMap<Element, DocHistorySnapshots>();
diff --git a/app/src/history/history.ts b/app/src/history/history.ts
index 7aae930d19..00b4d3ef23 100644
--- a/app/src/history/history.ts
+++ b/app/src/history/history.ts
@@ -8,7 +8,7 @@ import {hasClosestByClassName} from "../protyle/util/hasClosest";
import {renderAssetsPreview} from "../asset/renderAssets";
import {Protyle} from "../protyle";
import {disabledProtyle, onGet} from "../protyle/util/onGet";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {fetchPost, fetchSyncPost} from "../util/fetch";
import {escapeAttr, escapeHtml} from "../util/escape";
import {isMobile} from "../util/functions";
diff --git a/app/src/history/repoFile.ts b/app/src/history/repoFile.ts
index c332c39312..58e69e27af 100644
--- a/app/src/history/repoFile.ts
+++ b/app/src/history/repoFile.ts
@@ -9,7 +9,7 @@ import {escapeAttr, escapeHtml} from "../util/escape";
import {fetchPost} from "../util/fetch";
import {pathPosix} from "../util/pathName";
import {getHostCapabilities} from "../util/hostCapabilities";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
interface IRepoFile {
fileID: string;
diff --git a/app/src/history/snapshotDetail.ts b/app/src/history/snapshotDetail.ts
index 4520c350ec..b19f56883e 100644
--- a/app/src/history/snapshotDetail.ts
+++ b/app/src/history/snapshotDetail.ts
@@ -6,7 +6,7 @@ import {fetchSyncPost} from "../util/fetch";
import {escapeHtml} from "../util/escape";
import {isMobile} from "../util/functions";
import {renderRepoFile} from "./repoFile";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {forgetNotebookHistoryDialog, trackNotebookHistoryDialog} from "./notebookDialogs";
export const openSnapshotDetail = async (app: App, reference: DocHistorySnapshot, notebook: string) => {
diff --git a/app/src/layout/dock/BacklinkContent.ts b/app/src/layout/dock/BacklinkContent.ts
index 0033f16a4c..ed11c80bc6 100644
--- a/app/src/layout/dock/BacklinkContent.ts
+++ b/app/src/layout/dock/BacklinkContent.ts
@@ -1431,7 +1431,7 @@ export class BacklinkContent extends Model {
promises.push(applyViewFoldStates(editor.protyle));
}
});
- return Promise.all(promises).then(() => undefined);
+ return Promise.all(promises).then((): undefined => undefined);
}
private syncViewFoldVisibility() {
diff --git a/app/src/layout/dock/agent/AgentChat.error.test.ts b/app/src/layout/dock/agent/AgentChat.error.test.ts
index 824a7e4d61..5f5cd16a88 100644
--- a/app/src/layout/dock/agent/AgentChat.error.test.ts
+++ b/app/src/layout/dock/agent/AgentChat.error.test.ts
@@ -55,7 +55,7 @@ const createChat = () => {
appendChild: (element: typeof elements[number]) => elements.push(element),
querySelectorAll: () => elements.filter(element => element.className.includes("agent-chat__msg--error")),
},
- sessionRuns: {begin: () => ({controller: {}}), markRead: () => undefined, get: () => undefined},
+ sessionRuns: {begin: () => ({controller: {}}), markRead: (): undefined => undefined, get: (): undefined => undefined},
isScrolledToBottom: () => true,
});
for (const method of ["finishActiveThinking", "clearThinking", "scrollToBottom", "flushThinkingStep",
diff --git a/app/src/layout/dock/agent/AgentChat.sessions.test.ts b/app/src/layout/dock/agent/AgentChat.sessions.test.ts
index b58190fab7..836314ccfb 100644
--- a/app/src/layout/dock/agent/AgentChat.sessions.test.ts
+++ b/app/src/layout/dock/agent/AgentChat.sessions.test.ts
@@ -41,9 +41,9 @@ const createChat = (load: (id: string) => Promise<AgentSession>) => {
messagesContainer: {
classList,
scrollTop: 0,
- addEventListener: () => undefined,
- removeEventListener: () => undefined,
- querySelectorAll: () => [],
+ addEventListener: (): undefined => undefined,
+ removeEventListener: (): undefined => undefined,
+ querySelectorAll: (): Element[] => [],
},
titleElement: {},
sendBtn: {
diff --git a/app/src/layout/dock/agent/AgentChat.ts b/app/src/layout/dock/agent/AgentChat.ts
index c7e7fb016d..bbad515f99 100644
--- a/app/src/layout/dock/agent/AgentChat.ts
+++ b/app/src/layout/dock/agent/AgentChat.ts
@@ -18,7 +18,7 @@ import {setPosition} from "../../../util/setPosition";
import {fetchPost} from "../../../util/fetch";
import {confirmDialog} from "../../../dialog/confirmDialog";
import {showMessage} from "../../../dialog/message";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {sendNotification} from "../../../plugin/platformUtils";
import {
applyAgentUserEdit,
diff --git a/app/src/layout/dock/agent/AgentRunController.ts b/app/src/layout/dock/agent/AgentRunController.ts
index 09904c1a8e..2fe72dc7c8 100644
--- a/app/src/layout/dock/agent/AgentRunController.ts
+++ b/app/src/layout/dock/agent/AgentRunController.ts
@@ -135,7 +135,7 @@ export class AgentRunController<TState> {
async waitForView(run: ManagedAgentRun<TState>) {
const pending = [run.processingPromise, run.replayPromise].filter((promise): promise is Promise<void> => !!promise);
- await Promise.all(pending.map(promise => promise.catch(() => undefined)));
+ await Promise.all(pending.map(promise => promise.catch((): undefined => undefined)));
}
enqueue(run: ManagedAgentRun<TState>, event: ISSEResult) {
diff --git a/app/src/layout/dock/agent/agentSkill.test.ts b/app/src/layout/dock/agent/agentSkill.test.ts
index 677ced2254..a85b39a0f2 100644
--- a/app/src/layout/dock/agent/agentSkill.test.ts
+++ b/app/src/layout/dock/agent/agentSkill.test.ts
@@ -54,6 +54,7 @@ const browserCases = async (source: string) => {
document.body.appendChild(panel);
const hint = {
element, source: "hint", enableExtend: true, enableSlash: true, splitChar: "/",
+ consumeRefBracketClose: api.Hint.prototype.consumeRefBracketClose,
genHTML: (items: IHintData[], _protyle?: IProtyle, reset = false) => {
if (reset && items.length === 0) {
element.classList.add("fn__none");
@@ -248,7 +249,7 @@ test("agent mobile commands coexist with skills and skill names remain atomic",
}).map(statement => statement.getText(composer)).join("\n");
const hint = createSourceFile("hint.ts", read("../../../protyle/hint/index.ts"), ScriptTarget.Latest, true);
const hintSource = hint.statements.find(isClassDeclaration).members.filter(member => isMethodDeclaration(member) &&
- ["fill", "getHTMLByData"].includes(member.name.getText(hint))).map(member => member.getText(hint)).join("\n");
+ ["fill", "getHTMLByData", "consumeRefBracketClose"].includes(member.name.getText(hint))).map(member => member.getText(hint)).join("\n");
const source = transpileModule([read("../../../protyle/hint/builtinSlash.ts"),
read("../../../protyle/hint/blockHintRange.ts"), read("agentHintState.ts"),
read("agentSkill.ts"), read("../../../mobile/util/liteSlashMenu.ts"), composerSource,
diff --git a/app/src/layout/dock/graph/renderer.ts b/app/src/layout/dock/graph/renderer.ts
index 8a99d9dd24..0eaffe3f55 100644
--- a/app/src/layout/dock/graph/renderer.ts
+++ b/app/src/layout/dock/graph/renderer.ts
@@ -10,7 +10,7 @@ export interface IGraphRenderState {
options: IGraphOptions;
palette: IGraphPalette;
positionVersion: number;
- positions: Float32Array;
+ positions: Float32Array<ArrayBuffer>;
selected: number;
selectionVersion: number;
styleVersion: number;
diff --git a/app/src/layout/dock/graph/types.ts b/app/src/layout/dock/graph/types.ts
index 49bc4bc50b..101b34ea7b 100644
--- a/app/src/layout/dock/graph/types.ts
+++ b/app/src/layout/dock/graph/types.ts
@@ -41,7 +41,7 @@ export interface IGraphData {
targets: Uint32Array;
references: Uint8Array;
degrees: Uint32Array;
- sizes: Float32Array;
+ sizes: Float32Array<ArrayBuffer>;
}
export interface IGraphOptions {
@@ -113,8 +113,8 @@ export interface IGraphLayoutOptions {
export type TGraphLayoutRequest = {
type: "init";
generation: number;
- positions: Float32Array;
- sizes: Float32Array;
+ positions: Float32Array<ArrayBuffer>;
+ sizes: Float32Array<ArrayBuffer>;
sources: Uint32Array;
targets: Uint32Array;
degrees: Uint32Array;
@@ -142,7 +142,7 @@ export type TGraphLayoutRequest = {
export type TGraphLayoutResponse = {
type: "positions";
generation: number;
- positions: Float32Array;
+ positions: Float32Array<ArrayBuffer>;
settled: boolean;
} | {
type: "released";
diff --git a/app/src/layout/dock/graph/webglRenderer.ts b/app/src/layout/dock/graph/webglRenderer.ts
index c47b1735e8..93269f5431 100644
--- a/app/src/layout/dock/graph/webglRenderer.ts
+++ b/app/src/layout/dock/graph/webglRenderer.ts
@@ -472,7 +472,7 @@ export class GraphWebGLRenderer implements IGraphRenderer {
gl.vertexAttribDivisor(location, divisor);
}
- private createStaticBuffer(data: Float32Array) {
+ private createStaticBuffer(data: Float32Array<ArrayBuffer>) {
const buffer = this.createBuffer();
this.upload(buffer, data, this.gl.STATIC_DRAW);
return buffer;
diff --git a/app/src/layout/topBar.ts b/app/src/layout/topBar.ts
index 0bedff04c4..458c5a4ead 100644
--- a/app/src/layout/topBar.ts
+++ b/app/src/layout/topBar.ts
@@ -22,7 +22,7 @@ import {Constants} from "../constants";
import {isBrowser, isWindow, setToolbarLeftMac} from "../util/functions";
import {fetchPost} from "../util/fetch";
import {needSubscribe} from "../util/needSubscribe";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {exportLayout, resizeTopBar} from "./util";
import {setTabPosition} from "./tabUtil";
import {commandPanel} from "../boot/globalEvent/command/panel";
diff --git a/app/src/menus/commonMenuItem.ts b/app/src/menus/commonMenuItem.ts
index 7f81583dcf..a41db6f870 100644
--- a/app/src/menus/commonMenuItem.ts
+++ b/app/src/menus/commonMenuItem.ts
@@ -29,7 +29,7 @@ import {focusByRange} from "../protyle/util/selectionOffsets";
import {openAsset, openAssetInBackground, openBy} from "../editor/util";
/// #endif
import {rename, replaceFileName} from "../editor/rename";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {Constants} from "../constants";
import {exportImage} from "../protyle/export/util";
import type {App} from "../index";
diff --git a/app/src/menus/layouts.ts b/app/src/menus/layouts.ts
index 60ffe21a4a..ea56e33380 100644
--- a/app/src/menus/layouts.ts
+++ b/app/src/menus/layouts.ts
@@ -10,7 +10,7 @@ import {upDownHint} from "../util/upDownHint";
import {isBrowser} from "../util/functions";
import {editWindowWorkspace, getWindowWorkspaces, openWindowWorkspace, removeWindowWorkspace} from "../window/workspace";
import {MenuItem} from "./Menu";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {captureWindowGeometry, restoreWindowGeometry} from "../window/geometry";
import type {IWindowGeometry} from "../window/geometry";
/// #if !BROWSER
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index 98ad244495..c45bda61bd 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -49,7 +49,7 @@ import {openNewWindowById} from "../window/openNewWindow";
import {openBacklink, openGraph} from "../layout/dock/util";
/// #endif
import {getSearch, isMobile} from "../util/functions";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {blockRender} from "../protyle/render/blockRender";
import {renameAsset} from "../editor/rename";
import {renderImageDisplay} from "../protyle/render/imageDisplay";
diff --git a/app/src/mobile/menu/mainMenuSearch.ts b/app/src/mobile/menu/mainMenuSearch.ts
index 3212a0c906..e83c9ca242 100644
--- a/app/src/mobile/menu/mainMenuSearch.ts
+++ b/app/src/mobile/menu/mainMenuSearch.ts
@@ -50,7 +50,7 @@ const createSettingSearchMountQueue = (app: App) => {
mount(root: HTMLElement, tabId: TSettingTab, keywords: string, result: SettingTabSearchResult) {
const taskVersion = ++version;
const previousQueue = queue;
- queue = previousQueue.catch(() => undefined).then(async () => {
+ queue = previousQueue.catch((): undefined => undefined).then(async () => {
if (taskVersion !== version || !root.isConnected) {
if (!root.isConnected) {
unmountSettingTab(root, tabId);
diff --git a/app/src/mobile/util/MobileEditorDialog.ts b/app/src/mobile/util/MobileEditorDialog.ts
index 1e3c56d4af..309acaec68 100644
--- a/app/src/mobile/util/MobileEditorDialog.ts
+++ b/app/src/mobile/util/MobileEditorDialog.ts
@@ -1,21 +1,29 @@
import {showMessage} from "../../dialog/message";
import {escapeHtml} from "../../util/escape";
+import type {Dialog} from "../../dialog";
-export type MobileEditorDialog = InstanceType<ReturnType<typeof createMobileEditorDialog>>;
+export type MobileEditorDialog = Dialog & {
+ beforeClose: () => Promise<void>;
+ register: () => void;
+ close: () => Promise<void>;
+ discard: () => void;
+};
+
+type MobileEditorDialogConstructor = new (options: ConstructorParameters<typeof Dialog>[0]) => MobileEditorDialog;
const sheets = new Set<MobileEditorDialog>();
-let dialogClass: ReturnType<typeof createMobileEditorDialog>;
+let dialogClass: MobileEditorDialogConstructor;
export const closeMobileEditorSheets = () => {
if (sheets.size) {
- return Promise.all(Array.from(sheets, dialog => dialog.close())).then(() => undefined);
+ return Promise.all(Array.from(sheets, dialog => dialog.close())).then((): undefined => undefined);
}
};
// 创建抽屉时再加载对话框基类,避免菜单和编辑器模块在启动期间形成循环依赖。
-export const getMobileEditorDialog = () => dialogClass ??= createMobileEditorDialog();
+export const getMobileEditorDialog = (): MobileEditorDialogConstructor => dialogClass ??= createMobileEditorDialog();
-const createMobileEditorDialog = () => {
+const createMobileEditorDialog = (): MobileEditorDialogConstructor => {
const {Dialog}: typeof import("../../dialog") = require("../../dialog");
return class MobileEditorDialog extends Dialog {
public beforeClose: () => Promise<void>;
diff --git a/app/src/mobile/util/secondaryEditors.ts b/app/src/mobile/util/secondaryEditors.ts
index da1e822492..e3d33704ac 100644
--- a/app/src/mobile/util/secondaryEditors.ts
+++ b/app/src/mobile/util/secondaryEditors.ts
@@ -30,7 +30,7 @@ export const flushMobileSecondaryEditor = (editor: Protyle) => {
if (record.flushing === flushing) {
record.flushing = undefined;
}
- }, () => undefined);
+ }, (): undefined => undefined);
}
return flushing;
};
diff --git a/app/src/plugin/API.test.ts b/app/src/plugin/API.test.ts
index 939e91111b..f80bfa45db 100644
--- a/app/src/plugin/API.test.ts
+++ b/app/src/plugin/API.test.ts
@@ -16,6 +16,7 @@ it("defers plugin API dependency reads and shares the initialized API", () => {
const openAssetPicker = async (): Promise<null> => null;
const dependency = new Proxy({}, {
get(_target, key) {
+ if (key === "__esModule") return true;
assert.ok(dependenciesReady, `Dependency ${String(key)} was read during module initialization`);
if (key === "openInputDialog") {
return openInputDialog;
diff --git a/app/src/plugin/lifecycle.ts b/app/src/plugin/lifecycle.ts
index 03401e0fd6..335c59bc3c 100644
--- a/app/src/plugin/lifecycle.ts
+++ b/app/src/plugin/lifecycle.ts
@@ -225,7 +225,7 @@ export class PluginLifecycleCoordinator<TData, TPlugin> {
tasks.push(task);
}
});
- return Promise.all(tasks).then(() => undefined);
+ return Promise.all(tasks).then((): undefined => undefined);
}
public getState(name: string): TPluginLifecycleState {
@@ -433,7 +433,7 @@ export class PluginLifecycleCoordinator<TData, TPlugin> {
const provider = this.observe(record.name, "loadData", () => task.dataProvider?.());
const result = await Promise.race([
provider.then((data) => ({type: "data" as const, data})),
- record.interrupt.promise.then(() => ({type: "interrupt" as const, data: undefined})),
+ record.interrupt.promise.then((): {type: "interrupt"; data: undefined} => ({type: "interrupt" as const, data: undefined})),
]);
return result.type === "data" ? result.data : undefined;
}
@@ -522,7 +522,7 @@ export class PluginLifecycleCoordinator<TData, TPlugin> {
if (!result || typeof result.then !== "function") {
return Promise.resolve(true);
}
- const promise = Promise.resolve(result).catch((error) => {
+ const promise = Promise.resolve(result).catch((error): undefined => {
this.adapter.onError(name, hook, error);
});
if (deadlineReached || deadline <= this.now()) {
@@ -595,7 +595,7 @@ export class PluginLifecycleCoordinator<TData, TPlugin> {
private observe<T>(name: string, hook: TPluginLifecycleHook, callback: () => Promise<T> | T): Promise<T | undefined> {
try {
- return Promise.resolve(callback()).catch((error) => {
+ return Promise.resolve(callback()).catch((error): undefined => {
this.adapter.onError(name, hook, error);
return undefined;
});
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index e6944d7e27..77488ab6f0 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -57,7 +57,7 @@ import {
getTopAloneElement,
isNotEditBlock
} from "../wysiwyg/getBlock";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {fetchPost, fetchSyncPost} from "../../util/fetch";
import {escapeAttr} from "../../util/escape";
import {confirmBlockRef} from "../../util/checkBlockRef";
@@ -2106,7 +2106,7 @@ export class Gutter {
}
const start = response.data?.start;
return response.data?.found && typeof start === "number" && Number.isInteger(start) ? start : undefined;
- }).catch(() => undefined) : undefined;
+ }).catch((): undefined => undefined) : undefined;
const genListBlockSubmenu = (continueListStart?: number) => {
const submenu: IMenu[] = [];
if (type === "NodeListItem" && nodeElement.getAttribute("data-subtype") === "t") {
diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts
index c30589e459..837463d5d4 100644
--- a/app/src/protyle/header/Title.ts
+++ b/app/src/protyle/header/Title.ts
@@ -12,7 +12,7 @@ import {openFileAttr,} from "../../menus/commonMenuItem";
import {Constants} from "../../constants";
import {matchHotKey} from "../util/hotKey";
import {isMac, readText} from "../util/compatibility";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
/// #if !MOBILE
import {openFileById} from "../../editor/util";
/// #endif
diff --git a/app/src/protyle/header/documentMenu.ts b/app/src/protyle/header/documentMenu.ts
index 81a2946a9d..079f676be6 100644
--- a/app/src/protyle/header/documentMenu.ts
+++ b/app/src/protyle/header/documentMenu.ts
@@ -17,7 +17,7 @@ import {viewCards} from "../../card/viewCards";
import {getDisplayName, getNotebookName, isEncryptedBox, pathPosix, useShell} from "../../util/pathName";
import {makeCard, quickMakeCard} from "../../card/makeCard";
import {emitOpenMenu} from "../../plugin/EventBus";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {popSearch} from "../../mobile/menu/search";
import {openSearch} from "../../search/spread";
import {openDocHistory} from "../../history/doc";
diff --git a/app/src/protyle/hint/frequentSlashExecution.test.ts b/app/src/protyle/hint/frequentSlashExecution.test.ts
index 4deabe4a40..4e04909dec 100644
--- a/app/src/protyle/hint/frequentSlashExecution.test.ts
+++ b/app/src/protyle/hint/frequentSlashExecution.test.ts
@@ -33,7 +33,7 @@ const fixture = () => {
{code: 4, table: 2, "plugin:one:same": 3, "plugin:two:same": 1}),
});
Object.assign(hint, {source: "hint", splitChar: "/", lastIndex: -1, fixImageCursor() {},
- element: {closest: () => undefined}});
+ element: {closest: (): undefined => undefined}});
const protyle = {toolbar: {range}, wysiwyg: {element: {}}};
return {hint, protyle, counts, unavailable: () => { available = false; }};
};
diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts
index 8137d6f985..42212e6e7d 100644
--- a/app/src/protyle/index.ts
+++ b/app/src/protyle/index.ts
@@ -738,15 +738,6 @@ export class Protyle {
});
}
- /**
- * @deprecated 将在 3.7.1 版本中移除。请改用 {@link updateTransactionElement}。
- */
- public updateTransaction(id: string, newHTML: string, html: string) {
- const element = document.createElement("template");
- element.innerHTML = newHTML;
- updateTransaction(this.protyle, element.content.firstElementChild, html);
- }
-
public updateTransactionElement(element: Element, oldHTML: string) {
updateTransaction(this.protyle, element, oldHTML);
}
diff --git a/app/src/protyle/preview/platformCopy.ts b/app/src/protyle/preview/platformCopy.ts
index c5293364aa..9aee1b6052 100644
--- a/app/src/protyle/preview/platformCopy.ts
+++ b/app/src/protyle/preview/platformCopy.ts
@@ -74,7 +74,7 @@ const preserveSpaces = (line: string) => line
export const getWechatCodeLines = (text: string) => text.split(/\r\n|\r|\n/).map(preserveSpaces);
export const buildExpandedTableGrid = <T extends ITableGridCell>(rows: T[][]) => {
- const grid: Array<Array<T | undefined>> = rows.map(() => []);
+ const grid: Array<Array<T | undefined>> = rows.map((): Array<T | undefined> => []);
let columnCount = 0;
rows.forEach((cells, rowIndex) => {
let columnIndex = 0;
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index 29aa260e60..bfb5e99d37 100644
--- a/app/src/protyle/render/av/action.ts
+++ b/app/src/protyle/render/av/action.ts
@@ -38,7 +38,7 @@ import {focusByRange} from "../../util/selectionOffsets";
import {showMessage} from "../../../dialog/message";
import {previewAttrViewImages} from "../../preview/image";
import {unicode2Emoji} from "../../../emoji";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {openCalcMenu} from "./calc";
import {avRender, initUnfoldedGroupTables, setAVGroupFolded as setGroupFolded} from "./render";
import {addView, openViewMenu} from "./view";
diff --git a/app/src/protyle/render/av/addToDatabase.ts b/app/src/protyle/render/av/addToDatabase.ts
index 77e145fed5..f77e74c8b4 100644
--- a/app/src/protyle/render/av/addToDatabase.ts
+++ b/app/src/protyle/render/av/addToDatabase.ts
@@ -2,7 +2,7 @@ import {openSearchAV} from "./relation";
import {transaction} from "../../wysiwyg/transaction";
import {focusByRange} from "../../util/selectionOffsets";
import {hasClosestBlock} from "../../util/hasClosest";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {getAVFilteredTipContext} from "./filteredTip";
export const addFilesToDatabase = (fileLiElements: Element[]) => {
diff --git a/app/src/protyle/render/av/asset.ts b/app/src/protyle/render/av/asset.ts
index 580f2ad5d7..e36474ab0b 100644
--- a/app/src/protyle/render/av/asset.ts
+++ b/app/src/protyle/render/av/asset.ts
@@ -23,7 +23,7 @@ import {
import {writeText} from "../../util/compatibility";
import {escapeAriaLabel, escapeAttr, escapeHtml} from "../../../util/escape";
import {renameAsset} from "../../../editor/rename";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {getColId} from "./col";
import {getFieldIdByCellElement} from "./row";
import {getCompressURL, removeCompressURL} from "../../../util/image";
diff --git a/app/src/protyle/render/av/calendar/date.test.ts b/app/src/protyle/render/av/calendar/date.test.ts
index 5e96e5a804..7cd71cdf79 100644
--- a/app/src/protyle/render/av/calendar/date.test.ts
+++ b/app/src/protyle/render/av/calendar/date.test.ts
@@ -109,7 +109,7 @@ test("calendar all-day end is inclusive and timed midnight is exclusive", () =>
assert.equal(getCalendarInterval(value).end, day("2026-09-21"));
value.date.isNotTime = false;
assert.equal(getCalendarInterval(value).end, day("2026-09-20"));
- const segments = packCalendarWeek([{...getCalendarInterval(value), row: {id: "one", cells: []}, date: {value}}], day("2026-09-14"));
+ const segments = packCalendarWeek([{...getCalendarInterval(value), row: {id: "one", cells: new Array<IAVCell>()}, date: {value}}], day("2026-09-14"));
assert.equal(segments[0].span, 1);
assert.equal(segments[0].column, 5);
});
@@ -128,7 +128,7 @@ test("missing and reversed endpoints preserve the source value", () => {
test("calendar packing splits cross-week events without overlapping lanes", () => {
const start = day("2026-09-14");
const events = Array.from({length: 100}, (_, i) => ({start: addCalendarDays(start, i % 7 - 3),
- end: addCalendarDays(start, i % 7 + 9), invalid: false, row: {id: `${i}`, cells: []}, date: {}}));
+ end: addCalendarDays(start, i % 7 + 9), invalid: false, row: {id: `${i}`, cells: new Array<IAVCell>()}, date: {}}));
const segments = packCalendarWeek(events, start);
assert.equal(segments.length, 100);
for (const segment of segments) {
diff --git a/app/src/protyle/render/av/calendar/jump.ts b/app/src/protyle/render/av/calendar/jump.ts
index bfec572d49..cf557cb50e 100644
--- a/app/src/protyle/render/av/calendar/jump.ts
+++ b/app/src/protyle/render/av/calendar/jump.ts
@@ -1,4 +1,4 @@
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {openInputDialog} from "../../../../dialog/inputDialog";
import {escapeAttr, escapeHtml} from "../../../../util/escape";
import {getCalendarRange, getISOWeekForCalendarRow, getISOWeeksInYear, getISOWeekThursday} from "./date";
diff --git a/app/src/protyle/render/av/calendar/render.ts b/app/src/protyle/render/av/calendar/render.ts
index 4f9ff23f26..d850aa93fe 100644
--- a/app/src/protyle/render/av/calendar/render.ts
+++ b/app/src/protyle/render/av/calendar/render.ts
@@ -1,7 +1,7 @@
import {AV_DATE_TYPES} from "../capabilities";
import {Constants} from "../../../../constants";
import {setStorageVal} from "../../../util/compatibility";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {escapeAttr, escapeHtml} from "../../../../util/escape";
import {isMobile} from "../../../../util/functions";
import {transaction} from "../../../wysiwyg/transaction";
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index a71a1dd2ce..0d6de6ffa4 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -10,7 +10,7 @@ import {isDynamicRef, objEquals} from "../../../util/functions";
import {fetchPost, fetchSyncPost} from "../../../util/fetch";
import {focusBlock} from "../../util/selection";
import {focusByRange} from "../../util/selectionOffsets";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {openEmojiPanel, unicode2Emoji} from "../../../emoji";
import {getColIconByType, getColId} from "./col";
import {genAVRelationHTML, genAVValueHTML, getAVTemplateHTML} from "./attributeValue";
diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts
index 41f316d4c0..ca15309857 100644
--- a/app/src/protyle/render/av/col.ts
+++ b/app/src/protyle/render/av/col.ts
@@ -18,7 +18,7 @@ import {focusBlock} from "../../util/selection";
import {toggleUpdateRelationBtn} from "./relation";
import {bindRollupData, getRollupHTML} from "./rollup";
import {Constants} from "../../../constants";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {setPosition} from "../../../util/setPosition";
import {duplicateNameAddOne, isMobile} from "../../../util/functions";
import {Dialog} from "../../../dialog";
diff --git a/app/src/protyle/render/av/conditionalColor.test.ts b/app/src/protyle/render/av/conditionalColor.test.ts
index a43b4f9a3a..823cfaf8bb 100644
--- a/app/src/protyle/render/av/conditionalColor.test.ts
+++ b/app/src/protyle/render/av/conditionalColor.test.ts
@@ -14,7 +14,7 @@ test("conditional backgrounds preserve explicit defaults and independent propert
});
test("conditional rule drops preserve values and handle both directions and unchanged positions", () => {
- const rules: IAVConditionalColorRule[] = ["a", "b", "c"].map(id => ({id, target: "item", color: null,
+ const rules: IAVConditionalColorRule[] = ["a", "b", "c"].map((id): IAVConditionalColorRule => ({id, target: "item", color: null,
matchOption: false, filter: {column: "text", operator: "Is not empty"}}));
const ids = (items: IAVConditionalColorRule[]) => items.map(item => item.id);
assert.deepEqual(ids(moveConditionalColorRule(rules, "a", "c", false)), ["b", "c", "a"]);
diff --git a/app/src/protyle/render/av/conditionalColorMenu.test.ts b/app/src/protyle/render/av/conditionalColorMenu.test.ts
index fc2b48d745..9e5398c27f 100644
--- a/app/src/protyle/render/av/conditionalColorMenu.test.ts
+++ b/app/src/protyle/render/av/conditionalColorMenu.test.ts
@@ -78,7 +78,7 @@ test("rule menus dismiss outside dropdowns, preserve selections, and support dra
}},
})[name] || {}),
});
- const rules: IAVConditionalColorRule[] = ["a", "b", "c"].map(id => ({id, target: "item", color: null,
+ const rules: IAVConditionalColorRule[] = ["a", "b", "c"].map((id): IAVConditionalColorRule => ({id, target: "item", color: null,
matchOption: false, filter: {column: "text", operator: "Is not empty"}}));
await methods.openConditionalColorsMenu({
protyle: {options: {}} as IProtyle,
diff --git a/app/src/protyle/render/av/date.ts b/app/src/protyle/render/av/date.ts
index 66f58c8a60..d453d89bf0 100644
--- a/app/src/protyle/render/av/date.ts
+++ b/app/src/protyle/render/av/date.ts
@@ -1,4 +1,4 @@
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {genCellValueByElement, updateCellsValue} from "./cell";
import {getFieldsByData} from "./view";
import {shouldSubmitDateEdit} from "./dateSubmit";
diff --git a/app/src/protyle/render/av/fieldValueEditor.ts b/app/src/protyle/render/av/fieldValueEditor.ts
index d1b70dfc3e..e5219bd83a 100644
--- a/app/src/protyle/render/av/fieldValueEditor.ts
+++ b/app/src/protyle/render/av/fieldValueEditor.ts
@@ -3,7 +3,7 @@ import {Menu} from "../../../plugin/Menu";
import {escapeAttr, escapeHtml} from "../../../util/escape";
import {fetchPost} from "../../../util/fetch";
import {upDownHint} from "../../../util/upDownHint";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {getAVBlockRefSubtype} from "./cellValue";
import {getAVColorStyle} from "./color";
import {createAVPlainTextEditValue} from "./richTextValue";
diff --git a/app/src/protyle/render/av/filter.ts b/app/src/protyle/render/av/filter.ts
index 99c93aa372..488b5161a7 100644
--- a/app/src/protyle/render/av/filter.ts
+++ b/app/src/protyle/render/av/filter.ts
@@ -5,7 +5,7 @@ import {escapeAttr, escapeHtml} from "../../../util/escape";
import {getColIconByType} from "./col";
import {setPosition} from "../../../util/setPosition";
import {genCellValue, getCellValueText} from "./cell";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {unicode2Emoji} from "../../../emoji";
import {fetchPost, fetchSyncPost} from "../../../util/fetch";
import {getFieldsByData} from "./view";
@@ -457,7 +457,7 @@ export const prepareFilterColumns = async (data: IAV) => {
if (!request) {
request = fetchSyncPost("/api/av/getAttributeView", {id: targetAVID}).then((response) => {
return response.code === 0 ? (response.data?.av?.keyValues || []).map(item => item.key) : [];
- }).catch(() => []);
+ }).catch((): IAVColumn[] => []);
avRequests.set(targetAVID, request);
}
const targetColumns = await request;
diff --git a/app/src/protyle/render/av/kanban/groupMenu.ts b/app/src/protyle/render/av/kanban/groupMenu.ts
index 80d7903790..323fc72820 100644
--- a/app/src/protyle/render/av/kanban/groupMenu.ts
+++ b/app/src/protyle/render/av/kanban/groupMenu.ts
@@ -2,7 +2,7 @@ import {Menu} from "../../../../plugin/Menu";
import {Constants} from "../../../../constants";
import {transaction} from "../../../wysiwyg/transaction";
import {confirmDialog} from "../../../../dialog/confirmDialog";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {getAVData} from "../virtualScroll";
import {
AV_MANAGE_CUSTOM_COLORS_TYPE,
diff --git a/app/src/protyle/render/av/locationIntegration.test.ts b/app/src/protyle/render/av/locationIntegration.test.ts
index 161f39301b..239f3f26ca 100644
--- a/app/src/protyle/render/av/locationIntegration.test.ts
+++ b/app/src/protyle/render/av/locationIntegration.test.ts
@@ -30,6 +30,8 @@ const loadModule = <T>(file: string, extra: Record<string, unknown> = {}) => {
const modules: Record<string, unknown> = {
...Object.fromEntries(unusedDependencies.map(name => [name, new Proxy({}, {
get: (_target, member) => {
+ if (member === "__esModule") return true;
+ if (member === "default") return modules[name];
throw new Error(`Unexpected dependency use in ${file}: ${name}.${String(member)}`);
},
})])),
diff --git a/app/src/protyle/render/av/lunarDate.test.ts b/app/src/protyle/render/av/lunarDate.test.ts
index 8bebf8ffd6..978952336c 100644
--- a/app/src/protyle/render/av/lunarDate.test.ts
+++ b/app/src/protyle/render/av/lunarDate.test.ts
@@ -149,7 +149,7 @@ const browserCases = (sources: Record<string, string>, language: Record<string,
control.dispatchEvent(key);
check.equal(key.defaultPrevented, false, "native control navigation remains available");
if (control instanceof HTMLSelectElement) {
- const before = closeCount;
+ const before: number = closeCount;
control.dispatchEvent(new KeyboardEvent("keydown", {key: "Enter", bubbles: true}));
check.equal(closeCount, before, "Enter on a select confirms its option without closing the editor");
}
diff --git a/app/src/protyle/render/av/relation.ts b/app/src/protyle/render/av/relation.ts
index 464009116b..38512e8efa 100644
--- a/app/src/protyle/render/av/relation.ts
+++ b/app/src/protyle/render/av/relation.ts
@@ -10,7 +10,7 @@ import {genCellValueByElement, getCellValueText, renderCell, updateCellsValue} f
import {updateAttrViewCellAnimation} from "./action";
import {focusBlock} from "../../util/selection";
import {setPosition} from "../../../util/setPosition";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {getFieldsByData, getViewName} from "./view";
import {getColIconByType, getColId} from "./col";
import {getFieldIdByCellElement} from "./row";
diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.ts
index 254d0a61df..32f7d7fadd 100644
--- a/app/src/protyle/render/av/row.ts
+++ b/app/src/protyle/render/av/row.ts
@@ -15,7 +15,7 @@ import {
renderCellAttr
} from "./cell";
import {fetchPost} from "../../../util/fetch";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {Constants} from "../../../constants";
import {insertGalleryItemAnimation} from "./gallery/item";
import {clearSelect} from "../../util/clear";
diff --git a/app/src/protyle/render/av/select.ts b/app/src/protyle/render/av/select.ts
index 316714044a..63d75df43b 100644
--- a/app/src/protyle/render/av/select.ts
+++ b/app/src/protyle/render/av/select.ts
@@ -9,7 +9,7 @@ import {updateAttrViewCellAnimation} from "./action";
import {isCustomAttr} from "./blockAttr";
import {escapeAriaLabel, escapeAttr, escapeHtml} from "../../../util/escape";
import {genCellValueByElement, getTypeByCellElement, updateAttrViewCellInOtherElements} from "./cell";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {getFieldsByData} from "./view";
import {getFieldIdByCellElement} from "./row";
import {Constants} from "../../../constants";
diff --git a/app/src/protyle/render/av/testDOM.ts b/app/src/protyle/render/av/testDOM.ts
index 8a9288035c..34eec01f09 100644
--- a/app/src/protyle/render/av/testDOM.ts
+++ b/app/src/protyle/render/av/testDOM.ts
@@ -123,7 +123,8 @@ export class DOMElement {
dispatch(type: string, options: {key?: string; bubbles?: boolean} = {}) {
let stopped = false;
let immediate = false;
- const event = {target: this, key: options.key, defaultPrevented: false,
+ const event: {target: DOMElement; key: string; defaultPrevented: boolean; preventDefault: () => void;
+ stopPropagation: () => void; stopImmediatePropagation: () => void} = {target: this, key: options.key, defaultPrevented: false,
preventDefault() { this.defaultPrevented = true; },
stopPropagation() { stopped = true; }, stopImmediatePropagation() { stopped = true; immediate = true; }};
const dispatchTo = (element: DOMElement) => {
diff --git a/app/src/protyle/render/iframeResize.test.ts b/app/src/protyle/render/iframeResize.test.ts
index b457f17153..e900cb0ee2 100644
--- a/app/src/protyle/render/iframeResize.test.ts
+++ b/app/src/protyle/render/iframeResize.test.ts
@@ -73,7 +73,10 @@ const browserCases = async (renderSource: string, resizeSource: string, luteSour
const exports = {};
modules[id] = exports;
if (!source) {
- return new Proxy(exports, {get: (_target, key) => check.fail(`Unexpected insertion dependency: ${id}.${String(key)}`)});
+ return new Proxy(exports, {get: (_target, key) => {
+ if (key === "__esModule") return false;
+ return check.fail(`Unexpected insertion dependency: ${id}.${String(key)}`);
+ }});
}
new Function("exports", "require", source)(exports, (specifier: string) => load(
require("node:path").posix.normalize(require("node:path").posix.join(id, "..", specifier))
@@ -355,7 +358,7 @@ const browserCases = async (renderSource: string, resizeSource: string, luteSour
const bridge = {} as {initTouchDragBridge: () => void};
new Function("exports", "require", bridgeSource)(bridge, (id: string) => id === "./touchDragBridgeCore" ? bridgeCore : {
Constants: {SIZE_DRAG_THRESHOLD: 5, TIMEOUT_LONGPRESS: 460, TIMEOUT_MOUSE_DRAG_DELAY: 150},
- isInAndroid: () => false, ipcRenderer: {on() {}}, stopScrollAnimation() {},
+ isInAndroid: () => false, isInHarmony: () => false, ipcRenderer: {on() {}}, stopScrollAnimation() {},
});
Object.assign(window, {siyuan: {touchDragActive: false}});
bridge.initTouchDragBridge();
@@ -597,7 +600,7 @@ test("external resize handles preserve source, independent axes, historical dime
visit(source);
assert.ok(resize);
const resizeSource = transpileModule(`function resize() { ${resize} }`, {compilerOptions: {target: ScriptTarget.ES2021}})
- .outputText.replace(/^function resize\(\) \{/, "").replace(/\}\s*$/, "");
+ .outputText + "\nreturn resize.call(this);";
const renderSource = transpileModule(readFileSync("src/protyle/render/iframeResize.ts", "utf8").replace(/^export /gm, ""),
{compilerOptions: {target: ScriptTarget.ES2021}}).outputText;
const css = compileString('@use "protyle/protyle"; @use "component/typography"; @use "business/resize";',
@@ -625,7 +628,7 @@ test("external resize handles preserve source, independent axes, historical dime
const hintFile = createSourceFile("hint.ts", readFileSync("src/protyle/hint/index.ts", "utf8"), ScriptTarget.ES2021, true);
const hintDeclaration = hintFile.statements.find(node => isClassDeclaration(node) && node.name.text === "Hint");
assert.ok(hintDeclaration && isClassDeclaration(hintDeclaration));
- const hintMethods = hintDeclaration.members.filter(member => ["fill", "fillCommand"].includes(member.name?.getText(hintFile)))
+ const hintMethods = hintDeclaration.members.filter(member => ["fill", "fillCommand", "consumeRefBracketClose"].includes(member.name?.getText(hintFile)))
.map(member => member.getText(hintFile)).join("\n");
const hintSource = transpileModule(`class Hint { ${hintMethods} }`, {compilerOptions: {target: ScriptTarget.ES2021}}).outputText;
const menuFile = createSourceFile("menu.ts", readFileSync("src/menus/protyle.ts", "utf8"), ScriptTarget.ES2021, true);
diff --git a/app/src/protyle/render/imageTitleEditor.ts b/app/src/protyle/render/imageTitleEditor.ts
index b3e1e3cdef..cbb938dfe5 100644
--- a/app/src/protyle/render/imageTitleEditor.ts
+++ b/app/src/protyle/render/imageTitleEditor.ts
@@ -1,4 +1,4 @@
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {hideTooltip} from "../../dialog/tooltip";
import {getImageTitle, setImageTitle} from "./imageTitle";
import {hasClosestBlock} from "../util/hasClosest";
diff --git a/app/src/protyle/render/listMindmap/arrows.test.ts b/app/src/protyle/render/listMindmap/arrows.test.ts
index 798e1b33ce..32a28542f7 100644
--- a/app/src/protyle/render/listMindmap/arrows.test.ts
+++ b/app/src/protyle/render/listMindmap/arrows.test.ts
@@ -64,7 +64,7 @@ const setup = (arrowDirection?: ListMindmapRelation["arrowDirection"]) => {
["b", {id: "b", x: -20, y: 0, width: 20, height: 20}]]),
relationElements: new Map([["r", element()]]),
relationRoutes: new Map([["r", [{x: 100, y: 10}, {x: 0, y: 10}]]]),
- routingObstacles: () => [], drawRelationPreview: () => {}, drawSummaries: () => {}, renderRouteControls: () => {},
+ routingObstacles: (): unknown[] => [], drawRelationPreview: () => {}, drawSummaries: () => {}, renderRouteControls: () => {},
});
return {target, context, polygons, strokes, element};
};
diff --git a/app/src/protyle/render/listMindmap/focus.test.ts b/app/src/protyle/render/listMindmap/focus.test.ts
index c36b3830e9..fafb27293a 100644
--- a/app/src/protyle/render/listMindmap/focus.test.ts
+++ b/app/src/protyle/render/listMindmap/focus.test.ts
@@ -114,8 +114,9 @@ test("mind map transaction focus survives insertion, deletion and repeated undo/
let state: State = [{id: "root", children: ["existing"]}, {id: "existing", children: []}];
let selectedID = "existing";
let target: any;
+ type ModelNode = {id: string; children: ModelNode[]; parentId: string};
const getModel = () => {
- const nodes = new Map(state.map(node => [node.id, {id: node.id, children: [], parentId: ""}]));
+ const nodes = new Map<string, ModelNode>(state.map((node): [string, ModelNode] => [node.id, {id: node.id, children: [], parentId: ""}]));
state.forEach(node => {
nodes.get(node.id).children = node.children.map(id => {
const child = nodes.get(id);
diff --git a/app/src/protyle/render/listMindmap/model.test.ts b/app/src/protyle/render/listMindmap/model.test.ts
index 6098047415..5f67a0ab41 100644
--- a/app/src/protyle/render/listMindmap/model.test.ts
+++ b/app/src/protyle/render/listMindmap/model.test.ts
@@ -3838,7 +3838,7 @@ test("list mindmap mutations preserve block data in the real DOM and Lute", {
// 展开测试函数,避免断言失败时 Node 从压缩后的源码提取表达式而掩盖实际错误。
const browserSource = typescript.transpileModule(`(${browserCases.toString()})`, {
compilerOptions: {target: typescript.ScriptTarget.ES2021},
- }).outputText.trim().replace(/;$/, "");
+ }).outputText.trim().replace(/^"use strict";\s*/, "").replace(/;$/, "");
const code = `const {app, BrowserWindow, ipcMain} = require("electron");
app.setPath("userData", ${JSON.stringify(path.join(temporary, "profile"))});
app.commandLine.appendSwitch("disable-gpu");
diff --git a/app/src/protyle/render/listMindmap/relation.test.ts b/app/src/protyle/render/listMindmap/relation.test.ts
index a8cf9c8215..78ae3d8756 100644
--- a/app/src/protyle/render/listMindmap/relation.test.ts
+++ b/app/src/protyle/render/listMindmap/relation.test.ts
@@ -93,7 +93,7 @@ test("manual route save and reset use one transaction and reject stale relation
data = JSON.parse(saved);
const before = JSON.stringify(data);
target.onRelationChange("r", {arrowDirection});
- const transaction = transactions[transactions.length - 1];
+ const transaction: {before: string; after: string} = transactions[transactions.length - 1];
assert.equal(transaction.before, before, "undo retains the original relation and missing default field");
assert.deepEqual(JSON.parse(transaction.after).relations[0], {
...JSON.parse(before).relations[0], arrowDirection,
@@ -102,7 +102,7 @@ test("manual route save and reset use one transaction and reject stale relation
assert.equal(JSON.stringify(data), before);
data = JSON.parse(transaction.after);
assert.equal(JSON.stringify(data), transaction.after, "redo restores the selected arrow mode");
- const count = transactions.length;
+ const count: number = transactions.length;
target.onRelationChange("r", {arrowDirection});
assert.equal(transactions.length, count, "choosing the current direction is a no-op");
}
@@ -120,7 +120,7 @@ test("manual route save and reset use one transaction and reject stale relation
assert.equal(transactions[transactions.length - 1].after, beforeAnchor, "anchor reset preserves the manual path");
data = JSON.parse(anchored.after);
const anchorSnapshot = JSON.stringify(data.relations[0]);
- const count = transactions.length;
+ const count: number = transactions.length;
data.relations[0].label = "New remote label";
target.onRelationChange("r", {fromAnchor: {side: "left", ratio: .4}}, anchorSnapshot);
assert.equal(transactions.length, count, "stale anchor drags cannot replace remote updates");
diff --git a/app/src/protyle/render/mathRender.ts b/app/src/protyle/render/mathRender.ts
index 26742c47eb..b92ab1f890 100644
--- a/app/src/protyle/render/mathRender.ts
+++ b/app/src/protyle/render/mathRender.ts
@@ -149,7 +149,7 @@ export const mathRender = (element: Element, cdn = Constants.PROTYLE_CDN, maxWid
}
}
});
- return Promise.all(resizePromises).then(() => undefined);
+ return Promise.all(resizePromises).then((): undefined => undefined);
});
});
};
diff --git a/app/src/protyle/toolbar/entryVisibility.test.ts b/app/src/protyle/toolbar/entryVisibility.test.ts
index 4a423a7e08..4e3d975ed3 100644
--- a/app/src/protyle/toolbar/entryVisibility.test.ts
+++ b/app/src/protyle/toolbar/entryVisibility.test.ts
@@ -65,7 +65,7 @@ const resolve = (items: IToolbarTestItem[], options: {
getKey: (item) => item.key,
isSeparator: (item) => item.separator === true,
isVisible: (key) => !(options.hidden || []).includes(key),
- order: options.order || items.flatMap((item) => item.key || []),
+ order: options.order || items.flatMap((item): string | [] => item.key || []),
});
test("desktop toolbar defaults expose stable configuration identifiers", () => {
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index a33da655ac..3a61e65e0a 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -55,7 +55,7 @@ import {blockRender} from "../render/blockRender";
/// #endif
import {fetchPost} from "../../util/fetch";
import {isMobile} from "../../util/functions";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {insertEmptyBlock} from "../../block/util";
import {matchHotKey} from "../util/hotKey";
import {hideElements} from "../ui/hideElements";
diff --git a/app/src/protyle/util/blockClipboard.test.ts b/app/src/protyle/util/blockClipboard.test.ts
index 346268498c..ebc647886e 100644
--- a/app/src/protyle/util/blockClipboard.test.ts
+++ b/app/src/protyle/util/blockClipboard.test.ts
@@ -18,7 +18,9 @@ const setup = (platform = "MacIntel", maxTouchPoints = 5) => {
let selected: unknown;
let focused = false;
const editable = {focus: () => { focused = true; currentRange = null; }};
- const element = {matches: () => false, querySelector: () => editable};
+ const element: {matches: (selector: string) => boolean; querySelector: () => typeof editable} = {
+ matches: () => false, querySelector: () => editable,
+ };
const copyRange = {selectNodeContents: (target: unknown) => { selected = target; }};
Object.defineProperty(globalThis, "navigator", {configurable: true, value: {
userAgent: platform === "iPhone" ? "iPhone" : "Mozilla/5.0 (Macintosh)", platform, maxTouchPoints,
@@ -32,7 +34,7 @@ const setup = (platform = "MacIntel", maxTouchPoints = 5) => {
addRange: (range: unknown) => { currentRange = range; },
})},
});
- return {element: element as unknown as Element, editable, savedRange, copyRange,
+ return {rawElement: element, element: element as unknown as Element, editable, savedRange, copyRange,
current: () => currentRange, selected: () => selected, focused: () => focused};
};
@@ -76,7 +78,7 @@ describe("block menu clipboard selection", () => {
const state = setup(platform, platform === "Win32" ? 0 : 5);
const cursor = {focus: () => {}};
const hiddenTitle = {focus: () => assert.fail("hidden title must not receive focus")};
- state.element.matches = selector => selector === '[data-type="NodeAttributeView"]';
+ state.rawElement.matches = (selector: string) => selector === '[data-type="NodeAttributeView"]';
state.element.querySelector = <T extends Element>(selector: string) =>
(selector === ".av__cursor" ? cursor : hiddenTitle) as unknown as T;
copyBlockSelection(state.element, () => {
diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts
index edd376d58e..6f47cdb2e3 100644
--- a/app/src/protyle/util/compatibility.ts
+++ b/app/src/protyle/util/compatibility.ts
@@ -249,7 +249,7 @@ export const getLocalFiles = async () => {
cmd: "clipboardReadFiles",
});
if (Array.isArray(filePaths)) {
- localFiles = filePaths.map(path => ({path, size: null}));
+ localFiles = filePaths.map((path): ILocalFiles => ({path, size: null}));
}
} else {
const xmlString = await fetchSyncPost("/api/clipboard/readFilePaths", {});
diff --git a/app/src/protyle/util/contextMenuHotkey.test.ts b/app/src/protyle/util/contextMenuHotkey.test.ts
index 6696435344..6266541d06 100644
--- a/app/src/protyle/util/contextMenuHotkey.test.ts
+++ b/app/src/protyle/util/contextMenuHotkey.test.ts
@@ -130,7 +130,7 @@ test("keymap panel marks context menu conflicts and clears them after unbinding"
const rows = ["general.openContextMenu", "editor.general.undo"].map(path => ({
dataset: {key: path.replaceAll(".", constants.ZWSP), keys: '["⌘/"]', defaults: '["⌘/"]', conflict: "false"},
querySelector: () => ({querySelector: () => ({style: {}, tabIndex: 0})}),
- querySelectorAll: () => [],
+ querySelectorAll: (): Element[] => [],
}));
let hidden = true;
const filter = {dataset: {keymapFilterValue: "conflict"}, setAttribute() {},
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts
index cf5f5114d4..9b7b29fae6 100644
--- a/app/src/protyle/util/editorCommonEvent.ts
+++ b/app/src/protyle/util/editorCommonEvent.ts
@@ -47,7 +47,7 @@ import {insertHTML} from "./insertHTML";
import {isBrowser} from "../../util/functions";
import {hideElements} from "../ui/hideElements";
import {insertAttrViewBlockAnimation} from "../render/av/row";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {zoomOut} from "../../menus/protyle";
import {isFoldedHeading, shouldUnfoldMovedHeading} from "./foldHeadingMove";
/// #if !BROWSER
diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts
index 57268e8ade..b5fa589ff9 100644
--- a/app/src/protyle/util/insertHTML.ts
+++ b/app/src/protyle/util/insertHTML.ts
@@ -6,7 +6,7 @@ import {
hasClosestByTag,
isInEmbedBlock
} from "./hasClosest";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {transaction, updateTransaction} from "../wysiwyg/transaction";
import {copyTableCellContent} from "./tableCellRich";
import {
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index 0756c86045..fd42132b0f 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -50,7 +50,7 @@ import {
import {getAssetUploadPathsByInput, getCompleteAssetUploadPathsByInput} from "../upload/uploadResult";
import {resolveLinkDest} from "../toolbar/util";
import {updateTransaction} from "../wysiwyg/transaction";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {updateListOrder} from "../wysiwyg/list";
import {refreshSbAndPersistWidth} from "../../block/util";
import {
@@ -1459,7 +1459,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
if (localAssets.length > 0) {
let localAssetResult: Omit<IAssetUploadResult, "requestId" | "input"> | undefined;
await new Promise<void>(resolve => {
- uploadLocalFiles(localAssets.map(item => ({path: item.path, size: null})), protyle, true, {
+ uploadLocalFiles(localAssets.map((item): ILocalFiles => ({path: item.path, size: null})), protyle, true, {
...assetUploadOptions,
requiredFileCount: localAssets.length,
fromHTMLPaste: true,
diff --git a/app/src/protyle/util/table.ts b/app/src/protyle/util/table.ts
index a22ec4c572..e939726d53 100644
--- a/app/src/protyle/util/table.ts
+++ b/app/src/protyle/util/table.ts
@@ -17,7 +17,7 @@ import {scrollCenter} from "../../util/highlightById";
import {insertEmptyBlock} from "../../block/util";
import {removeBlock} from "../wysiwyg/remove";
import {hasNextSibling, hasPreviousSibling} from "../wysiwyg/getBlock";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {
getProjectedTableHeadRowCount,
getTableHeadRowCount,
diff --git a/app/src/protyle/util/tableCellRichLute.test.ts b/app/src/protyle/util/tableCellRichLute.test.ts
index 11dfecb307..f401de37fc 100644
--- a/app/src/protyle/util/tableCellRichLute.test.ts
+++ b/app/src/protyle/util/tableCellRichLute.test.ts
@@ -297,7 +297,8 @@ const browserCases = async (source: string, enterSource: string, hintSource: str
};
const enter = new Function(...Object.keys(dependencies), enterSource + "\nreturn enter;")(
...Object.values(dependencies)) as typeof import("../wysiwyg/enter").enter;
- const fill = new Function(...Object.keys(dependencies), hintSource + "\nreturn Hint.prototype.fill;")(...Object.values(dependencies));
+ const Hint = new Function(...Object.keys(dependencies), hintSource + "\nreturn Hint;")(...Object.values(dependencies));
+ const fill = Hint.prototype.fill;
const fragment = {wysiwyg, protyle, hintElement, getBlockHTML: () => wysiwyg.innerHTML};
const keyDependencies = {...dependencies, host, cell, table: cell.closest("table"), fragment, owner: protyle, signal: new AbortController().signal,
captureBeforeChange: () => {}, composing: false, matchHotKey: () => false, finish: () => {},
@@ -482,7 +483,8 @@ const browserCases = async (source: string, enterSource: string, hintSource: str
for (const prefix of ["", "existing "]) {
const range = prepare(prefix + "/");
range.setStart(range.startContainer, prefix.length);
- const context = {source: "hint", splitChar: "/", lastIndex: -1, fixImageCursor: () => {}};
+ const context = {source: "hint", splitChar: "/", lastIndex: -1, fixImageCursor: () => {},
+ consumeRefBracketClose: Hint.prototype.consumeRefBracketClose};
fill.call(context, "```", protyle, false);
const code = verifyCode(wysiwyg, window.siyuan.storage.codeLanguage);
check.equal(calls.rendered, code);
@@ -793,9 +795,10 @@ test("table cells insert code through slash and Enter without losing soft breaks
"\nreturn getTextWithoutSemanticMarkers;})();";
const hint = createSourceFile("hint.ts", read("../hint/index.ts"), ScriptTarget.Latest, true);
const hintClass = hint.statements.find(isClassDeclaration);
- const fill = hintClass.members.find(member => isMethodDeclaration(member) && member.name.getText(hint) === "fill");
+ const fill = hintClass.members.filter(member => isMethodDeclaration(member) &&
+ ["fill", "consumeRefBracketClose"].includes(member.name.getText(hint))).map(member => member.getText(hint)).join("\n");
const hintSource = compile(read("../../block/superBlock.ts") +
- "\nconst isProtyleListItemFragment = () => false; class Hint {" + fill.getText(hint) + "}");
+ "\nconst isProtyleListItemFragment = () => false; class Hint {" + fill + "}");
const editor = read("../render/tableCellRichEditor.ts");
const start = editor.indexOf('host.addEventListener("keydown", event => {');
const end = editor.indexOf("}, {capture: true, signal});", start) + "}, {capture: true, signal});".length;
diff --git a/app/src/protyle/util/transactionQueue.ts b/app/src/protyle/util/transactionQueue.ts
index 7910f9e605..1f5f4f45ed 100644
--- a/app/src/protyle/util/transactionQueue.ts
+++ b/app/src/protyle/util/transactionQueue.ts
@@ -25,7 +25,7 @@ const getTransactionQueue = (protyle: IProtyle) => {
};
const appendTransaction = (queue: ITransactionQueue, task: () => Promise<void>) => {
- const currentTransaction = queue.tail.catch(() => undefined).then(task);
+ const currentTransaction = queue.tail.catch((): undefined => undefined).then(task);
queue.tail = currentTransaction;
return currentTransaction;
};
@@ -71,5 +71,5 @@ export const waitForPendingTransactions = (protyle: IProtyle) => {
return Promise.resolve();
}
sealPendingBatches(queue);
- return queue.tail.catch(() => undefined);
+ return queue.tail.catch((): undefined => undefined);
};
diff --git a/app/src/protyle/util/undoReplayFocus.test.ts b/app/src/protyle/util/undoReplayFocus.test.ts
index 992356fc5b..d03243eaf5 100644
--- a/app/src/protyle/util/undoReplayFocus.test.ts
+++ b/app/src/protyle/util/undoReplayFocus.test.ts
@@ -102,7 +102,7 @@ const browserCases = async (source: string) => {
protyle, wysiwygElement: editor, element: document.createElement("div"),
abortController: new AbortController(), selectedCells: cells,
selection: {node, mode: "cell", activeCell: cells[1]},
- scheduleRender: () => undefined, isRectangle: () => true,
+ scheduleRender: (): undefined => undefined, isRectangle: () => true,
writeClipboard: () => true,
});
control.bindEvents();
diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.ts
index 4cb898fe37..de50ad429c 100644
--- a/app/src/protyle/wysiwyg/commonHotkey.ts
+++ b/app/src/protyle/wysiwyg/commonHotkey.ts
@@ -13,7 +13,7 @@ import {scrollCenter} from "../../util/highlightById";
import {transaction, updateTransaction} from "./transaction";
import {onGet} from "../util/onGet";
import {Constants} from "../../constants";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {net2LocalAssets} from "../breadcrumb/action";
import {copyTextByType} from "../toolbar/util";
import {hasClosestByTag, hasTopClosestByClassName} from "../util/hasClosest";
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 952c7090c7..fd22cffce4 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -65,7 +65,7 @@ import {
tagMenu,
zoomOut
} from "../../menus/protyle";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {dropEvent} from "../util/editorCommonEvent";
import {beforeBlockquoteInput, input} from "./input";
import {getMultilineInputText, isTextInputType} from "./multilineInput";
diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts
index 5c271959ee..9cf4dc8d75 100644
--- a/app/src/protyle/wysiwyg/input.ts
+++ b/app/src/protyle/wysiwyg/input.ts
@@ -1,7 +1,7 @@
import {focusBlock, focusByOffset, focusByWbr, getEditorRange} from "../util/selection";
import {getSelectionOffset} from "../util/selectionOffsets";
import {Constants} from "../../constants";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {transaction, turnsOneInto, updateTransaction, wrapBlockInBlockquote} from "./transaction";
import {mathRender} from "../render/mathRender";
import {highlightRender} from "../render/highlightRender";
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 5eaf6a1ced..21099d2e96 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -122,7 +122,7 @@ import {Constants} from "../../constants";
import {fetchPost} from "../../util/fetch";
import {scrollCenter} from "../../util/highlightById";
import {BlockPanel} from "../../block/Panel";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {countBlockWord, countSelectWord} from "../../layout/status";
import {moveToDown, moveToUp} from "./move";
import {beforePaste, pasteAsPlainText} from "../util/paste";
diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts
index 92c8900b50..8915c1ebea 100644
--- a/app/src/protyle/wysiwyg/list.ts
+++ b/app/src/protyle/wysiwyg/list.ts
@@ -2,7 +2,7 @@ import {focusByWbr, getEditorRange, getUndoFocusContext} from "../util/selection
import {focusByRange} from "../util/selectionOffsets";
import {transaction, turnsIntoOneTransaction, updateTransaction} from "./transaction";
import {genEmptyBlock} from "../../block/util";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {Constants} from "../../constants";
import {moveToPrevious, removeBlock} from "./remove";
import {hasClosestByClassName, isBlockElement} from "../util/hasClosest";
diff --git a/app/src/protyle/wysiwyg/listContext.ts b/app/src/protyle/wysiwyg/listContext.ts
index 4878936c8b..c6334df34a 100644
--- a/app/src/protyle/wysiwyg/listContext.ts
+++ b/app/src/protyle/wysiwyg/listContext.ts
@@ -127,7 +127,7 @@ export const shouldCreateListItemChildOnEnter = (isPrimaryBlock: boolean, isLast
export const getFollowingOrderedListMarkerUpdates = (currentMarker: string, followingMarkers: string[]) => {
const currentIndex = Number.parseInt(currentMarker, 10);
if (Number.isNaN(currentIndex)) {
- return followingMarkers.map(() => undefined);
+ return followingMarkers.map((): undefined => undefined);
}
return followingMarkers.map((marker, index) => {
const expectedMarker = `${currentIndex + index + 2}.`;
diff --git a/app/src/protyle/wysiwyg/listShortcut.dom.test.ts b/app/src/protyle/wysiwyg/listShortcut.dom.test.ts
index 8ec611cbad..6319c6c1f6 100644
--- a/app/src/protyle/wysiwyg/listShortcut.dom.test.ts
+++ b/app/src/protyle/wysiwyg/listShortcut.dom.test.ts
@@ -22,6 +22,7 @@ const browserCases = async (source: string) => {
},
}}}, menus: {menu: {element: hidden(), remove: noop}}} as any;
const dependencies = {
+ CALLOUT_PRESETS: new Array<import("./calloutType").ICalloutPreset>(),
Constants: {KEYCODELIST: {27: "Escape", 38: "↑", 74: "J", 76: "L"}, MENU_BLOCK_MULTI: "multi",
CUSTOM_SY_LIST_MINDMAP: "custom-sy-list-mindmap"},
bindVerticalNavigationReset: noop, getAVTemplateInteractiveElement: noop,
diff --git a/app/src/protyle/wysiwyg/mindmapShortcut.test.ts b/app/src/protyle/wysiwyg/mindmapShortcut.test.ts
index 184cae4292..248a338d11 100644
--- a/app/src/protyle/wysiwyg/mindmapShortcut.test.ts
+++ b/app/src/protyle/wysiwyg/mindmapShortcut.test.ts
@@ -7,7 +7,7 @@ import {getAppendListContext} from "./listContext";
const source = readFileSync("src/protyle/wysiwyg/keydown.ts", "utf8");
const start = source.indexOf(" if (matchHotKey(window.siyuan.config.keymap.editor.insert.mindmap");
-const end = source.indexOf(" const isMatchList =", start);
+const end = source.indexOf(" const calloutPreset =", start);
assert.ok(start >= 0 && end > start);
const compiled = transpileModule(`(async () => {${source.slice(start, end)}})()`, {
compilerOptions: {target: ScriptTarget.ES2021},
diff --git a/app/src/protyle/wysiwyg/refBracketInput.test.ts b/app/src/protyle/wysiwyg/refBracketInput.test.ts
index 8ac93a928a..9e2e97ae4c 100644
--- a/app/src/protyle/wysiwyg/refBracketInput.test.ts
+++ b/app/src/protyle/wysiwyg/refBracketInput.test.ts
@@ -10,7 +10,7 @@ const listeners = new Map<string, string>();
const visit = (node: Node) => {
if (isCallExpression(node) && node.expression.getText(file) === "this.element.addEventListener" &&
["\"input\"", "\"compositionend\""].includes(node.arguments[0]?.getText(file))) {
- listeners.set(JSON.parse(node.arguments[0].getText(file)), transpileModule("(" + node.arguments[1].getText(file) + ")", {
+ listeners.set(JSON.parse(node.arguments[0].getText(file)), transpileModule("const listener = (" + node.arguments[1].getText(file) + ");", {
compilerOptions: {target: ScriptTarget.ES2020},
}).outputText);
}
@@ -51,7 +51,7 @@ test("reference bracket input waits for IME commit and avoids saving duplicate c
};
const event = {data, inputType: "insertText", isComposing: false,
target: {tagName: "DIV"}, stopPropagation() {}};
- const listener = runInNewContext("(function () { return " + listeners.get(type) + " }).call(receiver)",
+ const listener = runInNewContext("(function () { " + listeners.get(type) + " return listener; }).call(receiver)",
Object.assign(context, {receiver}));
if (type === "input") {
await listener.call(receiver, {...event, isComposing: true, inputType: "insertCompositionText"});
diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts
index bad3ffcfe6..57b64fe838 100644
--- a/app/src/protyle/wysiwyg/remove.ts
+++ b/app/src/protyle/wysiwyg/remove.ts
@@ -57,7 +57,7 @@ import {highlightRender} from "../render/highlightRender";
import {processRender} from "../util/processCode";
import {avRender} from "../render/av/render";
import {blockRender} from "../render/blockRender";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {mergeSameInlineElement} from "../toolbar/util";
import {
getBlockRefCheckElementChain,
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 5a17635df4..95edac8019 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -1,6 +1,6 @@
import {escapeHtmlTextAndAttr} from "../../util/escape";
import {fetchPost, fetchSyncPost} from "../../util/fetch";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {restoreInlineElementBoundaryHTML} from "../util/inlineElementBoundary";
import {getEditorTransaction} from "../util/transactionContract";
import {
diff --git a/app/src/protyle/wysiwyg/turnIntoList.ts b/app/src/protyle/wysiwyg/turnIntoList.ts
index e09a6d75ab..9db7b74b06 100644
--- a/app/src/protyle/wysiwyg/turnIntoList.ts
+++ b/app/src/protyle/wysiwyg/turnIntoList.ts
@@ -1,6 +1,6 @@
import {transaction, updateTransaction} from "./transaction";
import {focusByOffset, focusByWbr} from "../util/selection";
-import * as dayjs from "dayjs";
+import dayjs from "dayjs";
import {decodeHTML, escapeAttr} from "../../util/escape";
import {Constants} from "../../constants";
import {getTaskListMarker} from "./taskListMarker";
diff --git a/app/src/types/api/index.d.ts b/app/src/types/api/index.d.ts
index 2813ba836a..445ca1af0a 100644
--- a/app/src/types/api/index.d.ts
+++ b/app/src/types/api/index.d.ts
@@ -368,13 +368,13 @@ export type AVKeyValues = { "key": AVKey | null; "values"?: Array<AVValue | null
export type AVKeysData = { "keys": Array<AVKey | null> | null; };
-export type AVLayoutCalendar = { "columns": Array<AVViewTableColumn | null> | null; "filters"?: Array<AVViewFilter | null>; "id": string; "pageSize"?: number; "rowIds": Array<string> | null; "settings": AVCalendarSettings; "showIcon": boolean; "sorts"?: Array<AVViewSort | null>; "spec": number; "wrapField": boolean; } | ({ "columns": Array<AVViewTableColumn | null> | null; "rowIds": Array<string> | null; "settings": AVCalendarSettings; } & { "filters"?: never; "id"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "spec"?: never; "wrapField"?: never; });
+export type AVLayoutCalendar = { "columns": Array<AVViewTableColumn | null> | null; "id": string; "rowIds": Array<string> | null; "settings": AVCalendarSettings; "showIcon": boolean; "spec": number; "wrapField": boolean; } | ({ "columns": Array<AVViewTableColumn | null> | null; "rowIds": Array<string> | null; "settings": AVCalendarSettings; } & { "id"?: never; "showIcon"?: never; "spec"?: never; "wrapField"?: never; });
-export type AVLayoutGallery = { "cardAspectRatio": number; "cardAspectRatioValue": number; "cardIds": Array<string> | null; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewGalleryCardField | null> | null; "filters"?: Array<AVViewFilter | null>; "fitImage": boolean; "id": string; "pageSize"?: number; "showIcon": boolean; "sorts"?: Array<AVViewSort | null>; "spec": number; "wrapField": boolean; } | ({ "cardAspectRatio": number; "cardAspectRatioValue": number; "cardIds": Array<string> | null; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewGalleryCardField | null> | null; "fitImage": boolean; } & { "filters"?: never; "id"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "spec"?: never; "wrapField"?: never; });
+export type AVLayoutGallery = { "cardAspectRatio": number; "cardAspectRatioValue": number; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewGalleryCardField | null> | null; "fitImage": boolean; "id": string; "showIcon": boolean; "spec": number; "wrapField": boolean; } | ({ "cardAspectRatio": number; "cardAspectRatioValue": number; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewGalleryCardField | null> | null; "fitImage": boolean; } & { "id"?: never; "showIcon"?: never; "spec"?: never; "wrapField"?: never; });
-export type AVLayoutKanban = { "cardAspectRatio": number; "cardAspectRatioValue": number; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewKanbanField | null> | null; "fillColBackgroundColor": boolean; "filters"?: Array<AVViewFilter | null>; "fitImage": boolean; "id": string; "pageSize"?: number; "showIcon": boolean; "sorts"?: Array<AVViewSort | null>; "spec": number; "wrapField": boolean; } | ({ "cardAspectRatio": number; "cardAspectRatioValue": number; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewKanbanField | null> | null; "fillColBackgroundColor": boolean; "fitImage": boolean; } & { "filters"?: never; "id"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "spec"?: never; "wrapField"?: never; });
+export type AVLayoutKanban = { "cardAspectRatio": number; "cardAspectRatioValue": number; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewKanbanField | null> | null; "fillColBackgroundColor": boolean; "fitImage": boolean; "id": string; "showIcon": boolean; "spec": number; "wrapField": boolean; } | ({ "cardAspectRatio": number; "cardAspectRatioValue": number; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewKanbanField | null> | null; "fillColBackgroundColor": boolean; "fitImage": boolean; } & { "id"?: never; "showIcon"?: never; "spec"?: never; "wrapField"?: never; });
-export type AVLayoutTable = { "columns": Array<AVViewTableColumn | null> | null; "filters"?: Array<AVViewFilter | null>; "id": string; "pageSize"?: number; "rowIds": Array<string> | null; "showIcon": boolean; "sorts"?: Array<AVViewSort | null>; "spec": number; "wrapField": boolean; } | ({ "columns": Array<AVViewTableColumn | null> | null; "rowIds": Array<string> | null; } & { "filters"?: never; "id"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "spec"?: never; "wrapField"?: never; });
+export type AVLayoutTable = { "columns": Array<AVViewTableColumn | null> | null; "id": string; "showIcon": boolean; "spec": number; "wrapField": boolean; } | ({ "columns": Array<AVViewTableColumn | null> | null; } & { "id"?: never; "showIcon"?: never; "spec"?: never; "wrapField"?: never; });
export type AVNewItemFieldValue = { "mode": "static" | "currentTime"; "value"?: AVValue; };
@@ -1876,7 +1876,7 @@ export type SetEditorRequestInput = { "allowHTMLBLockScript"?: boolean | null; "
export type SetEntryVisibilityRequestInput = { "active"?: string | null; "profiles"?: Array<SettingEntryVisibilityProfileInput | null> | null; "version"?: number | null; };
-export type SetExportRequestInput = { "addTitle"?: boolean | null; "blockEmbedMode"?: number | null; "blockRefMode"?: number | null; "blockRefTextLeft"?: string | null; "blockRefTextRight"?: string | null; "docxTemplate"?: string | null; "fileAnnotationRefMode"?: number | null; "imageWatermarkDesc"?: string | null; "imageWatermarkStr"?: string | null; "includeRelatedDocs"?: boolean | null; "includeSubDocs"?: boolean | null; "inlineMemo"?: boolean | null; "markdownYFM"?: boolean | null; "pandocBin"?: string | null; "pandocParams"?: string | null; "paragraphBeginningSpace"?: boolean | null; "pdfFooter"?: string | null; "pdfWatermarkDesc"?: string | null; "pdfWatermarkStr"?: string | null; "removeAssetsID"?: boolean | null; "tagCloseMarker"?: string | null; "tagOpenMarker"?: string | null; };
+export type SetExportRequestInput = { "addTitle"?: boolean | null; "blockEmbedMode"?: number | null; "blockRefMode"?: number | null; "blockRefTextLeft"?: string | null; "blockRefTextRight"?: string | null; "fileAnnotationRefMode"?: number | null; "imageWatermarkDesc"?: string | null; "imageWatermarkStr"?: string | null; "includeRelatedDocs"?: boolean | null; "includeSubDocs"?: boolean | null; "inlineMemo"?: boolean | null; "markdownYFM"?: boolean | null; "pandocBin"?: string | null; "pandocParams"?: string | null; "paragraphBeginningSpace"?: boolean | null; "pdfFooter"?: string | null; "pdfWatermarkDesc"?: string | null; "pdfWatermarkStr"?: string | null; "removeAssetsID"?: boolean | null; "tagCloseMarker"?: string | null; "tagOpenMarker"?: string | null; };
export type SetFiletreeRequestInput = { "allowCreateDeeper"?: boolean | null; "alwaysSelectOpenedFile"?: boolean | null; "boxDocEnabled"?: boolean | null; "closeTabOnDoubleClick"?: boolean | null; "closeTabsOnStart"?: boolean | null; "createDocAtTop"?: boolean | null; "docCreateSaveBox"?: string | null; "docCreateSavePath"?: string | null; "docCreateTemplatePath"?: string | null; "docIconClickMode"?: number | null; "largeFileWarningSize"?: number | null; "maxListCount"?: number | null; "maxOpenTabCount"?: number | null; "noSplitScreenWhenOpenTab"?: boolean | null; "openFilesUseCurrentTab"?: boolean | null; "parentDocTitleClickMode"?: number | null; "recentDocsMaxListCount"?: number | null; "refCreateSaveBox"?: string | null; "refCreateSavePath"?: string | null; "removeDocWithoutConfirm"?: boolean | null; "shorthandSaveBox"?: string | null; "shorthandSavePath"?: string | null; "sort"?: number | null; "tabStartupMode"?: number | null; "useSVGDefaultIcon"?: boolean | null; "useSingleLineSave"?: boolean | null; };
@@ -2030,9 +2030,9 @@ export type SettingEntryVisibilityProfile = { "defaults"?: "simple" | "full"; "e
export type SettingEntryVisibilityProfileInput = { "defaults"?: "simple" | "full"; "entries"?: Record<string, boolean> | null; "id"?: string | null; "name"?: string | null; "orders"?: Record<string, Array<string> | null> | null; };
-export type SettingExport = { "addTitle": boolean; "blockEmbedMode": number; "blockRefMode": number; "blockRefTextLeft": string; "blockRefTextRight": string; "docxTemplate": string; "fileAnnotationRefMode": number; "imageWatermarkDesc": string; "imageWatermarkStr": string; "includeRelatedDocs": boolean; "includeSubDocs": boolean; "inlineMemo": boolean; "markdownYFM": boolean; "pandocBin": string; "pandocParams": string; "paragraphBeginningSpace": boolean; "pdfFooter": string; "pdfWatermarkDesc": string; "pdfWatermarkStr": string; "removeAssetsID": boolean; "tagCloseMarker": string; "tagOpenMarker": string; };
+export type SettingExport = { "addTitle": boolean; "blockEmbedMode": number; "blockRefMode": number; "blockRefTextLeft": string; "blockRefTextRight": string; "fileAnnotationRefMode": number; "imageWatermarkDesc": string; "imageWatermarkStr": string; "includeRelatedDocs": boolean; "includeSubDocs": boolean; "inlineMemo": boolean; "markdownYFM": boolean; "pandocBin": string; "pandocParams": string; "paragraphBeginningSpace": boolean; "pdfFooter": string; "pdfWatermarkDesc": string; "pdfWatermarkStr": string; "removeAssetsID": boolean; "tagCloseMarker": string; "tagOpenMarker": string; };
-export type SettingExportInput = { "addTitle"?: boolean | null; "blockEmbedMode"?: number | null; "blockRefMode"?: number | null; "blockRefTextLeft"?: string | null; "blockRefTextRight"?: string | null; "docxTemplate"?: string | null; "fileAnnotationRefMode"?: number | null; "imageWatermarkDesc"?: string | null; "imageWatermarkStr"?: string | null; "includeRelatedDocs"?: boolean | null; "includeSubDocs"?: boolean | null; "inlineMemo"?: boolean | null; "markdownYFM"?: boolean | null; "pandocBin"?: string | null; "pandocParams"?: string | null; "paragraphBeginningSpace"?: boolean | null; "pdfFooter"?: string | null; "pdfWatermarkDesc"?: string | null; "pdfWatermarkStr"?: string | null; "removeAssetsID"?: boolean | null; "tagCloseMarker"?: string | null; "tagOpenMarker"?: string | null; };
+export type SettingExportInput = { "addTitle"?: boolean | null; "blockEmbedMode"?: number | null; "blockRefMode"?: number | null; "blockRefTextLeft"?: string | null; "blockRefTextRight"?: string | null; "fileAnnotationRefMode"?: number | null; "imageWatermarkDesc"?: string | null; "imageWatermarkStr"?: string | null; "includeRelatedDocs"?: boolean | null; "includeSubDocs"?: boolean | null; "inlineMemo"?: boolean | null; "markdownYFM"?: boolean | null; "pandocBin"?: string | null; "pandocParams"?: string | null; "paragraphBeginningSpace"?: boolean | null; "pdfFooter"?: string | null; "pdfWatermarkDesc"?: string | null; "pdfWatermarkStr"?: string | null; "removeAssetsID"?: boolean | null; "tagCloseMarker"?: string | null; "tagOpenMarker"?: string | null; };
export type SettingFileTree = { "allowCreateDeeper": boolean; "alwaysSelectOpenedFile": boolean; "boxDocEnabled": boolean | null; "closeTabOnDoubleClick": boolean; "closeTabsOnStart": boolean; "createDocAtTop": boolean | null; "docCreateSaveBox": string; "docCreateSavePath": string; "docCreateTemplatePath": string; "docIconClickMode": number; "largeFileWarningSize": number; "maxListCount": number; "maxOpenTabCount": number; "noSplitScreenWhenOpenTab": boolean; "openFilesUseCurrentTab": boolean; "parentDocTitleClickMode": number; "recentDocsMaxListCount": number; "refCreateSaveBox": string; "refCreateSavePath": string; "removeDocWithoutConfirm": boolean; "shorthandSaveBox": string; "shorthandSavePath": string; "sort": number; "tabStartupMode": number | null; "useSVGDefaultIcon": boolean | null; "useSingleLineSave": boolean; };
@@ -2500,9 +2500,6 @@ export type WorkspaceStorageEntry = { "name": "data" | "repo" | "history" | "tem
export type ZipRequestInput = { "path": string; "zipPath": string; };
-export type APILegacyGETPath =
- never;
-
export interface APIGETRoutes {
"/.well-known/oauth-authorization-server": {
request: EmptyRequestInput;
@@ -2737,9 +2734,6 @@ export interface APIGETRoutes {
};
}
-export type APILegacyPOSTPath =
- never;
-
export interface APIPOSTRoutes {
"/api/account/checkActivationcode": {
request: CheckActivationCodeRequestInput;
@@ -3436,13 +3430,6 @@ export interface APIPOSTRoutes {
/** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
authorization?: readonly ["authenticated"];
};
- "/api/attr/resetBlockAttrs": {
- request: EmptyRequestInput;
- response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
- body: "none";
- /** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
- authorization?: readonly ["authenticated","admin","writable"];
- };
"/api/attr/setBlockAttrs": {
request: SetBlockAttrsRequestInput;
response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
@@ -3757,13 +3744,6 @@ export interface APIPOSTRoutes {
/** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
authorization?: readonly ["authenticated","writable"];
};
- "/api/av/searchAttributeViewNonRelationKey": {
- request: EmptyRequestInput;
- response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
- body: "none";
- /** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
- authorization?: readonly ["authenticated","admin","writable"];
- };
"/api/av/searchAttributeViewRelationKey": {
request: SearchAttributeViewRelationKeyRequestInput;
response: { "code": 0; "data": AVKeysData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
@@ -7010,13 +6990,6 @@ export interface APIPOSTRoutes {
/** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
authorization?: readonly ["authenticated","admin","writable"];
};
- "/api/storage/setLocalStorage": {
- request: EmptyRequestInput;
- response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
- body: "none";
- /** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
- authorization?: readonly ["authenticated","admin","writable"];
- };
"/api/storage/setLocalStorageVal": {
request: StorageSetRequestInput;
response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
@@ -7569,13 +7542,6 @@ export interface APIPOSTRoutes {
/** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
authorization?: readonly ["authenticated","admin","writable"];
};
- "/api/system/reloadUI": {
- request: EmptyRequestInput;
- response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
- body: "none";
- /** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
- authorization?: readonly ["authenticated","admin","writable"];
- };
"/api/system/removeCustomFont": {
request: SystemRemoveCustomFontRequestInput;
response: { "code": 0; "data": SystemRemoveCustomFontData; "msg": string; } | { "code": -1 | 400 | 404; "data": { "closeTimeout": number; } | null; "msg": string; };
@@ -7984,7 +7950,6 @@ export type FetchPost<Legacy = APILegacyResponse> = <Path extends string>(
url: Path,
...args: Path extends keyof APIPOSTRoutes
? [...APIRequestArgs<APIPOSTRoutes[Path]>, ...APIPostTail<APIPOSTRoutes[Path]>]
- : Path extends APILegacyPOSTPath ? LegacyPostArgs<Legacy>
: string extends Path ? LegacyPostArgs<Legacy> : never
) => Promise<void>;
@@ -7992,7 +7957,6 @@ export type FetchSyncPost<Legacy = APILegacyResponse> = <Path extends string>(
url: Path,
...args: Path extends keyof APIPOSTRoutes
? [...APIRequestArgs<APIPOSTRoutes[Path]>, ...APISyncTail]
- : Path extends APILegacyPOSTPath ? [data?: any, ...tail: APISyncTail]
: string extends Path ? [data?: any, ...tail: APISyncTail] : never
) => Promise<Path extends keyof APIPOSTRoutes
? APIPOSTRoutes[Path] extends {output: "binary" | "proxy" | "pluginService"} ? JSONValue : APIPOSTRoutes[Path]["response"] | APITransportError
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index dfee3f19a2..61e6e2ac6d 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -56,20 +56,6 @@ type TJsonRpcHandler<T = any> = (...args: TJsonRpcMethodParams) => Promise<T> |
declare module "blueimp-md5"
-declare class Highlight {
- constructor(...range: Range[]);
-
- add(range: Range): void
-
- clear(): void
-
- forEach(callbackfn: (value: Range, key: number) => void): void;
-}
-
-declare namespace CSS {
- const highlights: Map<string, Highlight>;
-}
-
interface CSSStyleDeclarationElectron extends CSSStyleDeclaration {
WebkitAppRegion: string;
}
diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.ts
index 8eebdcf8d2..a41f97ae54 100644
--- a/app/src/types/protyle.d.ts
+++ b/app/src/types/protyle.d.ts
@@ -614,7 +614,7 @@ interface IProtyle {
gutter?: import("../protyle/gutter").Gutter,
breadcrumb?: import("../protyle/breadcrumb").Breadcrumb,
title?: import("../protyle/header/Title").Title,
- background?: import("../protyle/header/background").Background,
+ background?: import("../protyle/header/Background").Background,
databaseAttributePanel?: import("../protyle/render/av/attributePanel").AVAttributePanel,
contentElement?: HTMLElement,
options: IProtyleOptions;
diff --git a/app/src/util/fetch.ts b/app/src/util/fetch.ts
index e389e061f4..b9cb58981b 100644
--- a/app/src/util/fetch.ts
+++ b/app/src/util/fetch.ts
@@ -48,7 +48,7 @@ export const fetchPost = ((
init.signal = signal;
}
let isGetFile202 = false;
- return trackEditorSaveRequest(url, data, trackSettingRequest(url, withFetchTimeout((requestSignal) => fetchWithAppId(url, {...init, signal: requestSignal}).then((response) => {
+ return trackEditorSaveRequest(url, data, trackSettingRequest(url, withFetchTimeout((requestSignal) => fetchWithAppId(url, {...init, signal: requestSignal}).then((response): Promise<IWebSocketData | string> | IWebSocketData => {
switch (response.status) {
case 403:
case 404:
diff --git a/app/src/util/viewState.ts b/app/src/util/viewState.ts
index d60de2511c..3ed0a9a9a9 100644
--- a/app/src/util/viewState.ts
+++ b/app/src/util/viewState.ts
@@ -162,13 +162,13 @@ export class ViewStateService {
public flush() {
this.clearFlushTimer();
- const result = this.flushChain.catch(() => undefined).then(async () => {
+ const result = this.flushChain.catch((): undefined => undefined).then(async () => {
await this.ready;
while (this.pendingValues.size > 0 || this.pendingRemovals.size > 0) {
await this.flushPending();
}
});
- this.flushChain = result.catch(() => undefined);
+ this.flushChain = result.catch((): undefined => undefined);
return result;
}
diff --git a/app/tests/avRichTextEditor.test.js b/app/tests/avRichTextEditor.test.js
index 7469a3f28c..1ddabb8ab3 100644
--- a/app/tests/avRichTextEditor.test.js
+++ b/app/tests/avRichTextEditor.test.js
@@ -25,7 +25,7 @@ const runCases = async (sources) => {
fetchPost: (url, params, callback) => {
assert.equal(url, "/api/search/searchRefBlock");
request = params;
- callback({data: {newDoc: true, k: "New document", blocks: []}});
+ callback({code: 0, data: {newDoc: true, k: "New document", blocks: []}});
},
Lute: {UnEscapeHTMLStr: value => value, Caret: "caret"},
replaceFileName: value => value,
diff --git a/app/tests/blockTypeConversion.test.js b/app/tests/blockTypeConversion.test.js
index f77daaf200..7a459936e8 100644
--- a/app/tests/blockTypeConversion.test.js
+++ b/app/tests/blockTypeConversion.test.js
@@ -11,7 +11,7 @@ const sources = () => {
statement.declarationList.declarations.some(declaration =>
["turnsIntoTransaction", "turnsIntoOneTransaction"].includes(declaration.name.getText(parsed))));
assert.equal(statements.length, 2);
- return ts.transpileModule((read("protyle/toolbar/blockTypeCore.ts") + "\n" +
+ return ts.transpileModule((read("protyle/wysiwyg/calloutType.ts") + "\n" + read("protyle/toolbar/blockTypeCore.ts") + "\n" +
statements.map(statement => statement.getText(parsed)).join("\n")).replace(/^export /gm, ""),
{compilerOptions: {target: ts.ScriptTarget.ES2021}}).outputText;
};
diff --git a/app/tests/compositionCaret.test.js b/app/tests/compositionCaret.test.js
index 0b50c6941f..eaf790d3a7 100644
--- a/app/tests/compositionCaret.test.js
+++ b/app/tests/compositionCaret.test.js
@@ -122,6 +122,7 @@ const rendererSource = () => {
let recoveredComposition = false, compositionSnapshot;
let lineBreakUndoContext, forwardDeleteUndoContext;
let compositionRange, crossBlockComposition;
+ let compositionInputText = "";
const isAfterInlineMath = ${isAfterInlineMath};
const pending = [];
Object.assign(protyle.wysiwyg, new InputQueue());
@@ -129,7 +130,7 @@ const rendererSource = () => {
protyle.wysiwyg[name] = InputQueue.prototype[name];
}
protyle.toolbar = {};
- protyle.hint = {};
+ protyle.hint = {handleRefBracketInput: () => false};
const handlers = (function () {
this.persistComposition = ${persistComposition};
return {start: ${handlers.compositionstart}, end: ${handlers.compositionend},
diff --git a/app/tests/dialogFocus.test.js b/app/tests/dialogFocus.test.js
index fa922656d3..481fc52a80 100644
--- a/app/tests/dialogFocus.test.js
+++ b/app/tests/dialogFocus.test.js
@@ -267,6 +267,7 @@ const runFlashcardCases = async (dialogSource, cardSource, mobile) => {
"../util/pathName", "../protyle/util/resize", "../dialog/message", "../plugin/Menu",
"../protyle/wysiwyg/transaction", "./flashcardMode", "../protyle/util/blockFold", "../plugin/EventBusCore",
].map(name => [name, new Proxy({}, {get: (_target, key) => {
+ if (key === "__esModule") return false;
throw new Error(`Unexpected flashcard fixture dependency: ${name}.${String(key)}`);
}})])),
"../constants": {Constants: constants},
diff --git a/app/tests/newRefDocAtPath.test.js b/app/tests/newRefDocAtPath.test.js
index d1b2a6882b..cdb64a00f5 100644
--- a/app/tests/newRefDocAtPath.test.js
+++ b/app/tests/newRefDocAtPath.test.js
@@ -188,13 +188,13 @@ test("typed and searched reference suggestions offer location selection includin
f.hint.prepareCreateTarget = () => ({promise: Promise.resolve(hideConfigured), isCurrent: () => true});
const extend = load("protyle/hint/extend", f.deps, f.window, f.Lute);
extend.hintRef("New title", f.protyle, source);
- f.requests[0].cb({data: {newDoc: true, k: "New title", blocks: []}});
+ f.requests[0].cb({code: 0, data: {newDoc: true, k: "New title", blocks: []}});
await new Promise(resolve => setImmediate(resolve));
assert.equal(f.hint.items.some(item => item.value.startsWith("((newFileAtPath ")), true);
assert.equal(f.hint.items.some(item => item.value.startsWith("((newFile ")), !hideConfigured);
assert.equal(f.hint.items.some(item => item.value.startsWith("((newSubDoc ")), true);
f.hint.genSearchHTML(f.protyle, {value: "New title"}, false, "Original anchor", source);
- f.requests[1].cb({data: {newDoc: true, k: "New title", blocks: []}});
+ f.requests[1].cb({code: 0, data: {newDoc: true, k: "New title", blocks: []}});
await new Promise(resolve => setImmediate(resolve));
assert.equal(f.hint.element.lastElementChild.innerHTML.includes("newFileAtPath"), true);
}
diff --git a/app/tests/settingsNotifications.test.js b/app/tests/settingsNotifications.test.js
index 2e07d2b8cd..72df77a0af 100644
--- a/app/tests/settingsNotifications.test.js
+++ b/app/tests/settingsNotifications.test.js
@@ -54,7 +54,7 @@ for (const file of ["src/index.ts", "src/window/index.ts", "src/mobile/util/onMe
runInNewContext(compile(`let zoomRevision = 0; const applyZoom = () => {}; ${storageChanged}
export const receive = data => {switch(data.cmd){${clauses.join("\n")}}};`), {
exports: receiver, window, ...preference,
- onPageScrollButtonsStorageChanged() {},
+ onCompactModeStorageChanged() {},
onWindowWorkspaceStorageChanged: key => platformCalls.push(key),
MOBILE_BARS_CONFIG_KEY: "mobile-bars", Constants: {LOCAL_MOBILE_BOTTOM_BAR: "mobile-bottom", LOCAL_MOBILE_SIDE_PANEL: "mobile-side"},
showMobileBars: () => platformCalls.push("bars"), renderMobileBottomBar: () => platformCalls.push("bottom"),
diff --git a/app/tests/verticalNavigation.test.js b/app/tests/verticalNavigation.test.js
index 945eb79dbc..109ac7a967 100644
--- a/app/tests/verticalNavigation.test.js
+++ b/app/tests/verticalNavigation.test.js
@@ -21,6 +21,7 @@ const rendererModules = () => {
};
// 使用实际选区、区域解析与标题按键入口;不挂载无关的工具栏及页签控制器。
modules["util/selection"] = `const revealTabsForTarget = () => {};
+ import {isHiddenTabContent} from "../render/tabsVisibility";
import {getAtomicVerticalNavigationOwner} from "../wysiwyg/verticalNavigationState";
import {getContenteditableElement} from "../wysiwyg/getBlock";
import {hasClosestBlock} from "./hasClosest";\n` +
@@ -28,6 +29,7 @@ const rendererModules = () => {
extract("util/selection", ["setFirstNodeRange", "focusBlock", "getEditorRange"]))
.replace(/\/\/\/ #else[\s\S]*?\/\/\/ #endif/g, "");
modules["util/hasClosest"] = readFileSync(path.join(root, "util/hasClosest.ts"), "utf8");
+ modules["render/tabsVisibility"] = readFileSync(path.join(root, "render/tabsVisibility.ts"), "utf8");
modules["util/selectionOffsets"] = "const revealTabsForTarget = () => {};\n" +
extract("util/selectionOffsets", ["focusByRange", "setLastNodeRange"]);
modules["util/documentRange"] = readFileSync(path.join(root, "util/documentRange.ts"), "utf8");
diff --git a/app/tsconfig.api.json b/app/tsconfig.api.json
index 30060ca6ad..7390183724 100644
--- a/app/tsconfig.api.json
+++ b/app/tsconfig.api.json
@@ -4,8 +4,8 @@
"noEmit": true,
"skipLibCheck": false,
"target": "ES2021",
- "module": "commonjs",
- "moduleResolution": "node",
+ "module": "preserve",
+ "moduleResolution": "bundler",
"lib": ["ES2021", "DOM"],
"types": []
},
diff --git a/app/tsconfig.json b/app/tsconfig.json
index 77bcfc75b4..747e2048e8 100644
--- a/app/tsconfig.json
+++ b/app/tsconfig.json
@@ -1,16 +1,19 @@
{
"compilerOptions": {
"outDir": "./src/types/dist",
+ "rootDir": "./src",
+ "strict": false,
+ "useDefineForClassFields": false,
"noImplicitAny": true,
- "module": "commonjs",
+ "module": "preserve",
+ "moduleResolution": "bundler",
"resolveJsonModule": true,
- "target": "es6",
- "lib": ["ES2021", "DOM", "DOM.Iterable"],
+ "target": "ES2022",
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
"typeRoots": [
"./node_modules/@types"
],
"types": [
- "./src/types",
"node"
],
"declaration": true,
diff --git a/app/tsconfig.typecheck.json b/app/tsconfig.typecheck.json
index 2a989e9a56..a72683795c 100644
--- a/app/tsconfig.typecheck.json
+++ b/app/tsconfig.typecheck.json
@@ -4,6 +4,6 @@
"noEmit": true,
"emitDeclarationOnly": false,
"skipLibCheck": true,
- "lib": ["ES2021", "DOM", "DOM.Iterable"]
+ "lib": ["ES2022", "DOM", "DOM.Iterable"]
}
}
diff --git a/app/webpack.config.js b/app/webpack.config.js
index 5b9f03c233..3226f1bbb2 100644
--- a/app/webpack.config.js
+++ b/app/webpack.config.js
@@ -3,7 +3,6 @@ const webpack = require("webpack");
const pkg = require("./package.json");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
-const {CleanWebpackPlugin} = require("clean-webpack-plugin");
const {EsbuildPlugin} = require("esbuild-loader");
module.exports = (env, argv) => {
@@ -13,6 +12,8 @@ module.exports = (env, argv) => {
devtool: argv.mode !== "production" ? "source-map" : false,
target: "electron-renderer",
output: {
+ // 开发期间保留旧资源,避免已打开窗口引用的哈希文件被清除。
+ clean: argv.mode === "production",
globalObject: "globalThis",
publicPath: "auto",
filename: "[name].[chunkhash].js",
@@ -140,11 +141,6 @@ module.exports = (env, argv) => {
],
},
plugins: [
- new CleanWebpackPlugin({
- cleanStaleWebpackAssets: false,
- cleanOnceBeforeBuildPatterns: [
- path.join(__dirname, "stage/build/app")],
- }),
new webpack.DefinePlugin({
SIYUAN_VERSION: JSON.stringify(pkg.version),
NODE_ENV: JSON.stringify(argv.mode),
diff --git a/app/webpack.desktop.js b/app/webpack.desktop.js
index e04190f7fb..ef13f621df 100644
--- a/app/webpack.desktop.js
+++ b/app/webpack.desktop.js
@@ -3,7 +3,6 @@ const webpack = require("webpack");
const pkg = require("./package.json");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
-const {CleanWebpackPlugin} = require("clean-webpack-plugin");
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
const {EsbuildPlugin} = require("esbuild-loader");
@@ -13,6 +12,8 @@ module.exports = (env, argv) => {
watch: argv.mode !== "production",
devtool: argv.mode !== "production" ? "eval-source-map" : false,
output: {
+ // 开发期间保留旧资源,避免已打开窗口引用的哈希文件被清除。
+ clean: argv.mode === "production",
publicPath: "/stage/build/desktop/",
filename: "[name].[chunkhash].js",
path: path.resolve(__dirname, "stage/build/desktop"),
@@ -112,11 +113,6 @@ module.exports = (env, argv) => {
},
plugins: [
// new BundleAnalyzerPlugin(),
- new CleanWebpackPlugin({
- cleanStaleWebpackAssets: false,
- cleanOnceBeforeBuildPatterns: [
- path.join(__dirname, "stage/build/desktop")],
- }),
new webpack.DefinePlugin({
SIYUAN_VERSION: JSON.stringify(pkg.version),
NODE_ENV: JSON.stringify(argv.mode),
diff --git a/app/webpack.export.js b/app/webpack.export.js
index b4e9545814..b77dd93e55 100644
--- a/app/webpack.export.js
+++ b/app/webpack.export.js
@@ -2,7 +2,6 @@ const path = require("path");
const webpack = require("webpack");
const pkg = require("./package.json");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
-const {CleanWebpackPlugin} = require("clean-webpack-plugin");
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
const {EsbuildPlugin} = require("esbuild-loader");
@@ -12,6 +11,8 @@ module.exports = (env, argv) => {
watch: argv.mode !== "production",
devtool: argv.mode !== "production" ? "eval-source-map" : false,
output: {
+ // 开发期间保留旧资源,避免已打开窗口引用的哈希文件被清除。
+ clean: argv.mode === "production",
publicPath: "auto",
filename: "[name].js",
path: path.resolve(__dirname, "stage/build/export"),
@@ -91,10 +92,6 @@ module.exports = (env, argv) => {
},
plugins: [
// new BundleAnalyzerPlugin(),
- new CleanWebpackPlugin({
- cleanOnceBeforeBuildPatterns: [
- path.join(__dirname, "stage/build/export")],
- }),
new webpack.DefinePlugin({
NODE_ENV: JSON.stringify(argv.mode),
SIYUAN_VERSION: JSON.stringify(pkg.version),
diff --git a/app/webpack.mobile.js b/app/webpack.mobile.js
index 2986968d2f..23f0993842 100644
--- a/app/webpack.mobile.js
+++ b/app/webpack.mobile.js
@@ -3,7 +3,6 @@ const webpack = require("webpack");
const pkg = require("./package.json");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
-const {CleanWebpackPlugin} = require("clean-webpack-plugin");
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
const {EsbuildPlugin} = require("esbuild-loader");
@@ -13,6 +12,8 @@ module.exports = (env, argv) => {
watch: argv.mode !== "production",
devtool: argv.mode !== "production" ? "eval-source-map" : false,
output: {
+ // 开发期间保留旧资源,避免已打开窗口引用的哈希文件被清除。
+ clean: argv.mode === "production",
// 不能使用 auto,否则 ios 导出图片获取不到 css。 https://github.com/siyuan-note/siyuan/issues/8532
publicPath: "/stage/build/mobile/",
filename: "[name].[chunkhash].js",
@@ -113,11 +114,6 @@ module.exports = (env, argv) => {
},
plugins: [
// new BundleAnalyzerPlugin(),
- new CleanWebpackPlugin({
- cleanStaleWebpackAssets: false,
- cleanOnceBeforeBuildPatterns: [
- path.join(__dirname, "stage/build/mobile")],
- }),
new webpack.DefinePlugin({
SIYUAN_VERSION: JSON.stringify(pkg.version),
NODE_ENV: JSON.stringify(argv.mode),
diff --git a/docs/API-CONTRACTS.md b/docs/API-CONTRACTS.md
index e88341139e..7708d75d2d 100644
--- a/docs/API-CONTRACTS.md
+++ b/docs/API-CONTRACTS.md
@@ -4,17 +4,17 @@
## Scope
-This document defines type declarations, compatibility requirements, generated artifacts, and verification for kernel HTTP APIs. Transport types and endpoint definitions are maintained in the module files under `kernel/apicontract/`; `contracts.go` collects the endpoint registry. The migration is complete and `kernel/apicontract/legacy_routes.json` is empty. New endpoints must define type contracts and must not be added to the legacy list.
+This document defines type declarations, compatibility requirements, generated artifacts, and verification for kernel HTTP APIs. Transport types and endpoint definitions are maintained in the module files under `kernel/apicontract/`; `contracts.go` collects the endpoint registry. The migration is complete; every endpoint must define a type contract and bind a typed handler.
## Endpoint maintenance
1. Define or update transport types and endpoints in the contract package, explicitly declaring public or authenticated access, administrator and write requirements, request bodies, error codes, null values, defaults, and historical input compatibility
2. Bind business entry points through `contractHandler` and register their handlers with `contractRouteHandlers`, preserving route middleware order and lease scope
-3. Keep `legacy_routes.json` empty; when deleting an endpoint, remove both its route registration and contract definition
+3. When deleting an endpoint, remove both its route registration and contract definition
4. Update actual-response, input-compatibility, and strict type tests; run generation and correct calls identified by the compiler
5. Synchronize generated and related public declarations in `petal`; update API documentation for public endpoints
-Generation checks inspect actual route and handler declarations to verify methods, paths, handlers, contract adapters, and authorization middleware. `define` requires an explicit authorization argument; public endpoints use `PublicAccess`, while authenticated endpoints may add `AdminAccess` and `WritableAccess`. Domain registration functions retain literal methods and paths, and `contractRouteHandlers` derives middleware from the bound endpoint. Generation rejects missing policies, mismatched endpoint bindings, and missing or reordered explicit middleware. Authorization metadata does not replace resource permissions or the global notebook lease middleware. Prerelease CI compares the legacy list with the previous version tag reachable from the current commit's parent and prevents additional records. Do not bypass contract checks with `any`, type assertions, or changes to the legacy list.
+Generation checks inspect actual route and handler declarations to verify methods, paths, handlers, contract adapters, and authorization middleware. `define` requires an explicit authorization argument; public endpoints use `PublicAccess`, while authenticated endpoints may add `AdminAccess` and `WritableAccess`. Domain registration functions retain literal methods and paths, and `contractRouteHandlers` derives middleware from the bound endpoint. Generation rejects missing policies, mismatched endpoint bindings, and missing or reordered explicit middleware. Authorization metadata does not replace resource permissions or the global notebook lease middleware. Generation and CI reject every route without a contract and verify complete route coverage. Do not bypass contract checks with `any` or type assertions.
## Contracts and implementation
diff --git a/docs/API-CONTRACTS.zh-CN.md b/docs/API-CONTRACTS.zh-CN.md
index a67f6017e7..00e843b794 100644
--- a/docs/API-CONTRACTS.zh-CN.md
+++ b/docs/API-CONTRACTS.zh-CN.md
@@ -4,17 +4,17 @@
## 适用范围
-本文规定内核 HTTP 接口的类型定义、兼容要求、生成产物和验证流程。传输类型与端点定义位于 `kernel/apicontract/` 下的各模块文件,`contracts.go` 汇总端点注册表;迁移已完成,`kernel/apicontract/legacy_routes.json` 清单为空。新增接口必须定义类型契约,不得加入该清单。
+本文规定内核 HTTP 接口的类型定义、兼容要求、生成产物和验证流程。传输类型与端点定义位于 `kernel/apicontract/` 下的各模块文件,`contracts.go` 汇总端点注册表;迁移已完成,所有接口必须定义类型契约并绑定类型化处理函数。
## 接口维护流程
1. 在契约包中定义或更新传输类型与端点,显式声明公开或已鉴权访问、管理员和写入要求,以及请求体、错误码、空值、默认值和历史输入兼容规则
2. 用 `contractHandler` 绑定业务入口,并用 `contractRouteHandlers` 注册处理函数,保持路由中间件顺序和租约范围
-3. 保持 `legacy_routes.json` 为空;删除接口时同步移除路由注册和契约定义
+3. 删除接口时同步移除路由注册和契约定义
4. 更新实际响应、兼容输入和严格类型测试,运行生成器,再修正编译器指出的调用问题
5. 同步 `petal` 的生成声明和相关公共声明;公开接口同步更新接口文档
-生成检查读取实际路由与处理函数声明,验证方法、路径、处理函数、契约适配器和鉴权中间件的对应关系。`define` 要求显式传入访问策略:公开端点使用 `PublicAccess`,已鉴权端点可叠加 `AdminAccess` 和 `WritableAccess`。分域注册函数保留字面量方法与路径,`contractRouteHandlers` 从绑定端点派生中间件。生成检查拒绝缺少策略、端点绑定不匹配,以及显式中间件遗漏或顺序改变。鉴权元数据不替代资源权限或全局笔记本租约中间件。CI 对照变更前的清单阻止增加存量记录。不得通过 `any`、类型断言或修改存量清单规避契约检查。
+生成检查读取实际路由与处理函数声明,验证方法、路径、处理函数、契约适配器和鉴权中间件的对应关系。`define` 要求显式传入访问策略:公开端点使用 `PublicAccess`,已鉴权端点可叠加 `AdminAccess` 和 `WritableAccess`。分域注册函数保留字面量方法与路径,`contractRouteHandlers` 从绑定端点派生中间件。生成检查拒绝缺少策略、端点绑定不匹配,以及显式中间件遗漏或顺序改变。鉴权元数据不替代资源权限或全局笔记本租约中间件。生成器和 CI 拒绝没有契约的路由并检查完整路由覆盖。不得通过 `any` 或类型断言规避契约检查。
## 契约与实现
diff --git a/docs/API.ja.md b/docs/API.ja.md
index 262f1803db..3c11d376e9 100644
--- a/docs/API.ja.md
+++ b/docs/API.ja.md
@@ -2194,8 +2194,7 @@ if (response.code === 0 && response.data) {
"pin": false,
"width": ""
}
- ],
- "rowIds": null
+ ]
},
"itemIds": ["20240118203818-ct041hj", "20240118203855-sqzbja0", "20240118203831-fkfvvtx", "20240118203842-kc31ovy", "20240531235026-uiap07y"],
"groupCreated": 0,
diff --git a/docs/API.md b/docs/API.md
index 49470e0be4..70bffb7b26 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -2204,8 +2204,7 @@ The field types (`keyType`) are:
"pin": false,
"width": ""
}
- ],
- "rowIds": null
+ ]
},
"itemIds": ["20240118203818-ct041hj", "20240118203855-sqzbja0", "20240118203831-fkfvvtx", "20240118203842-kc31ovy", "20240531235026-uiap07y"],
"groupCreated": 0,
diff --git a/docs/API.zh-CN.md b/docs/API.zh-CN.md
index aebee6f7bb..0bcd8e7d57 100644
--- a/docs/API.zh-CN.md
+++ b/docs/API.zh-CN.md
@@ -2200,8 +2200,7 @@ if (response.code === 0 && response.data) {
"pin": false,
"width": ""
}
- ],
- "rowIds": null
+ ]
},
"itemIds": ["20240118203818-ct041hj", "20240118203855-sqzbja0", "20240118203831-fkfvvtx", "20240118203842-kc31ovy", "20240531235026-uiap07y"],
"groupCreated": 0,
diff --git a/kernel/api/av_contract_mapping.go b/kernel/api/av_contract_mapping.go
index f6e5b78cfd..681e7ec665 100644
--- a/kernel/api/av_contract_mapping.go
+++ b/kernel/api/av_contract_mapping.go
@@ -1055,7 +1055,6 @@ func toContractAVLayoutTable(value *av.LayoutTable) *apicontract.AVLayoutTable {
Columns: avContractSlice(value.Columns, func(value *av.ViewTableColumn) *apicontract.AVViewTableColumn {
return toContractAVViewTableColumn(value)
}),
- RowIDs: value.RowIDs,
}
}
func toContractAVBaseLayout(value *av.BaseLayout) *apicontract.AVBaseLayout {
@@ -1067,9 +1066,6 @@ func toContractAVBaseLayout(value *av.BaseLayout) *apicontract.AVBaseLayout {
ID: value.ID,
ShowIcon: value.ShowIcon,
WrapField: value.WrapField,
- Filters: avContractSlice(value.Filters, func(value *av.ViewFilter) *apicontract.AVViewFilter { return toContractAVViewFilter(value) }),
- Sorts: avContractSlice(value.Sorts, func(value *av.ViewSort) *apicontract.AVViewSort { return toContractAVViewSort(value) }),
- PageSize: value.PageSize,
}
}
func toContractAVViewTableColumn(value *av.ViewTableColumn) *apicontract.AVViewTableColumn {
@@ -1115,7 +1111,6 @@ func toContractAVLayoutGallery(value *av.LayoutGallery) *apicontract.AVLayoutGal
CardFields: avContractSlice(value.CardFields, func(value *av.ViewGalleryCardField) *apicontract.AVViewGalleryCardField {
return toContractAVViewGalleryCardField(value)
}),
- CardIDs: value.CardIDs,
}
}
func toContractAVViewGalleryCardField(value *av.ViewGalleryCardField) *apicontract.AVViewGalleryCardField {
diff --git a/kernel/api/contract_av_deprecated_test.go b/kernel/api/contract_av_deprecated_test.go
new file mode 100644
index 0000000000..9014ff8b81
--- /dev/null
+++ b/kernel/api/contract_av_deprecated_test.go
@@ -0,0 +1,44 @@
+package api
+
+import (
+ "encoding/json"
+ "os"
+ "testing"
+
+ "github.com/siyuan-note/siyuan/kernel/av"
+)
+
+func TestAPIContractAVDeprecatedLayoutProjection(t *testing.T) {
+ raw, err := os.ReadFile("../av/testdata/spec1-deprecated-layouts.json")
+ if err != nil {
+ t.Fatal(err)
+ }
+ database, err := av.ParseAttributeViewData("20261010120001-encav00", raw)
+ if err != nil {
+ t.Fatal(err)
+ }
+ av.UpgradeSpec(database)
+ for _, view := range database.Views {
+ encoded, marshalErr := json.Marshal(toContractAVView(view))
+ if marshalErr != nil {
+ t.Fatal(marshalErr)
+ }
+ var fields map[string]json.RawMessage
+ if err = json.Unmarshal(encoded, &fields); err != nil {
+ t.Fatal(err)
+ }
+ if len(fields["itemIds"]) == 0 || len(fields["filters"]) == 0 || len(fields["pageSize"]) == 0 ||
+ (view.Table != nil && len(fields["sorts"]) == 0) {
+ t.Fatalf("active view fields missing: %s", encoded)
+ }
+ var layout map[string]json.RawMessage
+ if err = json.Unmarshal(fields[string(view.LayoutType)], &layout); err != nil {
+ t.Fatal(err)
+ }
+ for _, name := range []string{"rowIds", "cardIds", "filters", "sorts", "pageSize"} {
+ if _, exists := layout[name]; exists {
+ t.Fatalf("deprecated layout field %s is exposed", name)
+ }
+ }
+ }
+}
diff --git a/kernel/api/contract_deprecated_test.go b/kernel/api/contract_deprecated_test.go
index 79d0330577..451d415631 100644
--- a/kernel/api/contract_deprecated_test.go
+++ b/kernel/api/contract_deprecated_test.go
@@ -1,39 +1,27 @@
package api
import (
- "encoding/json"
- "fmt"
- "net/http/httptest"
- "strings"
"testing"
"github.com/gin-gonic/gin"
)
-func TestAPIContractDeprecatedResponses(t *testing.T) {
+func TestAPIContractDeprecatedRoutesRemoved(t *testing.T) {
+ gin.SetMode(gin.TestMode)
engine := gin.New()
- engine.POST("/api/attr/resetBlockAttrs", resetBlockAttrs)
- engine.POST("/api/av/searchAttributeViewNonRelationKey", searchAttributeViewNonRelationKey)
- engine.POST("/api/storage/setLocalStorage", setLocalStorage)
- engine.POST("/api/system/reloadUI", deprecatedReloadUI)
+ ServeAPI(engine)
+ paths := map[string]bool{}
+ for _, route := range engine.Routes() {
+ paths[route.Path] = true
+ }
for _, path := range []string{"/api/attr/resetBlockAttrs", "/api/av/searchAttributeViewNonRelationKey", "/api/storage/setLocalStorage", "/api/system/reloadUI"} {
- for _, body := range []string{"", "{", "null", "{}"} {
- recorder := httptest.NewRecorder()
- uri := path + "?source=legacy"
- engine.ServeHTTP(recorder, httptest.NewRequest("POST", uri, strings.NewReader(body)))
- requireAPIContract(t, "POST", path, recorder)
- var response struct {
- Code int `json:"code"`
- Msg string `json:"msg"`
- Data json.RawMessage `json:"data"`
- }
- if err := json.Unmarshal(recorder.Body.Bytes(), &response); err != nil {
- t.Fatal(err)
- }
- want := fmt.Sprintf("[%s] is deprecated, visit [https://github.com/siyuan-note/siyuan/issues/15727] for details", uri)
- if response.Code != -1 || response.Msg != want || string(response.Data) != "null" {
- t.Fatalf("deprecated response changed: %s", recorder.Body.String())
- }
+ if paths[path] {
+ t.Fatalf("deprecated route is still registered: %s", path)
+ }
+ }
+ for _, path := range []string{"/api/storage/setLocalStorageVal", "/api/ui/reloadUI"} {
+ if !paths[path] {
+ t.Fatalf("active replacement route is missing: %s", path)
}
}
}
diff --git a/kernel/api/contract_test.go b/kernel/api/contract_test.go
index 936bfa686d..2349c357f0 100644
--- a/kernel/api/contract_test.go
+++ b/kernel/api/contract_test.go
@@ -62,24 +62,7 @@ func TestAPIContractRouterCoverage(t *testing.T) {
gin.SetMode(gin.TestMode)
engine := gin.New()
ServeAPI(engine)
- data, err := os.ReadFile("../apicontract/legacy_routes.json")
- if err != nil {
- t.Fatal(err)
- }
- var legacy []apicontract.Route
- if err := json.Unmarshal(data, &legacy); err != nil {
- t.Fatal(err)
- }
expected := map[string]bool{}
- for _, route := range legacy {
- methods := []string{route.Method}
- if route.Method == "ANY" {
- methods = []string{"GET", "POST", "PUT", "PATCH", "HEAD", "OPTIONS", "DELETE", "CONNECT", "TRACE"}
- }
- for _, method := range methods {
- expected[method+" "+route.Path] = true
- }
- }
for _, definition := range apicontract.Definitions() {
for _, method := range apicontract.ExpandMethods(definition.Methods) {
expected[method+" "+definition.Path] = true
diff --git a/kernel/api/router.go b/kernel/api/router.go
index 36723057ff..e251cc5a40 100644
--- a/kernel/api/router.go
+++ b/kernel/api/router.go
@@ -17,11 +17,9 @@
package api
import (
- "fmt"
"github.com/siyuan-note/siyuan/kernel/apicontract"
"github.com/gin-gonic/gin"
- "github.com/siyuan-note/logging"
)
func ServeAPI(ginServer *gin.Engine) {
@@ -75,23 +73,6 @@ func ServeAPI(ginServer *gin.Engine) {
registerUiRoutes(ginServer)
}
-func deprecatedResponse(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.Null] {
-
- msg := fmt.Sprintf("[%s] is deprecated, visit [https://github.com/siyuan-note/siyuan/issues/15727] for details",
- c.Request.RequestURI)
- logging.LogWarn(msg)
-
- return apicontract.Failure[apicontract.Null](-1, msg)
-}
-
-var resetBlockAttrs = contractHandler(apicontract.ResetBlockAttrs, deprecatedResponse)
-
-var searchAttributeViewNonRelationKey = contractHandler(apicontract.SearchAttributeViewNonRelationKey, deprecatedResponse)
-
-var setLocalStorage = contractHandler(apicontract.SetLocalStorage, deprecatedResponse)
-
-var deprecatedReloadUI = contractHandler(apicontract.DeprecatedReloadUI, deprecatedResponse)
-
// registerOauthRoutes 注册本域的契约路由。
func registerOauthRoutes(ginServer *gin.Engine) {
ginServer.GET("/.well-known/oauth-protected-resource/mcp", contractRouteHandlers(apicontract.MCPOAuthResource, mcpOAuthResource)...)
@@ -174,7 +155,6 @@ func registerSystemRoutes(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/system/getWorkspaceInfo", contractRouteHandlers(apicontract.GetWorkspaceInfo, getWorkspaceInfo)...)
ginServer.Handle("POST", "/api/system/getWorkspaceStorage", contractRouteHandlers(apicontract.GetWorkspaceStorage, getWorkspaceStorage)...)
ginServer.Handle("POST", "/api/system/getRuntimeInfo", contractRouteHandlers(apicontract.GetRuntimeInfo, getRuntimeInfo)...)
- ginServer.Handle("POST", "/api/system/reloadUI", contractRouteHandlers(apicontract.DeprecatedReloadUI, deprecatedReloadUI)...)
ginServer.Handle("POST", "/api/system/addMicrosoftDefenderExclusion", contractRouteHandlers(apicontract.AddMicrosoftDefenderExclusion, addMicrosoftDefenderExclusion)...)
ginServer.Handle("POST", "/api/system/ignoreAddMicrosoftDefenderExclusion", contractRouteHandlers(apicontract.IgnoreAddMicrosoftDefenderExclusion, ignoreAddMicrosoftDefenderExclusion)...)
ginServer.Handle("POST", "/api/system/vacuumDataIndex", contractRouteHandlers(apicontract.VacuumDataIndex, vacuumDataIndex)...)
@@ -245,7 +225,6 @@ func registerStorageRoutes(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/storage/getLocalStorage", contractRouteHandlers(apicontract.GetLocalStorage, getLocalStorage)...)
ginServer.Handle("POST", "/api/storage/getLocalStorageVal", contractRouteHandlers(apicontract.GetLocalStorageVal, getLocalStorageVal)...)
ginServer.Handle("POST", "/api/storage/getLocalStorageVals", contractRouteHandlers(apicontract.GetLocalStorageVals, getLocalStorageVals)...)
- ginServer.Handle("POST", "/api/storage/setLocalStorage", contractRouteHandlers(apicontract.SetLocalStorage, setLocalStorage)...)
ginServer.Handle("POST", "/api/storage/setLocalStorageVal", contractRouteHandlers(apicontract.SetLocalStorageVal, setLocalStorageVal)...)
ginServer.Handle("POST", "/api/storage/setLocalStorageVals", contractRouteHandlers(apicontract.SetLocalStorageVals, setLocalStorageVals)...)
ginServer.Handle("POST", "/api/storage/removeLocalStorageVal", contractRouteHandlers(apicontract.RemoveLocalStorageVal, removeLocalStorageVal)...)
@@ -534,7 +513,6 @@ func registerRefRoutes(ginServer *gin.Engine) {
// registerAttrRoutes 注册本域的契约路由。
func registerAttrRoutes(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/attr/getBookmarkLabels", contractRouteHandlers(apicontract.GetBookmarkLabels, getBookmarkLabels)...)
- ginServer.Handle("POST", "/api/attr/resetBlockAttrs", contractRouteHandlers(apicontract.ResetBlockAttrs, resetBlockAttrs)...)
ginServer.Handle("POST", "/api/attr/setBlockAttrs", contractRouteHandlers(apicontract.SetBlockAttrs, setBlockAttrs)...)
ginServer.Handle("POST", "/api/attr/batchSetBlockAttrs", contractRouteHandlers(apicontract.BatchSetBlockAttrs, batchSetBlockAttrs)...)
ginServer.Handle("POST", "/api/attr/getBlockAttrs", contractRouteHandlers(apicontract.GetBlockAttrs, getBlockAttrs)...)
@@ -868,7 +846,6 @@ func registerAvRoutes(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/av/previewAttributeViewCollection", contractRouteHandlers(apicontract.PreviewAttributeViewCollection, previewAttributeViewCollection)...)
ginServer.Handle("POST", "/api/av/getAttributeViewPasteRows", contractRouteHandlers(apicontract.GetAttributeViewPasteRows, getAttributeViewPasteRows)...)
ginServer.Handle("POST", "/api/av/searchAttributeViewRelationKey", contractRouteHandlers(apicontract.SearchAttributeViewRelationKey, searchAttributeViewRelationKey)...)
- ginServer.Handle("POST", "/api/av/searchAttributeViewNonRelationKey", contractRouteHandlers(apicontract.SearchAttributeViewNonRelationKey, searchAttributeViewNonRelationKey)...)
ginServer.Handle("POST", "/api/av/searchAttributeViewRollupDestKeys", contractRouteHandlers(apicontract.SearchAttributeViewRollupDestKeys, searchAttributeViewRollupDestKeys)...)
ginServer.Handle("POST", "/api/av/getAttributeViewFilterSort", contractRouteHandlers(apicontract.GetAttributeViewFilterSort, getAttributeViewFilterSort)...)
ginServer.Handle("POST", "/api/av/setAttrViewFilters", contractRouteHandlers(apicontract.SetAttrViewFilters, setAttrViewFilters)...)
diff --git a/kernel/api/setting_contract.go b/kernel/api/setting_contract.go
index c1f8dfed26..5825eec1a7 100644
--- a/kernel/api/setting_contract.go
+++ b/kernel/api/setting_contract.go
@@ -477,7 +477,6 @@ func settingExportPayload(value *conf.Export) *apicontract.SettingExport {
result.FileAnnotationRefMode = value.FileAnnotationRefMode
result.PandocBin = value.PandocBin
result.PandocParams = value.PandocParams
- result.DocxTemplate = value.DocxTemplate
result.RemoveAssetsID = value.RemoveAssetsID
result.MarkdownYFM = value.MarkdownYFM
result.InlineMemo = value.InlineMemo
diff --git a/kernel/apicontract/authorization_test.go b/kernel/apicontract/authorization_test.go
index 031c996db2..3ab3ddca6e 100644
--- a/kernel/apicontract/authorization_test.go
+++ b/kernel/apicontract/authorization_test.go
@@ -65,7 +65,7 @@ func TestRouteAuthorizationCoverage(t *testing.T) {
mutation(&changed[index])
}
}
- if err := CheckRoutes(changed, bindings, nil); err == nil {
+ if err := CheckRoutes(changed, bindings); err == nil {
t.Fatal("missing or mismatched authorization was accepted")
}
}
diff --git a/kernel/apicontract/av_types.go b/kernel/apicontract/av_types.go
index f28fe9f689..64a66f76db 100644
--- a/kernel/apicontract/av_types.go
+++ b/kernel/apicontract/av_types.go
@@ -526,17 +526,13 @@ type AVView struct {
type AVLayoutTable struct {
*AVBaseLayout
Columns []*AVViewTableColumn `json:"columns" api:"optional,nullable"`
- RowIDs []string `json:"rowIds" api:"optional,nullable"`
}
type AVBaseLayout struct {
- Spec int `json:"spec" api:"optional,nullable"`
- ID string `json:"id" api:"optional,nullable"`
- ShowIcon bool `json:"showIcon" api:"optional,nullable"`
- WrapField bool `json:"wrapField" api:"optional,nullable"`
- Filters []*AVViewFilter `json:"filters,omitempty" api:"optional,nullable"`
- Sorts []*AVViewSort `json:"sorts,omitempty" api:"optional,nullable"`
- PageSize int `json:"pageSize,omitempty" api:"optional,nullable"`
+ Spec int `json:"spec" api:"optional,nullable"`
+ ID string `json:"id" api:"optional,nullable"`
+ ShowIcon bool `json:"showIcon" api:"optional,nullable"`
+ WrapField bool `json:"wrapField" api:"optional,nullable"`
}
type AVViewTableColumn struct {
@@ -568,7 +564,6 @@ type AVLayoutGallery struct {
DisplayFieldName bool `json:"displayFieldName" api:"optional,nullable"`
DisplayEmptyFields bool `json:"displayEmptyFields" api:"optional,nullable"`
CardFields []*AVViewGalleryCardField `json:"fields" api:"optional,nullable"`
- CardIDs []string `json:"cardIds" api:"optional,nullable"`
}
type AVViewGalleryCardField struct {
diff --git a/kernel/apicontract/cmd/apigen/main.go b/kernel/apicontract/cmd/apigen/main.go
index eaa1eb9dd9..f5a8679ba4 100644
--- a/kernel/apicontract/cmd/apigen/main.go
+++ b/kernel/apicontract/cmd/apigen/main.go
@@ -6,7 +6,6 @@ import (
"flag"
"fmt"
"os"
- "os/exec"
"path/filepath"
"sort"
@@ -18,15 +17,14 @@ func main() {
check := flag.Bool("check", false, "check generated artifacts without writing")
root := flag.String("root", "..", "repository root")
petal := flag.String("petal", "", "optional petal repository to synchronize or check")
- base := flag.String("base", "", "base git revision for the legacy coverage ratchet")
flag.Parse()
- if err := run(*root, *petal, *base, *check); err != nil {
+ if err := run(*root, *petal, *check); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
-func run(root, petal, base string, check bool) error {
+func run(root, petal string, check bool) error {
bundle, err := apicontract.BuildBundle()
if err != nil {
return err
@@ -39,59 +37,22 @@ func run(root, petal, base string, check bool) error {
if err != nil {
return err
}
- legacyPath := filepath.Join(root, "kernel", "apicontract", "legacy_routes.json")
- data, err := os.ReadFile(legacyPath)
- if err != nil {
- return err
- }
- var legacy []apicontract.Route
- if err = json.Unmarshal(data, &legacy); err != nil {
+ if err = apicontract.CheckRoutes(routes, bindings); err != nil {
return err
}
- if err = apicontract.CheckRoutes(routes, bindings, legacy); err != nil {
- return err
- }
- if base != "" {
- command := exec.Command("git", "show", base+":kernel/apicontract/legacy_routes.json")
- command.Dir = root
- previous, readErr := command.Output()
- if readErr != nil {
- // 首次建立契约时基线文件尚不存在;其他 git 错误仍然中止校验。
- probe := exec.Command("git", "ls-tree", base, "kernel/apicontract/legacy_routes.json")
- probe.Dir = root
- listing, probeErr := probe.Output()
- if probeErr != nil || len(listing) != 0 {
- return fmt.Errorf("cannot read legacy coverage baseline: %w", readErr)
- }
- } else {
- var baseline []apicontract.Route
- if err = json.Unmarshal(previous, &baseline); err != nil {
- return err
- }
- allowed := map[string]bool{}
- for _, route := range baseline {
- allowed[route.Key()] = true
- }
- for _, route := range legacy {
- if !allowed[route.Key()] {
- return fmt.Errorf("legacy coverage may not grow: %s", route.Key())
- }
- }
- }
- }
jsonData, err := json.MarshalIndent(bundle, "", " ")
if err != nil {
return err
}
artifacts := map[string][]byte{
- filepath.Join(root, "app", "src", "types", "api", "index.d.ts"): bundle.TypeScript(legacy, documentation),
+ filepath.Join(root, "app", "src", "types", "api", "index.d.ts"): bundle.TypeScript(documentation),
filepath.Join(root, "kernel", "apicontract", "schema.json"): append(jsonData, '\n'),
}
capabilityRuntime, capabilityTypes := av.CapabilityTypeScript()
artifacts[filepath.Join(root, "app", "src", "protyle", "render", "av", "capabilities.generated.ts")] = capabilityRuntime
artifacts[filepath.Join(root, "app", "src", "types", "av", "index.d.ts")] = capabilityTypes
if petal != "" {
- artifacts[filepath.Join(petal, "types", "api", "index.d.ts")] = bundle.TypeScript(legacy, documentation)
+ artifacts[filepath.Join(petal, "types", "api", "index.d.ts")] = bundle.TypeScript(documentation)
artifacts[filepath.Join(petal, "types", "av", "index.d.ts")] = capabilityTypes
}
var paths []string
diff --git a/kernel/apicontract/contract_test.go b/kernel/apicontract/contract_test.go
index 7c5878e3aa..8a10f4367a 100644
--- a/kernel/apicontract/contract_test.go
+++ b/kernel/apicontract/contract_test.go
@@ -202,22 +202,14 @@ func TestRouteCoverage(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- data, err := os.ReadFile("legacy_routes.json")
- if err != nil {
- t.Fatal(err)
- }
- var legacy []Route
- if err := json.Unmarshal(data, &legacy); err != nil {
- t.Fatal(err)
- }
- if err := CheckRoutes(routes, bindings, legacy); err != nil {
+ if err := CheckRoutes(routes, bindings); err != nil {
t.Fatal(err)
}
- if err := CheckRoutes(append(routes, Route{Method: "POST", Path: "/api/new/untyped", Handler: "newHandler"}), bindings, legacy); err == nil {
+ if err := CheckRoutes(append(routes, Route{Method: "POST", Path: "/api/new/untyped", Handler: "newHandler"}), bindings); err == nil {
t.Fatal("new untyped route was accepted")
}
bindings["getBlockAttrs"] = "setBlockAttrs"
- if err := CheckRoutes(routes, bindings, legacy); err == nil {
+ if err := CheckRoutes(routes, bindings); err == nil {
t.Fatal("handler bound to the wrong contract was accepted")
}
}
@@ -231,19 +223,11 @@ func TestGeneratedArtifacts(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- legacyJSON, err := os.ReadFile("legacy_routes.json")
- if err != nil {
- t.Fatal(err)
- }
- var legacy []Route
- if err := json.Unmarshal(legacyJSON, &legacy); err != nil {
- t.Fatal(err)
- }
documentation, err := ReadEndpointDocumentation("contracts.go")
if err != nil {
t.Fatal(err)
}
- if strings.ReplaceAll(string(declaration), "\r\n", "\n") != string(bundle.TypeScript(legacy, documentation)) {
+ if strings.ReplaceAll(string(declaration), "\r\n", "\n") != string(bundle.TypeScript(documentation)) {
t.Fatal("TypeScript contracts are out of date")
}
schema, err := os.ReadFile("schema.json")
diff --git a/kernel/apicontract/contracts.go b/kernel/apicontract/contracts.go
index 5a298a56e3..65a5a775e8 100644
--- a/kernel/apicontract/contracts.go
+++ b/kernel/apicontract/contracts.go
@@ -525,11 +525,6 @@ var PatchViewState = define[ViewStatePatchRequest, map[string]JSONValue]("patchV
var RemoveViewState = define[StorageKeyRequest, Null]("removeViewState", "/api/storage/removeViewState", AuthenticatedAccess|AdminAccess|WritableAccess, JSONBody, ResponseOptions{Setting: SettingWrite{Namespace: "storage"}}, "POST")
var GetRecentDocs = define[RecentDocsRequest, []*RecentDoc]("getRecentDocs", "/api/storage/getRecentDocs", AuthenticatedAccess, LegacyOptionalBody, ResponseOptions{}, "POST")
-var ResetBlockAttrs = define[EmptyRequest, Null]("resetBlockAttrs", "/api/attr/resetBlockAttrs", AuthenticatedAccess|AdminAccess|WritableAccess, NoBody, ResponseOptions{}, "POST")
-var SearchAttributeViewNonRelationKey = define[EmptyRequest, Null]("searchAttributeViewNonRelationKey", "/api/av/searchAttributeViewNonRelationKey", AuthenticatedAccess|AdminAccess|WritableAccess, NoBody, ResponseOptions{}, "POST")
-var SetLocalStorage = define[EmptyRequest, Null]("setLocalStorage", "/api/storage/setLocalStorage", AuthenticatedAccess|AdminAccess|WritableAccess, NoBody, ResponseOptions{Setting: SettingWrite{Namespace: "localStorage", Mode: SettingSilent}}, "POST")
-var DeprecatedReloadUI = define[EmptyRequest, Null]("deprecatedReloadUI", "/api/system/reloadUI", AuthenticatedAccess|AdminAccess|WritableAccess, NoBody, ResponseOptions{}, "POST")
-
var GetCriteria = define[EmptyRequest, []*Criterion]("getCriteria", "/api/storage/getCriteria", AuthenticatedAccess, NoBody, ResponseOptions{}, "POST")
var SetCriterion = define[SetCriterionRequest, Null]("setCriterion", "/api/storage/setCriterion", AuthenticatedAccess|AdminAccess|WritableAccess, JSONBody, ResponseOptions{Setting: SettingWrite{Namespace: "storage"}}, "POST")
var RemoveCriterion = define[RemoveCriterionRequest, Null]("removeCriterion", "/api/storage/removeCriterion", AuthenticatedAccess|AdminAccess|WritableAccess, JSONBody, ResponseOptions{Setting: SettingWrite{Namespace: "storage"}}, "POST")
diff --git a/kernel/apicontract/direct_json_test.go b/kernel/apicontract/direct_json_test.go
index 3e30262b5c..c41ca2ac17 100644
--- a/kernel/apicontract/direct_json_test.go
+++ b/kernel/apicontract/direct_json_test.go
@@ -56,7 +56,7 @@ func TestDirectJSONHTTPResponses(t *testing.T) {
if _, err := json.Marshal(SuccessNoContent[directJSONTestResult]()); err == nil {
t.Fatal("empty response was serialized")
}
- declarations := string(bundle.TypeScript(nil, nil))
+ declarations := string(bundle.TypeScript(nil))
if !strings.Contains(declarations, `output: "directJSON"`) || !strings.Contains(declarations, "noContent: true") {
t.Fatal("direct JSON protocol metadata missing")
}
diff --git a/kernel/apicontract/documentation_test.go b/kernel/apicontract/documentation_test.go
index c10bbfd4c2..b6b724369a 100644
--- a/kernel/apicontract/documentation_test.go
+++ b/kernel/apicontract/documentation_test.go
@@ -62,7 +62,7 @@ func local() {
{Method: "POST", Path: "/first", Handler: "firstHandler", Request: request, Response: response},
{Method: "POST", Path: "/second", Handler: "secondHandler", Request: request, Response: response},
}}
- generated := string(bundle.TypeScript(nil, documentation))
+ generated := string(bundle.TypeScript(documentation))
single := " /**\n * 独立接口说明。\n *\n * 第二段包含字面量 *\\/。\n */\n"
first := " /**\n * 分组内第一个接口。\n */\n"
if strings.Count(generated, single+` "/single": {`) != 2 ||
@@ -70,7 +70,7 @@ func local() {
t.Fatal("endpoint documentation missing or attached to the wrong route")
}
withoutDocumentation := strings.ReplaceAll(strings.ReplaceAll(generated, single, ""), first, "")
- if withoutDocumentation != string(bundle.TypeScript(nil, nil)) {
+ if withoutDocumentation != string(bundle.TypeScript(nil)) {
t.Fatal("documentation changed the generated type declarations")
}
}
diff --git a/kernel/apicontract/legacy_routes.json b/kernel/apicontract/legacy_routes.json
deleted file mode 100644
index fe51488c70..0000000000
--- a/kernel/apicontract/legacy_routes.json
+++ /dev/null
@@ -1 +0,0 @@
-[]
diff --git a/kernel/apicontract/multipart_files_test.go b/kernel/apicontract/multipart_files_test.go
index a11a038f97..5740e3beb1 100644
--- a/kernel/apicontract/multipart_files_test.go
+++ b/kernel/apicontract/multipart_files_test.go
@@ -27,7 +27,7 @@ func TestMultipartFileListAndSuccessMessage(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- if !strings.Contains(string(bundle.TypeScript(nil, nil)), `"files": Array<Blob>`) {
+ if !strings.Contains(string(bundle.TypeScript(nil)), `"files": Array<Blob>`) {
t.Fatal("file list declaration is missing")
}
payload, err := json.Marshal(SuccessWithMessage([]string{"first.txt"}, "second file failed"))
diff --git a/kernel/apicontract/routes.go b/kernel/apicontract/routes.go
index d2f96946a3..5dd8a15d8e 100644
--- a/kernel/apicontract/routes.go
+++ b/kernel/apicontract/routes.go
@@ -182,8 +182,8 @@ func ReadRoutes(apiDir string) ([]Route, map[string]string, error) {
return routes, bindings, err
}
-// CheckRoutes 要求每个实际路由都有契约或存量记录,已迁移路由必须绑定对应的类型适配器。
-func CheckRoutes(routes []Route, bindings map[string]string, legacy []Route) error {
+// CheckRoutes 要求每个实际路由都有契约并绑定对应的类型适配器。
+func CheckRoutes(routes []Route, bindings map[string]string) error {
typed := map[string]Definition{}
for _, definition := range Definitions() {
if !definition.Authorization.Valid() {
@@ -193,13 +193,6 @@ func CheckRoutes(routes []Route, bindings map[string]string, legacy []Route) err
typed[method+" "+definition.Path] = definition
}
}
- legacySet := map[string]Route{}
- for _, route := range legacy {
- if _, exists := legacySet[route.Key()]; exists {
- return fmt.Errorf("duplicate legacy route: %s", route.Key())
- }
- legacySet[route.Key()] = route
- }
seen := map[string]bool{}
for _, route := range routes {
if definition, exists := typed[route.Key()]; exists {
@@ -214,15 +207,8 @@ func CheckRoutes(routes []Route, bindings map[string]string, legacy []Route) err
if route.Handler != definition.Name || bindings[route.Handler] != definition.Name {
return fmt.Errorf("typed handler missing or mismatched: %s", route.Key())
}
- if _, exists := legacySet[route.Key()]; exists {
- return fmt.Errorf("migrated route remains in legacy list: %s", route.Key())
- }
} else {
- previous, exists := legacySet[route.Key()]
- if !exists || previous.Handler != route.Handler {
- return fmt.Errorf("route needs a typed contract: %s (%s)", route.Key(), route.Handler)
- }
- seen[route.Key()] = true
+ return fmt.Errorf("route needs a typed contract: %s (%s)", route.Key(), route.Handler)
}
}
for key := range typed {
@@ -230,11 +216,6 @@ func CheckRoutes(routes []Route, bindings map[string]string, legacy []Route) err
return fmt.Errorf("contract has no route: %s", key)
}
}
- for key := range legacySet {
- if !seen[key] {
- return fmt.Errorf("removed route remains in legacy list: %s", key)
- }
- }
return nil
}
diff --git a/kernel/apicontract/schema.json b/kernel/apicontract/schema.json
index dc8b893047..5ff11c27cb 100644
--- a/kernel/apicontract/schema.json
+++ b/kernel/apicontract/schema.json
@@ -9440,25 +9440,9 @@
}
]
},
- "filters": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewFilter"
- },
- {
- "type": "null"
- }
- ]
- }
- },
"id": {
"type": "string"
},
- "pageSize": {
- "type": "integer"
- },
"rowIds": {
"anyOf": [
{
@@ -9478,19 +9462,6 @@
"showIcon": {
"type": "boolean"
},
- "sorts": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewSort"
- },
- {
- "type": "null"
- }
- ]
- }
- },
"spec": {
"type": "integer"
},
@@ -9569,19 +9540,6 @@
"cardAspectRatioValue": {
"type": "number"
},
- "cardIds": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
"cardLayout": {
"type": "integer"
},
@@ -9623,44 +9581,15 @@
}
]
},
- "filters": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewFilter"
- },
- {
- "type": "null"
- }
- ]
- }
- },
"fitImage": {
"type": "boolean"
},
"id": {
"type": "string"
},
- "pageSize": {
- "type": "integer"
- },
"showIcon": {
"type": "boolean"
},
- "sorts": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewSort"
- },
- {
- "type": "null"
- }
- ]
- }
- },
"spec": {
"type": "integer"
},
@@ -9679,7 +9608,6 @@
"displayFieldName",
"displayEmptyFields",
"fields",
- "cardIds",
"spec",
"id",
"showIcon",
@@ -9696,19 +9624,6 @@
"cardAspectRatioValue": {
"type": "number"
},
- "cardIds": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
"cardLayout": {
"type": "integer"
},
@@ -9764,8 +9679,7 @@
"fitImage",
"displayFieldName",
"displayEmptyFields",
- "fields",
- "cardIds"
+ "fields"
],
"additionalProperties": false
}
@@ -9826,44 +9740,15 @@
"fillColBackgroundColor": {
"type": "boolean"
},
- "filters": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewFilter"
- },
- {
- "type": "null"
- }
- ]
- }
- },
"fitImage": {
"type": "boolean"
},
"id": {
"type": "string"
},
- "pageSize": {
- "type": "integer"
- },
"showIcon": {
"type": "boolean"
},
- "sorts": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewSort"
- },
- {
- "type": "null"
- }
- ]
- }
- },
"spec": {
"type": "integer"
},
@@ -9989,54 +9874,12 @@
}
]
},
- "filters": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewFilter"
- },
- {
- "type": "null"
- }
- ]
- }
- },
"id": {
"type": "string"
},
- "pageSize": {
- "type": "integer"
- },
- "rowIds": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
"showIcon": {
"type": "boolean"
},
- "sorts": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewSort"
- },
- {
- "type": "null"
- }
- ]
- }
- },
"spec": {
"type": "integer"
},
@@ -10046,7 +9889,6 @@
},
"required": [
"columns",
- "rowIds",
"spec",
"id",
"showIcon",
@@ -10076,24 +9918,10 @@
"type": "null"
}
]
- },
- "rowIds": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
}
},
"required": [
- "columns",
- "rowIds"
+ "columns"
],
"additionalProperties": false
}
@@ -41003,16 +40831,6 @@
}
]
},
- "docxTemplate": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
"fileAnnotationRefMode": {
"anyOf": [
{
@@ -45911,9 +45729,6 @@
"blockRefTextRight": {
"type": "string"
},
- "docxTemplate": {
- "type": "string"
- },
"fileAnnotationRefMode": {
"type": "integer"
},
@@ -45969,7 +45784,6 @@
"blockRefMode",
"blockRefTextLeft",
"blockRefTextRight",
- "docxTemplate",
"fileAnnotationRefMode",
"imageWatermarkDesc",
"imageWatermarkStr",
@@ -46042,16 +45856,6 @@
}
]
},
- "docxTemplate": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
"fileAnnotationRefMode": {
"anyOf": [
{
@@ -126442,86 +126246,6 @@
]
}
},
- {
- "method": "POST",
- "path": "/api/attr/resetBlockAttrs",
- "handler": "resetBlockAttrs",
- "authorization": [
- "authenticated",
- "admin",
- "writable"
- ],
- "body": "none",
- "request": {
- "$ref": "#/$defs/EmptyRequestInput"
- },
- "response": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "type": "null"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- -1
- ]
- },
- "data": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "closeTimeout": {
- "type": "number"
- }
- },
- "required": [
- "closeTimeout"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": true
- }
- ]
- }
- },
{
"method": "POST",
"path": "/api/attr/setBlockAttrs",
@@ -129932,86 +129656,6 @@
]
}
},
- {
- "method": "POST",
- "path": "/api/av/searchAttributeViewNonRelationKey",
- "handler": "searchAttributeViewNonRelationKey",
- "authorization": [
- "authenticated",
- "admin",
- "writable"
- ],
- "body": "none",
- "request": {
- "$ref": "#/$defs/EmptyRequestInput"
- },
- "response": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "type": "null"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- -1
- ]
- },
- "data": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "closeTimeout": {
- "type": "number"
- }
- },
- "required": [
- "closeTimeout"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": true
- }
- ]
- }
- },
{
"method": "POST",
"path": "/api/av/searchAttributeViewRelationKey",
@@ -164745,86 +164389,6 @@
]
}
},
- {
- "method": "POST",
- "path": "/api/storage/setLocalStorage",
- "handler": "setLocalStorage",
- "authorization": [
- "authenticated",
- "admin",
- "writable"
- ],
- "body": "none",
- "request": {
- "$ref": "#/$defs/EmptyRequestInput"
- },
- "response": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "type": "null"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- -1
- ]
- },
- "data": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "closeTimeout": {
- "type": "number"
- }
- },
- "required": [
- "closeTimeout"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": true
- }
- ]
- }
- },
{
"method": "POST",
"path": "/api/storage/setLocalStorageVal",
@@ -170740,86 +170304,6 @@
]
}
},
- {
- "method": "POST",
- "path": "/api/system/reloadUI",
- "handler": "deprecatedReloadUI",
- "authorization": [
- "authenticated",
- "admin",
- "writable"
- ],
- "body": "none",
- "request": {
- "$ref": "#/$defs/EmptyRequestInput"
- },
- "response": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "type": "null"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- -1
- ]
- },
- "data": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "closeTimeout": {
- "type": "number"
- }
- },
- "required": [
- "closeTimeout"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": true
- }
- ]
- }
- },
{
"method": "POST",
"path": "/api/system/removeCustomFont",
diff --git a/kernel/apicontract/setting.go b/kernel/apicontract/setting.go
index bd004558a1..8c1f437143 100644
--- a/kernel/apicontract/setting.go
+++ b/kernel/apicontract/setting.go
@@ -307,7 +307,6 @@ type SettingExport struct {
FileAnnotationRefMode int `json:"fileAnnotationRefMode" api:"optional,nullable"`
PandocBin string `json:"pandocBin" api:"optional,nullable"`
PandocParams string `json:"pandocParams" api:"optional,nullable"`
- DocxTemplate string `json:"docxTemplate" api:"optional,nullable"`
RemoveAssetsID bool `json:"removeAssetsID" api:"optional,nullable"`
MarkdownYFM bool `json:"markdownYFM" api:"optional,nullable"`
InlineMemo bool `json:"inlineMemo" api:"optional,nullable"`
diff --git a/kernel/apicontract/typescript.go b/kernel/apicontract/typescript.go
index 7ba356f4bc..08fd395c72 100644
--- a/kernel/apicontract/typescript.go
+++ b/kernel/apicontract/typescript.go
@@ -123,7 +123,7 @@ func (b *Bundle) typeScript(schema *Schema) string {
}
}
-func (b *Bundle) TypeScript(legacy []Route, documentation map[string]string) []byte {
+func (b *Bundle) TypeScript(documentation map[string]string) []byte {
var output strings.Builder
output.WriteString("// 此文件由内核契约生成,请运行 pnpm run api:generate 更新。\n\n")
for _, name := range sortedKeys(b.Definitions) {
@@ -134,24 +134,6 @@ func (b *Bundle) TypeScript(legacy []Route, documentation map[string]string) []b
fmt.Fprintf(&output, "export type %s = %s;\n\n", name, b.typeScript(b.Definitions[name]))
}
for _, method := range []string{"GET", "POST"} {
- legacyPaths := map[string]bool{}
- for _, route := range legacy {
- if route.Method == method || route.Method == "ANY" {
- legacyPaths[route.Path] = true
- }
- }
- fmt.Fprintf(&output, "export type APILegacy%sPath =\n", method)
- for i, path := range sortedKeys(legacyPaths) {
- separator := " |"
- if i == len(legacyPaths)-1 {
- separator = ";"
- }
- fmt.Fprintf(&output, " %s%s\n", quote(path), separator)
- }
- if len(legacyPaths) == 0 {
- output.WriteString(" never;\n")
- }
- output.WriteString("\n")
fmt.Fprintf(&output, "export interface API%sRoutes {\n", method)
for _, endpoint := range b.Endpoints {
if endpoint.Method != method {
@@ -293,7 +275,6 @@ export type FetchPost<Legacy = APILegacyResponse> = <Path extends string>(
url: Path,
...args: Path extends keyof APIPOSTRoutes
? [...APIRequestArgs<APIPOSTRoutes[Path]>, ...APIPostTail<APIPOSTRoutes[Path]>]
- : Path extends APILegacyPOSTPath ? LegacyPostArgs<Legacy>
: string extends Path ? LegacyPostArgs<Legacy> : never
) => Promise<void>;
@@ -301,7 +282,6 @@ export type FetchSyncPost<Legacy = APILegacyResponse> = <Path extends string>(
url: Path,
...args: Path extends keyof APIPOSTRoutes
? [...APIRequestArgs<APIPOSTRoutes[Path]>, ...APISyncTail]
- : Path extends APILegacyPOSTPath ? [data?: any, ...tail: APISyncTail]
: string extends Path ? [data?: any, ...tail: APISyncTail] : never
) => Promise<Path extends keyof APIPOSTRoutes
? APIPOSTRoutes[Path] extends {output: "binary" | "proxy" | "pluginService"} ? JSONValue : APIPOSTRoutes[Path]["response"] | APITransportError
diff --git a/kernel/av/encrypted_atomic_write_test.go b/kernel/av/encrypted_atomic_write_test.go
index ba5a8ed286..f7e78e8eba 100644
--- a/kernel/av/encrypted_atomic_write_test.go
+++ b/kernel/av/encrypted_atomic_write_test.go
@@ -2,6 +2,7 @@ package av
import (
"bytes"
+ "encoding/json"
"os"
"path/filepath"
"testing"
@@ -11,6 +12,15 @@ import (
)
func TestEncryptedAttributeViewSaveReplacesCiphertext(t *testing.T) {
+ testEncryptedAttributeViewSaveReplacesCiphertext(t, false)
+}
+
+func TestEncryptedDeprecatedLayoutRecovery(t *testing.T) {
+ testEncryptedAttributeViewSaveReplacesCiphertext(t, true)
+}
+
+func testEncryptedAttributeViewSaveReplacesCiphertext(t *testing.T, legacy bool) {
+ t.Helper()
const boxID, avID = "20261010120000-encbox0", "20261010120001-encav00"
oldData := util.DataDir
oldDEK, oldEncrypted, oldUnlocked := AVDEKProvider, AVIsEncryptedBox, AVIsBoxUnlocked
@@ -31,10 +41,37 @@ func TestEncryptedAttributeViewSaveReplacesCiphertext(t *testing.T) {
})
view := &AttributeView{ID: avID, Spec: PlainTextSpec}
view.Name = "first encrypted version"
- if err := SaveAttributeView(view); err != nil {
+ file := attributeViewDataPathByBox(avID, boxID)
+ if legacy {
+ raw, err := os.ReadFile("testdata/spec1-deprecated-layouts.json")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err = json.Unmarshal(raw, view); err != nil {
+ t.Fatal(err)
+ }
+ view.Name = "first encrypted version"
+ raw, err = json.Marshal(view)
+ if err != nil {
+ t.Fatal(err)
+ }
+ ciphertext, err := encryptAVData(boxID, avID, raw)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err = os.MkdirAll(filepath.Dir(file), 0700); err != nil {
+ t.Fatal(err)
+ }
+ if err = os.WriteFile(file, ciphertext, 0600); err != nil {
+ t.Fatal(err)
+ }
+ view, err = ParseAttributeViewInBox(avID, boxID)
+ if err != nil {
+ t.Fatal(err)
+ }
+ } else if err := SaveAttributeView(view); err != nil {
t.Fatal(err)
}
- file := attributeViewDataPathByBox(avID, boxID)
before, err := os.ReadFile(file)
if err != nil {
t.Fatal(err)
@@ -64,4 +101,8 @@ func TestEncryptedAttributeViewSaveReplacesCiphertext(t *testing.T) {
if err != nil || previous.Name != "first encrypted version" {
t.Fatalf("previous ciphertext is not recoverable: %+v, %v", previous, err)
}
+ if legacy && (previous.Spec != 1 || len(previous.Views[0].Table.RowIDs) != 2 ||
+ len(loaded.Views[0].ItemIDs) != 2 || loaded.Views[0].PageSize != 25) {
+ t.Fatal("encrypted save lost legacy layout data or its recovery source")
+ }
}
diff --git a/kernel/av/layout.go b/kernel/av/layout.go
index bce6dd81a1..4378141b1b 100644
--- a/kernel/av/layout.go
+++ b/kernel/av/layout.go
@@ -33,13 +33,11 @@ type BaseLayout struct {
ShowIcon bool `json:"showIcon"` // 是否显示字段图标
WrapField bool `json:"wrapField"` // 是否换行字段内容
- // TODO 以下三个字段已经废弃,计划于 2026 年 6 月 30 日后删除 https://github.com/siyuan-note/siyuan/issues/15162
-
- //Deprecated
+ // Deprecated: 仅用于读取和升级旧版布局,过滤规则由 View.Filters 维护。
Filters []*ViewFilter `json:"filters,omitempty"` // 过滤规则
- //Deprecated
+ // Deprecated: 仅用于读取和升级旧版布局,排序规则由 View.Sorts 维护。
Sorts []*ViewSort `json:"sorts,omitempty"` // 排序规则
- //Deprecated
+ // Deprecated: 仅用于读取和升级旧版布局,分页大小由 View.PageSize 维护。
PageSize int `json:"pageSize,omitempty"` // 每页条目数
}
diff --git a/kernel/av/layout_deprecated_test.go b/kernel/av/layout_deprecated_test.go
new file mode 100644
index 0000000000..94e2533cd3
--- /dev/null
+++ b/kernel/av/layout_deprecated_test.go
@@ -0,0 +1,54 @@
+package av
+
+import (
+ "bytes"
+ "encoding/json"
+ "os"
+ "reflect"
+ "testing"
+)
+
+func TestDeprecatedLayoutFieldsRemainReadable(t *testing.T) {
+ raw, err := os.ReadFile("testdata/spec1-deprecated-layouts.json")
+ if err != nil {
+ t.Fatal(err)
+ }
+ original := bytes.Clone(raw)
+ database, err := ParseAttributeViewData("20261010120001-encav00", raw)
+ if err != nil {
+ t.Fatal(err)
+ }
+ UpgradeSpec(database)
+ table, gallery := database.Views[0], database.Views[1]
+ if !reflect.DeepEqual(table.ItemIDs, []string{"second", "first"}) ||
+ !reflect.DeepEqual(gallery.ItemIDs, []string{"first", "second"}) || table.PageSize != 25 ||
+ len(table.Filters) != 1 || len(table.Filters[0].Filters) != 1 || table.Filters[0].Filters[0].Column != "title" ||
+ len(table.Sorts) != 1 || table.Sorts[0].Order != SortOrderDesc {
+ t.Fatal("legacy ordering, filters, sorts or page size were lost")
+ }
+ encoded, err := json.Marshal(database)
+ if err != nil {
+ t.Fatal(err)
+ }
+ reloaded, err := ParseAttributeViewData(database.ID, encoded)
+ if err != nil || !reflect.DeepEqual(table.ItemIDs, reloaded.Views[0].ItemIDs) ||
+ !reflect.DeepEqual(gallery.ItemIDs, reloaded.Views[1].ItemIDs) || !bytes.Equal(raw, original) {
+ t.Fatalf("legacy layout round trip changed data: %v", err)
+ }
+}
+
+func TestDeprecatedLayoutEmptyFieldsAreOmitted(t *testing.T) {
+ for _, layout := range []any{
+ &LayoutTable{BaseLayout: &BaseLayout{}}, &LayoutGallery{BaseLayout: &BaseLayout{}},
+ } {
+ encoded, err := json.Marshal(layout)
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, field := range []string{"rowIds", "cardIds", "filters", "sorts", "pageSize"} {
+ if bytes.Contains(encoded, []byte(`"`+field+`"`)) {
+ t.Fatalf("empty deprecated field %s was written: %s", field, encoded)
+ }
+ }
+ }
+}
diff --git a/kernel/av/layout_gallery.go b/kernel/av/layout_gallery.go
index 1e45027367..1fa784afaa 100644
--- a/kernel/av/layout_gallery.go
+++ b/kernel/av/layout_gallery.go
@@ -37,9 +37,8 @@ type LayoutGallery struct {
CardFields []*ViewGalleryCardField `json:"fields"` // 卡片字段
- // TODO CardIDs 字段已经废弃,计划于 2026 年 6 月 30 日后删除 https://github.com/siyuan-note/siyuan/issues/15194
- //Deprecated
- CardIDs []string `json:"cardIds"` // 卡片 ID,用于自定义排序
+ // Deprecated: 仅用于读取和升级旧版布局,卡片顺序由 View.ItemIDs 维护。
+ CardIDs []string `json:"cardIds,omitempty"` // 卡片 ID,用于自定义排序
}
func NewLayoutGallery() *LayoutGallery {
diff --git a/kernel/av/layout_table.go b/kernel/av/layout_table.go
index f5b3ae1245..81af5b61e7 100644
--- a/kernel/av/layout_table.go
+++ b/kernel/av/layout_table.go
@@ -42,9 +42,8 @@ type LayoutTable struct {
Columns []*ViewTableColumn `json:"columns"` // 表格列
- // TODO RowIDs 字段已经废弃,计划于 2026 年 6 月 30 日后删除 https://github.com/siyuan-note/siyuan/issues/15194
- //Deprecated
- RowIDs []string `json:"rowIds"` // 行 ID,用于自定义排序
+ // Deprecated: 仅用于读取和升级旧版布局,行顺序由 View.ItemIDs 维护。
+ RowIDs []string `json:"rowIds,omitempty"` // 行 ID,用于自定义排序
}
func NewLayoutTable() *LayoutTable {
diff --git a/kernel/av/testdata/spec1-deprecated-layouts.json b/kernel/av/testdata/spec1-deprecated-layouts.json
new file mode 100644
index 0000000000..e58ae60dcd
--- /dev/null
+++ b/kernel/av/testdata/spec1-deprecated-layouts.json
@@ -0,0 +1,29 @@
+{
+ "id": "20261010120001-encav00",
+ "name": "Legacy layout",
+ "spec": 1,
+ "keyValues": [{"key": {"id": "title", "type": "block"}, "values": [
+ {"id": "first-value", "keyID": "title", "blockID": "first", "type": "block", "isDetached": true, "block": {"content": "First"}},
+ {"id": "second-value", "keyID": "title", "blockID": "second", "type": "block", "isDetached": true, "block": {"content": "Second"}}
+ ]}],
+ "views": [
+ {
+ "id": "table-view",
+ "type": "table",
+ "table": {
+ "spec": 0,
+ "id": "table-layout",
+ "columns": [{"id": "title"}],
+ "rowIds": ["second", "first"],
+ "filters": [{"column": "title", "operator": "Contains", "value": {"type": "text", "text": {"content": "legacy"}}}],
+ "sorts": [{"column": "title", "order": "DESC"}],
+ "pageSize": 25
+ }
+ },
+ {
+ "id": "gallery-view",
+ "type": "gallery",
+ "gallery": {"spec": 0, "id": "gallery-layout", "cardIds": ["first", "second"], "cardFields": []}
+ }
+ ]
+}
diff --git a/kernel/conf/export.go b/kernel/conf/export.go
index 69334ed6ef..2b99e30d71 100644
--- a/kernel/conf/export.go
+++ b/kernel/conf/export.go
@@ -34,7 +34,6 @@ type Export struct {
FileAnnotationRefMode int `json:"fileAnnotationRefMode"` // 文件标注引用导出模式,0:文件名 - 页码 - 锚文本,1:仅锚文本
PandocBin string `json:"pandocBin"` // Pandoc 可执行文件路径
PandocParams string `json:"pandocParams"` // Pandoc 额外参数
- DocxTemplate string `json:"docxTemplate"` // Docx 导出时模板文件路径 TODO 已经废弃,计划于 2026 年 6 月 30 日后删除 https://github.com/siyuan-note/siyuan/issues/16845
RemoveAssetsID bool `json:"removeAssetsID"` // Markdown 导出时是否移除资源文件名 ID 部分 https://github.com/siyuan-note/siyuan/issues/16065
MarkdownYFM bool `json:"markdownYFM"` // Markdown 导出时是否添加 YAML Front Matter https://github.com/siyuan-note/siyuan/issues/7727
InlineMemo bool `json:"inlineMemo"` // 是否导出行级备注 https://github.com/siyuan-note/siyuan/issues/14605
diff --git a/kernel/model/attribute_view_layout_spec_test.go b/kernel/model/attribute_view_layout_spec_test.go
index 4205ae97bd..bb7c990543 100644
--- a/kernel/model/attribute_view_layout_spec_test.go
+++ b/kernel/model/attribute_view_layout_spec_test.go
@@ -2,9 +2,9 @@ package model
import (
"bytes"
+ "encoding/json"
"os"
"path/filepath"
- "reflect"
"testing"
"github.com/siyuan-note/siyuan/kernel/av"
@@ -13,11 +13,19 @@ import (
)
func TestAttributeViewLayoutSpecLegacyRecovery(t *testing.T) {
- fixture, err := os.ReadFile("../av/testdata/spec9-layouts.json")
+ testAttributeViewLayoutSpecRecovery(t, "spec9-layouts.json", "20260921000000-layouts", 9, 10, 1)
+}
+
+func TestAttributeViewDeprecatedLayoutLegacyRecovery(t *testing.T) {
+ testAttributeViewLayoutSpecRecovery(t, "spec1-deprecated-layouts.json", "20261010120001-encav00", 1, 8, 2)
+}
+
+func testAttributeViewLayoutSpecRecovery(t *testing.T, file, avID string, sourceSpec, savedSpec, rows int) {
+ t.Helper()
+ fixture, err := os.ReadFile(filepath.Join("../av/testdata", file))
if err != nil {
t.Fatal(err)
}
- const avID = "20260921000000-layouts"
for _, encrypted := range []bool{false, true} {
name := "ordinary"
if encrypted {
@@ -46,26 +54,46 @@ func TestAttributeViewLayoutSpecLegacyRecovery(t *testing.T) {
t.Fatal(err)
}
original, err := av.ParseAttributeViewForIndexInBox(avID, boxID)
- if err != nil || original.Spec != 9 {
+ if err != nil || original.Spec != sourceSpec {
t.Fatalf("legacy source read: %v", err)
}
before, _ := os.ReadFile(path)
if !bytes.Equal(source, before) {
t.Fatal("reading rewrote the legacy source")
}
- for _, view := range original.Views {
- if exported := getAttrViewTable(original, view, ""); exported == nil || len(exported.Rows) != 1 {
+ av.UpgradeSpec(original)
+ exportData, err := json.Marshal(original)
+ if err != nil {
+ t.Fatal(err)
+ }
+ exportable, err := av.ParseAttributeViewData(avID, exportData)
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, view := range exportable.Views {
+ if exported := getAttrViewTable(exportable, view, ""); exported == nil || len(exported.Rows) != rows {
t.Fatalf("legacy layout export failed: %s", view.LayoutType)
}
}
if err := av.SaveAttributeView(original); err != nil {
t.Fatal(err)
}
+ want, err := json.Marshal(original.Views)
+ if err != nil {
+ t.Fatal(err)
+ }
cache.ClearAVCache()
upgraded, err := av.ParseAttributeViewForIndexInBox(avID, boxID)
- if err != nil || upgraded.Spec != 10 || !reflect.DeepEqual(upgraded.Views, original.Views) {
+ if err != nil {
t.Fatalf("upgraded layout read: %v", err)
}
+ if upgraded.Spec != savedSpec {
+ t.Fatalf("upgraded spec = %d, want %d", upgraded.Spec, savedSpec)
+ }
+ got, err := json.Marshal(upgraded.Views)
+ if err != nil || !bytes.Equal(got, want) {
+ t.Fatalf("upgraded views differ: got %s, want %s", got, want)
+ }
// 历史或备份保留的旧源仍须先认证,再解析并恢复,不能依赖当前文件的格式版本。
plain, err := decryptHistoricalAttributeView(boxID, avID, source)
@@ -73,7 +101,7 @@ func TestAttributeViewLayoutSpecLegacyRecovery(t *testing.T) {
t.Fatal(err)
}
historical, err := av.ParseAttributeViewData(avID, plain)
- if err != nil || historical.Spec != 9 {
+ if err != nil || historical.Spec != sourceSpec {
t.Fatalf("historical layout read: %v", err)
}
if err := av.SaveAttributeView(historical); err != nil {
@@ -81,9 +109,13 @@ func TestAttributeViewLayoutSpecLegacyRecovery(t *testing.T) {
}
cache.ClearAVCache()
restored, err := av.ParseAttributeViewForIndexInBox(avID, boxID)
- if err != nil || restored.Spec != 10 || !reflect.DeepEqual(upgraded.Views, restored.Views) {
+ if err != nil || restored.Spec != savedSpec {
t.Fatalf("legacy backup recovery lost layouts: %v", err)
}
+ got, err = json.Marshal(restored.Views)
+ if err != nil || !bytes.Equal(got, want) {
+ t.Fatalf("restored views differ: got %s, want %s", got, want)
+ }
if encrypted {
stored, err := os.ReadFile(path)
if err != nil || !util.IsCiphertext(stored) {
diff --git a/kernel/model/conf_migration.go b/kernel/model/conf_migration.go
index fbfe8326b2..40a4b5f373 100644
--- a/kernel/model/conf_migration.go
+++ b/kernel/model/conf_migration.go
@@ -72,7 +72,17 @@ var confMigrations = []confMigration{
if nil == c.Export.Load() {
return false, nil
}
- docxTemplate := util.RemoveInvalid(c.Export.Load().DocxTemplate)
+ var legacy struct {
+ Export struct {
+ DocxTemplate string `json:"docxTemplate"`
+ } `json:"export"`
+ }
+ if len(raw) > 0 {
+ if err := gulu.JSON.UnmarshalJSON(raw, &legacy); err != nil {
+ return false, err
+ }
+ }
+ docxTemplate := util.RemoveInvalid(legacy.Export.DocxTemplate)
if "" == docxTemplate {
return false, nil
}
@@ -84,7 +94,6 @@ var confMigrations = []confMigration{
params += " --reference-doc " + docxTemplate
c.Export.Load().PandocParams = strings.TrimSpace(params)
}
- c.Export.Load().DocxTemplate = ""
return true, nil
}},
{5, "pandoc", func(c *AppConf, raw []byte) (bool, error) {
diff --git a/kernel/model/conf_migration_docx_test.go b/kernel/model/conf_migration_docx_test.go
new file mode 100644
index 0000000000..c22e3cc833
--- /dev/null
+++ b/kernel/model/conf_migration_docx_test.go
@@ -0,0 +1,60 @@
+package model
+
+import (
+ "bytes"
+ "encoding/json"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func TestConfMigrationDeprecatedDocxTemplate(t *testing.T) {
+ prepareConfConsistencyTest(t)
+ previousStore := util.ISMicrosoftStore
+ util.ISMicrosoftStore = false
+ t.Cleanup(func() { util.ISMicrosoftStore = previousStore })
+ file := filepath.Join(t.TempDir(), "legacy template.docx")
+ if err := os.WriteFile(file, []byte("template"), 0600); err != nil {
+ t.Fatal(err)
+ }
+ for _, quoted := range []bool{false, true} {
+ for _, existing := range []bool{false, true} {
+ template := file
+ if quoted {
+ template = `"` + file + `"`
+ }
+ params := "--wrap=none"
+ if existing {
+ params += " --reference-doc existing.docx"
+ }
+ raw, err := json.Marshal(map[string]any{"confVersion": 3, "export": map[string]string{
+ "docxTemplate": template, "pandocParams": params,
+ }})
+ if err != nil {
+ t.Fatal(err)
+ }
+ original := bytes.Clone(raw)
+ config := loadConfFixture(t, string(raw))
+ if !applyConfMigrations(config, raw) || config.ConfVersion != CurrentConfVersion {
+ t.Fatal("legacy template migration did not finish")
+ }
+ want := params
+ if !existing && !quoted {
+ want += ` --reference-doc "` + file + `"`
+ }
+ if config.Export.Load().PandocParams != want || !bytes.Equal(raw, original) {
+ t.Fatalf("template parameters lost: %q, want %q", config.Export.Load().PandocParams, want)
+ }
+ encoded, err := json.Marshal(config)
+ if err != nil || strings.Contains(string(encoded), "docxTemplate") {
+ t.Fatalf("deprecated template field persisted: %v", err)
+ }
+ if applyConfMigrations(config, raw) || config.Export.Load().PandocParams != want {
+ t.Fatal("migration was not idempotent")
+ }
+ }
+ }
+}