Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
0bce4998
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
0bce4998
编写于
6月 05, 2024
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip: uni_modules编译模式
上级
b3042f9c
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
37 addition
and
5 deletion
+37
-5
packages/playground/uts/unpackage/dist/dev/.sourcemap/app/uni_modules/test-uniplugin/utssdk/app-ios/index.swift.map
...uni_modules/test-uniplugin/utssdk/app-ios/index.swift.map
+1
-1
packages/playground/uts/unpackage/dist/dev/app-plus/uni_modules/test-uniplugin/utssdk/app-ios/index.swift
...lus/uni_modules/test-uniplugin/utssdk/app-ios/index.swift
+13
-3
packages/uni-cli-shared/src/index.ts
packages/uni-cli-shared/src/index.ts
+1
-0
packages/uni-cli-shared/src/messages/en.ts
packages/uni-cli-shared/src/messages/en.ts
+1
-0
packages/uni-cli-shared/src/messages/zh_CN.ts
packages/uni-cli-shared/src/messages/zh_CN.ts
+2
-0
packages/uni-cli-shared/src/uni_modules.ts
packages/uni-cli-shared/src/uni_modules.ts
+9
-0
packages/uni-uts-v1/__tests__/sourceMap.spec.ts
packages/uni-uts-v1/__tests__/sourceMap.spec.ts
+1
-1
packages/vite-plugin-uni/src/config/resolve.ts
packages/vite-plugin-uni/src/config/resolve.ts
+9
-0
未找到文件。
packages/playground/uts/unpackage/dist/dev/.sourcemap/app/uni_modules/test-uniplugin/utssdk/app-ios/index.swift.map
浏览文件 @
0bce4998
{
"version"
:
3
,
"sources"
:
[
"uni_modules/test-uniplugin/utssdk/app-ios/index.uts"
,
"uni_modules/test-uniplugin/utssdk/interface.uts"
],
"sourcesContent"
:
[
"import { UIDevice } from 'UIKit'
\n
import { CLLocationManager, CLAuthorizationStatus } from 'CoreLocation'
\n
import { ShowToast } from '../interface.uts'
\n\n
type GetBatteryInfoOptions = {\n name: string
\n
pwd: number
\n
success?: (res: UTSJSONObject) => void
\n
fail?: (res: UTSJSONObject) => void
\n
complete?: (res: UTSJSONObject) => void
\n
}
\n\n
export default function getBatteryInfo(options: GetBatteryInfoOptions) {\n new UIAlertController(
\n
(title = title),
\n
(message = message),
\n
(preferredStyle = UIAlertController.Style.alert)
\n
)
\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\n
export function test1(callback: () => void): string {\n console.log({
\"
a
\"
:
\"
b
\"
})
\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
const a = -3
\n
console.log(~a)
\n
return 'test1'
\n
}
\n\n
class Test1 { }
\n
export class Test {\n constructor() {\n new Test1()
\n
}
\n
test(): string | null {\n if (UTSiOS.macros(
\"
swift(>=1)
\"
)) {\n console.log(
\"
swift(>=1)
\"
)
\n
}
\n
if (UTSiOS.macros(
\"
arch(i386) || arch(arm)
\"
)) {\n console.log(
\"
arch(i386) || arch(arm)
\"
)
\n
}
\n
if (UTSiOS.available(
\"
iOS 14, macOS 11.0, *
\"
)) {\n console.log(
\"
iOS 14, macOS 11.0, *
\"
)
\n
} else if (UTSiOS.available(
\"
iOS 13,*
\"
)) {\n console.log(
\"
iOS 13,*
\"
)
\n
} else if (UTSiOS.unavailable(
\"
tvOS 12
\"
)) {\n console.log(
\"
tvOS 12
\"
)
\n
}
\n
return null
\n
}
\n
}
\n\n
export async function testAsync() {\n uni.showToast()
\n
uni.showToast()
\n
uni.showModel()
\n
return { a: 1 }
\n
}
\n\n
export const showToast1: ShowToast = (msg) => { }
\n
export const showToast2: ShowToast = function (msg) { }
\n
export const showToast3: ShowToast = function showToast(msg) { }
\n
"
,
"export type ShowToast = (msg: string) => void
\n
"
],
"names"
:
[],
"mappings"
:
"AACA,oBAAuE;;AADvE,aAAgC;;iBCApB,eAAa,KAAK,MAAM,KAAK,IAAI;ADIhB;;aAAxB;IACH,iBAAM,MAAM,EAAA;IACZ,gBAAK,QAAM,EAAA;IACX,wBAAW,KAAK,kBAAkB,IAAI,GAAA;IACtC,qBAAQ,KAAK,kBAAkB,IAAI,GAAA;IACnC,yBAAY,KAAK,kBAAkB,IAAI,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;oCAJjC,MAAM;kCACP,QAAM;8CACA,KAAK,kBAAkB,IAAI;wCAC9B,KAAK,kBAAkB,IAAI;gDACvB,KAAK,kBAAkB,IAAI;;AACzC;AAEe,YAAS,eAAe,EAAA,SAAS,qBAAqB,EAAE;IACjE,kBACD,OAAQ,OACR,SAAU,SACV,gBAAiB,kBAAkB,KAAK,CAAC,KAAK;IAEjD,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,EAAE;QAC3B,QAAQ,OAAO,EAAE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AA7B;;;;;;8BAgCZ,MAAM;;;;;;;;6BC/DS,KAAK,MAAM,KAAK,IAAI;sBAApB;;6BAAA,KAAK,MAAM,KAAK,IAAI;sBAApB;;6BAAA,KAAK,MAAM,KAAK,IAAI;sBAApB;;;;;4CDYc,EAAA,SAAS,+BAAqB;kCAA9B;;qCAmBjB,0BAAuB,MAAM;yBAA7B;;;;;;0CC/BG,KAAK,MAAM,KAAK,IAAI;8BAApB;;0CAAA,KAAK,MAAM,KAAK,IAAI;8BAApB;;0CAAA,KAAK,MAAM,KAAK,IAAI;8BAApB"
}
\ No newline at end of file
{
"version"
:
3
,
"sources"
:
[
"uni_modules/test-uniplugin/utssdk/app-ios/index.uts"
,
"uni_modules/test-uniplugin/utssdk/interface.uts"
],
"sourcesContent"
:
[
"import { UIDevice } from 'UIKit'
\n
import { CLLocationManager, CLAuthorizationStatus } from 'CoreLocation'
\n
import { ShowToast } from '../interface.uts'
\n\n
type GetBatteryInfoOptions = {\n name: string
\n
pwd: number
\n
success?: (res: UTSJSONObject) => void
\n
fail?: (res: UTSJSONObject) => void
\n
complete?: (res: UTSJSONObject) => void
\n
}
\n\n
export default function getBatteryInfo(options: GetBatteryInfoOptions) {\n new UIAlertController(
\n
(title = title),
\n
(message = message),
\n
(preferredStyle = UIAlertController.Style.alert)
\n
)
\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\n
export function test1(callback: () => void): string {\n console.log({
\"
a
\"
:
\"
b
\"
})
\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
const a = -3
\n
console.log(~a)
\n
return 'test1'
\n
}
\n\n
class Test1 { }
\n
export class Test {\n constructor() {\n new Test1()
\n
}
\n
test(): string | null {\n if (UTSiOS.macros(
\"
swift(>=1)
\"
)) {\n console.log(
\"
swift(>=1)
\"
)
\n
}
\n
if (UTSiOS.macros(
\"
arch(i386) || arch(arm)
\"
)) {\n console.log(
\"
arch(i386) || arch(arm)
\"
)
\n
}
\n
if (UTSiOS.available(
\"
iOS 14, macOS 11.0, *
\"
)) {\n console.log(
\"
iOS 14, macOS 11.0, *
\"
)
\n
} else if (UTSiOS.available(
\"
iOS 13,*
\"
)) {\n console.log(
\"
iOS 13,*
\"
)
\n
} else if (UTSiOS.unavailable(
\"
tvOS 12
\"
)) {\n console.log(
\"
tvOS 12
\"
)
\n
}
\n
return null
\n
}
\n
}
\n\n
export async function testAsync() {\n uni.showToast()
\n
uni.showToast()
\n
uni.showModel()
\n
return { a: 1 }
\n
}
\n\n
export const showToast1: ShowToast = (msg) => { }
\n
export const showToast2: ShowToast = function (msg) { }
\n
export const showToast3: ShowToast = function showToast(msg) { }
\n
"
,
"export type ShowToast = (msg: string) => void
\n
"
],
"names"
:
[],
"mappings"
:
"AACA,oBAAuE;;AADvE,aAAgC;;iBCApB,eAAa,KAAK,MAAM,KAAK,IAAI;ADIhB;;aAAxB;;;;IACH,iBAAM,MAAM,EAAA;IACZ,gBAAK,QAAM,EAAA;IACX,wBAAW,KAAK,kBAAkB,IAAI,GAAA;IACtC,qBAAQ,KAAK,kBAAkB,IAAI,GAAA;IACnC,yBAAY,KAAK,kBAAkB,IAAI,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;oCAJjC,MAAM;kCACP,QAAM;8CACA,KAAK,kBAAkB,IAAI;wCAC9B,KAAK,kBAAkB,IAAI;gDACvB,KAAK,kBAAkB,IAAI;;AACzC;AAEe,YAAS,eAAe,EAAA,SAAS,qBAAqB,EAAE;IACjE,kBACD,OAAQ,OACR,SAAU,SACV,gBAAiB,kBAAkB,KAAK,CAAC,KAAK;IAEjD,IAAM,MAAM;;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A,KAAK,QAAM,EAAA;IACX,WAAA,SAAQ,aAA8B;IACtC,WAAA,MAAK,aAA8B;IACnC,WAAA,UAAS,aAA8B;AACzC;+BAEuC,EAAA,SAAS,+BAAqB;;;;;SALxD,KAAK;yBAAL;;;SACH,KAAK;sBAAL;;;SACI,KAAK;0BAAL;;;;wBAsBQ,0BAAuB,MAAM;;;IAA7B;;;;;;8BAgCZ,MAAM;;;;;;;;6BC/DS,KAAK,MAAM,KAAK,IAAI;sBAApB;;6BAAA,KAAK,MAAM,KAAK,IAAI;sBAApB;;6BAAA,KAAK,MAAM,KAAK,IAAI;sBAApB;;;;;4CDYc,EAAA,SAAS,+BAAqB;kCAA9B;;qCAmBjB,0BAAuB,MAAM;yBAA7B;;;;;;0CC/BG,KAAK,MAAM,KAAK,IAAI;8BAApB;;0CAAA,KAAK,MAAM,KAAK,IAAI;8BAApB;;0CAAA,KAAK,MAAM,KAAK,IAAI;8BAApB"
}
\ No newline at end of file
packages/playground/uts/unpackage/dist/dev/app-plus/uni_modules/test-uniplugin/utssdk/app-ios/index.swift
浏览文件 @
0bce4998
...
...
@@ -5,7 +5,10 @@ import DCloudUTSExtAPI;
public
typealias
ShowToast
=
(
_
msg
:
String
)
->
Void
;
@objc
(
UTSSDKModulesTestUniPluginGetBatteryInfoOptions
)
@objcMembers
public
class
GetBatteryInfoOptions
:
NSObject
,
UTSObject
{
public
class
GetBatteryInfoOptions
:
NSObject
,
UTSObject
,
IUTSSourceMap
{
public
func
__
$
getOriginalPosition
()
->
UTSSourceMapPosition
?
{
return
UTSSourceMapPosition
(
"GetBatteryInfoOptions"
,
"uni_modules/test-uniplugin/utssdk/app-ios/index.uts"
,
5
,
6
);
}
public
var
name
:
String
!
;
public
var
pwd
:
NSNumber
!
;
public
var
success
:
((
_
res
:
UTSJSONObject
)
->
Void
)?;
...
...
@@ -46,6 +49,7 @@ public class GetBatteryInfoOptions : NSObject, UTSObject {
public
func
getBatteryInfo
(
_
options
:
GetBatteryInfoOptions
)
{
UIAlertController
(
title
:
title
,
message
:
message
,
preferredStyle
:
UIAlertController
.
Style
.
alert
);
var
res
=
UTSJSONObject
([
"__$originalPosition"
:
UTSSourceMapPosition
(
"res"
,
"uni_modules/test-uniplugin/utssdk/app-ios/index.uts"
,
19
,
9
),
"errMsg"
:
"getBatteryInfo:ok"
,
"level"
:
UIDevice
.
current
.
batteryLevel
*
100
,
"isCharging"
:
UIDevice
.
current
.
batteryState
==
UIDevice
.
BatteryState
.
charging
...
...
@@ -72,11 +76,17 @@ public func test1(_ callback:@escaping () -> Void) -> String {
}
@objc
(
UTSSDKModulesTestUniPluginTest1
)
@objcMembers
public
class
Test1
:
NSObject
{
public
class
Test1
:
NSObject
,
IUTSSourceMap
{
public
func
__
$
getOriginalPosition
()
->
UTSSourceMapPosition
?
{
return
UTSSourceMapPosition
(
"Test1"
,
"uni_modules/test-uniplugin/utssdk/app-ios/index.uts"
,
59
,
7
);
}
}
@objc
(
UTSSDKModulesTestUniPluginTest
)
@objcMembers
public
class
Test
:
NSObject
{
public
class
Test
:
NSObject
,
IUTSSourceMap
{
public
func
__
$
getOriginalPosition
()
->
UTSSourceMapPosition
?
{
return
UTSSourceMapPosition
(
"Test"
,
"uni_modules/test-uniplugin/utssdk/app-ios/index.uts"
,
60
,
14
);
}
override
public
init
(){
Test1
();
}
...
...
packages/uni-cli-shared/src/index.ts
浏览文件 @
0bce4998
...
...
@@ -31,6 +31,7 @@ export {
DefineOptions
,
Defines
,
getUniExtApiProviderRegisters
,
resolveEncryptUniModule
,
}
from
'
./uni_modules
'
export
{
M
}
from
'
./messages
'
...
...
packages/uni-cli-shared/src/messages/en.ts
浏览文件 @
0bce4998
...
...
@@ -57,4 +57,5 @@ export default {
'
uvue.unsupported
'
:
'
uvue does not support {platform} platform
'
,
'
uvue.dev.watching.end.empty
'
:
'
The compilation outcome remains unchanged; there is no need to synchronize.
'
,
'
uni_modules.import
'
:
'
Plug-in [{0}] only supports @/uni_modules/{1}.
'
,
}
as
const
packages/uni-cli-shared/src/messages/zh_CN.ts
浏览文件 @
0bce4998
...
...
@@ -57,4 +57,6 @@ export default {
'
uvue.unsupported
'
:
'
uvue 暂不支持 {platform} 平台
'
,
'
uvue.dev.watching.end.empty
'
:
'
本次代码变更,编译结果未发生变化,跳过同步手机端程序文件。
'
,
'
uni_modules.import
'
:
'
插件[{0}]仅支持 @/uni_modules/{1} 方式引入,不支持直接导入内部文件 {2}。
'
,
}
as
const
packages/uni-cli-shared/src/uni_modules.ts
浏览文件 @
0bce4998
...
...
@@ -5,6 +5,7 @@ import { sync } from 'fast-glob'
import
type
{
UTSTargetLanguage
}
from
'
./uts
'
import
{
normalizePath
}
from
'
./utils
'
import
{
genUTSComponentPublicInstanceIdent
}
from
'
./easycom
'
import
{
M
}
from
'
./messages
'
export
type
DefineOptions
=
{
name
?:
string
...
...
@@ -665,6 +666,14 @@ export function resolveEncryptUniModule(
if
(
index
!==
-
1
)
{
const
uniModuleId
=
parts
[
index
+
1
]
if
(
uniModuleId
in
encryptUniModules
)
{
if
(
parts
[
index
+
2
])
{
console
.
warn
(
M
[
'
uni_modules.import
'
]
.
replace
(
'
{0}
'
,
uniModuleId
)
.
replace
(
'
{1}
'
,
uniModuleId
)
.
replace
(
'
{2}
'
,
parts
.
slice
(
index
+
2
).
join
(
'
/
'
))
)
}
// 原生平台走旧的uts-proxy
return
normalizePath
(
path
.
join
(
...
...
packages/uni-uts-v1/__tests__/sourceMap.spec.ts
浏览文件 @
0bce4998
...
...
@@ -193,7 +193,7 @@ describe('uts:sourceMap', () => {
)
const
{
line
,
column
,
source
}
=
await
originalPositionFor
({
sourceMapFile
,
line
:
48
,
line
:
51
,
column
:
0
,
})
...
...
packages/vite-plugin-uni/src/config/resolve.ts
浏览文件 @
0bce4998
...
...
@@ -5,6 +5,7 @@ import {
isWindows
,
normalizePath
,
requireResolve
,
resolveEncryptUniModule
,
resolveUTSAppModule
,
resolveUTSModule
,
uni_app_x_extensions
,
...
...
@@ -38,6 +39,14 @@ export const customResolver: ResolverFunction = (updatedId, importer) => {
requireResolve
(
updatedId
,
importer
||
process
.
env
.
UNI_INPUT_DIR
)
)
}
const
resolveId
=
resolveEncryptUniModule
(
updatedId
,
process
.
env
.
UNI_UTS_PLATFORM
,
process
.
env
.
UNI_APP_X
===
'
true
'
)
if
(
resolveId
)
{
return
resolveId
}
return
requireResolve
(
updatedId
,
importer
||
process
.
env
.
UNI_INPUT_DIR
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录