Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
65199644
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
65199644
编写于
7月 07, 2023
作者:
H
huyunhui1
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of gitee.com:huyunhui1/xts_acts
Signed-off-by:
N
huyunhui1
<
huyunhui1@huawei.com
>
上级
644fe1f8
00e66788
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
137 addition
and
79 deletion
+137
-79
arkcompiler/BUILD.gn
arkcompiler/BUILD.gn
+14
-3
arkcompiler/esmodule/BUILD.gn
arkcompiler/esmodule/BUILD.gn
+13
-0
arkcompiler/esmodule/esmodule_entry/entry/src/main/cpp/hello.cpp
...iler/esmodule/esmodule_entry/entry/src/main/cpp/hello.cpp
+1
-2
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportHar.ts
...odule_entry/entry/src/main/ets/workers/workerImportHar.ts
+6
-7
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportNapi.ts
...dule_entry/entry/src/main/ets/workers/workerImportNapi.ts
+8
-6
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportOhpm.ts
...dule_entry/entry/src/main/ets/workers/workerImportOhpm.ts
+7
-7
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportRelative.ts
..._entry/entry/src/main/ets/workers/workerImportRelative.ts
+9
-7
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportSystem.ts
...le_entry/entry/src/main/ets/workers/workerImportSystem.ts
+6
-7
arkcompiler/esmodule/esmodule_entry/har/src/main/ets/ohpm.ts
arkcompiler/esmodule/esmodule_entry/har/src/main/ets/ohpm.ts
+4
-2
arkcompiler/esmodule/esmodule_entry/oh-package-lock.json5
arkcompiler/esmodule/esmodule_entry/oh-package-lock.json5
+32
-18
arkcompiler/esmodule/esmodule_ohostest/har/src/main/ets/ohpm.ts
...piler/esmodule/esmodule_ohostest/har/src/main/ets/ohpm.ts
+4
-2
arkcompiler/esmodule/esmodule_ohostest/oh-package-lock.json5
arkcompiler/esmodule/esmodule_ohostest/oh-package-lock.json5
+33
-18
未找到文件。
arkcompiler/BUILD.gn
浏览文件 @
65199644
# Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos_var.gni")
group("arkcompiler") {
testonly = true
if (is_standard_system) {
deps = [
"esmodule:esmodule",
]
deps = [ "esmodule:esmodule" ]
}
}
\ No newline at end of file
arkcompiler/esmodule/BUILD.gn
浏览文件 @
65199644
# Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos_var.gni")
group("esmodule") {
...
...
arkcompiler/esmodule/esmodule_entry/entry/src/main/cpp/hello.cpp
浏览文件 @
65199644
...
...
@@ -20,7 +20,7 @@ static napi_value Add(napi_env env, napi_callback_info info)
size_t
argc
=
2
;
napi_value
args
[
2
]
=
{
nullptr
};
napi_get_cb_info
(
env
,
info
,
&
argc
,
args
,
nullptr
,
nullptr
);
napi_get_cb_info
(
env
,
info
,
&
argc
,
args
,
nullptr
,
nullptr
);
napi_valuetype
valuetype0
;
napi_typeof
(
env
,
args
[
0
],
&
valuetype0
);
...
...
@@ -38,7 +38,6 @@ static napi_value Add(napi_env env, napi_callback_info info)
napi_create_double
(
env
,
value0
+
value1
,
&
sum
);
return
sum
;
}
EXTERN_C_START
...
...
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportHar.ts
浏览文件 @
65199644
...
...
@@ -12,13 +12,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
ohpmRes
}
from
'
har
'
import
{
ohpmRes
}
from
'
har
'
;
import
worker
from
'
@ohos.worker
'
;
var
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
()
{
console
.
log
(
"
ModuleTest har
"
);
if
(
ohpmRes
){
workerPort
.
postMessage
(
"
ModuleTest receive data from main thread
"
);
let
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
():
void
{
if
(
ohpmRes
)
{
workerPort
.
postMessage
(
'
ModuleTest receive data from main thread
'
);
}
}
\ No newline at end of file
};
\ No newline at end of file
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportNapi.ts
浏览文件 @
65199644
...
...
@@ -12,13 +12,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
add
}
from
'
libentry.so
'
import
{
add
}
from
'
libentry.so
'
;
import
worker
from
'
@ohos.worker
'
;
const
ADDEND_FIRST
=
2
;
const
ADDEND_SECOND
=
3
;
const
SUM
=
5
;
var
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
()
{
if
(
add
(
2
,
3
)
==
5
)
{
console
.
log
(
"
ModuleTest AppNapi
"
);
workerPort
.
postMessage
(
"
ModuleTest receive data from main thread
"
);
workerPort
.
onmessage
=
function
():
void
{
if
(
add
(
ADDEND_FIRST
,
ADD_SECOND
)
===
SUM
)
{
workerPort
.
postMessage
(
'
ModuleTest receive data from main thread
'
);
}
}
\ No newline at end of file
};
\ No newline at end of file
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportOhpm.ts
浏览文件 @
65199644
...
...
@@ -12,13 +12,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
isLeapYear
from
'
leap-year
'
import
isLeapYear
from
'
leap-year
'
;
import
worker
from
'
@ohos.worker
'
;
var
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
()
{
if
(
isLeapYear
(
2000
))
{
console
.
log
(
"
ModuleTest ohpm
"
);
workerPort
.
postMessage
(
"
ModuleTest receive data from main thread
"
);
const
LEAP_YEAR
=
2000
;
let
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
():
void
{
if
(
isLeapYear
(
LEAP_YEAR
))
{
workerPort
.
postMessage
(
'
ModuleTest receive data from main thread
'
);
}
}
\ No newline at end of file
};
\ No newline at end of file
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportRelative.ts
浏览文件 @
65199644
...
...
@@ -12,13 +12,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
add
}
from
'
../test/test
'
import
{
add
}
from
'
../test/test
'
;
import
worker
from
'
@ohos.worker
'
;
var
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
()
{
if
(
add
(
2
,
6
)
==
8
){
console
.
log
(
"
ModuleTest relativePath
"
);
workerPort
.
postMessage
(
"
ModuleTest receive data from main thread
"
);
const
ADDEND_FIRST
=
2
;
const
ADDEND_SECOND
=
3
;
const
SUM
=
5
;
let
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
():
void
{
if
(
add
(
ADDEND_FIRST
,
ADD_SECOND
)
===
SUM
)
{
workerPort
.
postMessage
(
'
ModuleTest receive data from main thread
'
);
}
}
\ No newline at end of file
};
\ No newline at end of file
arkcompiler/esmodule/esmodule_entry/entry/src/main/ets/workers/workerImportSystem.ts
浏览文件 @
65199644
...
...
@@ -12,13 +12,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
hilog
from
"
@ohos.hilog
"
import
hilog
from
'
@ohos.hilog
'
;
import
worker
from
'
@ohos.worker
'
;
hilog
.
info
(
0x0000
,
"
testTag
"
,
'
dexter log: call ohos.hilog
'
)
hilog
.
info
(
0x0000
,
'
testTag
'
,
'
dexter log: call ohos.hilog
'
);
var
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
()
{
console
.
log
(
"
ModuleTest systemNapi
"
);
workerPort
.
postMessage
(
"
ModuleTest receive data from main thread
"
);
}
\ No newline at end of file
let
workerPort
=
worker
.
workerPort
;
workerPort
.
onmessage
=
function
():
void
{
workerPort
.
postMessage
(
'
ModuleTest receive data from main thread
'
);
};
\ No newline at end of file
arkcompiler/esmodule/esmodule_entry/har/src/main/ets/ohpm.ts
浏览文件 @
65199644
...
...
@@ -12,5 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
isLeapYear
from
"
leap-year
"
export
var
ohpmRes
=
isLeapYear
(
2000
);
\ No newline at end of file
import
isLeapYear
from
'
leap-year
'
;
const
LEAP_YEAR
=
2000
;
export
let
ohpmRes
=
isLeapYear
(
LEAP_YEAR
);
\ No newline at end of file
arkcompiler/esmodule/esmodule_entry/oh-package-lock.json5
浏览文件 @
65199644
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6",
"leap-year@^4.0.0": "leap-year@4.0.0",
"leap-year@4.0.0": "leap-year@4.0.0"
},
"packages": {
"@ohos/hypium@1.0.6": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
},
"leap-year@4.0.0": {
"resolved": "https://repo.harmonyos.com/ohpm/leap-year/-/leap-year-4.0.0.tgz",
"integrity": "sha512-+GveCBnhFmRjFf04Nj/2Z/w5lNC4bRXpecIRz5QkK+LnWBwuf9jAaNEfbybrU+e2ls8J6p+FZMjiq1aEh+gPAw=="
}
}
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6",
"leap-year@^4.0.0": "leap-year@4.0.0",
"leap-year@4.0.0": "leap-year@4.0.0"
},
"packages": {
"@ohos/hypium@1.0.6": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
},
"leap-year@4.0.0": {
"resolved": "https://repo.harmonyos.com/ohpm/leap-year/-/leap-year-4.0.0.tgz",
"integrity": "sha512-+GveCBnhFmRjFf04Nj/2Z/w5lNC4bRXpecIRz5QkK+LnWBwuf9jAaNEfbybrU+e2ls8J6p+FZMjiq1aEh+gPAw=="
}
}
}
\ No newline at end of file
arkcompiler/esmodule/esmodule_ohostest/har/src/main/ets/ohpm.ts
浏览文件 @
65199644
...
...
@@ -12,5 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
isLeapYear
from
"
leap-year
"
export
var
ohpmRes
=
isLeapYear
(
2000
);
\ No newline at end of file
import
isLeapYear
from
'
leap-year
'
;
const
LEAP_YEAR
=
2000
;
export
let
ohpmRes
=
isLeapYear
(
LEAP_YEAR
);
\ No newline at end of file
arkcompiler/esmodule/esmodule_ohostest/oh-package-lock.json5
浏览文件 @
65199644
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6",
"leap-year@^4.0.0": "leap-year@4.0.0",
"leap-year@4.0.0": "leap-year@4.0.0"
},
"packages": {
"@ohos/hypium@1.0.6": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
},
"leap-year@4.0.0": {
"resolved": "https://repo.harmonyos.com/ohpm/leap-year/-/leap-year-4.0.0.tgz",
"integrity": "sha512-+GveCBnhFmRjFf04Nj/2Z/w5lNC4bRXpecIRz5QkK+LnWBwuf9jAaNEfbybrU+e2ls8J6p+FZMjiq1aEh+gPAw=="
}
}
/**
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6",
"leap-year@^4.0.0": "leap-year@4.0.0",
"leap-year@4.0.0": "leap-year@4.0.0"
},
"packages": {
"@ohos/hypium@1.0.6": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
},
"leap-year@4.0.0": {
"resolved": "https://repo.harmonyos.com/ohpm/leap-year/-/leap-year-4.0.0.tgz",
"integrity": "sha512-+GveCBnhFmRjFf04Nj/2Z/w5lNC4bRXpecIRz5QkK+LnWBwuf9jAaNEfbybrU+e2ls8J6p+FZMjiq1aEh+gPAw=="
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录