diff --git a/packages/vscode/LICENSE b/packages/vscode/LICENSE new file mode 100644 index 0000000..42ff6bc --- /dev/null +++ b/packages/vscode/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 BrandonX + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/vscode/package.json b/packages/vscode/package.json index acf4769..120bfcf 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -2,7 +2,7 @@ "name": "vscode-protobuf-to-typescript", "displayName": "Protobuf To Typescript", "description": "Convert protobuf struct to typescript type", - "version": "0.0.7", + "version": "0.0.8", "private": true, "icon": "icon.png", "publisher": "yishi", @@ -17,6 +17,11 @@ "type": "git", "url": "git+https://github.com/brandonxiang/protobuf-to-typescript.git" }, + "activationEvents": [ + "onCommand:pbToTypescript.fromSelection", + "onCommand:pbToTypescript.fromClipboard", + "onCommand:pbToTypescript.convertOnAir" + ], "main": "./out/extension.js", "contributes": { "configuration": { @@ -92,7 +97,8 @@ "watch": "npm run -S esbuild-base -- --sourcemap --watch", "pretest": "npm run build && npm run lint", "lint": "eslint src --ext ts", - "will-test": "node ./out/test/runTest.js" + "will-test": "node ./out/test/runTest.js", + "publish": "pnpm vsce publish --no-dependencies" }, "devDependencies": { "@types/copy-paste": "^1.1.30", @@ -112,7 +118,7 @@ "rimraf": "^3.0.2" }, "dependencies": { - "pbts": "^4.0.5", + "pbts": "^4.0.6", "copy-paste": "1.3.0" } } \ No newline at end of file diff --git a/packages/web/app/pages/index.svelte b/packages/web/app/pages/index.svelte index 487b07d..9564d1e 100755 --- a/packages/web/app/pages/index.svelte +++ b/packages/web/app/pages/index.svelte @@ -26,7 +26,7 @@ message MyResponse { let dest = ''; let selectedDefinition = localStorage.getItem('selectedDefinition') || 'typescript'; - let selectedMode = localStorage.getItem('selectedMode') || 'normal'; + let selectedMode = localStorage.getItem('selectedMode') || 'strict'; let isWarning = false; diff --git a/packages/web/app/pages/mock.svelte b/packages/web/app/pages/mock.svelte index a951919..43d4169 100755 --- a/packages/web/app/pages/mock.svelte +++ b/packages/web/app/pages/mock.svelte @@ -31,7 +31,7 @@ message HelloReply { let isWarning = false; let methodNames = []; - let selectedMode = localStorage.getItem('selectedMode') || 'normal'; + let selectedMode = localStorage.getItem('selectedMode') || 'strict'; function onProtobuf() { const methods = pbToTypescript.getAllMethods('syntax = "proto3";' + src); diff --git a/packages/web/package.json b/packages/web/package.json index 28fdb27..f2518cb 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "svelte": "^4.2.18", - "pbts": "^4.0.5", + "pbts": "^4.0.6", "clipboard": "^2.0.11", "protobufjs": "^7.3.3", "svelte-codemirror-editor": "^1.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5aac1b8..80404e9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,7 +85,7 @@ importers: specifier: 1.3.0 version: 1.3.0 pbts: - specifier: ^4.0.3 + specifier: ^4.0.6 version: link:../core devDependencies: '@types/copy-paste': @@ -146,7 +146,7 @@ importers: specifier: ^2.0.11 version: 2.0.11 pbts: - specifier: ^4.0.3 + specifier: ^4.0.6 version: link:../core protobufjs: specifier: ^7.3.3