diff --git a/packages/uni-vue-devtools/build.json b/packages/uni-vue-devtools/build.json index 952671e020e9385f8efd1ad8b015bff085103cd6..5063da8136e126979de37021cd16dd4f690cf8c9 100644 --- a/packages/uni-vue-devtools/build.json +++ b/packages/uni-vue-devtools/build.json @@ -8,7 +8,10 @@ }, "external": [ "@dcloudio/uni-cli-shared" - ] + ], + "compilerOptions": { + "target": "es2018" + } }, { "input": { diff --git a/packages/uni-vue-devtools/dist/uni.compiler.js b/packages/uni-vue-devtools/dist/uni.compiler.js index 60b5e08f9afefdf97f0d21e0a8a69d269b924226..bcda1b280b197c85ad4bda633f9fde4fb213903d 100644 --- a/packages/uni-vue-devtools/dist/uni.compiler.js +++ b/packages/uni-vue-devtools/dist/uni.compiler.js @@ -9,31 +9,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); var path__default = /*#__PURE__*/_interopDefaultLegacy(path); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - // eslint-disable-next-line no-restricted-globals const { initDevtoolsServer } = require('../lib/front/server.js'); const uniVueDevtoolsPlugin = () => { @@ -41,11 +16,11 @@ const uniVueDevtoolsPlugin = () => { return { name: 'uni:vue-devtools', config() { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + return new Promise(async (resolve) => { let __VUE_DEVTOOLS_HOST__ = 'localhost'; let __VUE_DEVTOOLS_PORT__ = 8098; if (process.env.__VUE_PROD_DEVTOOLS__) { - const { socketHost, socketPort } = yield initDevtoolsServer(); + const { socketHost, socketPort } = await initDevtoolsServer(); __VUE_DEVTOOLS_HOST__ = socketHost; __VUE_DEVTOOLS_PORT__ = socketPort; } @@ -56,7 +31,7 @@ const uniVueDevtoolsPlugin = () => { __VUE_DEVTOOLS_PORT__: JSON.stringify(`${__VUE_DEVTOOLS_PORT__}`), }, }); - })); + }); }, generateBundle() { // 仅处理小程序 diff --git a/packages/uni-vue-devtools/package.json b/packages/uni-vue-devtools/package.json index 287af29b5044546994910fa39172038ba3d4a9db..015ed9958d279286fc769b5cb9219721d4aacb61 100644 --- a/packages/uni-vue-devtools/package.json +++ b/packages/uni-vue-devtools/package.json @@ -4,7 +4,8 @@ "description": "uni-vue-devtools", "module": "dist/runtime.es.js", "files": [ - "dist" + "dist", + "lib" ], "repository": { "type": "git", @@ -26,7 +27,6 @@ "express": "^4.17.1", "open": "^8.4.0", "picocolors": "^1.0.0", - "socket.io": "^4.4.0", - "tslib": "^2.4.1" + "socket.io": "^4.4.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 961f5aca11a00537215e54589f62dbada010f724..04e57b4f2a1dc4f58de67d7c9385ae654cea84d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -841,7 +841,6 @@ importers: open: ^8.4.0 picocolors: ^1.0.0 socket.io: ^4.4.0 - tslib: ^2.4.1 dependencies: '@dcloudio/uni-cli-shared': link:../uni-cli-shared detect-port: 1.5.1 @@ -849,7 +848,6 @@ importers: open: 8.4.0 picocolors: 1.0.0 socket.io: 4.5.4 - tslib: 2.4.1 packages/uts: specifiers: @@ -7938,6 +7936,7 @@ packages: /tslib/2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + dev: true /tsutils/3.21.0_typescript@4.9.3: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}