From ce1efd86732ebd51c67f12e64703c7818bae7d9f Mon Sep 17 00:00:00 2001 From: 15827185459 Date: Tue, 26 Aug 2025 16:53:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=B0=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangzhenhui <1664002766@qq.com> --- automock/BUILD.gn | 3 ++- automock/mock-generate/src/common/commonUtils.ts | 2 +- automock/mock-generate/src/common/systemUtils.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/automock/BUILD.gn b/automock/BUILD.gn index 47e6716..e353fd7 100644 --- a/automock/BUILD.gn +++ b/automock/BUILD.gn @@ -33,6 +33,7 @@ action("gen_node_modules") { } action("gen_snapshot_jsmock") { + deps = ["//interface/sdk-js:build_sdk_interop1"] script = "$mock_root/js_framework_build.sh" js_framework_mock_generate = "$mock_root/mock-generate" is_mac = "false" @@ -56,7 +57,7 @@ action("gen_snapshot_jsmock") { tsconfig = "$mock_root/mock-generate/tsconfig.json" eslint = "$mock_root/mock-generate/.eslintrc" babel = "$mock_root/mock-generate/.babelrc" - api_input_path = "//interface/sdk-js/api" + api_input_path = interface_sdk_path_ets1 + "/api" args = [ rebase_path(buildfile_jsmock, root_build_dir), diff --git a/automock/mock-generate/src/common/commonUtils.ts b/automock/mock-generate/src/common/commonUtils.ts index 6077a4f..7c2da19 100644 --- a/automock/mock-generate/src/common/commonUtils.ts +++ b/automock/mock-generate/src/common/commonUtils.ts @@ -76,7 +76,7 @@ export function generateKeyValue(key: string, type: KeyValueTypes, parent?: KeyV * 获取开源接口的api路径 */ export function getOhosInterfacesDir(): string { - return path.join(getProjectDir(), 'interface', 'sdk-js', 'api'); + return path.join(getProjectDir(), 'ets1.1', 'sdk-js', 'api'); } /** diff --git a/automock/mock-generate/src/common/systemUtils.ts b/automock/mock-generate/src/common/systemUtils.ts index 6db81b7..f323e4a 100644 --- a/automock/mock-generate/src/common/systemUtils.ts +++ b/automock/mock-generate/src/common/systemUtils.ts @@ -22,6 +22,6 @@ import { paramIndex } from './constants'; */ export function getProjectDir(): string { const apiInputPath = process.argv[paramIndex]; - const apiDir = path.join('interface', 'sdk-js', 'api'); + const apiDir = path.join('ets1.1', 'sdk-js', 'api'); return apiInputPath.replace(`${path.sep}${apiDir}`, ''); } -- Gitee