diff --git a/packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts b/packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts index 14e2c526b482ae6f6a94f3943e0f4faa1bcf7b7e..f72f5138cf82b0a62e145caae1595e832efb0343 100644 --- a/packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts +++ b/packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts @@ -1,4 +1,5 @@ import { UIDevice } from 'UIKit' +import { CLLocationManager, CLAuthorizationStatus } from 'CoreLocation' type GetBatteryInfoOptions = { name: string @@ -42,6 +43,7 @@ export function test1(callback: () => void): string { //#ifdef MP-WEIXIN console.log('def weixin') //#endif + console.log(CLLocationManager, CLAuthorizationStatus) return 'test1' } 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 281800159774e36a9b1edb2ac87dc9d2fd20b1cd..3460067acd64a81d9f19dad400301664698dac9c 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 @@ -15,7 +15,7 @@ fun login(name: String, pwd: String): UTSJSONObject { var pwd = pwd }; } -val __default = getResourcePath("uni_modules/test-uniplugin/static/logo.png"); +val default = getResourcePath("uni_modules/test-uniplugin/static/logo.png"); val test = arrayOf(1, 2, 3); open class GetBatteryInfoOptions : UTSJSONObject() { open var success: UTSCallback? = null; @@ -29,13 +29,13 @@ open class User : IUser { } , 1000); login(name, pwd); - Log.info(__default); + Log.info(default); console.log("def android", " at uni_modules/test-uniplugin/app-android/index.uts:23"); console.log("ndef ios", " at uni_modules/test-uniplugin/app-android/index.uts:32"); console.log("def android || def ios", " at uni_modules/test-uniplugin/app-android/index.uts:35"); } override fun register(name: String, callback: UTSCallback) { - Log.info(__default as FrameLayout); + Log.info(default as FrameLayout); } open fun test(view: View) {} } 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 c35b3606b143463d8a10690c78301abb4afb072c..dc51090f34994736a4531da6473fe211edbd842c 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/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 FrameLayout from 'android.widget.FrameLayout'\nimport View from 'android.view.View'\nimport { IUser } from './interface.uts'\nimport { login } from './login.uts'\nimport logo from '../static/logo.png'\n\nconst test = arrayOf(1, 2, 3)\n\ntype GetBatteryInfoOptions = {\n success?: (res: UTSJSONObject) => void\n fail?: (res: UTSJSONObject) => void\n complete?: (res: UTSJSONObject) => void\n}\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(logo)\n\n console.log('def android')\n\n\n\n\n\n\n\n\n console.log('ndef ios')\n\n\n console.log('def android || def ios')\n\n\n\n\n }\n register(name: string, callback: () => void) {\n Log.info(logo as FrameLayout)\n }\n test(view: View) {}\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;AAClC,OAAwB,0BAA4B,CAAA;AACpD,OAAiB,iBAAmB,CAAA;UCFnB;QACf,SAAS,MAAM,MAAM,GAAG,IAAI;;ACDvB,IAAS,MAAM,MAAM,MAAM,EAAE,KAAK,MAAM,iBAAE;IAC/C,QAAQ,GAAG,CAAC;IACZ,OAAO;QAAE,IAAA,OAAA;QAAM,IAAA,MAAA;KAAK;AACtB;gBHFe,gBAAgB;ACM/B,IAAM,OAAO,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;AAEC,WAAxB;IACH,SAAA,SAAQ,oBAA8B;IACtC,SAAA,MAAK,oBAA8B;IACnC,SAAA,UAAS,oBAA8B;AACzC;AACO,WAAM,OAAgB;IAC3B,iBAAM,MAAM,MAAM,MAAM,EAAE,KAAK,MAAM,8CAAE;QACrC,WAAW,KAAM;YACf,QAAQ,GAAG,CAAC;QACd;UAAG,IAAI;QACP,MAAM,MAAM;QACZ,IAAI,IAAI;QAER,QAAQ,GAAG,CAAC;QASZ,QAAQ,GAAG,CAAC;QAGZ,QAAQ,GAAG,CAAC;IAKd;IACA,aAAA,SAAS,MAAM,MAAM,EAAE,qBAAoB,EAAE;QAC3C,IAAI,IAAI,cAAS;IACnB;IACA,SAAA,KAAK,MAAM,IAAI,EAAE,CAAC;AACpB;AACA,UAAe,MAAM,MAAM,EAAE,gBAAgB,IAAI,EAAE,CAAC;AAC7C,IAAS,SAAS,MAAM,MAAM,EAAE,qBAAoB,EAAE,CAAC"} \ 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 FrameLayout from 'android.widget.FrameLayout'\nimport View from 'android.view.View'\nimport { IUser } from './interface.uts'\nimport { login } from './login.uts'\nimport logo from '../static/logo.png'\n\nconst test = arrayOf(1, 2, 3)\n\ntype GetBatteryInfoOptions = {\n success?: (res: UTSJSONObject) => void\n fail?: (res: UTSJSONObject) => void\n complete?: (res: UTSJSONObject) => void\n}\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(logo)\n\n console.log('def android')\n\n\n\n\n\n\n\n\n console.log('ndef ios')\n\n\n console.log('def android || def ios')\n\n\n\n\n }\n register(name: string, callback: () => void) {\n Log.info(logo as FrameLayout)\n }\n test(view: View) {}\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;AAClC,OAAwB,0BAA4B,CAAA;AACpD,OAAiB,iBAAmB,CAAA;UCFnB;QACf,SAAS,MAAM,MAAM,GAAG,IAAI;;ACDvB,IAAS,MAAM,MAAM,MAAM,EAAE,KAAK,MAAM,iBAAE;IAC/C,QAAQ,GAAG,CAAC;IACZ,OAAO;QAAE,IAAA,OAAA;QAAM,IAAA,MAAA;KAAK;AACtB;cHFe,gBAAgB;ACM/B,IAAM,OAAO,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;AAEC,WAAxB;IACH,SAAA,SAAQ,oBAA8B;IACtC,SAAA,MAAK,oBAA8B;IACnC,SAAA,UAAS,oBAA8B;AACzC;AACO,WAAM,OAAgB;IAC3B,iBAAM,MAAM,MAAM,MAAM,EAAE,KAAK,MAAM,8CAAE;QACrC,WAAW,KAAM;YACf,QAAQ,GAAG,CAAC;QACd;UAAG,IAAI;QACP,MAAM,MAAM;QACZ,IAAI,IAAI;QAER,QAAQ,GAAG,CAAC;QASZ,QAAQ,GAAG,CAAC;QAGZ,QAAQ,GAAG,CAAC;IAKd;IACA,aAAA,SAAS,MAAM,MAAM,EAAE,qBAAoB,EAAE;QAC3C,IAAI,IAAI,YAAS;IACnB;IACA,SAAA,KAAK,MAAM,IAAI,EAAE,CAAC;AACpB;AACA,UAAe,MAAM,MAAM,EAAE,gBAAgB,IAAI,EAAE,CAAC;AAC7C,IAAS,SAAS,MAAM,MAAM,EAAE,qBAAoB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift b/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift index 362919f4cf3030dbdcf2d7bc0e4c48c8f979296c..ccd7a9e73ae2ebf6e28fa277b475aaa5cec5c131 100644 --- a/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift +++ b/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift @@ -1,5 +1,6 @@ import DCUTSPlugin; import UIKit; +import CoreLocation; @objc(UTSSDKModulesTestUniPluginGetBatteryInfoOptions) @objcMembers class GetBatteryInfoOptions : UTSJSONObject { @@ -23,10 +24,11 @@ func getBatteryInfo(_ options: GetBatteryInfoOptions) { } } func test1(_ callback: UTSCallback) -> String { - console.log("test1", " at uni_modules/test-uniplugin/app-ios/index.uts:26"); - console.log("def ios", " at uni_modules/test-uniplugin/app-ios/index.uts:31"); - console.log("ndef android", " at uni_modules/test-uniplugin/app-ios/index.uts:34"); - console.log("def android || def ios", " at uni_modules/test-uniplugin/app-ios/index.uts:40"); + console.log("test1", " at uni_modules/test-uniplugin/app-ios/index.uts:27"); + console.log("def ios", " at uni_modules/test-uniplugin/app-ios/index.uts:32"); + console.log("ndef android", " at uni_modules/test-uniplugin/app-ios/index.uts:35"); + console.log("def android || def ios", " at uni_modules/test-uniplugin/app-ios/index.uts:41"); + console.log(CLLocationManager, CLAuthorizationStatus, " at uni_modules/test-uniplugin/app-ios/index.uts:46"); return "test1"; } class Test1 : NSObject { diff --git a/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift.map b/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift.map index d84436a2d2fb100a49d5887726213d53a693f707..ba1106a5746b094d353c1dd55bc08fb9e0144b50 100644 --- a/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift.map +++ b/packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift.map @@ -1 +1 @@ -{"version":3,"sources":["/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts"],"sourcesContent":["import { UIDevice } from 'UIKit'\n\ntype GetBatteryInfoOptions = {\n name: string\n pwd: number\n success?: (res: UTSJSONObject) => void\n fail?: (res: UTSJSONObject) => void\n complete?: (res: UTSJSONObject) => void\n}\n\nexport default function getBatteryInfo(options: GetBatteryInfoOptions) {\n const res = {\n errMsg: 'getBatteryInfo:ok',\n level: UIDevice.current.batteryLevel * 100,\n isCharging: UIDevice.current.batteryState == UIDevice.BatteryState.charging,\n }\n if (options.success != null) {\n options.success!(res)\n }\n if (options.complete != null) {\n options.complete!(res)\n }\n}\n\nexport function test1(callback: () => void): string {\n console.log('test1')\n\n\n\n\n console.log('def ios')\n\n\n console.log('ndef android')\n\n\n\n\n\n console.log('def android || def ios')\n\n\n\n\n return 'test1'\n}\n\nclass Test1 {}\nexport class Test {\n constructor() {\n new Test1()\n }\n test(): string | null {\n return null\n }\n}\n\nexport async function testAsync() {\n return { a: 1 }\n}\n"],"names":[],"mappings":";AAAA;AAE6B;;MAAxB;IACH,WAAA,MAAM,MAAM,EAAA;IACZ,WAAA,KAAK,QAAM,EAAA;IACX,WAAA,SAAQ,aAA8B;IACtC,WAAA,MAAK,aAA8B;IACnC,WAAA,UAAS,aAA8B;AACzC;AAEe,KAAS,eAAe,EAAA,SAAS,qBAAqB,EAAE;IACrE,IAAM,MAAM;QACV,CAAA,SAAQ;QACR,CAAA,QAAO,SAAS,OAAO,CAAC,YAAY,GAAG,GAAG;QAC1C,CAAA,aAAY,SAAS,OAAO,CAAC,YAAY,IAAI,SAAS,YAAY,CAAC,QAAQ;MAC5E;IACD,IAAI,QAAQ,OAAO,IAAI,GAAI;QACzB,QAAQ,OAAO,EAAE;;IAEnB,IAAI,QAAQ,QAAQ,IAAI,GAAI;QAC1B,QAAQ,QAAQ,EAAE;;AAEtB;AAEO,KAAS,MAAM,EAAA,qBAAoB,KAAG,MAAM,CAAC;IAClD,QAAQ,GAAG,CAAC;IAKZ,QAAQ,GAAG,CAAC;IAGZ,QAAQ,GAAG,CAAC;IAMZ,QAAQ,GAAG,CAAC;IAKZ,OAAO;AACT;AAEA,MAAM;AAAO;AACN;;MAAM;IACX,aAAc;QACR;IACN;IACA,YAAA,UAAQ,MAAM,EAAQ;QACpB,OAAO,GAAI;IACb;AACF;AAEO;KAAe,oCAAY;IAChC,OAAO;QAAE,CAAA,IAAG,CAAC;MAAE;AACjB;;;;wCAjDuC,EAAA,SAAS,qBAAqB;eAA7C,eAAe;;+BAcjB,EAAA,qBAAoB,KAAG,MAAM;eAAnC,MAAM;;;;qBAiCA"} \ 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/app-ios/index.uts"],"sourcesContent":["import { UIDevice } from 'UIKit'\nimport { CLLocationManager, CLAuthorizationStatus } from 'CoreLocation'\n\ntype GetBatteryInfoOptions = {\n name: string\n pwd: number\n success?: (res: UTSJSONObject) => void\n fail?: (res: UTSJSONObject) => void\n complete?: (res: UTSJSONObject) => void\n}\n\nexport default function getBatteryInfo(options: GetBatteryInfoOptions) {\n const res = {\n errMsg: 'getBatteryInfo:ok',\n level: UIDevice.current.batteryLevel * 100,\n isCharging: UIDevice.current.batteryState == UIDevice.BatteryState.charging,\n }\n if (options.success != null) {\n options.success!(res)\n }\n if (options.complete != null) {\n options.complete!(res)\n }\n}\n\nexport function test1(callback: () => void): string {\n console.log('test1')\n\n\n\n\n console.log('def ios')\n\n\n console.log('ndef android')\n\n\n\n\n\n console.log('def android || def ios')\n\n\n\n\n console.log(CLLocationManager, CLAuthorizationStatus)\n return 'test1'\n}\n\nclass Test1 {}\nexport class Test {\n constructor() {\n new Test1()\n }\n test(): string | null {\n return null\n }\n}\n\nexport async function testAsync() {\n return { a: 1 }\n}\n"],"names":[],"mappings":";AAAA;AACA;AAE6B;;MAAxB;IACH,WAAA,MAAM,MAAM,EAAA;IACZ,WAAA,KAAK,QAAM,EAAA;IACX,WAAA,SAAQ,aAA8B;IACtC,WAAA,MAAK,aAA8B;IACnC,WAAA,UAAS,aAA8B;AACzC;AAEe,KAAS,eAAe,EAAA,SAAS,qBAAqB,EAAE;IACrE,IAAM,MAAM;QACV,CAAA,SAAQ;QACR,CAAA,QAAO,SAAS,OAAO,CAAC,YAAY,GAAG,GAAG;QAC1C,CAAA,aAAY,SAAS,OAAO,CAAC,YAAY,IAAI,SAAS,YAAY,CAAC,QAAQ;MAC5E;IACD,IAAI,QAAQ,OAAO,IAAI,GAAI;QACzB,QAAQ,OAAO,EAAE;;IAEnB,IAAI,QAAQ,QAAQ,IAAI,GAAI;QAC1B,QAAQ,QAAQ,EAAE;;AAEtB;AAEO,KAAS,MAAM,EAAA,qBAAoB,KAAG,MAAM,CAAC;IAClD,QAAQ,GAAG,CAAC;IAKZ,QAAQ,GAAG,CAAC;IAGZ,QAAQ,GAAG,CAAC;IAMZ,QAAQ,GAAG,CAAC;IAKZ,QAAQ,GAAG,CAAC,mBAAmB;IAC/B,OAAO;AACT;AAEA,MAAM;AAAO;AACN;;MAAM;IACX,aAAc;QACR;IACN;IACA,YAAA,UAAQ,MAAM,EAAQ;QACpB,OAAO,GAAI;IACb;AACF;AAEO;KAAe,oCAAY;IAChC,OAAO;QAAE,CAAA,IAAG,CAAC;MAAE;AACjB;;;;wCAlDuC,EAAA,SAAS,qBAAqB;eAA7C,eAAe;;+BAcjB,EAAA,qBAAoB,KAAG,MAAM;eAAnC,MAAM;;;;qBAkCA"} \ No newline at end of file diff --git a/packages/uts-darwin-arm64/uts.darwin-arm64.node b/packages/uts-darwin-arm64/uts.darwin-arm64.node index e6c7966148b682d7bb5ef3ded392b434a4ab94d3..65851918890c5e900f685ec2c18852a5263d6302 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 9627805dd3c4b99d6bb1ad4de4f75dd023dafbe6..477f738871a36f98723c9d39595fca74c0ef14bc 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 cc83be8b22945c352fb785191386a83bd7d30518..60e4eccc9b48edcf69d68ca8797f2c2ab23540ec 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 4b7a632b57d6c83f731af187405ede1cd039e714..1f4fcb314c68c8110059386c847903c1edfc40bf 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