@atomicservice/ascf-base 1.0.17 → 1.0.18-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/hianalytics/ha.esm.js +1 -0
  2. package/dist/hianalytics/ha.min.js +1 -0
  3. package/dist/index.d.mts +73 -8
  4. package/dist/index.d.ts +73 -8
  5. package/dist/index.js +92 -74
  6. package/dist/index.mjs +92 -74
  7. package/dist/reporter/reporter-process.js +1 -0
  8. package/dist/schemas/app.schema.json +39 -0
  9. package/dist/schemas/ascf.config.schema.json +9 -4
  10. package/dist/templates/ascfProject/entry/oh-package.json5 +1 -1
  11. package/dist/templates/ascfTaro/package.json +1 -1
  12. package/dist/templates/ascfUniapp/package.json +1 -1
  13. package/package.json +7 -8
  14. package/dist/templates/ascfTaro/ascf-project/AppScope/app.json5 +0 -11
  15. package/dist/templates/ascfTaro/ascf-project/AppScope/resources/base/element/string.json +0 -8
  16. package/dist/templates/ascfTaro/ascf-project/AppScope/resources/base/media/app_icon.png +0 -0
  17. package/dist/templates/ascfTaro/ascf-project/build-profile.json5 +0 -55
  18. package/dist/templates/ascfTaro/ascf-project/code-linter.json5 +0 -20
  19. package/dist/templates/ascfTaro/ascf-project/entry/build-profile.json5 +0 -28
  20. package/dist/templates/ascfTaro/ascf-project/entry/hvigorfile.ts +0 -6
  21. package/dist/templates/ascfTaro/ascf-project/entry/obfuscation-rules.txt +0 -23
  22. package/dist/templates/ascfTaro/ascf-project/entry/oh-package-lock.json5 +0 -21
  23. package/dist/templates/ascfTaro/ascf-project/entry/oh-package.json5 +0 -11
  24. package/dist/templates/ascfTaro/ascf-project/entry/src/main/ets/abilitystage/AbilityStage.ets +0 -7
  25. package/dist/templates/ascfTaro/ascf-project/entry/src/main/ets/entryability/EntryAbility.ets +0 -4
  26. package/dist/templates/ascfTaro/ascf-project/entry/src/main/ets/pages/Index.ets +0 -10
  27. package/dist/templates/ascfTaro/ascf-project/entry/src/main/module.json5 +0 -65
  28. package/dist/templates/ascfTaro/ascf-project/entry/src/main/resources/base/element/color.json +0 -8
  29. package/dist/templates/ascfTaro/ascf-project/entry/src/main/resources/base/element/string.json +0 -16
  30. package/dist/templates/ascfTaro/ascf-project/entry/src/main/resources/base/media/startIcon.png +0 -0
  31. package/dist/templates/ascfTaro/ascf-project/entry/src/main/resources/base/profile/main_pages.json +0 -5
  32. package/dist/templates/ascfTaro/ascf-project/entry/src/main/resources/en_US/element/string.json +0 -16
  33. package/dist/templates/ascfTaro/ascf-project/entry/src/main/resources/zh_CN/element/string.json +0 -16
  34. package/dist/templates/ascfTaro/ascf-project/entry/src/mock/mock-config.json5 +0 -2
  35. package/dist/templates/ascfTaro/ascf-project/entry/src/ohosTest/ets/test/Ability.test.ets +0 -35
  36. package/dist/templates/ascfTaro/ascf-project/entry/src/ohosTest/ets/test/List.test.ets +0 -5
  37. package/dist/templates/ascfTaro/ascf-project/entry/src/ohosTest/module.json5 +0 -12
  38. package/dist/templates/ascfTaro/ascf-project/entry/src/test/List.test.ets +0 -5
  39. package/dist/templates/ascfTaro/ascf-project/entry/src/test/LocalUnit.test.ets +0 -33
  40. package/dist/templates/ascfTaro/ascf-project/hvigor/hvigor-config.json5 +0 -23
  41. package/dist/templates/ascfTaro/ascf-project/hvigorfile.ts +0 -10
  42. package/dist/templates/ascfTaro/ascf-project/oh-package-lock.json5 +0 -20
  43. package/dist/templates/ascfTaro/ascf-project/oh-package.json5 +0 -9
@@ -0,0 +1 @@
1
+ "use strict";var _=Object.create;var m=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var w=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of b(t))!v.call(e,r)&&r!==s&&m(e,r,{get:()=>t[r],enumerable:!(n=y(t,r))||n.enumerable});return e};var u=(e,t,s)=>(s=e!=null?_(k(e)):{},w(t||!e||!e.__esModule?m(s,"default",{value:e,enumerable:!0}):s,e));var d=u(require("https")),g=(e,t={})=>new Promise(s=>{let n=new URL(e),r=d.request({hostname:n.hostname,port:n.port||443,path:n.pathname+n.search,method:t.method||"POST",headers:t.headers||{}},c=>{c.resume(),s({ok:(c.statusCode??0)>=200&&(c.statusCode??0)<300,status:c.statusCode??0})});r.on("error",()=>s({ok:!1,status:0})),t.body&&r.write(t.body),r.end()}),h=class{constructor(){this._method="";this._url="";this._headers={};this.withCredentials=!1}open(t,s){this._method=t,this._url=s}setRequestHeader(t,s){this._headers[t]=s}send(t){g(this._url,{method:this._method,headers:this._headers,body:t}).then(s=>{s.ok?this.onload?.():this.onerror?.()}).catch(()=>this.onerror?.())}},i={},l={getItem:e=>i[e]??null,setItem:(e,t)=>{i[e]=t},removeItem:e=>{delete i[e]},clear:()=>{Object.keys(i).forEach(e=>delete i[e])},get length(){return Object.keys(i).length},key:e=>Object.keys(i)[e]??null},p={},I={get cookie(){return Object.entries(p).map(([e,t])=>`${e}=${t}`).join("; ")},set cookie(e){let[t,s]=e.split("=");p[t.trim()]=s?.split(";")[0]?.trim()??""},referrer:"",title:"CLI",documentElement:{clientHeight:0,clientWidth:0},body:{clientHeight:0,clientWidth:0},getElementById:()=>null,addEventListener:()=>{},attachEvent:()=>{}},S={location:{href:"cli://local",host:"localhost"},innerHeight:0,innerWidth:0,screen:{height:0,width:0},performance:{now:()=>Date.now(),timing:{}},XMLHttpRequest:h,addEventListener:()=>{},attachEvent:()=>{},crypto:{getRandomValues:e=>{for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}},navigator:{userAgent:`Node.js/${process.version} CLI`,language:"zh-CN"},localStorage:l,sessionStorage:l,fetch:g},o=(e,t)=>Object.defineProperty(global,e,{value:t,writable:!0,configurable:!0});o("window",S);o("navigator",{userAgent:`Node.js/${process.version} CLI`,language:"zh-CN"});o("location",{href:"cli://local",host:"localhost",hostname:"localhost",pathname:"/",search:"",hash:""});o("localStorage",l);o("sessionStorage",l);o("fetch",g);o("XMLHttpRequest",h);o("document",I);o("Image",class{constructor(){this._src=""}get src(){return this._src}set src(e){this._src=e;let t=d.get(e,s=>{s.resume(),s.on("end",()=>{t.destroy()})});t.on("error",()=>{}),t.end()}});var f=u(require("path")),a=require(f.join(__dirname,"../hianalytics/ha.min.js"));a.setOnReportUrl(process.env.ASCF_REPORT_URL);a.setIdsite(process.env.ASCF_IDSITE);a.setBatchSend({timeout:7e3,interval:!1,maxLength:10});process.on("message",e=>{e.type==="collect"&&a.sendData(e.eventName,e.category,e.params,null,null),e.type==="flush"&&setImmediate(()=>{a.batchSendNow(),setTimeout(()=>{process.send?.({type:"flushed"}),process.exit(0)},5e3)})});
@@ -83,6 +83,45 @@
83
83
  "default": "requiredComponents",
84
84
  "description": "按需注入和用时注入配置",
85
85
  "markdownDescription": "按需注入和用时注入配置"
86
+ },
87
+ "agent": {
88
+ "type": "object",
89
+ "description": "AI 能力配置",
90
+ "markdownDescription": "AI 能力配置",
91
+ "properties": {
92
+ "skills": {
93
+ "type": "array",
94
+ "description": "AI skill 列表",
95
+ "markdownDescription": "AI skill 列表",
96
+ "items": {
97
+ "type": "object",
98
+ "properties": {
99
+ "name": {
100
+ "type": "string",
101
+ "description": "skill名称,必须与skill分包目录名一致",
102
+ "markdownDescription": "skill名称,必须与skill分包目录名一致"
103
+ },
104
+ "description": {
105
+ "type": "string",
106
+ "description": "skill简要说明",
107
+ "markdownDescription": "skill简要说明"
108
+ },
109
+ "path": {
110
+ "type": "string",
111
+ "description": "skill分包路径",
112
+ "markdownDescription": "skill分包路径"
113
+ }
114
+ },
115
+ "required": ["name", "description", "path"]
116
+ }
117
+ },
118
+ "pageMetadata": {
119
+ "type": "string",
120
+ "description": "页面元数据配置文件路径",
121
+ "markdownDescription": "页面元数据配置文件路径"
122
+ }
123
+ },
124
+ "required": ["skills"]
86
125
  }
87
126
  },
88
127
  "required": [
@@ -15,15 +15,15 @@
15
15
  },
16
16
  "swc": {
17
17
  "type": "boolean",
18
- "description": "默认使用babel编译,开启后使用swc编译,提升编译构建性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
19
- "markdownDescription": "默认使用babel编译,开启后使用swc编译,提升编译构建性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
20
- "default": false
18
+ "description": "默认使用swc编译,开启后使用swc编译,提升编译构建性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
19
+ "markdownDescription": "默认使用swc编译,开启后使用swc编译,提升编译构建性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
20
+ "default": true
21
21
  },
22
22
  "templateHoist": {
23
23
  "type": "boolean",
24
24
  "description": "类Taro框架(采用了base.hxml模板技术)情况下设置为true,可减少重复的编译代码,减少包体积。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
25
25
  "markdownDescription": "类Taro框架(采用了base.hxml模板技术)情况下设置为true,可减少重复的编译代码,减少包体积。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
26
- "default": false
26
+ "default": true
27
27
  },
28
28
  "disableSubpackages": {
29
29
  "type": "boolean",
@@ -119,6 +119,11 @@
119
119
  "$ref": "#/definitions/ILaunchOptions",
120
120
  "description": "元服务启动参数。仅ascf.private.config.json配置有效\n\n依赖关系:ASCF Toolkit版本≥1.0.17\n\n详见:[启动参数](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/develop-want-parameter-parsing#%E8%A7%A3%E6%9E%90%E5%8F%82%E6%95%B0)",
121
121
  "markdownDescription": "元服务启动参数。仅ascf.private.config.json配置有效\n\n依赖关系:ASCF Toolkit版本≥1.0.17\n\n详见:[启动参数](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/develop-want-parameter-parsing#%E8%A7%A3%E6%9E%90%E5%8F%82%E6%95%B0)"
122
+ },
123
+ "disableReportLog": {
124
+ "type": "boolean",
125
+ "description": "禁用元服务打点上报能力",
126
+ "markdownDescription": "禁用元服务打点上报能力"
122
127
  }
123
128
  }
124
129
  },
@@ -6,6 +6,6 @@
6
6
  "author": "",
7
7
  "license": "",
8
8
  "dependencies": {
9
- "@atomicservice/ascfapi": "^1.0.6"
9
+ "@atomicservice/ascfapi": "^2.0.0"
10
10
  }
11
11
  }
@@ -2,7 +2,7 @@
2
2
  "name": "taro4-mp",
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
- "description": "小程序demo",
5
+ "description": "ascf taro demo",
6
6
  "templateInfo": {
7
7
  "name": "default",
8
8
  "typescript": true,
@@ -2,7 +2,7 @@
2
2
  "name": "unibest",
3
3
  "type": "commonjs",
4
4
  "version": "1.5.0",
5
- "description": "unibest - 最好的 uniapp 开发模板",
5
+ "description": "ascf uniapp demo",
6
6
  "author": "ascf",
7
7
  "license": "MIT",
8
8
  "repository": "https://github.com/feige996/unibest",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomicservice/ascf-base",
3
- "version": "1.0.17",
3
+ "version": "1.0.18-beta.1",
4
4
  "author": "atomicservice",
5
5
  "description": "ascf base",
6
6
  "files": [
@@ -26,16 +26,15 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "jimp": "1.6.0",
29
- "body-parser": "2.2.2",
30
- "cachedir": "2.4.0",
31
- "tar": "7.5.6",
29
+ "body-parser": "2.3.0",
30
+ "tar": "7.5.22",
32
31
  "express": "4.21.0",
33
32
  "json5": "2.2.3",
34
- "log4js": "6.9.1",
33
+ "winston": "3.14.2",
35
34
  "ejs": "3.1.10",
36
- "semver": "7.5.4",
37
- "ws": "8.18.3",
38
- "adm-zip": "v0.5.16"
35
+ "semver": "7.7.2",
36
+ "ws": "8.21.3",
37
+ "adm-zip": "v0.6.0"
39
38
  },
40
39
  "scripts": {
41
40
  "dev": "tsup --sourcemap --no-minify --dts",
@@ -1,11 +0,0 @@
1
- {
2
- "app": {
3
- "bundleName": "com.atomicservice.5765880207854768701",
4
- "bundleType": "atomicService",
5
- "vendor": "example",
6
- "versionCode": 1000000,
7
- "versionName": "1.0.0",
8
- "icon": "$media:app_icon",
9
- "label": "$string:app_name"
10
- }
11
- }
@@ -1,8 +0,0 @@
1
- {
2
- "string": [
3
- {
4
- "name": "app_name",
5
- "value": "taro4_hello"
6
- }
7
- ]
8
- }
@@ -1,55 +0,0 @@
1
- {
2
- "app": {
3
- "signingConfigs": [
4
- {
5
- "name": "default",
6
- "type": "HarmonyOS",
7
- "material": {
8
- "certpath": "D:/private/radui-debug.cer",
9
- "storePassword": "000000203D7B73811B368AA025EC6F66D859443BFD3B922C0F390C7341906909EF787465F7C9933410426965A286165A",
10
- "keyAlias": "radui",
11
- "keyPassword": "0000002039A616255C88588DA7828AD837A29239D80F921E29914E0CD671AD8F8E130115B454609E01661168EB2E60B7",
12
- "profile": "D:/private/radui-debugDebug.p7b",
13
- "signAlg": "SHA256withECDSA",
14
- "storeFile": "D:/private/radui.p12"
15
- }
16
- }
17
- ],
18
- "products": [
19
- {
20
- "name": "default",
21
- "signingConfig": "default",
22
- "compatibleSdkVersion": "5.0.0(12)",
23
- "runtimeOS": "HarmonyOS",
24
- "buildOption": {
25
- "strictMode": {
26
- "caseSensitiveCheck": true,
27
- "useNormalizedOHMUrl": true
28
- }
29
- }
30
- }
31
- ],
32
- "buildModeSet": [
33
- {
34
- "name": "debug"
35
- },
36
- {
37
- "name": "release"
38
- }
39
- ]
40
- },
41
- "modules": [
42
- {
43
- "name": "entry",
44
- "srcPath": "./entry",
45
- "targets": [
46
- {
47
- "name": "default",
48
- "applyToProducts": [
49
- "default"
50
- ]
51
- }
52
- ]
53
- }
54
- ]
55
- }
@@ -1,20 +0,0 @@
1
- {
2
- "files": [
3
- "**/*.ets"
4
- ],
5
- "ignore": [
6
- "**/src/ohosTest/**/*",
7
- "**/src/test/**/*",
8
- "**/src/mock/**/*",
9
- "**/node_modules/**/*",
10
- "**/oh_modules/**/*",
11
- "**/build/**/*",
12
- "**/.preview/**/*"
13
- ],
14
- "ruleSet": [
15
- "plugin:@performance/recommended",
16
- "plugin:@typescript-eslint/recommended"
17
- ],
18
- "rules": {
19
- }
20
- }
@@ -1,28 +0,0 @@
1
- {
2
- "apiType": "stageMode",
3
- "buildOption": {
4
- },
5
- "buildOptionSet": [
6
- {
7
- "name": "release",
8
- "arkOptions": {
9
- "obfuscation": {
10
- "ruleOptions": {
11
- "enable": false,
12
- "files": [
13
- "./obfuscation-rules.txt"
14
- ]
15
- }
16
- }
17
- }
18
- }
19
- ],
20
- "targets": [
21
- {
22
- "name": "default"
23
- },
24
- {
25
- "name": "ohosTest"
26
- }
27
- ]
28
- }
@@ -1,6 +0,0 @@
1
- import { hapTasks } from '@ohos/hvigor-ohos-plugin';
2
-
3
- export default {
4
- system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
5
- plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
6
- }
@@ -1,23 +0,0 @@
1
- # Define project specific obfuscation rules here.
2
- # You can include the obfuscation configuration files in the current module's build-profile.json5.
3
- #
4
- # For more details, see
5
- # https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
6
-
7
- # Obfuscation options:
8
- # -disable-obfuscation: disable all obfuscations
9
- # -enable-property-obfuscation: obfuscate the property names
10
- # -enable-toplevel-obfuscation: obfuscate the names in the global scope
11
- # -compact: remove unnecessary blank spaces and all line feeds
12
- # -remove-log: remove all console.* statements
13
- # -print-namecache: print the name cache that contains the mapping from the old names to new names
14
- # -apply-namecache: reuse the given cache file
15
-
16
- # Keep options:
17
- # -keep-property-name: specifies property names that you want to keep
18
- # -keep-global-name: specifies names that you want to keep in the global scope
19
-
20
- -enable-property-obfuscation
21
- -enable-toplevel-obfuscation
22
- -enable-filename-obfuscation
23
- -enable-export-obfuscation
@@ -1,21 +0,0 @@
1
- {
2
- "meta": {
3
- "stableOrder": true,
4
- "enableUnifiedLockfile": false
5
- },
6
- "lockfileVersion": 3,
7
- "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
8
- "specifiers": {
9
- "@atomicservice/ascfapi@^1.0.6": "@atomicservice/ascfapi@1.0.12"
10
- },
11
- "packages": {
12
- "@atomicservice/ascfapi@1.0.12": {
13
- "name": "@atomicservice/ascfapi",
14
- "version": "1.0.12",
15
- "integrity": "sha512-WyX08YA5L+oZLb8GmVAZs5K6EnJuRbOXOA4hjz6r4A79RWlNVhcswG7mSIEyvAFhfYDgmr0gDu0FSQkESsCGxg==",
16
- "resolved": "https://cmc.centralrepo.rnd.huawei.com/artifactory/api/ohpm/product_ohpm/@atomicservice/ascfapi/-/@atomicservice/ascfapi-1.0.12.har",
17
- "registryType": "ohpm",
18
- "packageType": "InterfaceHar"
19
- }
20
- }
21
- }
@@ -1,11 +0,0 @@
1
- {
2
- "name": "entry",
3
- "version": "1.0.0",
4
- "description": "Please describe the basic information.",
5
- "main": "",
6
- "author": "",
7
- "license": "",
8
- "dependencies": {
9
- "@atomicservice/ascfapi": "^1.0.6"
10
- }
11
- }
@@ -1,7 +0,0 @@
1
- import { AscfAbilityStage } from '@atomicservice/ascfapi';
2
-
3
- export default class MyAbilityStage extends AscfAbilityStage {
4
- onCreate() {
5
- super.onCreate()
6
- }
7
- }
@@ -1,4 +0,0 @@
1
- import { AscfUIAbility } from '@atomicservice/ascfapi';
2
-
3
- export default class EntryAbility extends AscfUIAbility {
4
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Note: DO NOT delete this page file.
3
- */
4
-
5
- @Entry
6
- @Component
7
- struct Index {
8
- build() {
9
- }
10
- }
@@ -1,65 +0,0 @@
1
- {
2
- "module": {
3
- "name": "entry",
4
- "type": "entry",
5
- "description": "$string:module_desc",
6
- "mainElement": "EntryAbility",
7
- "deviceTypes": ["phone","tablet"],
8
- "deliveryWithInstall": true,
9
- "installationFree": true,
10
- "pages": "$profile:main_pages",
11
- "abilities": [
12
- {
13
- "name": "EntryAbility",
14
- "srcEntry": "./ets/entryability/EntryAbility.ets",
15
- "description": "$string:EntryAbility_desc",
16
- "icon": "$media:app_icon",
17
- "label": "$string:EntryAbility_label",
18
- "startWindowIcon": "$media:startIcon",
19
- "startWindowBackground": "$color:start_window_background",
20
- "exported": true,
21
- "skills": [
22
- {
23
- "entities": [
24
- "entity.system.home"
25
- ],
26
- "actions": [
27
- "action.system.home"
28
- ]
29
- }
30
- ]
31
- }
32
- ],
33
- "srcEntry": "./ets/abilitystage/AbilityStage.ets",
34
- "dependencies": [
35
- {
36
- "bundleName": "com.huawei.hms.ascfruntime",
37
- "moduleName": "ascf",
38
- "versionCode": 10006300
39
- }
40
- ],
41
- "requestPermissions": [
42
- {
43
- "name": "ohos.permission.INTERNET",
44
- "usedScene": {
45
- "abilities": [
46
- "EntryAbility"
47
- ],
48
- "when": "always"
49
- }
50
- },
51
- {
52
- "name": "ohos.permission.GET_NETWORK_INFO",
53
- "usedScene": {
54
- "abilities": [
55
- "EntryAbility"
56
- ],
57
- "when": "always"
58
- }
59
- },
60
- {
61
- "name": "ohos.permission.VIBRATE"
62
- }
63
- ]
64
- }
65
- }
@@ -1,8 +0,0 @@
1
- {
2
- "color": [
3
- {
4
- "name": "start_window_background",
5
- "value": "#FFFFFF"
6
- }
7
- ]
8
- }
@@ -1,16 +0,0 @@
1
- {
2
- "string": [
3
- {
4
- "name": "module_desc",
5
- "value": "taro4_hello"
6
- },
7
- {
8
- "name": "EntryAbility_desc",
9
- "value": "taro4_hello"
10
- },
11
- {
12
- "name": "EntryAbility_label",
13
- "value": "taro4_hello"
14
- }
15
- ]
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "string": [
3
- {
4
- "name": "module_desc",
5
- "value": "taro4_hello"
6
- },
7
- {
8
- "name": "EntryAbility_desc",
9
- "value": "taro4_hello"
10
- },
11
- {
12
- "name": "EntryAbility_label",
13
- "value": "taro4_hello"
14
- }
15
- ]
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "string": [
3
- {
4
- "name": "module_desc",
5
- "value": "taro4_hello"
6
- },
7
- {
8
- "name": "EntryAbility_desc",
9
- "value": "taro4_hello"
10
- },
11
- {
12
- "name": "EntryAbility_label",
13
- "value": "taro4_hello"
14
- }
15
- ]
16
- }
@@ -1,35 +0,0 @@
1
- import { hilog } from '@kit.PerformanceAnalysisKit';
2
- import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
3
-
4
- export default function abilityTest() {
5
- describe('ActsAbilityTest', () => {
6
- // Defines a test suite. Two parameters are supported: test suite name and test suite function.
7
- beforeAll(() => {
8
- // Presets an action, which is performed only once before all test cases of the test suite start.
9
- // This API supports only one parameter: preset action function.
10
- })
11
- beforeEach(() => {
12
- // Presets an action, which is performed before each unit test case starts.
13
- // The number of execution times is the same as the number of test cases defined by **it**.
14
- // This API supports only one parameter: preset action function.
15
- })
16
- afterEach(() => {
17
- // Presets a clear action, which is performed after each unit test case ends.
18
- // The number of execution times is the same as the number of test cases defined by **it**.
19
- // This API supports only one parameter: clear action function.
20
- })
21
- afterAll(() => {
22
- // Presets a clear action, which is performed after all test cases of the test suite end.
23
- // This API supports only one parameter: clear action function.
24
- })
25
- it('assertContain', 0, () => {
26
- // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
27
- hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
28
- let a = 'abc';
29
- let b = 'b';
30
- // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
31
- expect(a).assertContain(b);
32
- expect(a).assertEqual(a);
33
- })
34
- })
35
- }
@@ -1,5 +0,0 @@
1
- import abilityTest from './Ability.test';
2
-
3
- export default function testsuite() {
4
- abilityTest();
5
- }
@@ -1,12 +0,0 @@
1
- {
2
- "module": {
3
- "name": "entry_test",
4
- "type": "feature",
5
- "deviceTypes": [
6
- "phone",
7
- "tablet"
8
- ],
9
- "deliveryWithInstall": true,
10
- "installationFree": true
11
- }
12
- }
@@ -1,5 +0,0 @@
1
- import localUnitTest from './LocalUnit.test';
2
-
3
- export default function testsuite() {
4
- localUnitTest();
5
- }
@@ -1,33 +0,0 @@
1
- import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
2
-
3
- export default function localUnitTest() {
4
- describe('localUnitTest', () => {
5
- // Defines a test suite. Two parameters are supported: test suite name and test suite function.
6
- beforeAll(() => {
7
- // Presets an action, which is performed only once before all test cases of the test suite start.
8
- // This API supports only one parameter: preset action function.
9
- });
10
- beforeEach(() => {
11
- // Presets an action, which is performed before each unit test case starts.
12
- // The number of execution times is the same as the number of test cases defined by **it**.
13
- // This API supports only one parameter: preset action function.
14
- });
15
- afterEach(() => {
16
- // Presets a clear action, which is performed after each unit test case ends.
17
- // The number of execution times is the same as the number of test cases defined by **it**.
18
- // This API supports only one parameter: clear action function.
19
- });
20
- afterAll(() => {
21
- // Presets a clear action, which is performed after all test cases of the test suite end.
22
- // This API supports only one parameter: clear action function.
23
- });
24
- it('assertContain', 0, () => {
25
- // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
26
- let a = 'abc';
27
- let b = 'b';
28
- // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
29
- expect(a).assertContain(b);
30
- expect(a).assertEqual(a);
31
- });
32
- });
33
- }
@@ -1,23 +0,0 @@
1
- {
2
- "modelVersion": "5.0.0",
3
- "dependencies": {
4
- "@atomicservice/ascf-toolkit-hvigor-plugin": "~1.0.6-alpha.0 || ~1.0.6-beta.0 || ~1.0.6"
5
- },
6
- "execution": {
7
- // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */
8
- // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */
9
- // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */
10
- // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */
11
- // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */
12
- },
13
- "logging": {
14
- // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
15
- },
16
- "debugging": {
17
- // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
18
- },
19
- "nodeOptions": {
20
- // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/
21
- // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/
22
- }
23
- }
@@ -1,10 +0,0 @@
1
- import { appTasks } from '@ohos/hvigor-ohos-plugin';
2
- import ascfPlugin, { signByBuildModePlugin } from '@atomicservice/ascf-toolkit-hvigor-plugin';
3
-
4
- export default {
5
- system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
6
- plugins:[
7
- ascfPlugin(),
8
- signByBuildModePlugin('default', 'release') // need build-profile.json5 配置 signingConfigs 调试和发布的签名
9
- ]
10
- }