@deveco-test/deveco-cli 1.3.5-Test.2 → 1.3.5-Test.4
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/cli.js +57 -0
- package/package.json +26 -58
- package/LICENSE +0 -21
- package/README.md +0 -1751
- package/THIRD-PARTY-LICENSES +0 -45
- package/dist/cli.js +0 -1376
- package/dist/internal/telemetry-upload-background.js +0 -9
- package/skills/deveco-cli/SKILL.md +0 -256
- package/src/resources/aclPermission/aclPermissionsInfo.json +0 -311
- package/src/resources/arkts-check.cjs +0 -3642
- package/templates/application/AppScope/app.json5 +0 -10
- package/templates/application/AppScope/resources/base/element/string.json +0 -8
- package/templates/application/AppScope/resources/base/media/layered_image.json +0 -7
- package/templates/application/build-profile.json5 +0 -42
- package/templates/application/code-linter.json5 +0 -32
- package/templates/application/entry/build-profile.json5 +0 -33
- package/templates/application/entry/gitignore.txt +0 -6
- package/templates/application/entry/hvigorfile.ts +0 -7
- package/templates/application/entry/obfuscation-rules.txt +0 -20
- package/templates/application/entry/oh-package.json5 +0 -10
- package/templates/application/entry/src/main/ets/entryability/EntryAbility.ets +0 -63
- package/templates/application/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +0 -31
- package/templates/application/entry/src/main/ets/pages/Index.ets +0 -38
- package/templates/application/entry/src/main/module.json5 +0 -50
- package/templates/application/entry/src/main/resources/base/element/color.json +0 -8
- package/templates/application/entry/src/main/resources/base/element/float.json +0 -8
- package/templates/application/entry/src/main/resources/base/element/string.json +0 -16
- package/templates/application/entry/src/main/resources/base/media/layered_image.json +0 -7
- package/templates/application/entry/src/main/resources/base/profile/backup_config.json +0 -3
- package/templates/application/entry/src/main/resources/base/profile/main_pages.json +0 -5
- package/templates/application/entry/src/main/resources/dark/element/color.json +0 -8
- package/templates/application/gitignore.txt +0 -13
- package/templates/application/hvigor/hvigor-config.json5 +0 -23
- package/templates/application/hvigorfile.ts +0 -7
- package/templates/application/oh-package.json5 +0 -10
package/cli.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Shell entry: map process.platform to an implementation package, resolve its
|
|
3
|
+
// absolute cli.js path, and spawnSync-exec it with all argv forwarded.
|
|
4
|
+
// Command parsing, error handling, and exit code are all owned by the impl pkg.
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
import { createRequire } from 'node:module';
|
|
7
|
+
import { readFileSync } from 'node:fs';
|
|
8
|
+
|
|
9
|
+
// Pass wrapper identity to the impl process so `devecocli update` installs
|
|
10
|
+
// THIS package (the one the user installed), not the nested impl dependency.
|
|
11
|
+
// These env names are NOT in tsup's `env` map, so they survive as runtime
|
|
12
|
+
// process.env reads in the built impl bundle.
|
|
13
|
+
const wrapperPkg = JSON.parse(
|
|
14
|
+
readFileSync(new URL('./package.json', import.meta.url), 'utf8'),
|
|
15
|
+
);
|
|
16
|
+
process.env.DEVECO_CLI_WRAPPER_NAME = wrapperPkg.name;
|
|
17
|
+
process.env.DEVECO_CLI_WRAPPER_VERSION = wrapperPkg.version;
|
|
18
|
+
|
|
19
|
+
// Auto-adapt: read implementation package names from optionalDependencies so
|
|
20
|
+
// scope/name changes in package.json propagate without editing cli.js.
|
|
21
|
+
const IMPL_PKG = (() => {
|
|
22
|
+
const deps = Object.keys(wrapperPkg.optionalDependencies ?? {});
|
|
23
|
+
const needle = process.platform === 'openharmony' ? 'openharmony' : 'common';
|
|
24
|
+
const match = deps.find((name) => name.includes(needle));
|
|
25
|
+
if (!match) {
|
|
26
|
+
process.stderr.write(
|
|
27
|
+
`devecocli: no implementation package found for platform "${process.platform}".\n` +
|
|
28
|
+
` available: ${deps.length ? deps.join(', ') : '(none)'}\n` +
|
|
29
|
+
` expected a package containing "${needle}"\n`
|
|
30
|
+
);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
return match;
|
|
34
|
+
})();
|
|
35
|
+
|
|
36
|
+
let cliPath;
|
|
37
|
+
try {
|
|
38
|
+
cliPath = createRequire(import.meta.url).resolve(IMPL_PKG + '/dist/cli.js');
|
|
39
|
+
} catch (err) {
|
|
40
|
+
process.stderr.write(
|
|
41
|
+
`devecocli: implementation package "${IMPL_PKG}" is not installed for this platform.\n` +
|
|
42
|
+
` platform: ${process.platform}\n` +
|
|
43
|
+
` expected: ${IMPL_PKG}\n` +
|
|
44
|
+
` cause: ${err && err.message ? err.message : err}\n`
|
|
45
|
+
);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const result = spawnSync(process.execPath, [cliPath, ...process.argv.slice(2)], {
|
|
50
|
+
stdio: 'inherit',
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
if (result.error) {
|
|
54
|
+
process.stderr.write(`devecocli: failed to spawn implementation: ${result.error.message}\n`);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,58 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@deveco-test/deveco-cli",
|
|
3
|
-
"version": "1.3.5-Test.
|
|
4
|
-
"description": "HarmonyOS application development command line tool",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
"keywords": ["harmonyos", "deveco", "cli"],
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@deveco-test/deveco-cli-knowledgebase": "*",
|
|
30
|
-
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
31
|
-
"adm-zip": "0.6.1",
|
|
32
|
-
"axios": "1.19.0",
|
|
33
|
-
"colorette": "^2.0.20",
|
|
34
|
-
"commander": "^13.1.0",
|
|
35
|
-
"execa": "^9.6.1",
|
|
36
|
-
"fs-extra": "^11.3.4",
|
|
37
|
-
"global-agent": "^4.1.3",
|
|
38
|
-
"json5": "^2.2.3",
|
|
39
|
-
"mp4box": "^2.4.1",
|
|
40
|
-
"node-forge": "^1.4.0",
|
|
41
|
-
"ora": "^9.4.0",
|
|
42
|
-
"p-limit": "^5.0.0",
|
|
43
|
-
"proper-lockfile": "^4.1.2",
|
|
44
|
-
"regedit": "^5.1.4",
|
|
45
|
-
"semver": "^7.8.5",
|
|
46
|
-
"smol-toml": "^1.6.1",
|
|
47
|
-
"socket.io-client": "^4.7.5",
|
|
48
|
-
"zod": "^4.4.3"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@types/adm-zip": "^0.5.8",
|
|
52
|
-
"@types/fs-extra": "^11.0.4",
|
|
53
|
-
"@types/global-agent": "^3.0.0",
|
|
54
|
-
"@types/node-forge": "^1.3.14",
|
|
55
|
-
"@types/proper-lockfile": "^4.1.4",
|
|
56
|
-
"@types/semver": "^7.7.1"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@deveco-test/deveco-cli",
|
|
3
|
+
"version": "1.3.5-Test.4",
|
|
4
|
+
"description": "HarmonyOS application development command line tool",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"devecocli": "cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"cli.js"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"harmonyos",
|
|
18
|
+
"deveco",
|
|
19
|
+
"cli",
|
|
20
|
+
"openharmony"
|
|
21
|
+
],
|
|
22
|
+
"optionalDependencies": {
|
|
23
|
+
"@deveco-test/deveco-cli-openharmony-arm64": "1.3.5-Test.4",
|
|
24
|
+
"@deveco-test/deveco-cli-common": "1.3.5-Test.4"
|
|
25
|
+
}
|
|
26
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Huawei Device Co., Ltd.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|