From 0a8cff40952741a5614cfeaa615a62ee831116ab Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Fri, 19 Jan 2024 21:29:24 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"wip(uvue):=20=E9=87=8D=E6=9E=84=20uts?= =?UTF-8?q?=20ext=20api=20=E7=9A=84=20auto=20import"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ff87e1efed02082be2a633970172bd32242e2cc2. --- .../__tests__/uniExtApi.spec.ts | 25 -- packages/uni-cli-shared/src/constants.ts | 2 +- packages/uni-cli-shared/src/uni_modules.ts | 7 +- .../uni-cli-shared/src/vite/autoImport.ts | 13 +- .../src/vite/plugins/uts/ext-api.ts | 80 ++--- packages/uni-h5/dist-x/uni-h5.cjs.js | 235 --------------- packages/uni-h5/dist-x/uni-h5.es.js | 279 ++---------------- .../uni-uts-v1/src/tsc/javascript/index.ts | 13 +- packages/vite-plugin-uni/src/index.ts | 6 +- pnpm-lock.yaml | 104 +++---- 10 files changed, 104 insertions(+), 660 deletions(-) diff --git a/packages/uni-cli-shared/__tests__/uniExtApi.spec.ts b/packages/uni-cli-shared/__tests__/uniExtApi.spec.ts index 7959ad387c..c947dd650e 100644 --- a/packages/uni-cli-shared/__tests__/uniExtApi.spec.ts +++ b/packages/uni-cli-shared/__tests__/uniExtApi.spec.ts @@ -1,5 +1,4 @@ import { parseInjects } from '../src/uni_modules' -import { injectsToAutoImports } from '../src/vite' describe('uni_modules:uni-ext-api', () => { test('parseInjects', () => { @@ -216,28 +215,4 @@ describe('uni_modules:uni-ext-api', () => { ], }) }) - test(`injectsToAutoImports`, () => { - expect( - injectsToAutoImports( - parseInjects( - true, - 'app-android', - 'kotlin', - `@/uni_modules/uni-getbatteryinfo`, - '', - { - uni: ['getBatteryInfo', 'getBatteryInfoSync'], - } - ) - ) - ).toEqual([ - { - from: '@/uni_modules/uni-getbatteryinfo', - imports: [ - ['getBatteryInfo', 'uni_getBatteryInfo'], - ['getBatteryInfoSync', 'uni_getBatteryInfoSync'], - ], - }, - ]) - }) }) diff --git a/packages/uni-cli-shared/src/constants.ts b/packages/uni-cli-shared/src/constants.ts index bf9d98b2f7..f601579c45 100644 --- a/packages/uni-cli-shared/src/constants.ts +++ b/packages/uni-cli-shared/src/constants.ts @@ -6,7 +6,7 @@ export const EXTNAME_VUE = ['.vue', '.nvue', '.uvue'] export const X_EXTNAME_VUE = ['.uvue', '.vue'] export const EXTNAME_VUE_TEMPLATE = ['.vue', '.nvue', '.uvue', '.jsx', '.tsx'] export const EXTNAME_VUE_RE = /\.(vue|nvue|uvue)$/ -export const EXTNAME_JS_RE = /\.(js|jsx|ts|uts|tsx|mjs)$/ +export const EXTNAME_JS_RE = /\.(js|jsx|ts|tsx|mjs)$/ export const EXTNAME_TS_RE = /\.tsx?$/ const COMMON_EXTENSIONS = [ diff --git a/packages/uni-cli-shared/src/uni_modules.ts b/packages/uni-cli-shared/src/uni_modules.ts index 07524049b6..25e017506c 100644 --- a/packages/uni-cli-shared/src/uni_modules.ts +++ b/packages/uni-cli-shared/src/uni_modules.ts @@ -2,7 +2,6 @@ import path from 'path' import fs from 'fs-extra' import type { UTSTargetLanguage } from './uts' -import { once } from '@dcloudio/uni-shared' export type DefineOptions = { name?: string @@ -29,13 +28,11 @@ export interface Exports { [name: string]: Define | Defines | false } -export const parseUniExtApisOnce = once(parseUniExtApis) - export function parseUniExtApis( vite = true, platform: typeof process.env.UNI_UTS_PLATFORM, language: UTSTargetLanguage = 'javascript' -): Injects { +) { if (!process.env.UNI_INPUT_DIR) { return {} } @@ -78,7 +75,7 @@ export function parseUniExtApis( } type Inject = string | string[] -export type Injects = { +type Injects = { [name: string]: | string | [string, string] diff --git a/packages/uni-cli-shared/src/vite/autoImport.ts b/packages/uni-cli-shared/src/vite/autoImport.ts index 2a518530c3..6b6ec4b645 100644 --- a/packages/uni-cli-shared/src/vite/autoImport.ts +++ b/packages/uni-cli-shared/src/vite/autoImport.ts @@ -1,6 +1,4 @@ import { Options } from 'unplugin-auto-import/types' -import { injectsToAutoImports } from './plugins/uts/ext-api' -import { parseUniExtApisOnce } from '../uni_modules' export type AutoImportOptions = Options @@ -113,18 +111,9 @@ export function initAutoImportOptions( if (platform === 'web') { autoImport.push(uniH5Preset) } - if (platform !== 'app-android') { - // 非 android 平台,注入 uts ext-api - injectsToAutoImports( - parseUniExtApisOnce(true, platform, 'javascript') - ).forEach( - // @ts-expect-error - (item) => autoImport.push(item) - ) - } return { ...userOptions, - include: [/\.[u]?ts$/, /\.[u]?vue/], + include: [/\.[u]?ts$/, /\.[u]?vue$/, /\.[u]?vue\?vue/], exclude: [/[\\/]\.git[\\/]/], imports: (imports as any[]).concat( // app-android 平台暂不注入其他 diff --git a/packages/uni-cli-shared/src/vite/plugins/uts/ext-api.ts b/packages/uni-cli-shared/src/vite/plugins/uts/ext-api.ts index 9317ff7647..72bdf9d614 100644 --- a/packages/uni-cli-shared/src/vite/plugins/uts/ext-api.ts +++ b/packages/uni-cli-shared/src/vite/plugins/uts/ext-api.ts @@ -1,67 +1,29 @@ import type { Plugin } from 'vite' -import { isArray } from '@vue/shared' -import { Injects, parseUniExtApisOnce } from '../../../uni_modules' -import { isJsFile } from '../../utils/url' +import { parseUniExtApis } from '../../../uni_modules' +import { InjectOptions, uniViteInjectPlugin } from '../inject' -const escape = (str: string) => str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&') - -export function uniUTSExtApiReplace(): Plugin { - const injects = parseUniExtApisOnce( - true, - process.env.UNI_UTS_PLATFORM, - 'javascript' - ) - const injectApis = Object.keys(injects) - const firstPass = new RegExp(`(?:${injectApis.map(escape).join('|')})`, 'g') +export function uniUTSExtApi(): Plugin { return { - name: 'uni:uts-ext-api-replace', - transform(code, id) { - if (!injectApis.length) { - return - } - if (!isJsFile(id)) { - return - } - if (code.search(firstPass) === -1) { - return - } - injectApis.forEach((api) => { - code = code.replaceAll(api, api.replace('.', '_')) - }) - return { - code, - map: { mappings: '' }, + name: 'uni:uts-ext-api', + configResolved(config) { + // 在 uts 之前插入 ext-api-inject + const index = config.plugins.findIndex((p) => p.name === 'uts') + if (index > -1) { + const injects = parseUniExtApis( + true, + process.env.UNI_UTS_PLATFORM, + 'javascript' + ) + if (Object.keys(injects).length) { + // @ts-expect-error + config.plugins.splice( + index, + 0, + uniViteInjectPlugin('uni:ext-api-inject', injects as InjectOptions) + ) + } } }, } } - -/** - * { 'uni.getBatteryInfo': ['@/uni_modules/uni-getbatteryinfo/utssdk/web/index.uts','getBatteryInfo'] } - * { '@/uni_modules/uni-getbatteryinfo/utssdk/web/index.ts': [['getBatteryInfo', 'uni_getBatteryInfo']] } - * @param injects - */ -export function injectsToAutoImports( - injects: Injects -): { from: string; imports: [string, string][] }[] { - const autoImports: Record = {} - Object.keys(injects).forEach((api) => { - const options = injects[api] - if (isArray(options) && options.length === 2) { - const source = options[0] - const name = options[1] - if (!autoImports[source]) { - autoImports[source] = [] - } - autoImports[source].push([name, api.replace('.', '_')]) - } - }) - - return Object.keys(autoImports).map((source) => { - return { - from: source, - imports: autoImports[source], - } - }) -} diff --git a/packages/uni-h5/dist-x/uni-h5.cjs.js b/packages/uni-h5/dist-x/uni-h5.cjs.js index 6949b8e63a..9be6cab45a 100644 --- a/packages/uni-h5/dist-x/uni-h5.cjs.js +++ b/packages/uni-h5/dist-x/uni-h5.cjs.js @@ -11,220 +11,6 @@ const shared = require("@vue/shared"); const uniShared = require("@dcloudio/uni-shared"); const uniI18n = require("@dcloudio/uni-i18n"); const vueRouter = require("vue-router"); -class UniError extends Error { - constructor(errSubject, errCode, errMsg) { - super(errMsg); - this.name = "UniError"; - this.errSubject = errSubject; - this.errCode = errCode; - this.errMsg = errMsg; - } - toString() { - return this.errMsg; - } - toJSON() { - return { - errSubject: this.errSubject, - errCode: this.errCode, - errMsg: this.errMsg, - data: this.data, - cause: this.cause && typeof this.cause.toJSON === "function" ? this.cause.toJSON() : this.cause - }; - } -} -function getType$1(val) { - return Object.prototype.toString.call(val).slice(8, -1).toLowerCase(); -} -function isPlainObject(val) { - if (val == null || typeof val !== "object") { - return false; - } - const proto = Object.getPrototypeOf(val); - return proto === Object.prototype || proto === null; -} -function initUTSJSONObjectProperties(obj) { - const propertyList = [ - "_resolveKeyPath", - "_getValue", - "toJSON", - "get", - "set", - "getAny", - "getString", - "getNumber", - "getBoolean", - "getJSON", - "getArray", - "toMap", - "forEach" - ]; - const propertyDescriptorMap = {}; - for (let i = 0; i < propertyList.length; i++) { - const property = propertyList[i]; - propertyDescriptorMap[property] = { - enumerable: false, - value: obj[property] - }; - } - Object.defineProperties(obj, propertyDescriptorMap); -} -class UTSJSONObject { - constructor(content = {}) { - for (const key in content) { - if (Object.prototype.hasOwnProperty.call(content, key)) { - const value = content[key]; - if (isPlainObject(value)) { - this[key] = new UTSJSONObject(value); - } else if (getType$1(value) === "array") { - this[key] = value.map((item) => { - if (isPlainObject(item)) { - return new UTSJSONObject(item); - } else { - return item; - } - }); - } else { - this[key] = value; - } - } - } - initUTSJSONObjectProperties(this); - } - _resolveKeyPath(keyPath) { - let token = ""; - const keyPathArr = []; - let inOpenParentheses = false; - for (let i = 0; i < keyPath.length; i++) { - const word = keyPath[i]; - switch (word) { - case ".": - if (token.length > 0) { - keyPathArr.push(token); - token = ""; - } - break; - case "[": { - inOpenParentheses = true; - if (token.length > 0) { - keyPathArr.push(token); - token = ""; - } - break; - } - case "]": - if (inOpenParentheses) { - if (token.length > 0) { - const tokenFirstChar = token[0]; - const tokenLastChar = token[token.length - 1]; - if (tokenFirstChar === '"' && tokenLastChar === '"' || tokenFirstChar === "'" && tokenLastChar === "'" || tokenFirstChar === "`" && tokenLastChar === "`") { - if (token.length > 2) { - token = token.slice(1, -1); - } else { - return []; - } - } else if (!/^\d+$/.test(token)) { - return []; - } - keyPathArr.push(token); - token = ""; - } else { - return []; - } - inOpenParentheses = false; - } else { - return []; - } - break; - default: - token += word; - break; - } - if (i === keyPath.length - 1) { - if (token.length > 0) { - keyPathArr.push(token); - token = ""; - } - } - } - return keyPathArr; - } - _getValue(keyPath) { - const keyPathArr = this._resolveKeyPath(keyPath); - if (keyPathArr.length === 0) { - return null; - } - let value = this; - for (let key of keyPathArr) { - if (value instanceof Object) { - value = value[key]; - } else { - return null; - } - } - return value; - } - get(key) { - return this._getValue(key); - } - set(key, value) { - this[key] = value; - } - getAny(key) { - return this._getValue(key); - } - getString(key) { - const value = this._getValue(key); - if (typeof value === "string") { - return value; - } else { - return null; - } - } - getNumber(key) { - const value = this._getValue(key); - if (typeof value === "number") { - return value; - } else { - return null; - } - } - getBoolean(key) { - const boolean = this._getValue(key); - if (typeof boolean === "boolean") { - return boolean; - } else { - return null; - } - } - getJSON(key) { - let value = this._getValue(key); - if (value instanceof Object) { - return new UTSJSONObject(value); - } else { - return null; - } - } - getArray(key) { - let value = this._getValue(key); - if (value instanceof Array) { - return value; - } else { - return null; - } - } - toMap() { - let map = /* @__PURE__ */ new Map(); - for (let key in this) { - map.set(key, this[key]); - } - return map; - } - forEach(callback) { - for (let key in this) { - callback(this[key], key); - } - } -} const isEnableLocale = /* @__PURE__ */ uniShared.once( () => typeof __uniConfig !== "undefined" && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length ); @@ -12866,27 +12652,6 @@ function createPageBodyVNode(ctx) { } ); } -function getGlobal() { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw new Error("unable to locate global object"); -} -const realGlobal = getGlobal(); -if (!realGlobal.globalThis) { - realGlobal.globalThis = realGlobal; -} -globalThis.UTSJSONObject = UTSJSONObject; -globalThis.UniError = UniError; exports.Ad = index$6; exports.AdContentPage = index$5; exports.AdDraw = index$4; diff --git a/packages/uni-h5/dist-x/uni-h5.es.js b/packages/uni-h5/dist-x/uni-h5.es.js index c7bad47d7a..a2c0254170 100644 --- a/packages/uni-h5/dist-x/uni-h5.es.js +++ b/packages/uni-h5/dist-x/uni-h5.es.js @@ -5,225 +5,11 @@ var __publicField = (obj, key, value) => { return value; }; import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, onMounted, provide, computed, watch, onUnmounted, inject, onBeforeUnmount, mergeProps, injectHook, reactive, onActivated, nextTick, onBeforeMount, withDirectives, vModelDynamic, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, Comment, h, createTextVNode, isReactive, Transition, createApp, createBlock, onBeforeActivate, onBeforeDeactivate, renderList, effectScope, withCtx, KeepAlive, resolveDynamicComponent, createElementVNode, normalizeStyle, renderSlot } from "vue"; -import { isArray, isString, extend, remove, stringifyStyle, parseStringStyle, isPlainObject as isPlainObject$1, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, hyphenate, invokeArrayFns as invokeArrayFns$1 } from "@vue/shared"; +import { isArray, isString, extend, remove, stringifyStyle, parseStringStyle, isPlainObject, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, hyphenate, invokeArrayFns as invokeArrayFns$1 } from "@vue/shared"; import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, normalizeStyles, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, getLen, debounce, isUniLifecycleHook, ON_LOAD, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook, parseQuery, NAVBAR_HEIGHT, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, ON_THEME_CHANGE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, sortObject, OFF_THEME_CHANGE, updateElementStyle, ON_BACK_PRESS, parseUrl, addFont, ON_NAVIGATION_BAR_CHANGE, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared"; import { onCreateVueApp as onCreateVueApp2 } from "@dcloudio/uni-shared"; import { initVueI18n, isI18nStr, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT } from "@dcloudio/uni-i18n"; import { useRoute, createRouter, createWebHistory, createWebHashHistory, useRouter, isNavigationFailure, RouterView } from "vue-router"; -class UniError extends Error { - constructor(errSubject, errCode, errMsg) { - super(errMsg); - this.name = "UniError"; - this.errSubject = errSubject; - this.errCode = errCode; - this.errMsg = errMsg; - } - toString() { - return this.errMsg; - } - toJSON() { - return { - errSubject: this.errSubject, - errCode: this.errCode, - errMsg: this.errMsg, - data: this.data, - cause: this.cause && typeof this.cause.toJSON === "function" ? this.cause.toJSON() : this.cause - }; - } -} -function getType$1(val) { - return Object.prototype.toString.call(val).slice(8, -1).toLowerCase(); -} -function isPlainObject(val) { - if (val == null || typeof val !== "object") { - return false; - } - const proto = Object.getPrototypeOf(val); - return proto === Object.prototype || proto === null; -} -function initUTSJSONObjectProperties(obj) { - const propertyList = [ - "_resolveKeyPath", - "_getValue", - "toJSON", - "get", - "set", - "getAny", - "getString", - "getNumber", - "getBoolean", - "getJSON", - "getArray", - "toMap", - "forEach" - ]; - const propertyDescriptorMap = {}; - for (let i = 0; i < propertyList.length; i++) { - const property = propertyList[i]; - propertyDescriptorMap[property] = { - enumerable: false, - value: obj[property] - }; - } - Object.defineProperties(obj, propertyDescriptorMap); -} -class UTSJSONObject { - constructor(content = {}) { - for (const key in content) { - if (Object.prototype.hasOwnProperty.call(content, key)) { - const value = content[key]; - if (isPlainObject(value)) { - this[key] = new UTSJSONObject(value); - } else if (getType$1(value) === "array") { - this[key] = value.map((item) => { - if (isPlainObject(item)) { - return new UTSJSONObject(item); - } else { - return item; - } - }); - } else { - this[key] = value; - } - } - } - initUTSJSONObjectProperties(this); - } - _resolveKeyPath(keyPath) { - let token = ""; - const keyPathArr = []; - let inOpenParentheses = false; - for (let i = 0; i < keyPath.length; i++) { - const word = keyPath[i]; - switch (word) { - case ".": - if (token.length > 0) { - keyPathArr.push(token); - token = ""; - } - break; - case "[": { - inOpenParentheses = true; - if (token.length > 0) { - keyPathArr.push(token); - token = ""; - } - break; - } - case "]": - if (inOpenParentheses) { - if (token.length > 0) { - const tokenFirstChar = token[0]; - const tokenLastChar = token[token.length - 1]; - if (tokenFirstChar === '"' && tokenLastChar === '"' || tokenFirstChar === "'" && tokenLastChar === "'" || tokenFirstChar === "`" && tokenLastChar === "`") { - if (token.length > 2) { - token = token.slice(1, -1); - } else { - return []; - } - } else if (!/^\d+$/.test(token)) { - return []; - } - keyPathArr.push(token); - token = ""; - } else { - return []; - } - inOpenParentheses = false; - } else { - return []; - } - break; - default: - token += word; - break; - } - if (i === keyPath.length - 1) { - if (token.length > 0) { - keyPathArr.push(token); - token = ""; - } - } - } - return keyPathArr; - } - _getValue(keyPath) { - const keyPathArr = this._resolveKeyPath(keyPath); - if (keyPathArr.length === 0) { - return null; - } - let value = this; - for (let key of keyPathArr) { - if (value instanceof Object) { - value = value[key]; - } else { - return null; - } - } - return value; - } - get(key) { - return this._getValue(key); - } - set(key, value) { - this[key] = value; - } - getAny(key) { - return this._getValue(key); - } - getString(key) { - const value = this._getValue(key); - if (typeof value === "string") { - return value; - } else { - return null; - } - } - getNumber(key) { - const value = this._getValue(key); - if (typeof value === "number") { - return value; - } else { - return null; - } - } - getBoolean(key) { - const boolean = this._getValue(key); - if (typeof boolean === "boolean") { - return boolean; - } else { - return null; - } - } - getJSON(key) { - let value = this._getValue(key); - if (value instanceof Object) { - return new UTSJSONObject(value); - } else { - return null; - } - } - getArray(key) { - let value = this._getValue(key); - if (value instanceof Array) { - return value; - } else { - return null; - } - } - toMap() { - let map = /* @__PURE__ */ new Map(); - for (let key in this) { - map.set(key, this[key]); - } - return map; - } - forEach(callback) { - for (let key in this) { - callback(this[key], key); - } - } -} const isEnableLocale = /* @__PURE__ */ once( () => typeof __uniConfig !== "undefined" && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length ); @@ -1586,7 +1372,7 @@ class ComponentDescriptor { if (isString(style)) { style = parseStringStyle(style); } - if (isPlainObject$1(style)) { + if (isPlainObject(style)) { this.$el.__wxsStyle = style; this.forceUpdate("style"); } @@ -2505,7 +2291,7 @@ function _addListeners(id2, listeners2, watch2) { if (watch2 && !id2) { return; } - if (!isPlainObject$1(listeners2)) { + if (!isPlainObject(listeners2)) { return; } Object.keys(listeners2).forEach((name) => { @@ -2527,7 +2313,7 @@ function _removeListeners(id2, listeners2, watch2) { if (watch2 && !id2) { return; } - if (!isPlainObject$1(listeners2)) { + if (!isPlainObject(listeners2)) { return; } Object.keys(listeners2).forEach((name) => { @@ -3019,7 +2805,7 @@ function validateProtocols(name, args, protocol, onFail) { } } function validateProp(name, value, prop, isAbsent) { - if (!isPlainObject$1(prop)) { + if (!isPlainObject(prop)) { prop = { type: prop }; } const { type, required, validator: validator2 } = prop; @@ -3191,7 +2977,7 @@ function normalizeErrMsg$1(errMsg, name) { return name + errMsg.substring(errMsg.indexOf(":fail")); } function createAsyncApiCallback(name, args = {}, { beforeAll, beforeSuccess } = {}) { - if (!isPlainObject$1(args)) { + if (!isPlainObject(args)) { args = {}; } const { success, fail, complete } = getApiCallbacks(args); @@ -3318,7 +3104,7 @@ function invokeApi(method, api2, options, params) { return api2(options, ...params); } function hasCallback(args) { - if (isPlainObject$1(args) && [API_SUCCESS, API_FAIL, API_COMPLETE].find( + if (isPlainObject(args) && [API_SUCCESS, API_FAIL, API_COMPLETE].find( (cb) => isFunction(args[cb]) )) { return true; @@ -3350,7 +3136,7 @@ function promisify(name, fn) { } function formatApiArgs(args, options) { const params = args[0]; - if (!options || !isPlainObject$1(options.formatArgs) && isPlainObject$1(params)) { + if (!options || !isPlainObject(options.formatArgs) && isPlainObject(params)) { return; } const formatArgs = options.formatArgs; @@ -3653,12 +3439,12 @@ function dedupeHooks(hooks) { const addInterceptor = /* @__PURE__ */ defineSyncApi( API_ADD_INTERCEPTOR, (method, interceptor) => { - if (isString(method) && isPlainObject$1(interceptor)) { + if (isString(method) && isPlainObject(interceptor)) { mergeInterceptorHook( scopedInterceptors[method] || (scopedInterceptors[method] = {}), interceptor ); - } else if (isPlainObject$1(method)) { + } else if (isPlainObject(method)) { mergeInterceptorHook(globalInterceptors, method); } }, @@ -3668,12 +3454,12 @@ const removeInterceptor = /* @__PURE__ */ defineSyncApi( API_REMOVE_INTERCEPTOR, (method, interceptor) => { if (isString(method)) { - if (isPlainObject$1(interceptor)) { + if (isPlainObject(interceptor)) { removeInterceptorHook(scopedInterceptors[method], interceptor); } else { delete scopedInterceptors[method]; } - } else if (isPlainObject$1(method)) { + } else if (isPlainObject(method)) { removeInterceptorHook(globalInterceptors, method); } }, @@ -4489,7 +4275,7 @@ class CanvasContext { }); } set font(value) { - var self2 = this; + var self = this; this.state.font = value; var fontFormat = value.match( /^(([\w\-]+\s)*)(\d+r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/ @@ -4505,19 +4291,19 @@ class CanvasContext { method: "setFontStyle", data: [value2] }); - self2.state.fontStyle = value2; + self.state.fontStyle = value2; } else if (["bold", "normal"].indexOf(value2) > -1) { actions.push({ method: "setFontWeight", data: [value2] }); - self2.state.fontWeight = value2; + self.state.fontWeight = value2; } else if (index2 === 0) { actions.push({ method: "setFontStyle", data: ["normal"] }); - self2.state.fontStyle = "normal"; + self.state.fontStyle = "normal"; } else if (index2 === 1) { pushAction(); } @@ -4542,7 +4328,7 @@ class CanvasContext { method: "setFontWeight", data: ["normal"] }); - self2.state.fontWeight = "normal"; + self.state.fontWeight = "normal"; } } get font() { @@ -5978,7 +5764,7 @@ function stringifyQuery(url, data) { let v2 = data[key]; if (typeof v2 === "undefined" || v2 === null) { v2 = ""; - } else if (isPlainObject$1(v2)) { + } else if (isPlainObject(v2)) { v2 = JSON.stringify(v2); } params[encode(key)] = encode(v2); @@ -6011,7 +5797,7 @@ const RequestOptions = { params.data = value || ""; }, url(value, params) { - if (params.method === HTTP_METHODS[0] && isPlainObject$1(params.data) && Object.keys(params.data).length) { + if (params.method === HTTP_METHODS[0] && isPlainObject(params.data) && Object.keys(params.data).length) { params.url = stringifyQuery(value, params.data); } }, @@ -13388,7 +13174,7 @@ function processClickEvent(node, triggerItemClick) { } } function normalizeAttrs(tagName, attrs2) { - if (!isPlainObject$1(attrs2)) + if (!isPlainObject(attrs2)) return; for (const key in attrs2) { if (hasOwn(attrs2, key)) { @@ -13402,7 +13188,7 @@ const nodeList2VNode = (scopeId, triggerItemClick, nodeList) => { if (!nodeList || isArray(nodeList) && !nodeList.length) return []; return nodeList.map((node) => { - if (!isPlainObject$1(node)) { + if (!isPlainObject(node)) { return; } if (!hasOwn(node, "type") || node.type === "node") { @@ -17370,7 +17156,7 @@ function onResize() { }); } function onMessage(evt) { - if (isPlainObject$1(evt.data) && evt.data.type === WEB_INVOKE_APPSERVICE) { + if (isPlainObject(evt.data) && evt.data.type === WEB_INVOKE_APPSERVICE) { UniServiceJSBridge.emit( ON_WEB_INVOKE_APP_SERVICE, evt.data.data, @@ -26200,27 +25986,6 @@ function createPageBodyVNode(ctx) { } ); } -function getGlobal() { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof window !== "undefined") { - return window; - } - throw new Error("unable to locate window object"); -} -const realGlobal = getGlobal(); -if (!realGlobal.globalThis) { - realGlobal.globalThis = realGlobal; -} -globalThis.UTSJSONObject = UTSJSONObject; -globalThis.UniError = UniError; export { $emit, $off, diff --git a/packages/uni-uts-v1/src/tsc/javascript/index.ts b/packages/uni-uts-v1/src/tsc/javascript/index.ts index f5577ed624..f5879a5a0e 100644 --- a/packages/uni-uts-v1/src/tsc/javascript/index.ts +++ b/packages/uni-uts-v1/src/tsc/javascript/index.ts @@ -1,5 +1,5 @@ import path from 'path' -import { extend, isArray, isFunction } from '@vue/shared' +import { extend, isFunction } from '@vue/shared' import type { RPT2Options } from 'rollup-plugin-typescript2' import { isInHBuilderX } from '../../shared' interface UTS2JavaScriptOptions extends Omit { @@ -85,14 +85,5 @@ export const uts2js: uts2js = (options) => { // @ts-expect-error return globalThis.uts2js(options) } - const plugins = require('../../../lib/javascript').uts2js(options) - if (isArray(plugins)) { - plugins.forEach((p) => { - if (p.name === 'uts') { - // 强制放到 auto import 之后执行 - p.enforce = 'post' - } - }) - } - return plugins + return require('../../../lib/javascript').uts2js(options) } diff --git a/packages/vite-plugin-uni/src/index.ts b/packages/vite-plugin-uni/src/index.ts index 18f5377896..8f2a7a0930 100644 --- a/packages/vite-plugin-uni/src/index.ts +++ b/packages/vite-plugin-uni/src/index.ts @@ -18,7 +18,7 @@ import { initPreContext, parseUniExtApis, resolveSourceMapPath, - uniUTSExtApiReplace, + uniUTSExtApi, uniViteInjectPlugin, } from '@dcloudio/uni-cli-shared' @@ -130,9 +130,9 @@ export default function uniPlugin( function createPlugins(options: VitePluginUniResolvedOptions) { const plugins: Plugin[] = [] - // uni x 调整了,由 uniUTSExtApiReplace 实现 uni.getBatteryInfo => uni_getBatterInfo,然后交由 auto import 处理 + // uni x 需要插入到指定位置,此插件执行太早,又会引发 vue 文件的不支持,该插件是解析ast的,所以必须是合法的js或ts代码 if (process.env.UNI_APP_X === 'true') { - plugins.push(uniUTSExtApiReplace()) + plugins.push(uniUTSExtApi()) } else { const injects = parseUniExtApis( true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3eb14224a0..2601cd6a02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - overrides: '@babel/plugin-transform-block-scoping': 7.19.4 @@ -2777,7 +2773,7 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} /@colors/colors@1.5.0: - resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==, tarball: https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz} + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} requiresBuild: true dev: true @@ -2832,7 +2828,7 @@ packages: dev: false /@esbuild/android-arm64@0.16.17: - resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==, tarball: https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz} + resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -2841,7 +2837,7 @@ packages: optional: true /@esbuild/android-arm64@0.17.5: - resolution: {integrity: sha512-KHWkDqYAMmKZjY4RAN1PR96q6UOtfkWlTS8uEwWxdLtkRt/0F/csUhXIrVfaSIFxnscIBMPynGfhsMwQDRIBQw==, tarball: https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.5.tgz} + resolution: {integrity: sha512-KHWkDqYAMmKZjY4RAN1PR96q6UOtfkWlTS8uEwWxdLtkRt/0F/csUhXIrVfaSIFxnscIBMPynGfhsMwQDRIBQw==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -2849,7 +2845,7 @@ packages: optional: true /@esbuild/android-arm@0.16.17: - resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==, tarball: https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz} + resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -2858,7 +2854,7 @@ packages: optional: true /@esbuild/android-arm@0.17.5: - resolution: {integrity: sha512-crmPUzgCmF+qZXfl1YkiFoUta2XAfixR1tEnr/gXIixE+WL8Z0BGqfydP5oox0EUOgQMMRgtATtakyAcClQVqQ==, tarball: https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.5.tgz} + resolution: {integrity: sha512-crmPUzgCmF+qZXfl1YkiFoUta2XAfixR1tEnr/gXIixE+WL8Z0BGqfydP5oox0EUOgQMMRgtATtakyAcClQVqQ==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -2866,7 +2862,7 @@ packages: optional: true /@esbuild/android-x64@0.16.17: - resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==, tarball: https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz} + resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -2875,7 +2871,7 @@ packages: optional: true /@esbuild/android-x64@0.17.5: - resolution: {integrity: sha512-8fI/AnIdmWz/+1iza2WrCw8kwXK9wZp/yZY/iS8ioC+U37yJCeppi9EHY05ewJKN64ASoBIseufZROtcFnX5GA==, tarball: https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.5.tgz} + resolution: {integrity: sha512-8fI/AnIdmWz/+1iza2WrCw8kwXK9wZp/yZY/iS8ioC+U37yJCeppi9EHY05ewJKN64ASoBIseufZROtcFnX5GA==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -2883,7 +2879,7 @@ packages: optional: true /@esbuild/darwin-arm64@0.16.17: - resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==, tarball: https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz} + resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2892,7 +2888,7 @@ packages: optional: true /@esbuild/darwin-arm64@0.17.5: - resolution: {integrity: sha512-EAvaoyIySV6Iif3NQCglUNpnMfHSUgC5ugt2efl3+QDntucJe5spn0udNZjTgNi6tKVqSceOw9tQ32liNZc1Xw==, tarball: https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.5.tgz} + resolution: {integrity: sha512-EAvaoyIySV6Iif3NQCglUNpnMfHSUgC5ugt2efl3+QDntucJe5spn0udNZjTgNi6tKVqSceOw9tQ32liNZc1Xw==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2900,7 +2896,7 @@ packages: optional: true /@esbuild/darwin-x64@0.16.17: - resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==, tarball: https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz} + resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2909,7 +2905,7 @@ packages: optional: true /@esbuild/darwin-x64@0.17.5: - resolution: {integrity: sha512-ha7QCJh1fuSwwCgoegfdaljowwWozwTDjBgjD3++WAy/qwee5uUi1gvOg2WENJC6EUyHBOkcd3YmLDYSZ2TPPA==, tarball: https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.5.tgz} + resolution: {integrity: sha512-ha7QCJh1fuSwwCgoegfdaljowwWozwTDjBgjD3++WAy/qwee5uUi1gvOg2WENJC6EUyHBOkcd3YmLDYSZ2TPPA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2917,7 +2913,7 @@ packages: optional: true /@esbuild/freebsd-arm64@0.16.17: - resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==, tarball: https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz} + resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2926,7 +2922,7 @@ packages: optional: true /@esbuild/freebsd-arm64@0.17.5: - resolution: {integrity: sha512-VbdXJkn2aI2pQ/wxNEjEcnEDwPpxt3CWWMFYmO7CcdFBoOsABRy2W8F3kjbF9F/pecEUDcI3b5i2w+By4VQFPg==, tarball: https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.5.tgz} + resolution: {integrity: sha512-VbdXJkn2aI2pQ/wxNEjEcnEDwPpxt3CWWMFYmO7CcdFBoOsABRy2W8F3kjbF9F/pecEUDcI3b5i2w+By4VQFPg==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2934,7 +2930,7 @@ packages: optional: true /@esbuild/freebsd-x64@0.16.17: - resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==, tarball: https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz} + resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2943,7 +2939,7 @@ packages: optional: true /@esbuild/freebsd-x64@0.17.5: - resolution: {integrity: sha512-olgGYND1/XnnWxwhjtY3/ryjOG/M4WfcA6XH8dBTH1cxMeBemMODXSFhkw71Kf4TeZFFTN25YOomaNh0vq2iXg==, tarball: https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.5.tgz} + resolution: {integrity: sha512-olgGYND1/XnnWxwhjtY3/ryjOG/M4WfcA6XH8dBTH1cxMeBemMODXSFhkw71Kf4TeZFFTN25YOomaNh0vq2iXg==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2951,7 +2947,7 @@ packages: optional: true /@esbuild/linux-arm64@0.16.17: - resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==, tarball: https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz} + resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -2960,7 +2956,7 @@ packages: optional: true /@esbuild/linux-arm64@0.17.5: - resolution: {integrity: sha512-8a0bqSwu3OlLCfu2FBbDNgQyBYdPJh1B9PvNX7jMaKGC9/KopgHs37t+pQqeMLzcyRqG6z55IGNQAMSlCpBuqg==, tarball: https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.5.tgz} + resolution: {integrity: sha512-8a0bqSwu3OlLCfu2FBbDNgQyBYdPJh1B9PvNX7jMaKGC9/KopgHs37t+pQqeMLzcyRqG6z55IGNQAMSlCpBuqg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -2968,7 +2964,7 @@ packages: optional: true /@esbuild/linux-arm@0.16.17: - resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==, tarball: https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz} + resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2977,7 +2973,7 @@ packages: optional: true /@esbuild/linux-arm@0.17.5: - resolution: {integrity: sha512-YBdCyQwA3OQupi6W2/WO4FnI+NWFWe79cZEtlbqSESOHEg7a73htBIRiE6uHPQe7Yp5E4aALv+JxkRLGEUL7tw==, tarball: https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.5.tgz} + resolution: {integrity: sha512-YBdCyQwA3OQupi6W2/WO4FnI+NWFWe79cZEtlbqSESOHEg7a73htBIRiE6uHPQe7Yp5E4aALv+JxkRLGEUL7tw==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2985,7 +2981,7 @@ packages: optional: true /@esbuild/linux-ia32@0.16.17: - resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==, tarball: https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz} + resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -2994,7 +2990,7 @@ packages: optional: true /@esbuild/linux-ia32@0.17.5: - resolution: {integrity: sha512-uCwm1r/+NdP7vndctgq3PoZrnmhmnecWAr114GWMRwg2QMFFX+kIWnp7IO220/JLgnXK/jP7VKAFBGmeOYBQYQ==, tarball: https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.5.tgz} + resolution: {integrity: sha512-uCwm1r/+NdP7vndctgq3PoZrnmhmnecWAr114GWMRwg2QMFFX+kIWnp7IO220/JLgnXK/jP7VKAFBGmeOYBQYQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -3002,7 +2998,7 @@ packages: optional: true /@esbuild/linux-loong64@0.16.17: - resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==, tarball: https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz} + resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -3011,7 +3007,7 @@ packages: optional: true /@esbuild/linux-loong64@0.17.5: - resolution: {integrity: sha512-3YxhSBl5Sb6TtBjJu+HP93poBruFzgXmf3PVfIe4xOXMj1XpxboYZyw3W8BhoX/uwxzZz4K1I99jTE/5cgDT1g==, tarball: https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.5.tgz} + resolution: {integrity: sha512-3YxhSBl5Sb6TtBjJu+HP93poBruFzgXmf3PVfIe4xOXMj1XpxboYZyw3W8BhoX/uwxzZz4K1I99jTE/5cgDT1g==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -3019,7 +3015,7 @@ packages: optional: true /@esbuild/linux-mips64el@0.16.17: - resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==, tarball: https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz} + resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -3028,7 +3024,7 @@ packages: optional: true /@esbuild/linux-mips64el@0.17.5: - resolution: {integrity: sha512-Hy5Z0YVWyYHdtQ5mfmfp8LdhVwGbwVuq8mHzLqrG16BaMgEmit2xKO+iDakHs+OetEx0EN/2mUzDdfdktI+Nmg==, tarball: https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.5.tgz} + resolution: {integrity: sha512-Hy5Z0YVWyYHdtQ5mfmfp8LdhVwGbwVuq8mHzLqrG16BaMgEmit2xKO+iDakHs+OetEx0EN/2mUzDdfdktI+Nmg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -3036,7 +3032,7 @@ packages: optional: true /@esbuild/linux-ppc64@0.16.17: - resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==, tarball: https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz} + resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -3045,7 +3041,7 @@ packages: optional: true /@esbuild/linux-ppc64@0.17.5: - resolution: {integrity: sha512-5dbQvBLbU/Y3Q4ABc9gi23hww1mQcM7KZ9KBqabB7qhJswYMf8WrDDOSw3gdf3p+ffmijMd28mfVMvFucuECyg==, tarball: https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.5.tgz} + resolution: {integrity: sha512-5dbQvBLbU/Y3Q4ABc9gi23hww1mQcM7KZ9KBqabB7qhJswYMf8WrDDOSw3gdf3p+ffmijMd28mfVMvFucuECyg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -3053,7 +3049,7 @@ packages: optional: true /@esbuild/linux-riscv64@0.16.17: - resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==, tarball: https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz} + resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -3062,7 +3058,7 @@ packages: optional: true /@esbuild/linux-riscv64@0.17.5: - resolution: {integrity: sha512-fp/KUB/ZPzEWGTEUgz9wIAKCqu7CjH1GqXUO2WJdik1UNBQ7Xzw7myIajpxztE4Csb9504ERiFMxZg5KZ6HlZQ==, tarball: https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.5.tgz} + resolution: {integrity: sha512-fp/KUB/ZPzEWGTEUgz9wIAKCqu7CjH1GqXUO2WJdik1UNBQ7Xzw7myIajpxztE4Csb9504ERiFMxZg5KZ6HlZQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -3070,7 +3066,7 @@ packages: optional: true /@esbuild/linux-s390x@0.16.17: - resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==, tarball: https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz} + resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -3079,7 +3075,7 @@ packages: optional: true /@esbuild/linux-s390x@0.17.5: - resolution: {integrity: sha512-kRV3yw19YDqHTp8SfHXfObUFXlaiiw4o2lvT1XjsPZ++22GqZwSsYWJLjMi1Sl7j9qDlDUduWDze/nQx0d6Lzw==, tarball: https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.5.tgz} + resolution: {integrity: sha512-kRV3yw19YDqHTp8SfHXfObUFXlaiiw4o2lvT1XjsPZ++22GqZwSsYWJLjMi1Sl7j9qDlDUduWDze/nQx0d6Lzw==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -3087,7 +3083,7 @@ packages: optional: true /@esbuild/linux-x64@0.16.17: - resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==, tarball: https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz} + resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -3096,7 +3092,7 @@ packages: optional: true /@esbuild/linux-x64@0.17.5: - resolution: {integrity: sha512-vnxuhh9e4pbtABNLbT2ANW4uwQ/zvcHRCm1JxaYkzSehugoFd5iXyC4ci1nhXU13mxEwCnrnTIiiSGwa/uAF1g==, tarball: https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.5.tgz} + resolution: {integrity: sha512-vnxuhh9e4pbtABNLbT2ANW4uwQ/zvcHRCm1JxaYkzSehugoFd5iXyC4ci1nhXU13mxEwCnrnTIiiSGwa/uAF1g==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -3104,7 +3100,7 @@ packages: optional: true /@esbuild/netbsd-x64@0.16.17: - resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==, tarball: https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz} + resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -3113,7 +3109,7 @@ packages: optional: true /@esbuild/netbsd-x64@0.17.5: - resolution: {integrity: sha512-cigBpdiSx/vPy7doUyImsQQBnBjV5f1M99ZUlaJckDAJjgXWl6y9W17FIfJTy8TxosEF6MXq+fpLsitMGts2nA==, tarball: https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.5.tgz} + resolution: {integrity: sha512-cigBpdiSx/vPy7doUyImsQQBnBjV5f1M99ZUlaJckDAJjgXWl6y9W17FIfJTy8TxosEF6MXq+fpLsitMGts2nA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -3121,7 +3117,7 @@ packages: optional: true /@esbuild/openbsd-x64@0.16.17: - resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==, tarball: https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz} + resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -3130,7 +3126,7 @@ packages: optional: true /@esbuild/openbsd-x64@0.17.5: - resolution: {integrity: sha512-VdqRqPVIjjZfkf40LrqOaVuhw9EQiAZ/GNCSM2UplDkaIzYVsSnycxcFfAnHdWI8Gyt6dO15KHikbpxwx+xHbw==, tarball: https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.5.tgz} + resolution: {integrity: sha512-VdqRqPVIjjZfkf40LrqOaVuhw9EQiAZ/GNCSM2UplDkaIzYVsSnycxcFfAnHdWI8Gyt6dO15KHikbpxwx+xHbw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -3138,7 +3134,7 @@ packages: optional: true /@esbuild/sunos-x64@0.16.17: - resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==, tarball: https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz} + resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -3147,7 +3143,7 @@ packages: optional: true /@esbuild/sunos-x64@0.17.5: - resolution: {integrity: sha512-ItxPaJ3MBLtI4nK+mALLEoUs6amxsx+J1ibnfcYMkqaCqHST1AkF4aENpBehty3czqw64r/XqL+W9WqU6kc2Qw==, tarball: https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.5.tgz} + resolution: {integrity: sha512-ItxPaJ3MBLtI4nK+mALLEoUs6amxsx+J1ibnfcYMkqaCqHST1AkF4aENpBehty3czqw64r/XqL+W9WqU6kc2Qw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -3155,7 +3151,7 @@ packages: optional: true /@esbuild/win32-arm64@0.16.17: - resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==, tarball: https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz} + resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -3164,7 +3160,7 @@ packages: optional: true /@esbuild/win32-arm64@0.17.5: - resolution: {integrity: sha512-4u2Q6qsJTYNFdS9zHoAi80spzf78C16m2wla4eJPh4kSbRv+BpXIfl6TmBSWupD8e47B1NrTfrOlEuco7mYQtg==, tarball: https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.5.tgz} + resolution: {integrity: sha512-4u2Q6qsJTYNFdS9zHoAi80spzf78C16m2wla4eJPh4kSbRv+BpXIfl6TmBSWupD8e47B1NrTfrOlEuco7mYQtg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -3172,7 +3168,7 @@ packages: optional: true /@esbuild/win32-ia32@0.16.17: - resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==, tarball: https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz} + resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -3181,7 +3177,7 @@ packages: optional: true /@esbuild/win32-ia32@0.17.5: - resolution: {integrity: sha512-KYlm+Xu9TXsfTWAcocLuISRtqxKp/Y9ZBVg6CEEj0O5J9mn7YvBKzAszo2j1ndyzUPk+op+Tie2PJeN+BnXGqQ==, tarball: https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.5.tgz} + resolution: {integrity: sha512-KYlm+Xu9TXsfTWAcocLuISRtqxKp/Y9ZBVg6CEEj0O5J9mn7YvBKzAszo2j1ndyzUPk+op+Tie2PJeN+BnXGqQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -3189,7 +3185,7 @@ packages: optional: true /@esbuild/win32-x64@0.16.17: - resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==, tarball: https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz} + resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -3198,7 +3194,7 @@ packages: optional: true /@esbuild/win32-x64@0.17.5: - resolution: {integrity: sha512-XgA9qWRqby7xdYXuF6KALsn37QGBMHsdhmnpjfZtYxKxbTOwfnDM6MYi2WuUku5poNaX2n9XGVr20zgT/2QwCw==, tarball: https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.5.tgz} + resolution: {integrity: sha512-XgA9qWRqby7xdYXuF6KALsn37QGBMHsdhmnpjfZtYxKxbTOwfnDM6MYi2WuUku5poNaX2n9XGVr20zgT/2QwCw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -4749,7 +4745,7 @@ packages: dev: true /@types/yauzl@2.10.0: - resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==, tarball: https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz} + resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: '@types/node': 18.16.2 @@ -5753,7 +5749,7 @@ packages: dev: true /commander@9.5.0: - resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==, tarball: https://registry.npmjs.org/commander/-/commander-9.5.0.tgz} + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} engines: {node: ^12.20.0 || >=14} requiresBuild: true dev: true @@ -6915,7 +6911,7 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} /fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, tarball: https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz} + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -11264,3 +11260,7 @@ packages: optionalDependencies: commander: 9.5.0 dev: true + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false -- GitLab