diff --git a/packages/playground/uts/uni_modules/test-uniplugin/app-android/index.uts b/packages/playground/uts/uni_modules/test-uniplugin/app-android/index.uts index 5dc67a085b9f7c6f9ff4bcc219543108c21e3fce..3c4457402b29e12642afee1d7c233477eb6a2aa6 100644 --- a/packages/playground/uts/uni_modules/test-uniplugin/app-android/index.uts +++ b/packages/playground/uts/uni_modules/test-uniplugin/app-android/index.uts @@ -11,7 +11,9 @@ export class User implements IUser { Log.info('123') Log.info(logo) } - register(name: string) { + register(name: string, callback: () => void) { Log.info(logo) } } +function login(name: string, callback: () => void) {} +export function register(name: string, callback: () => void) {} diff --git a/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-android/index.kt b/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-android/index.kt index 6ad7c1fd630726935f3481b2ac4f6d2438b04e6d..ace59f6c078aa7dfbeb7526a3cdf15185e7eeb61 100644 --- a/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-android/index.kt +++ b/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-android/index.kt @@ -6,9 +6,9 @@ import android.util.Log; interface IUser { fun register(name: String): Unit; } -fun login(name: String, pwd: String): UtsJSONObject { +fun login(name: String, pwd: String): UTSJSONObject { console.log("login", "at uni_modules/test-uniplugin/app-android/login.uts:2"); - return object : UtsJSONObject() { + return object : UTSJSONObject() { var name = name var pwd = pwd }; @@ -24,7 +24,9 @@ open class User : IUser { Log.info("123"); Log.info(__default); } - override fun register(name: String) { + override fun register(name: String, callback: UTSCallback) { Log.info(__default); } } +fun login(name: String, callback: () -> Unit) {} +fun register(name: String, callback: UTSCallback) {} diff --git a/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-android/index.kt.map b/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-android/index.kt.map index e492274f7737a00fb764a5d2e03e887f9438a818..af99704164b9326b93998eafd4659bc4ef7b9fe1 100644 --- a/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-android/index.kt.map +++ b/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-android/index.kt.map @@ -1 +1 @@ -{"version":3,"sources":["/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/static/logo.png","/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/index.uts","/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/interface.uts","/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts"],"sourcesContent":["import { getResourcePath } from 'io.dcloud.uts.android'\nexport default getResourcePath('uni_modules/test-uniplugin/static/logo.png')\n ","import Log from 'android.util.Log'\nimport { IUser } from './interface.uts'\nimport { login } from './login.uts'\nimport logo from '../static/logo.png'\nexport class User implements IUser {\n async login(name: string, pwd: string) {\n setTimeout(() => {\n console.log('timeout')\n }, 1000)\n login(name, pwd)\n Log.info('123')\n Log.info(logo)\n }\n register(name: string) {\n Log.info(logo)\n }\n}\n","export interface IUser {\n register(name: string): void\n}\n","export function login(name: string, pwd: string) {\n console.log('login')\n return { name, pwd }\n}\n"],"names":[],"mappings":";;;AAAA;ACAA,OAAgB,gBAAkB,CAAA;UCAjB,KAAK;QACpB,QAAQ,CAAC,IAAY,EAAN,MAAM,GAAG,IAAI;;ACDvB,IAAS,KAAK,CAAC,IAAY,EAAN,MAAM,EAAE,GAAW,EAAN,MAAM,iBAAE;IAC/C,OAAO,CAAC,GAAG,CAAC,OAAO,0DAAC;IACpB,OAAO;QAAE,IAAA,IAAI,GAAJ,IAAI;QAAE,IAAA,GAAG,GAAH,GAAG;KAAE,CAAA;AACtB;gBHFe,eAAe,CAAC,4CAA4C,CAAC;ACGrE,WAAM,IAAI,GAAY,KAAK;qBAC1B,KAAK,CAAC,IAAY,EAAN,MAAM,EAAE,GAAW,EAAN,MAAM,8CAAE;QACrC,UAAU,CAAC,KAAM;YACf,OAAO,CAAC,GAAG,CAAC,SAAS,0DAAC;QACxB;QAAC,EAAE,IAAI,CAAC;QACR,MAAM,IAAI,EAAE,GAAG,CAAC;QAChB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QACf,GAAG,CAAC,IAAI,WAAM;IAChB;iBACA,QAAQ,CAAC,IAAY,EAAN,MAAM,EAAE;QACrB,GAAG,CAAC,IAAI,WAAM;IAChB;CACD"} \ No newline at end of file +{"version":3,"sources":["/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/static/logo.png","/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/index.uts","/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/interface.uts","/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts"],"sourcesContent":["import { getResourcePath } from 'io.dcloud.uts.android'\nexport default getResourcePath('uni_modules/test-uniplugin/static/logo.png')\n ","import Log from 'android.util.Log'\nimport { IUser } from './interface.uts'\nimport { login } from './login.uts'\nimport logo from '../static/logo.png'\nexport class User implements IUser {\n async login(name: string, pwd: string) {\n setTimeout(() => {\n console.log('timeout')\n }, 1000)\n login(name, pwd)\n Log.info('123')\n Log.info(logo)\n }\n register(name: string, callback: () => void) {\n Log.info(logo)\n }\n}\nfunction login(name: string, callback: () => void) {}\nexport function register(name: string, callback: () => void) {}\n","export interface IUser {\n register(name: string): void\n}\n","export function login(name: string, pwd: string) {\n console.log('login')\n return { name, pwd }\n}\n"],"names":[],"mappings":";;;AAAA;ACAA,OAAgB,gBAAkB,CAAA;UCAjB,KAAK;QACpB,QAAQ,CAAC,IAAY,EAAN,MAAM,GAAG,IAAI;;ACDvB,IAAS,KAAK,CAAC,IAAY,EAAN,MAAM,EAAE,GAAW,EAAN,MAAM,iBAAE;IAC/C,OAAO,CAAC,GAAG,CAAC,OAAO,0DAAC;IACpB,OAAO;QAAE,IAAA,IAAI,GAAJ,IAAI;QAAE,IAAA,GAAG,GAAH,GAAG;KAAE,CAAA;AACtB;gBHFe,eAAe,CAAC,4CAA4C,CAAC;ACGrE,WAAM,IAAI,GAAY,KAAK;qBAC1B,KAAK,CAAC,IAAY,EAAN,MAAM,EAAE,GAAW,EAAN,MAAM,8CAAE;QACrC,UAAU,CAAC,KAAM;YACf,OAAO,CAAC,GAAG,CAAC,SAAS,0DAAC;QACxB;QAAC,EAAE,IAAI,CAAC;QACR,MAAM,IAAI,EAAE,GAAG,CAAC;QAChB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QACf,GAAG,CAAC,IAAI,WAAM;IAChB;iBACA,QAAQ,CAAC,IAAY,EAAN,MAAM,EAAE,QAAoB,aAAA,EAAE;QAC3C,GAAG,CAAC,IAAI,WAAM;IAChB;CACD;AACD,UAAe,IAAY,EAAN,MAAM,EAAE,QAAoB,QAAJ,IAAI,EAAE,CAAC,CAAC;AAC9C,IAAS,QAAQ,CAAC,IAAY,EAAN,MAAM,EAAE,QAAoB,aAAA,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/uni-cli-shared/src/preprocess/context.ts b/packages/uni-cli-shared/src/preprocess/context.ts index d7f89aa663d54832cd62872f5aefc333bf280f48..05a4a6d3c1250f06e1ea5780d988ba65c9c56b9f 100644 --- a/packages/uni-cli-shared/src/preprocess/context.ts +++ b/packages/uni-cli-shared/src/preprocess/context.ts @@ -5,6 +5,8 @@ const DEFAULT_KEYS = [ 'APP_PLUS', 'APP_PLUS_NVUE', 'APP_VUE', + 'APP_ANDROID', + 'APP_IOS', 'H5', 'MP', 'MP_360', @@ -60,6 +62,15 @@ export function initPreContext( nvueContext.APP_NVUE = true nvueContext.APP_PLUS_NVUE = true + + if (process.env.UNI_APP_PLATFORM === 'app-android') { + defaultContext.APP_ANDROID = true + } else if (process.env.UNI_APP_PLATFORM === 'app-ios') { + defaultContext.APP_IOS = true + } else { + defaultContext.APP_ANDROID = true + defaultContext.APP_IOS = true + } } else if (platform.startsWith('mp-')) { defaultContext.MP = true } else if (platform.startsWith('quickapp-webview')) { diff --git a/packages/uni-stacktracey/__tests__/uni-stacktracey.spec.ts b/packages/uni-stacktracey/__tests__/uni-stacktracey.spec.ts index b6dac5960b6c863e9a02158a06f8674bfefccaee..804bc599ffb77f6952720a3b594cf2c7e1e66750 100644 --- a/packages/uni-stacktracey/__tests__/uni-stacktracey.spec.ts +++ b/packages/uni-stacktracey/__tests__/uni-stacktracey.spec.ts @@ -50,31 +50,31 @@ at node_modules/@dcloudio/vue-cli-plugin-uni/packages/h5-vue/dist/vue.runtime. }) }) - test('utsStracktraceyPreset local', () => { - stacktracey(utsErrorMsg, { - preset: utsStracktraceyPreset({ - base: path.resolve( - __dirname, - '../test/nativeplugins-sourceMap/DCloud-UTSPlugin/' - ), - sourceRoot: 'DCloud-UTSPlugin/android/src/', - }), - }).then((res: string) => { - expect(res) - .toEqual(`e: C:/Users/xianyang/Documents/HBuilderProjects/test-uni2/nativeplugins/DCloud-UTSPlugin/android/src/io/dcloud/uniplugin/TestModule.uts: (7, 0): Unresolved reference: logxxxxxxx + // test('utsStracktraceyPreset local', () => { + // stacktracey(utsErrorMsg, { + // preset: utsStracktraceyPreset({ + // base: path.resolve( + // __dirname, + // '../test/nativeplugins-sourceMap/DCloud-UTSPlugin/' + // ), + // sourceRoot: 'DCloud-UTSPlugin/android/src/', + // }), + // }).then((res: string) => { + // expect(res) + // .toEqual(`e: C:/Users/xianyang/Documents/HBuilderProjects/test-uni2/nativeplugins/DCloud-UTSPlugin/android/src/io/dcloud/uniplugin/TestModule.uts: (7, 0): Unresolved reference: logxxxxxxx -FAILURE: Build failed with an exception. + // FAILURE: Build failed with an exception. -* What went wrong: -Execution failed for task ':nativeplugins:DCloud-UTSPlugin:compileReleaseKotlin'. -> Compilation error. See log for more details + // * What went wrong: + // Execution failed for task ':nativeplugins:DCloud-UTSPlugin:compileReleaseKotlin'. + // > Compilation error. See log for more details -* Try: -Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. + // * Try: + // Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -* Get more help at https://help.gradle.org + // * Get more help at https://help.gradle.org -BUILD FAILED in 2s`) - }) - }) + // BUILD FAILED in 2s`) + // }) + // }) }) diff --git a/packages/uni-stacktracey/test/nativeplugins-sourceMap/DCloud-UTSPlugin/io/dcloud/uniplugin/TestModule.kt.map b/packages/uni-stacktracey/test/nativeplugins-sourceMap/DCloud-UTSPlugin/io/dcloud/uniplugin/TestModule.kt.map deleted file mode 100644 index 3cf01c7cba9bc584d21dd5dcdde2752c9a791e47..0000000000000000000000000000000000000000 --- a/packages/uni-stacktracey/test/nativeplugins-sourceMap/DCloud-UTSPlugin/io/dcloud/uniplugin/TestModule.kt.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["C:/Users/xianyang/Documents/HBuilderProjects/test-uni2/nativeplugins/DCloud-UTSPlugin/android/src/io/dcloud/uniplugin/TestModule.uts"],"names":["logxxxxxxx","TestModule","UniModule","TAG","UniJSMethod","uiThread","testAsyncFunc","options","callback","log","data","JSONObject","invoke","testSyncFunc","onActivityResult","requestCode","resultCode","REQUEST_CODE","hasExtra","getStringExtra"],"mappings":";AAAA,OAAmB,sBAAwB,CAAC;AAC5C,OAAuB,+BAAiC,CAAC;AACzD,OAAsB,yCAA2C,CAAC;AAClE,OAAwB,+CAAiD,CAAC;AAC1E,OAA0B,6CAA+C,CAAC;AAC1E,OAAgB,2BAAO,CAAC;;IACxBA,UAAU;;AACK,WAAMC,UAAU,GAASC,SAAS,EAAE;IACjDC,SAAAA,GAAG,GAAG,YAAY,CAAC;IAGnB,CAACC,WAAW,CAAC,CAAEC,QAAQ,GAAE,IAAI,CAAE,CAAC;IAAA,SAChCC,aAAa,CAACC,OAAmB,EAAV,UAAU,EAAEC,QAAwB,EAAb,aAAa,CAAA,EAAE;QAC3DC,GAAG,CAAC,IAAI,CAACN,GAAG,EAAE,yBAAyB,CAAC,CAAC;QACzC,IAAIK,QAAQ,IAAI,IAAI,EAAE;YACpB,IAAME,IAAI,GAAG,AAAIC,UAAU,EAAE,AAAC;YAC9BD,IAAI,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;YAC9BF,QAAQ,CAACI,MAAM,CAACF,IAAI,CAAC,CAAC;;;IAI1B,CAACN,WAAW,CAAC,CAAEC,QAAQ,GAAE,KAAK,CAAE,CAAC;IAAA,SACjCQ,YAAY,CAACN,OAAmB,EAAV,UAAU,GAAG,UAAU,CAAC;QAC5C,IAAMG,IAAI,GAAG,AAAIC,UAAU,EAAE,AAAC;QAC9BD,IAAI,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC;QAC5B,OAAOA,IAAI,CAAC;;IAEd,kBAASI,gBAAgB,CAACC,WAAgB,EAAH,GAAG,EAAEC,UAAe,EAAH,GAAG,EAAEN,IAAY,EAAN,MAAM,EAAE;QACzE,IAAIK,WAAW,IAAId,UAAU,CAACgB,YAAY,IAAIP,IAAI,CAACQ,QAAQ,CAAC,SAAS,CAAC,EAAE;YACtET,GAAG,CAAC,IAAI,CAACN,GAAG,EAAE,wBAAY,GAAGO,IAAI,CAACS,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;;QAC9D,MAAM;YACL,KAAK,CAACL,gBAAgB,CAACC,WAAW,EAAEC,UAAU,EAAEN,IAAI,CAAC,CAAC;;;;QAtB1D,IAAOO,YAAY,GAAG,IAAI,CAAC;;CAyB5B"} \ No newline at end of file diff --git a/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts-battery/app-android/index.kt.map b/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts-battery/app-android/index.kt.map new file mode 100644 index 0000000000000000000000000000000000000000..4aa193c0698b31afd92830a5c9de9396e5bce604 --- /dev/null +++ b/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts-battery/app-android/index.kt.map @@ -0,0 +1 @@ +{"version":3,"sources":["/Users/fxy/Projects/Demo/my-vue3-project-uts/src/uni_modules/test-uts-battery/app-android/index.uts"],"sourcesContent":["import Context from \"android.content.Context\";\nimport BatteryManager from \"android.os.BatteryManager\";\nimport { getAppContext } from \"io.dcloud.uts.android\";\n\nexport default function getBatteryCapacity(): number {\n const context = getAppContext();\n if (context != null) {\n const manager = context.getSystemService(\n Context.BATTERY_SERVICE\n ) as BatteryManager;\n const currentLevel: number = manager.getIntProperty(\n BatteryManager.BATTERY_PROPERTY_CAPACITY\n );\n return currentLevel;\n }\n return 0;\n}"],"names":[],"mappings":";;;;;;AAAA,OAAoB,uBAAyB,CAAC;AAC9C,OAA2B,yBAA2B,CAAC;AACvD;AAEe,IAAS,kBAAkB,IAAI,MAAM,CAAC;IACnD,IAAM,OAAO,GAAG,aAAa,EAAE,AAAC;IAChC,IAAI,OAAO,IAAI,IAAI,EAAE;QACnB,IAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CACtC,OAAO,CAAC,eAAe,CACxB,IAAI,cAAc,AAAC;QACpB,IAAM,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CACjD,cAAc,CAAC,yBAAyB,CACzC,AAAC;QACF,OAAO,YAAY,CAAC;IACtB;IACA,OAAO,CAAC,CAAC;AACX"} \ No newline at end of file diff --git a/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts-static/app-android/index.kt.map b/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts-static/app-android/index.kt.map new file mode 100644 index 0000000000000000000000000000000000000000..93f9979b60d44a866f394d03ab2f492b33861aff --- /dev/null +++ b/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts-static/app-android/index.kt.map @@ -0,0 +1 @@ +{"version":3,"sources":["/Users/fxy/Projects/Demo/my-vue3-project-uts/src/uni_modules/test-uts-static/static/logo.png","/Users/fxy/Projects/Demo/my-vue3-project-uts/src/uni_modules/test-uts-static/app-android/index.uts"],"sourcesContent":["import { getResourcePath } from 'io.dcloud.uts.android'\nexport default getResourcePath('uni_modules/test-uts-static/static/logo.png')\n ","import logo from \"../static/logo.png\";\nexport function getLogoPath(): string {\n return logo;\n}\n"],"names":[],"mappings":";;;;;;AAAA;gBACe,eAAe,CAAC,6CAA6C,CAAC;ACAtE,IAAS,WAAW,IAAI,MAAM,CAAC;IACpC,iBAAY;AACd"} \ No newline at end of file diff --git a/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts/app-android/index.kt.map b/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts/app-android/index.kt.map new file mode 100644 index 0000000000000000000000000000000000000000..3e0f09b5ce895ec1d8519e7d6e2f1cd9c2406dee --- /dev/null +++ b/packages/uni-stacktracey/test/nativeplugins-sourceMap/uni_modules/test-uts/app-android/index.kt.map @@ -0,0 +1 @@ +{"version":3,"sources":["/Users/fxy/Projects/Demo/my-vue3-project-uts/src/uni_modules/test-uts/app-android/utils.uts","/Users/fxy/Projects/Demo/my-vue3-project-uts/src/uni_modules/test-uts/app-android/index.uts"],"sourcesContent":["export function log(msg: string) {\n console.log(msg);\n}\n","import { log } from \"./utils.uts\";\ntype AsyncOptions = {\n type: string;\n success: (res: string) => void;\n fail: (res: string) => void;\n complete: (res: string) => void;\n};\n/**\n * 导出一个属性\n */\nexport const MAX = 100;\n\n/**\n * 导出一个同步方法\n * @returns\n */\nexport function testSync(msg: string) {\n console.log(\"log test\");\n log(\"log test1\");\n return {\n msg: `hello ${msg}`,\n };\n}\n/**\n * 导出一个同步方法(触发了数组越界异常)\n */\nexport function testSyncError() {\n const arr: string[] = [];\n console.log(arr[1]);\n}\n/**\n * 导出一个带callback的同步方法\n * @param opts\n */\nexport function testSyncWithCallback(opts: AsyncOptions) {\n if (opts.type == \"success\") {\n opts.success(\"success\");\n } else {\n opts.fail(\"fail\");\n }\n opts.complete(\"complete\");\n return { name: \"testSyncWithCallback\" };\n}\n/**\n * 导出一个异步方法\n * @returns\n */\nexport async function testAsync(opts: AsyncOptions) {\n if (opts.type == \"success\") {\n opts.success(\"success\");\n } else {\n opts.fail(\"fail\");\n }\n opts.complete(\"complete\");\n return { name: \"testAsync\" };\n}\n\ntype TestOptions = {\n name: string;\n callback: (res: string) => void;\n};\n\nexport class Test {\n id: number;\n name: string;\n static type: string = \"Test\";\n constructor(id: number, options: TestOptions) {\n this.id = id;\n this.name = options.name;\n options.callback(\"Test.constructor\");\n }\n static testClassStaticSyncWithCallback(opts: AsyncOptions): UTSJSONObject {\n return testSyncWithCallback(opts);\n }\n static async testClassStaticAsync(opts: AsyncOptions): Promise {\n const res = await testAsync(opts);\n return res;\n }\n testClassSyncWithCallback(opts: AsyncOptions): UTSJSONObject {\n return testSyncWithCallback(opts);\n }\n async testClassAsync(opts: AsyncOptions): Promise {\n const res = await testAsync(opts);\n return res;\n }\n}\n"],"names":[],"mappings":";;;;;;AAAO,IAAS,GAAG,CAAC,GAAW,EAAN,MAAM,EAAE;IAC/B,OAAO,CAAC,GAAG,CAAC,GAAG,oDAAC,CAAC;AACnB;ACDoB,WAAf,YAAY;IACf,kBAAA,IAAI,EAAE,MAAM,CAAC;IACb,kBAAA,OAAO,EAAA,WAAuB,CAAC;IAC/B,kBAAA,IAAI,EAAA,WAAuB,CAAC;IAC5B,kBAAA,QAAQ,EAAA,WAAuB,CAAC;CACjC,AAAC;AAIK,IAAM,GAAG,GAAG,GAAG,AAAC;AAMhB,IAAS,QAAQ,CAAC,GAAW,EAAN,MAAM,iBAAE;IACpC,OAAO,CAAC,GAAG,CAAC,UAAU,qDAAC,CAAC;IACxB,IAAI,WAAW,CAAC,CAAC;IACjB,OAAO;QACL,IAAA,GAAG,GAAE,GAAC,MAAM,EAAE,GAAG,CAAC,GAAC;KACpB,CAAC;AACJ;AAIO,IAAS,aAAa,GAAG;IAC9B,IAAM,GAAG,cAAE,MAAM,IAAK,eAAE,AAAC;IACzB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,qDAAC,CAAC;AACtB;AAKO,IAAS,oBAAoB,CAAC,IAAkB,EAAZ,YAAY,iBAAE;IACvD,IAAI,IAAI,CAAC,IAAI,IAAI,SAAS,EACxB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;SAExB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEpB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC1B,OAAO;QAAE,IAAA,IAAI,GAAE,sBAAsB;KAAE,CAAC;AAC1C;AAKO,YAAe,SAAS,CAAC,IAAkB,EAAZ,YAAY,uEAAE;IAClD,IAAI,IAAI,CAAC,IAAI,IAAI,SAAS,EACxB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;SAExB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEpB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC1B,aAAO;QAAE,IAAA,IAAI,GAAE,WAAW;KAAE,CAAC;AAC/B;AAEmB,WAAd,WAAW;IACd,kBAAA,IAAI,EAAE,MAAM,CAAC;IACb,kBAAA,QAAQ,EAAA,WAAuB,CAAC;CACjC,AAAC;AAEK,WAAM,IAAI;IACf,SAAA,EAAE,EAAE,MAAM,CAAC;IACX,SAAA,IAAI,EAAE,MAAM,CAAC;IAEb,YAAY,EAAU,EAAN,MAAM,EAAE,OAAoB,EAAX,WAAW,CAAE;QAC5C,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACvC;aAQA,yBAAyB,CAAC,IAAkB,EAAZ,YAAY,GAAG,aAAa,CAAC;QAC3D,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACpC;qBACM,cAAc,CAAC,IAAkB,EAAZ,YAAY,GAAG,QAAO,CAAC,aAAa,8CAAE;QAC/D,IAAM,GAAG,GAAG,AAAM,SAAS,CAAC,IAAI,CAAC,QAAA,AAAC;QAClC,aAAO,GAAG,CAAC;IACb;;QAnBA,IAAO,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;YAMtB,+BAA+B,CAAC,IAAkB,EAAZ,YAAY,GAAG,aAAa,CAAC;YACxE,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACpC;oBACa,oBAAoB,CAAC,IAAkB,EAAZ,YAAY,GAAG,QAAO,CAAC,aAAa,8CAAE;YAC5E,IAAM,GAAG,GAAG,AAAM,SAAS,CAAC,IAAI,CAAC,QAAA,AAAC;YAClC,aAAO,GAAG,CAAC;QACb;;CAQD"} \ No newline at end of file diff --git a/packages/uni-uts-vite/src/plugins/v1.ts b/packages/uni-uts-vite/src/plugins/v1.ts index c5392abda893bf4c87eadf8b37affb921945d215..ab93a6420df75437c48cb8438a1c68911d94d3b2 100644 --- a/packages/uni-uts-vite/src/plugins/v1.ts +++ b/packages/uni-uts-vite/src/plugins/v1.ts @@ -272,7 +272,7 @@ function genProxyCode({ body }: Module) { } } else if (decl.type === 'FunctionExpression') { if (decl.identifier) { - code = genFunctionDeclarationCode(decl, false) + code = genFunctionDeclarationCode(decl, true) } } } diff --git a/packages/uts-darwin-arm64/uts.darwin-arm64.node b/packages/uts-darwin-arm64/uts.darwin-arm64.node index 77495f184f57f74cec9582876151adbda030d490..42beb844118c34355f3d896207a60535c51896df 100755 Binary files a/packages/uts-darwin-arm64/uts.darwin-arm64.node and b/packages/uts-darwin-arm64/uts.darwin-arm64.node differ diff --git a/packages/uts-darwin-x64/uts.darwin-x64.node b/packages/uts-darwin-x64/uts.darwin-x64.node index 16c93250f16a52b3f683ec1b1a963ac1df6b6fc3..1f1c96996d65aa37d3e3b447cf88b1da39182742 100755 Binary files a/packages/uts-darwin-x64/uts.darwin-x64.node and b/packages/uts-darwin-x64/uts.darwin-x64.node differ diff --git a/packages/uts-win32-ia32-msvc/uts.win32-ia32-msvc.node b/packages/uts-win32-ia32-msvc/uts.win32-ia32-msvc.node index 6c9c7bb1cb5b43d0bfc87d05f2e96a4242075559..9f179d8bfb34eeb123d623c7e8819d8a1d125eb8 100644 Binary files a/packages/uts-win32-ia32-msvc/uts.win32-ia32-msvc.node and b/packages/uts-win32-ia32-msvc/uts.win32-ia32-msvc.node differ diff --git a/packages/uts-win32-x64-msvc/uts.win32-x64-msvc.node b/packages/uts-win32-x64-msvc/uts.win32-x64-msvc.node index f3bbfb1608c6102993528a4bce6872742d42b339..23a31f61f05446587d74e6c869b0ef528c27c455 100644 Binary files a/packages/uts-win32-x64-msvc/uts.win32-x64-msvc.node and b/packages/uts-win32-x64-msvc/uts.win32-x64-msvc.node differ