From 1f75529bc73d6f98eff148541419203bc60d8c5a Mon Sep 17 00:00:00 2001 From: linlai Date: Fri, 6 Sep 2024 09:36:53 +0800 Subject: [PATCH] feat(vsc): 3.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fix: 修复 `invalid rev format` 错误, #108 #109 感谢 @huankong233 @corvofeng - feat: 优化启动超时报错的问题 #102, 感谢 @xyeluo --- helper/package.json | 4 +- helper/pnpm-lock.yaml | 75 +++++++++++----------- helper/src/config/config.ts | 8 ++- helper/tsconfig.json | 13 +++- plugins/vscode/package-lock.json | 106 ++++++++++++++----------------- plugins/vscode/package.json | 4 +- 6 files changed, 104 insertions(+), 106 deletions(-) diff --git a/helper/package.json b/helper/package.json index 10f978b..212a313 100644 --- a/helper/package.json +++ b/helper/package.json @@ -1,6 +1,6 @@ { "name": "utools-helper", - "version": "2.1.0", + "version": "2.2.0", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ @@ -35,4 +35,4 @@ "dependencies": { "throttle-debounce": "^3.0.1" } -} +} \ No newline at end of file diff --git a/helper/pnpm-lock.yaml b/helper/pnpm-lock.yaml index 5ecdc04..5cf63b4 100644 --- a/helper/pnpm-lock.yaml +++ b/helper/pnpm-lock.yaml @@ -1,58 +1,55 @@ -lockfileVersion: '9.0' +lockfileVersion: '6.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -importers: - - .: - dependencies: - throttle-debounce: - specifier: ^3.0.1 - version: 3.0.1 - devDependencies: - '@types/node': - specifier: ^15.12.4 - version: 15.14.9 - '@types/throttle-debounce': - specifier: ^2.1.0 - version: 2.1.0 - typescript: - specifier: ^4.2.4 - version: 4.9.5 - utools-api-types: - specifier: ^2.0.3 - version: 2.6.4 +dependencies: + throttle-debounce: + specifier: ^3.0.1 + version: 3.0.1 + +devDependencies: + '@types/node': + specifier: 20.16.0 + version: 20.16.0 + '@types/throttle-debounce': + specifier: ^2.1.0 + version: 2.1.0 + typescript: + specifier: ^4.9.5 + version: 4.9.5 + utools-api-types: + specifier: ^2.6.4 + version: 2.6.4 packages: - '@types/node@15.14.9': - resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==} + /@types/node@20.16.0: + resolution: {integrity: sha512-vDxceJcoZhIVh67S568bm1UGZO0DX0hpplJZxzeXMKwIPLn190ec5RRxQ69BKhX44SUGIxxgMdDY557lGLKprQ==} + dependencies: + undici-types: 6.19.8 + dev: true - '@types/throttle-debounce@2.1.0': + /@types/throttle-debounce@2.1.0: resolution: {integrity: sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==} + dev: true - throttle-debounce@3.0.1: + /throttle-debounce@3.0.1: resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==} engines: {node: '>=10'} + dev: false - typescript@4.9.5: + /typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true + dev: true - utools-api-types@2.6.4: - resolution: {integrity: sha512-pJuGvjSScwePuc6F/PVtL6DSCm+XzF78CBKxFUU82FON4vB8MGDXPCp6Y/25T/ndKyiyFj1zCR8ObyxtdikzPg==} - -snapshots: + /undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + dev: true - '@types/node@15.14.9': {} - - '@types/throttle-debounce@2.1.0': {} - - throttle-debounce@3.0.1: {} - - typescript@4.9.5: {} - - utools-api-types@2.6.4: {} + /utools-api-types@2.6.4: + resolution: {integrity: sha512-pJuGvjSScwePuc6F/PVtL6DSCm+XzF78CBKxFUU82FON4vB8MGDXPCp6Y/25T/ndKyiyFj1zCR8ObyxtdikzPg==} + dev: true diff --git a/helper/src/config/config.ts b/helper/src/config/config.ts index 2bfb8c7..1443e22 100644 --- a/helper/src/config/config.ts +++ b/helper/src/config/config.ts @@ -59,14 +59,14 @@ export abstract class Config implements IConfig { get key(): string { if (this.only_current_machine) { - return utools.getLocalId() + "." + this.name; + return utools.getNativeId() + "." + this.name; } return this.name; } get value(): any { let itemOld = utools.db.get("config"); - let data = itemOld as { _id: string; _rev: string; data: any }; + let data = itemOld as { _id: string; _rev?: string; data: any }; if (data && this.key in data.data) return data.data[this.key]; // 值不存在,初始化,并且保存 @@ -99,7 +99,9 @@ export abstract class Config implements IConfig { this.name = item.name; this.only_current_machine = item.only_current_machine; this.label = item.label ? item.label : item.name; - this.placeholder = item.placeholder ? item.placeholder : "请输入" + item.name; + this.placeholder = item.placeholder + ? item.placeholder + : "请输入" + item.name; this.default = item.default; this.required = item.required; this.tips = item.tips; diff --git a/helper/tsconfig.json b/helper/tsconfig.json index aa42f67..55c7c7d 100644 --- a/helper/tsconfig.json +++ b/helper/tsconfig.json @@ -5,6 +5,7 @@ "declaration": true, "sourceMap": false, "noImplicitAny": true, + "noEmitOnError": false, "module": "CommonJS", // "module": "AMD", "target": "ES2018", @@ -15,7 +16,13 @@ // "utools": ["@types/utools.d.ts"], // "electron": ["@types/electron.d.ts"] // } - "types": ["utools-api-types", "@types/node"] + "types": [ + "utools-api-types", + "@types/node" + ] }, - "exclude": ["example/*", "dist"] -} + "exclude": [ + "example/*", + "dist" + ] +} \ No newline at end of file diff --git a/plugins/vscode/package-lock.json b/plugins/vscode/package-lock.json index c344d95..f7bc394 100644 --- a/plugins/vscode/package-lock.json +++ b/plugins/vscode/package-lock.json @@ -1,7 +1,7 @@ { "name": "utools-vscode", "version": "v1.5.2", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -9,81 +9,73 @@ "version": "v1.5.2", "license": "MIT", "dependencies": { - "utools-helper": "^2.0.0" + "utools-helper": "^2.2.0" }, "devDependencies": { - "@types/node": "^15.12.4", - "@types/sql.js": "^1.4.3", - "utools-api-types": "^2.0.3" + "@types/node": "20.16.0", + "@types/sql.js": "^1.4.9", + "utools-api-types": "^2.6.4" } }, "node_modules/@types/emscripten": { - "version": "1.39.6", - "resolved": "https://registry.npmmirror.com/@types/emscripten/-/emscripten-1.39.6.tgz", - "integrity": "sha512-H90aoynNhhkQP6DRweEjJp5vfUVdIj7tdPLsu7pq89vODD/lcugKfZOsfgwpvM6XUewEp2N5dCg1Uf3Qe55Dcg==", - "dev": true + "version": "1.39.13", + "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-1.39.13.tgz", + "integrity": "sha512-cFq+fO/isvhvmuP/+Sl4K4jtU6E23DoivtbO4r50e3odaxAiVdbfSYRDdJ4gCdxx+3aRjhphS5ZMwIH4hFy/Cw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "15.12.4", - "resolved": "https://registry.nlark.com/@types/node/download/@types/node-15.12.4.tgz", - "integrity": "sha1-4c+BfXCh4RjoGSLE/2aDzp1CLiY=", - "dev": true + "version": "20.16.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.0.tgz", + "integrity": "sha512-vDxceJcoZhIVh67S568bm1UGZO0DX0hpplJZxzeXMKwIPLn190ec5RRxQ69BKhX44SUGIxxgMdDY557lGLKprQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } }, "node_modules/@types/sql.js": { - "version": "1.4.3", - "resolved": "https://registry.npmmirror.com/@types/sql.js/-/sql.js-1.4.3.tgz", - "integrity": "sha512-3bz1LJIiJtKMEL8tYf7c9Nrb1lYcFeWQkE8vhWvobE29ZzizW79DtoTjqx1bR82DS2Ch2K30nOwNhuLclZ1vYg==", + "version": "1.4.9", + "resolved": "https://registry.npmjs.org/@types/sql.js/-/sql.js-1.4.9.tgz", + "integrity": "sha512-ep8b36RKHlgWPqjNG9ToUrPiwkhwh0AEzy883mO5Xnd+cL6VBH1EvSjBAAuxLUFF2Vn/moE3Me6v9E1Lo+48GQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/emscripten": "*", "@types/node": "*" } }, - "node_modules/utools-api-types": { - "version": "2.0.3", - "resolved": "https://registry.nlark.com/utools-api-types/download/utools-api-types-2.0.3.tgz", - "integrity": "sha1-SxJ+Mn7r1G/4U8Nyt8KAe69c4WE=", - "dev": true - }, - "node_modules/utools-helper": { - "version": "2.0.0", - "resolved": "https://registry.nlark.com/utools-helper/download/utools-helper-2.0.0.tgz?cache=0&sync_timestamp=1624256839035&other_urls=https%3A%2F%2Fregistry.nlark.com%2Futools-helper%2Fdownload%2Futools-helper-2.0.0.tgz", - "integrity": "sha1-bRSwLIMaySWhxqepTxkGrxHlV1o=" - } - }, - "dependencies": { - "@types/emscripten": { - "version": "1.39.6", - "resolved": "https://registry.npmmirror.com/@types/emscripten/-/emscripten-1.39.6.tgz", - "integrity": "sha512-H90aoynNhhkQP6DRweEjJp5vfUVdIj7tdPLsu7pq89vODD/lcugKfZOsfgwpvM6XUewEp2N5dCg1Uf3Qe55Dcg==", - "dev": true - }, - "@types/node": { - "version": "15.12.4", - "resolved": "https://registry.nlark.com/@types/node/download/@types/node-15.12.4.tgz", - "integrity": "sha1-4c+BfXCh4RjoGSLE/2aDzp1CLiY=", - "dev": true + "node_modules/throttle-debounce": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz", + "integrity": "sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==", + "license": "MIT", + "engines": { + "node": ">=10" + } }, - "@types/sql.js": { - "version": "1.4.3", - "resolved": "https://registry.npmmirror.com/@types/sql.js/-/sql.js-1.4.3.tgz", - "integrity": "sha512-3bz1LJIiJtKMEL8tYf7c9Nrb1lYcFeWQkE8vhWvobE29ZzizW79DtoTjqx1bR82DS2Ch2K30nOwNhuLclZ1vYg==", + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true, - "requires": { - "@types/emscripten": "*", - "@types/node": "*" - } + "license": "MIT" }, - "utools-api-types": { - "version": "2.0.3", - "resolved": "https://registry.nlark.com/utools-api-types/download/utools-api-types-2.0.3.tgz", - "integrity": "sha1-SxJ+Mn7r1G/4U8Nyt8KAe69c4WE=", - "dev": true + "node_modules/utools-api-types": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/utools-api-types/-/utools-api-types-2.6.4.tgz", + "integrity": "sha512-pJuGvjSScwePuc6F/PVtL6DSCm+XzF78CBKxFUU82FON4vB8MGDXPCp6Y/25T/ndKyiyFj1zCR8ObyxtdikzPg==", + "dev": true, + "license": "MIT" }, - "utools-helper": { - "version": "2.0.0", - "resolved": "https://registry.nlark.com/utools-helper/download/utools-helper-2.0.0.tgz?cache=0&sync_timestamp=1624256839035&other_urls=https%3A%2F%2Fregistry.nlark.com%2Futools-helper%2Fdownload%2Futools-helper-2.0.0.tgz", - "integrity": "sha1-bRSwLIMaySWhxqepTxkGrxHlV1o=" + "node_modules/utools-helper": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/utools-helper/-/utools-helper-2.2.0.tgz", + "integrity": "sha512-EnyxkRg35ajuK4GglxuL+bFUAwGv7gRZdnsC2zg5m4stFlxc7S+i5boLkA3IIiOKvBKvFi94BA+bLrnJ1x6saA==", + "license": "MIT", + "dependencies": { + "throttle-debounce": "^3.0.1" + } } } } diff --git a/plugins/vscode/package.json b/plugins/vscode/package.json index 6b5683d..d38539d 100644 --- a/plugins/vscode/package.json +++ b/plugins/vscode/package.json @@ -9,6 +9,6 @@ "utools-api-types": "^2.6.4" }, "dependencies": { - "utools-helper": "^2.1.0" + "utools-helper": "^2.2.0" } -} +} \ No newline at end of file