Skip to content

Commit

Permalink
feat(vsc): 3.5.0
Browse files Browse the repository at this point in the history
- fix: 修复 `invalid rev format` 错误, #108 #109 感谢 @huankong233 @corvofeng
- feat: 优化启动超时报错的问题 #102, 感谢 @xyeluo
  • Loading branch information
mohuishou committed Sep 6, 2024
1 parent d4ce5f2 commit 0153cd1
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 106 deletions.
4 changes: 2 additions & 2 deletions helper/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down Expand Up @@ -35,4 +35,4 @@
"dependencies": {
"throttle-debounce": "^3.0.1"
}
}
}
75 changes: 36 additions & 39 deletions helper/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions helper/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];

// 值不存在,初始化,并且保存
Expand Down Expand Up @@ -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;
Expand Down
13 changes: 10 additions & 3 deletions helper/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"declaration": true,
"sourceMap": false,
"noImplicitAny": true,
"noEmitOnError": false,
"module": "CommonJS",
// "module": "AMD",
"target": "ES2018",
Expand All @@ -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"
]
}
106 changes: 49 additions & 57 deletions plugins/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions plugins/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"utools-api-types": "^2.6.4"
},
"dependencies": {
"utools-helper": "^2.1.0"
"utools-helper": "^2.2.0"
}
}
}

0 comments on commit 0153cd1

Please sign in to comment.