@deveco-test/deveco-cli-openharmony-arm64 0.1.2
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.
- package/LICENSE +21 -0
- package/README.md +837 -0
- package/SKILL.md +186 -0
- package/THIRD-PARTY-LICENSES +5566 -0
- package/dist/cli.js +1422 -0
- package/dist/internal/doc-init-background.js +66 -0
- package/docs.zip +4 -0
- package/index.zip +0 -0
- package/package.json +108 -0
- package/scripts/install-better-sqlite3.mjs +51 -0
- package/scripts/install-jieba-wasm.mjs +47 -0
- package/scripts/lib/better-sqlite3-vendor.mjs +128 -0
- package/scripts/lib/cli-data-dir.mjs +44 -0
- package/scripts/lib/doc-init-log-path.mjs +15 -0
- package/scripts/lib/jieba-wasm-vendor.mjs +102 -0
- package/scripts/postinstall.mjs +64 -0
- package/src/resources/aclPermission/aclPermissionsInfo.json +311 -0
- package/templates/application/AppScope/app.json5 +10 -0
- package/templates/application/AppScope/resources/base/element/string.json +8 -0
- package/templates/application/AppScope/resources/base/media/layered_image.json +7 -0
- package/templates/application/build-profile.json5 +42 -0
- package/templates/application/code-linter.json5 +32 -0
- package/templates/application/entry/build-profile.json5 +33 -0
- package/templates/application/entry/gitignore.txt +6 -0
- package/templates/application/entry/hvigorfile.ts +7 -0
- package/templates/application/entry/obfuscation-rules.txt +20 -0
- package/templates/application/entry/oh-package.json5 +10 -0
- package/templates/application/entry/src/main/ets/entryability/EntryAbility.ets +63 -0
- package/templates/application/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +31 -0
- package/templates/application/entry/src/main/ets/pages/Index.ets +38 -0
- package/templates/application/entry/src/main/module.json5 +50 -0
- package/templates/application/entry/src/main/resources/base/element/color.json +8 -0
- package/templates/application/entry/src/main/resources/base/element/float.json +8 -0
- package/templates/application/entry/src/main/resources/base/element/string.json +16 -0
- package/templates/application/entry/src/main/resources/base/media/layered_image.json +7 -0
- package/templates/application/entry/src/main/resources/base/profile/backup_config.json +3 -0
- package/templates/application/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/templates/application/entry/src/main/resources/dark/element/color.json +8 -0
- package/templates/application/gitignore.txt +12 -0
- package/templates/application/hvigor/hvigor-config.json5 +23 -0
- package/templates/application/hvigorfile.ts +7 -0
- package/templates/application/oh-package.json5 +10 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Huawei Device Co., Ltd.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { dirname, join } from 'path';
|
|
7
|
+
import { existsSync } from 'fs';
|
|
8
|
+
import { spawnSync } from 'child_process';
|
|
9
|
+
import { fileURLToPath } from 'url';
|
|
10
|
+
import { packageRoot } from './better-sqlite3-vendor.mjs';
|
|
11
|
+
|
|
12
|
+
const JIEBA_WASM_VERSION = '2.0.1';
|
|
13
|
+
|
|
14
|
+
function resolveNpmCliPath() {
|
|
15
|
+
const nodeDir = dirname(process.execPath);
|
|
16
|
+
const candidates = [
|
|
17
|
+
join(nodeDir, 'node_modules', 'npm', 'bin', 'npm-cli.js'),
|
|
18
|
+
join(nodeDir, '..', 'lib', 'node_modules', 'npm', 'bin', 'npm-cli.js'),
|
|
19
|
+
];
|
|
20
|
+
return candidates.find((candidate) => existsSync(candidate)) ?? null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function quoteWindowsCmdArg(arg) {
|
|
24
|
+
return /\s/.test(arg) ? `"${arg.replace(/"/g, '\\"')}"` : arg;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function spawnDetail(result) {
|
|
28
|
+
return [result.stderr, result.stdout, result.error?.message]
|
|
29
|
+
.filter(Boolean)
|
|
30
|
+
.join('\n')
|
|
31
|
+
.trim();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function runNpmInstallJiebaWasm(targetVersion) {
|
|
35
|
+
const args = [
|
|
36
|
+
'install',
|
|
37
|
+
`@node-rs/jieba-wasm32-wasi@${targetVersion}`,
|
|
38
|
+
'--no-save',
|
|
39
|
+
'--cpu=wasm32',
|
|
40
|
+
];
|
|
41
|
+
const npmCli = resolveNpmCliPath();
|
|
42
|
+
if (npmCli) {
|
|
43
|
+
return spawnSync(process.execPath, [npmCli, ...args], {
|
|
44
|
+
cwd: packageRoot,
|
|
45
|
+
stdio: 'pipe',
|
|
46
|
+
encoding: 'utf-8',
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (process.platform === 'win32') {
|
|
50
|
+
const command = ['npm', ...args].map(quoteWindowsCmdArg).join(' ');
|
|
51
|
+
return spawnSync(command, {
|
|
52
|
+
cwd: packageRoot,
|
|
53
|
+
stdio: 'pipe',
|
|
54
|
+
encoding: 'utf-8',
|
|
55
|
+
shell: true,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return spawnSync('npm', args, {
|
|
59
|
+
cwd: packageRoot,
|
|
60
|
+
stdio: 'pipe',
|
|
61
|
+
encoding: 'utf-8',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export async function installJiebaWasmViaNpm(targetVersion = JIEBA_WASM_VERSION) {
|
|
66
|
+
try {
|
|
67
|
+
await import('@node-rs/jieba-wasm32-wasi');
|
|
68
|
+
return { ok: true, skipped: true, reason: 'already-installed' };
|
|
69
|
+
} catch {
|
|
70
|
+
// continue — try native or install wasm
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
await import('@node-rs/jieba');
|
|
75
|
+
return { ok: true, skipped: true, reason: 'native-available' };
|
|
76
|
+
} catch {
|
|
77
|
+
// continue — install wasm fallback
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const result = runNpmInstallJiebaWasm(targetVersion);
|
|
81
|
+
if (result.status !== 0) {
|
|
82
|
+
return {
|
|
83
|
+
ok: false,
|
|
84
|
+
reason: 'npm-install-failed',
|
|
85
|
+
version: targetVersion,
|
|
86
|
+
error: spawnDetail(result) || `exit ${result.status ?? 'null'}`,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
await import('@node-rs/jieba-wasm32-wasi');
|
|
92
|
+
} catch {
|
|
93
|
+
return {
|
|
94
|
+
ok: false,
|
|
95
|
+
reason: 'load-failed',
|
|
96
|
+
version: targetVersion,
|
|
97
|
+
error:
|
|
98
|
+
'npm install finished but @node-rs/jieba-wasm32-wasi still cannot be imported',
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return { ok: true, version: targetVersion, method: 'npm' };
|
|
102
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Huawei Device Co., Ltd.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { spawn } from 'child_process';
|
|
7
|
+
import { chmodSync, existsSync, mkdirSync } from 'fs';
|
|
8
|
+
import { platform } from 'os';
|
|
9
|
+
import { dirname, join } from 'path';
|
|
10
|
+
import { fileURLToPath } from 'url';
|
|
11
|
+
import { ensureBetterSqlite3ForDocs } from './install-better-sqlite3.mjs';
|
|
12
|
+
import { ensureJiebaWasmForDocs } from './install-jieba-wasm.mjs';
|
|
13
|
+
import { getDocInitLogPath } from './lib/doc-init-log-path.mjs';
|
|
14
|
+
|
|
15
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
16
|
+
const logPath = getDocInitLogPath();
|
|
17
|
+
mkdirSync(dirname(logPath), { recursive: true });
|
|
18
|
+
|
|
19
|
+
// On OpenHarmony's /storage/ overlayfs, npm's bin-link chmod may not persist,
|
|
20
|
+
// causing "zsh: permission denied" when running `devecocli`.
|
|
21
|
+
if (platform().toLowerCase().includes('openharmony')) {
|
|
22
|
+
const cliEntry = join(root, 'dist', 'cli.js');
|
|
23
|
+
if (existsSync(cliEntry)) {
|
|
24
|
+
try {
|
|
25
|
+
chmodSync(cliEntry, 0o755);
|
|
26
|
+
} catch {
|
|
27
|
+
/* filesystem does not support chmod */
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const nativeResult = await ensureBetterSqlite3ForDocs();
|
|
33
|
+
if (!nativeResult.ok && !nativeResult.skipped) {
|
|
34
|
+
console.warn(
|
|
35
|
+
`[deveco-cli] better-sqlite3 install via npm failed; docs search will use sqlite-wasm fallback.\n` +
|
|
36
|
+
`${nativeResult.error ?? ''}\n`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const jiebaResult = await ensureJiebaWasmForDocs();
|
|
41
|
+
if (!jiebaResult.ok && !jiebaResult.skipped) {
|
|
42
|
+
console.warn(
|
|
43
|
+
`[deveco-cli] jieba wasm install via npm failed; docs search may fail on this machine.\n` +
|
|
44
|
+
`${jiebaResult.error ?? ''}\n`
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const initScript = join(root, 'dist', 'internal', 'doc-init-background.js');
|
|
48
|
+
|
|
49
|
+
if (!existsSync(initScript)) {
|
|
50
|
+
process.exit(0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const child = spawn(process.execPath, [initScript], {
|
|
54
|
+
detached: true,
|
|
55
|
+
stdio: ['ignore', 'ignore', 'ignore'],
|
|
56
|
+
env: {
|
|
57
|
+
...process.env,
|
|
58
|
+
DEVECO_CLI_SKIP_VERSION_CHECK: '1',
|
|
59
|
+
DEVECO_CLI_POSTINSTALL: '1',
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
child.unref();
|
|
64
|
+
process.exit(0);
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"permissionName": "ohos.permission.SYSTEM_FLOAT_WINDOW",
|
|
4
|
+
"permissionDisplayName": "SYSTEM_FLOAT_WINDOW",
|
|
5
|
+
"permissionHelpUrlKey": "acl.system.float.window.instead.url",
|
|
6
|
+
"permissionInsteadName": "acl.SYSTEM_FLOAT_WINDOW.instead.name",
|
|
7
|
+
"minSupportApiLevel": "9"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"permissionName": "ohos.permission.READ_CONTACTS",
|
|
11
|
+
"permissionDisplayName": "READ_CONTACTS",
|
|
12
|
+
"permissionHelpUrlKey": "acl.read.contacts.instead.url",
|
|
13
|
+
"permissionInsteadName": "acl.READ_CONTACTS.instead.name",
|
|
14
|
+
"minSupportApiLevel": "8"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"permissionName": "ohos.permission.WRITE_CONTACTS",
|
|
18
|
+
"permissionDisplayName": "WRITE_CONTACTS",
|
|
19
|
+
"minSupportApiLevel": "8"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"permissionName": "ohos.permission.READ_IMAGEVIDEO",
|
|
23
|
+
"permissionDisplayName": "READ_IMAGEVIDEO",
|
|
24
|
+
"permissionHelpUrlKey": "acl.read.image.video.instead.url",
|
|
25
|
+
"permissionInsteadName": "acl.READ_IMAGEVIDEO.instead.name",
|
|
26
|
+
"minSupportApiLevel": "9"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"permissionName": "ohos.permission.WRITE_IMAGEVIDEO",
|
|
30
|
+
"permissionDisplayName": "WRITE_IMAGEVIDEO",
|
|
31
|
+
"permissionHelpUrlKey": "acl.write.image.video.instead.url",
|
|
32
|
+
"permissionInsteadName": "acl.WRITE_IMAGEVIDEO.instead.name",
|
|
33
|
+
"minSupportApiLevel": "9"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"permissionName": "ohos.permission.READ_AUDIO",
|
|
37
|
+
"permissionDisplayName": "READ_AUDIO",
|
|
38
|
+
"permissionHelpUrlKey": "acl.read.audio.instead.url",
|
|
39
|
+
"permissionInsteadName": "acl.READ_AUDIO.instead.name",
|
|
40
|
+
"minSupportApiLevel": "9"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"permissionName": "ohos.permission.WRITE_AUDIO",
|
|
44
|
+
"permissionDisplayName": "WRITE_AUDIO",
|
|
45
|
+
"permissionHelpUrlKey": "acl.write.audio.instead.url",
|
|
46
|
+
"permissionInsteadName": "acl.WRITE_AUDIO.instead.name",
|
|
47
|
+
"minSupportApiLevel": "9"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"permissionName": "ohos.permission.READ_PASTEBOARD",
|
|
51
|
+
"permissionDisplayName": "READ_PASTEBOARD",
|
|
52
|
+
"permissionHelpUrlKey": "acl.read.pasteboard.instead.url",
|
|
53
|
+
"permissionInsteadName": "acl.READ_PASTEBOARD.instead.name",
|
|
54
|
+
"minSupportApiLevel": "11"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"permissionName": "ohos.permission.ACCESS_DDK_USB",
|
|
58
|
+
"permissionDisplayName": "ACCESS_DDK_USB",
|
|
59
|
+
"minSupportApiLevel": "11"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"permissionName": "ohos.permission.ACCESS_DDK_HID",
|
|
63
|
+
"permissionDisplayName": "ACCESS_DDK_HID",
|
|
64
|
+
"minSupportApiLevel": "11"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"permissionName": "ohos.permission.FILE_ACCESS_PERSIST",
|
|
68
|
+
"permissionDisplayName": "FILE_ACCESS_PERSIST",
|
|
69
|
+
"minSupportApiLevel": "11"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"permissionName": "ohos.permission.READ_WRITE_DOWNLOAD_DIRECTORY",
|
|
73
|
+
"permissionDisplayName": "READ_WRITE_DOWNLOAD_DIRECTORY",
|
|
74
|
+
"minSupportApiLevel": "11"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"permissionName": "ohos.permission.READ_WRITE_DESKTOP_DIRECTORY",
|
|
78
|
+
"permissionDisplayName": "READ_WRITE_DESKTOP_DIRECTORY",
|
|
79
|
+
"minSupportApiLevel": "11"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"permissionName": "ohos.permission.READ_WRITE_DOCUMENTS_DIRECTORY",
|
|
83
|
+
"permissionDisplayName": "READ_WRITE_DOCUMENTS_DIRECTORY",
|
|
84
|
+
"minSupportApiLevel": "11"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"permissionName": "ohos.permission.INPUT_MONITORING",
|
|
88
|
+
"permissionDisplayName": "INPUT_MONITORING",
|
|
89
|
+
"minSupportApiLevel": "12"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"permissionName": "ohos.permission.INTERCEPT_INPUT_EVENT",
|
|
93
|
+
"permissionDisplayName": "INTERCEPT_INPUT_EVENT",
|
|
94
|
+
"minSupportApiLevel": "12"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"permissionName": "ohos.permission.SHORT_TERM_WRITE_IMAGEVIDEO",
|
|
98
|
+
"permissionDisplayName": "SHORT_TERM_WRITE_IMAGEVIDEO",
|
|
99
|
+
"minSupportApiLevel": "12"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"permissionName": "ohos.permission.kernel.ALLOW_WRITABLE_CODE_MEMORY",
|
|
103
|
+
"permissionDisplayName": "ALLOW_WRITABLE_CODE_MEMORY",
|
|
104
|
+
"minSupportApiLevel": "14"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"permissionName": "ohos.permission.kernel.DISABLE_CODE_MEMORY_PROTECTION",
|
|
108
|
+
"permissionDisplayName": "DISABLE_CODE_MEMORY_PROTECTION",
|
|
109
|
+
"minSupportApiLevel": "14"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"permissionName": "ohos.permission.kernel.ALLOW_EXECUTABLE_FORT_MEMORY",
|
|
113
|
+
"permissionDisplayName": "ALLOW_EXECUTABLE_FORT_MEMORY",
|
|
114
|
+
"minSupportApiLevel": "14"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"permissionName": "ohos.permission.GET_WIFI_PEERS_MAC",
|
|
118
|
+
"permissionDisplayName": "GET_WIFI_PEERS_MAC",
|
|
119
|
+
"minSupportApiLevel": "8"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"permissionName": "ohos.permission.MANAGE_PASTEBOARD_APP_SHARE_OPTION",
|
|
123
|
+
"permissionDisplayName": "MANAGE_PASTEBOARD_APP_SHARE_OPTION",
|
|
124
|
+
"minSupportApiLevel": "14"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"permissionName": "ohos.permission.MANAGE_UDMF_APP_SHARE_OPTION",
|
|
128
|
+
"permissionDisplayName": "MANAGE_UDMF_APP_SHARE_OPTION",
|
|
129
|
+
"minSupportApiLevel": "14"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"permissionName": "ohos.permission.READ_WRITE_USER_FILE",
|
|
133
|
+
"permissionDisplayName": "READ_WRITE_USER_FILE",
|
|
134
|
+
"minSupportApiLevel": "13"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"permissionName": "ohos.permission.READ_WRITE_USB_DEV",
|
|
138
|
+
"permissionDisplayName": "READ_WRITE_USB_DEV",
|
|
139
|
+
"minSupportApiLevel": "13"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"permissionName": "ohos.permission.USE_FRAUD_CALL_LOG_PICKER",
|
|
143
|
+
"permissionDisplayName": "USE_FRAUD_CALL_LOG_PICKER",
|
|
144
|
+
"minSupportApiLevel": "15"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"permissionName": "ohos.permission.USE_FRAUD_MESSAGES_PICKER",
|
|
148
|
+
"permissionDisplayName": "USE_FRAUD_MESSAGES_PICKER",
|
|
149
|
+
"minSupportApiLevel": "15"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"permissionName": "ohos.permission.ACCESS_DISK_PHY_INFO",
|
|
153
|
+
"permissionDisplayName": "ACCESS_DISK_PHY_INFO",
|
|
154
|
+
"minSupportApiLevel": "15"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"permissionName": "ohos.permission.SET_PAC_URL",
|
|
158
|
+
"permissionDisplayName": "SET_PAC_URL",
|
|
159
|
+
"minSupportApiLevel": "15"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"permissionName": "ohos.permission.PERSONAL_MANAGE_RESTRICTIONS",
|
|
163
|
+
"permissionDisplayName": "PERSONAL_MANAGE_RESTRICTIONS",
|
|
164
|
+
"minSupportApiLevel": "15"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"permissionName": "ohos.permission.START_PROVISIONING_MESSAGE",
|
|
168
|
+
"permissionDisplayName": "START_PROVISIONING_MESSAGE",
|
|
169
|
+
"minSupportApiLevel": "15"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"permissionName": "ohos.permission.PRELOAD_FILE",
|
|
173
|
+
"permissionDisplayName": "PRELOAD_FILE",
|
|
174
|
+
"minSupportApiLevel": "15"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"permissionName": "ohos.permission.ACCESS_VIRTUAL_SCREEN",
|
|
178
|
+
"permissionDisplayName": "ACCESS_VIRTUAL_SCREEN",
|
|
179
|
+
"minSupportApiLevel": "16"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"permissionName": "ohos.permission.PERSISTENT_BLUETOOTH_PEERS_MAC",
|
|
183
|
+
"permissionDisplayName": "PERSISTENT_BLUETOOTH_PEERS_MAC",
|
|
184
|
+
"minSupportApiLevel": "16"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"permissionName": "ohos.permission.ACCESS_DDK_USB_SERIAL",
|
|
188
|
+
"permissionDisplayName": "ACCESS_DDK_USB_SERIAL",
|
|
189
|
+
"minSupportApiLevel": "18"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"permissionName": "ohos.permission.ACCESS_DDK_SCSI_PERIPHERAL",
|
|
193
|
+
"permissionDisplayName": "ACCESS_DDK_SCSI_PERIPHERAL",
|
|
194
|
+
"minSupportApiLevel": "18"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"permissionName": "ohos.permission.USE_FRAUD_APP_PICKER",
|
|
198
|
+
"permissionDisplayName": "USE_FRAUD_APP_PICKER",
|
|
199
|
+
"minSupportApiLevel": "18"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"permissionName": "ohos.permission.kernel.DISABLE_GOTPLT_RO_PROTECTION",
|
|
203
|
+
"permissionDisplayName": "DISABLE_GOTPLT_RO_PROTECTION",
|
|
204
|
+
"minSupportApiLevel": "17"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"permissionName": "ohos.permission.MANAGE_APN_SETTING",
|
|
208
|
+
"permissionDisplayName": "MANAGE_APN_SETTING",
|
|
209
|
+
"minSupportApiLevel": "16"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"permissionName": "ohos.permission.MANAGE_SCREEN_TIME_GUARD",
|
|
213
|
+
"permissionDisplayName": "MANAGE_SCREEN_TIME_GUARD",
|
|
214
|
+
"minSupportApiLevel": "20"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"permissionName": "ohos.permission.CUSTOMIZE_SAVE_BUTTON",
|
|
218
|
+
"permissionDisplayName": "CUSTOMIZE_SAVE_BUTTON",
|
|
219
|
+
"minSupportApiLevel": "20"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"permissionName": "ohos.permission.GET_ABILITY_INFO",
|
|
223
|
+
"permissionDisplayName": "GET_ABILITY_INFO",
|
|
224
|
+
"minSupportApiLevel": "20"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"permissionName": "ohos.permission.DLP_GET_HIDE_STATUS",
|
|
228
|
+
"permissionDisplayName": "DLP_GET_HIDE_STATUS",
|
|
229
|
+
"minSupportApiLevel": "20"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"permissionName": "ohos.permission.ACCESS_FIDO2_ONLINEAUTH",
|
|
233
|
+
"permissionDisplayName": "ACCESS_FIDO2_ONLINEAUTH",
|
|
234
|
+
"minSupportApiLevel": "20"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"permissionName": "ohos.permission.LINKTURBO",
|
|
238
|
+
"permissionDisplayName": "LINKTURBO",
|
|
239
|
+
"minSupportApiLevel": "20"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"permissionName": "ohos.permission.USE_FLOAT_BALL",
|
|
243
|
+
"permissionDisplayName": "USE_FLOAT_BALL",
|
|
244
|
+
"minSupportApiLevel": "20"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"permissionName": "ohos.permission.GET_ETHERNET_LOCAL_MAC",
|
|
248
|
+
"permissionDisplayName": "GET_ETHERNET_LOCAL_MAC",
|
|
249
|
+
"minSupportApiLevel": "20"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"permissionName": "ohos.permission.GET_WIFI_LOCAL_MAC",
|
|
253
|
+
"permissionDisplayName": "GET_WIFI_LOCAL_MAC",
|
|
254
|
+
"minSupportApiLevel": "20"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"permissionName": "ohos.permission.READ_LOCAL_DEVICE_NAME",
|
|
258
|
+
"permissionDisplayName": "READ_LOCAL_DEVICE_NAME",
|
|
259
|
+
"minSupportApiLevel": "20"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"permissionName": "ohos.permission.ACCESS_NET_TRACE_INFO",
|
|
263
|
+
"permissionDisplayName": "ACCESS_NET_TRACE_INFO",
|
|
264
|
+
"minSupportApiLevel": "20"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"permissionName": "ohos.permission.KEEP_BACKGROUND_RUNNING_SYSTEM",
|
|
268
|
+
"permissionDisplayName": "KEEP_BACKGROUND_RUNNING_SYSTEM",
|
|
269
|
+
"minSupportApiLevel": "20"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"permissionName": "ohos.permission.atomicService.MANAGE_STORAGE",
|
|
273
|
+
"permissionDisplayName": "MANAGE_STORAGE",
|
|
274
|
+
"minSupportApiLevel": "20"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"permissionName": "ohos.permission.WEB_NATIVE_MESSAGING",
|
|
278
|
+
"permissionDisplayName": "WEB_NATIVE_MESSAGING",
|
|
279
|
+
"minSupportApiLevel": "21"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"permissionName": "ohos.permission.HOOK_KEY_EVENT",
|
|
283
|
+
"permissionDisplayName": "HOOK_KEY_EVENT",
|
|
284
|
+
"minSupportApiLevel": "21"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"permissionName": "ohos.permission.SET_SYSTEMSHARE_APPLAUNCHTRUSTLIST",
|
|
288
|
+
"permissionDisplayName": "SET_SYSTEMSHARE_APPLAUNCHTRUSTLIST",
|
|
289
|
+
"minSupportApiLevel": "21"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"permissionName": "ohos.permission.SUBSCRIBE_NOTIFICATION",
|
|
293
|
+
"permissionDisplayName": "SUBSCRIBE_NOTIFICATION",
|
|
294
|
+
"minSupportApiLevel": "22"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"permissionName": "ohos.permission.ACCESS_USER_FULL_DISK",
|
|
298
|
+
"permissionDisplayName": "ACCESS_USER_FULL_DISK",
|
|
299
|
+
"minSupportApiLevel": "22"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"permissionName": "ohos.permission.CUSTOM_SCREEN_RECORDING",
|
|
303
|
+
"permissionDisplayName": "CUSTOM_SCREEN_RECORDING",
|
|
304
|
+
"minSupportApiLevel": "22"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"permissionName": "ohos.permission.GET_IP_MAC_INFO",
|
|
308
|
+
"permissionDisplayName": "GET_IP_MAC_INFO",
|
|
309
|
+
"minSupportApiLevel": "22"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app": {
|
|
3
|
+
"signingConfigs": [],
|
|
4
|
+
"products": [
|
|
5
|
+
{
|
|
6
|
+
"name": "default",
|
|
7
|
+
"signingConfig": "default",
|
|
8
|
+
"targetSdkVersion": "6.0.2(22)",
|
|
9
|
+
"compatibleSdkVersion": "6.0.2(22)",
|
|
10
|
+
"runtimeOS": "HarmonyOS",
|
|
11
|
+
"buildOption": {
|
|
12
|
+
"strictMode": {
|
|
13
|
+
"caseSensitiveCheck": true,
|
|
14
|
+
"useNormalizedOHMUrl": true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"buildModeSet": [
|
|
20
|
+
{
|
|
21
|
+
"name": "debug",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "release"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"modules": [
|
|
29
|
+
{
|
|
30
|
+
"name": "entry",
|
|
31
|
+
"srcPath": "./entry",
|
|
32
|
+
"targets": [
|
|
33
|
+
{
|
|
34
|
+
"name": "default",
|
|
35
|
+
"applyToProducts": [
|
|
36
|
+
"default"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
"@security/no-unsafe-aes": "error",
|
|
20
|
+
"@security/no-unsafe-hash": "error",
|
|
21
|
+
"@security/no-unsafe-mac": "warn",
|
|
22
|
+
"@security/no-unsafe-dh": "error",
|
|
23
|
+
"@security/no-unsafe-dsa": "error",
|
|
24
|
+
"@security/no-unsafe-ecdsa": "error",
|
|
25
|
+
"@security/no-unsafe-rsa-encrypt": "error",
|
|
26
|
+
"@security/no-unsafe-rsa-sign": "error",
|
|
27
|
+
"@security/no-unsafe-rsa-key": "error",
|
|
28
|
+
"@security/no-unsafe-dsa-key": "error",
|
|
29
|
+
"@security/no-unsafe-dh-key": "error",
|
|
30
|
+
"@security/no-unsafe-3des": "error"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiType": "stageMode",
|
|
3
|
+
"buildOption": {
|
|
4
|
+
"resOptions": {
|
|
5
|
+
"copyCodeResource": {
|
|
6
|
+
"enable": false
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"buildOptionSet": [
|
|
11
|
+
{
|
|
12
|
+
"name": "release",
|
|
13
|
+
"arkOptions": {
|
|
14
|
+
"obfuscation": {
|
|
15
|
+
"ruleOptions": {
|
|
16
|
+
"enable": false,
|
|
17
|
+
"files": [
|
|
18
|
+
"./obfuscation-rules.txt"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
"targets": [
|
|
26
|
+
{
|
|
27
|
+
"name": "default"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "ohosTest",
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// @ts-nocheck – Template file, only used when copied into a project directory
|
|
2
|
+
import { hapTasks } from '@ohos/hvigor-ohos-plugin';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
system: hapTasks /* Built-in plugin of Hvigor. It cannot be modified. */,
|
|
6
|
+
plugins: [] /* Custom plugin to extend the functionality of Hvigor. */,
|
|
7
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
# Obfuscation options:
|
|
5
|
+
# -disable-obfuscation: disable all obfuscations
|
|
6
|
+
# -enable-property-obfuscation: obfuscate the property names
|
|
7
|
+
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
|
8
|
+
# -compact: remove unnecessary blank spaces and all line feeds
|
|
9
|
+
# -remove-log: remove all console.* statements
|
|
10
|
+
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
|
11
|
+
# -apply-namecache: reuse the given cache file
|
|
12
|
+
|
|
13
|
+
# Keep options:
|
|
14
|
+
# -keep-property-name: specifies property names that you want to keep
|
|
15
|
+
# -keep-global-name: specifies names that you want to keep in the global scope
|
|
16
|
+
|
|
17
|
+
-enable-property-obfuscation
|
|
18
|
+
-enable-toplevel-obfuscation
|
|
19
|
+
-enable-filename-obfuscation
|
|
20
|
+
-enable-export-obfuscation
|