@atomicservice/ascf-base 1.0.13 → 1.0.14

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/dist/index.d.mts CHANGED
@@ -23,21 +23,24 @@ declare class Logger {
23
23
  declare function getLogger(categories: any): Logger;
24
24
 
25
25
  declare const qsHostPkg = "com.enjoy.now.hmos";
26
- declare const LEGACY_PKG_NAME = "com.huawei.intelligent/com.huawei.ascf.main.AscfActivity";
26
+ declare const LEGACY_PKG_NAME = "com.huawei.fastapp.dev/com.huawei.ascf.main.AscfActivity";
27
27
  declare const LEGACY_DEVICE = "legacy";
28
28
  declare const HOS_DEVICE = "hos";
29
29
  declare const DEBUG_TYPE_VIEW = "view";
30
30
  declare const DEBUG_TYPE_SERVICE = "service";
31
+ declare const BUILD_TARGET_QS = "quickapp";
32
+ declare const BUILD_TARGET_AS = "atomicservice";
31
33
 
32
34
  type BuildModeType = 'debug' | 'release';
33
- type BuildTargetType = 'atomicservice' | 'crossAtomicService';
34
- type BuildDeviceType = 'hos' | 'legacy';
35
+ type BuildTargetType = typeof BUILD_TARGET_AS | typeof BUILD_TARGET_QS;
36
+ type BuildDeviceType = typeof HOS_DEVICE | typeof LEGACY_DEVICE;
35
37
  type BuilderOptions = {
36
38
  projectRoot?: string;
37
39
  deviceId?: string;
38
40
  buildMode?: BuildModeType;
39
41
  targets?: BuildTargetType;
40
42
  deviceType?: BuildDeviceType;
43
+ subCmd: string;
41
44
  };
42
45
  type DebuggerOptions = {
43
46
  open?: '' | 'default' | 'chrome' | 'edge';
@@ -183,6 +186,11 @@ declare function hasHvigor(projectRoot: any): boolean;
183
186
  declare function clearAscfDepDirCache(projectRoot: any): void;
184
187
  declare function fixHvigorPath(fixPath: any): any;
185
188
  declare function getAscfDepDir(projectRoot: any): Promise<string | undefined>;
189
+ declare function getCmdAndArgs(projectRoot: any, options?: any): Promise<{
190
+ cmd: string;
191
+ args: any[];
192
+ ascfVerCmd: string;
193
+ }>;
186
194
  declare function ascfRun(projectRoot: any, options?: any, onCp?: any): Promise<void>;
187
195
  declare function ascfCompile(projectRoot: any, options?: any, onCp?: any): Promise<void>;
188
196
  declare function ascfConvert(input: any, projectRoot: any, options?: any): Promise<void>;
@@ -247,8 +255,6 @@ declare function startServer(port: number, staticFolder: string): Promise<{
247
255
  hasReq(url: string): boolean | "";
248
256
  }>;
249
257
 
250
- declare const BUILD_TARGET_AS = "atomicservice";
251
- declare const BUILD_TARGET_QS = "crossAtomicService";
252
258
  declare function hdcShared({ logger, getDevEcoSdkHome, getPath, getHdcPath }: {
253
259
  logger: any;
254
260
  getDevEcoSdkHome: any;
@@ -295,6 +301,7 @@ declare function hdcDeviceShared(opts: any): {
295
301
  };
296
302
  };
297
303
 
304
+ declare function getBuildProfile(projectRoot: string): any;
298
305
  declare function execSafe(cmd: any, opt?: {}): string | undefined;
299
306
 
300
307
  declare function openInBrowser(url: any, browserName?: string): void;
@@ -336,4 +343,4 @@ declare function tryHdcPortReversing(deviceId: any, localPort: any, times?: numb
336
343
 
337
344
  declare function installSpkShared({ logger, projectRoot, deviceId, getSpkInfo, buildMode, startServer, tryAdbPortReversing, startHostPkgUrl, rportRmCmd, legacyPkg }: IInstallSpkShared): Promise<void>;
338
345
 
339
- export { $async, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE, BUILD_TARGET_AS, BUILD_TARGET_QS, BuildProcessFactory, DEBUG_TYPE_SERVICE, DEBUG_TYPE_VIEW, DebuggerProcessFactory, ERROR_MSG, HOS_DEVICE, IS_MACOS, IS_WIN32, LEGACY_DEVICE, LEGACY_PKG_NAME, ascfCompile, ascfConvert, ascfGenCert, ascfGenP12, ascfRun, clearAscfDepDirCache, configureLogger, copyDirectory, type deviceType, devicesLegacyShared, execSafe, findAvailablePort, fixHvigorPath, fportCmd, fportListCmd, fportRmCmd, getAdbPath, getAscfDebuggerPidFile, getAscfDepDir, getBundleInfo, getDebugServerInfo, getDebugees, getDevEcoSdkHome, getDevEcoToolsDir, getDeviceName, getDevicesCmd, getHdcPath, getHvigorwPath, getJavaBinPath, getLegacyDeviceName, getLegacyPackInfo, getLegacyProcess, getLogLevelGetter, getLogger, getNodeBinPath, getNodePath, getNpmPath, getOhpmPath, getPath, getPid, getProjectConfig, getSpkInfo, hasHvigor, hdcDeviceShared, hdcShared, installAscfTools, installSpkShared, isAscfProject, isDirectoryExists, isMpProject, isPortReachable, listTargets, maskLast4, mergeJson, normalizeBuildMode, openInBrowser, optArgIf, parseJsonFile, parseJsonSafe, portManagerShared, qsHostPkg, rportCmd, rportRmCmd, runAdbCmdAsync, setLogLevelGetter, setLoggerConfig, startDebugServerCmd, startHostPkg, startHostPkgUrl, startServer, stopDebugServer, tryAdbPortReversing, tryHdcPortReversing };
346
+ export { $async, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE, BUILD_TARGET_AS, BUILD_TARGET_QS, BuildProcessFactory, DEBUG_TYPE_SERVICE, DEBUG_TYPE_VIEW, DebuggerProcessFactory, ERROR_MSG, HOS_DEVICE, IS_MACOS, IS_WIN32, LEGACY_DEVICE, LEGACY_PKG_NAME, ascfCompile, ascfConvert, ascfGenCert, ascfGenP12, ascfRun, clearAscfDepDirCache, configureLogger, copyDirectory, type deviceType, devicesLegacyShared, execSafe, findAvailablePort, fixHvigorPath, fportCmd, fportListCmd, fportRmCmd, getAdbPath, getAscfDebuggerPidFile, getAscfDepDir, getBuildProfile, getBundleInfo, getCmdAndArgs, getDebugServerInfo, getDebugees, getDevEcoSdkHome, getDevEcoToolsDir, getDeviceName, getDevicesCmd, getHdcPath, getHvigorwPath, getJavaBinPath, getLegacyDeviceName, getLegacyPackInfo, getLegacyProcess, getLogLevelGetter, getLogger, getNodeBinPath, getNodePath, getNpmPath, getOhpmPath, getPath, getPid, getProjectConfig, getSpkInfo, hasHvigor, hdcDeviceShared, hdcShared, installAscfTools, installSpkShared, isAscfProject, isDirectoryExists, isMpProject, isPortReachable, listTargets, maskLast4, mergeJson, normalizeBuildMode, openInBrowser, optArgIf, parseJsonFile, parseJsonSafe, portManagerShared, qsHostPkg, rportCmd, rportRmCmd, runAdbCmdAsync, setLogLevelGetter, setLoggerConfig, startDebugServerCmd, startHostPkg, startHostPkgUrl, startServer, stopDebugServer, tryAdbPortReversing, tryHdcPortReversing };
package/dist/index.d.ts CHANGED
@@ -23,21 +23,24 @@ declare class Logger {
23
23
  declare function getLogger(categories: any): Logger;
24
24
 
25
25
  declare const qsHostPkg = "com.enjoy.now.hmos";
26
- declare const LEGACY_PKG_NAME = "com.huawei.intelligent/com.huawei.ascf.main.AscfActivity";
26
+ declare const LEGACY_PKG_NAME = "com.huawei.fastapp.dev/com.huawei.ascf.main.AscfActivity";
27
27
  declare const LEGACY_DEVICE = "legacy";
28
28
  declare const HOS_DEVICE = "hos";
29
29
  declare const DEBUG_TYPE_VIEW = "view";
30
30
  declare const DEBUG_TYPE_SERVICE = "service";
31
+ declare const BUILD_TARGET_QS = "quickapp";
32
+ declare const BUILD_TARGET_AS = "atomicservice";
31
33
 
32
34
  type BuildModeType = 'debug' | 'release';
33
- type BuildTargetType = 'atomicservice' | 'crossAtomicService';
34
- type BuildDeviceType = 'hos' | 'legacy';
35
+ type BuildTargetType = typeof BUILD_TARGET_AS | typeof BUILD_TARGET_QS;
36
+ type BuildDeviceType = typeof HOS_DEVICE | typeof LEGACY_DEVICE;
35
37
  type BuilderOptions = {
36
38
  projectRoot?: string;
37
39
  deviceId?: string;
38
40
  buildMode?: BuildModeType;
39
41
  targets?: BuildTargetType;
40
42
  deviceType?: BuildDeviceType;
43
+ subCmd: string;
41
44
  };
42
45
  type DebuggerOptions = {
43
46
  open?: '' | 'default' | 'chrome' | 'edge';
@@ -183,6 +186,11 @@ declare function hasHvigor(projectRoot: any): boolean;
183
186
  declare function clearAscfDepDirCache(projectRoot: any): void;
184
187
  declare function fixHvigorPath(fixPath: any): any;
185
188
  declare function getAscfDepDir(projectRoot: any): Promise<string | undefined>;
189
+ declare function getCmdAndArgs(projectRoot: any, options?: any): Promise<{
190
+ cmd: string;
191
+ args: any[];
192
+ ascfVerCmd: string;
193
+ }>;
186
194
  declare function ascfRun(projectRoot: any, options?: any, onCp?: any): Promise<void>;
187
195
  declare function ascfCompile(projectRoot: any, options?: any, onCp?: any): Promise<void>;
188
196
  declare function ascfConvert(input: any, projectRoot: any, options?: any): Promise<void>;
@@ -247,8 +255,6 @@ declare function startServer(port: number, staticFolder: string): Promise<{
247
255
  hasReq(url: string): boolean | "";
248
256
  }>;
249
257
 
250
- declare const BUILD_TARGET_AS = "atomicservice";
251
- declare const BUILD_TARGET_QS = "crossAtomicService";
252
258
  declare function hdcShared({ logger, getDevEcoSdkHome, getPath, getHdcPath }: {
253
259
  logger: any;
254
260
  getDevEcoSdkHome: any;
@@ -295,6 +301,7 @@ declare function hdcDeviceShared(opts: any): {
295
301
  };
296
302
  };
297
303
 
304
+ declare function getBuildProfile(projectRoot: string): any;
298
305
  declare function execSafe(cmd: any, opt?: {}): string | undefined;
299
306
 
300
307
  declare function openInBrowser(url: any, browserName?: string): void;
@@ -336,4 +343,4 @@ declare function tryHdcPortReversing(deviceId: any, localPort: any, times?: numb
336
343
 
337
344
  declare function installSpkShared({ logger, projectRoot, deviceId, getSpkInfo, buildMode, startServer, tryAdbPortReversing, startHostPkgUrl, rportRmCmd, legacyPkg }: IInstallSpkShared): Promise<void>;
338
345
 
339
- export { $async, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE, BUILD_TARGET_AS, BUILD_TARGET_QS, BuildProcessFactory, DEBUG_TYPE_SERVICE, DEBUG_TYPE_VIEW, DebuggerProcessFactory, ERROR_MSG, HOS_DEVICE, IS_MACOS, IS_WIN32, LEGACY_DEVICE, LEGACY_PKG_NAME, ascfCompile, ascfConvert, ascfGenCert, ascfGenP12, ascfRun, clearAscfDepDirCache, configureLogger, copyDirectory, type deviceType, devicesLegacyShared, execSafe, findAvailablePort, fixHvigorPath, fportCmd, fportListCmd, fportRmCmd, getAdbPath, getAscfDebuggerPidFile, getAscfDepDir, getBundleInfo, getDebugServerInfo, getDebugees, getDevEcoSdkHome, getDevEcoToolsDir, getDeviceName, getDevicesCmd, getHdcPath, getHvigorwPath, getJavaBinPath, getLegacyDeviceName, getLegacyPackInfo, getLegacyProcess, getLogLevelGetter, getLogger, getNodeBinPath, getNodePath, getNpmPath, getOhpmPath, getPath, getPid, getProjectConfig, getSpkInfo, hasHvigor, hdcDeviceShared, hdcShared, installAscfTools, installSpkShared, isAscfProject, isDirectoryExists, isMpProject, isPortReachable, listTargets, maskLast4, mergeJson, normalizeBuildMode, openInBrowser, optArgIf, parseJsonFile, parseJsonSafe, portManagerShared, qsHostPkg, rportCmd, rportRmCmd, runAdbCmdAsync, setLogLevelGetter, setLoggerConfig, startDebugServerCmd, startHostPkg, startHostPkgUrl, startServer, stopDebugServer, tryAdbPortReversing, tryHdcPortReversing };
346
+ export { $async, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE, BUILD_TARGET_AS, BUILD_TARGET_QS, BuildProcessFactory, DEBUG_TYPE_SERVICE, DEBUG_TYPE_VIEW, DebuggerProcessFactory, ERROR_MSG, HOS_DEVICE, IS_MACOS, IS_WIN32, LEGACY_DEVICE, LEGACY_PKG_NAME, ascfCompile, ascfConvert, ascfGenCert, ascfGenP12, ascfRun, clearAscfDepDirCache, configureLogger, copyDirectory, type deviceType, devicesLegacyShared, execSafe, findAvailablePort, fixHvigorPath, fportCmd, fportListCmd, fportRmCmd, getAdbPath, getAscfDebuggerPidFile, getAscfDepDir, getBuildProfile, getBundleInfo, getCmdAndArgs, getDebugServerInfo, getDebugees, getDevEcoSdkHome, getDevEcoToolsDir, getDeviceName, getDevicesCmd, getHdcPath, getHvigorwPath, getJavaBinPath, getLegacyDeviceName, getLegacyPackInfo, getLegacyProcess, getLogLevelGetter, getLogger, getNodeBinPath, getNodePath, getNpmPath, getOhpmPath, getPath, getPid, getProjectConfig, getSpkInfo, hasHvigor, hdcDeviceShared, hdcShared, installAscfTools, installSpkShared, isAscfProject, isDirectoryExists, isMpProject, isPortReachable, listTargets, maskLast4, mergeJson, normalizeBuildMode, openInBrowser, optArgIf, parseJsonFile, parseJsonSafe, portManagerShared, qsHostPkg, rportCmd, rportRmCmd, runAdbCmdAsync, setLogLevelGetter, setLoggerConfig, startDebugServerCmd, startHostPkg, startHostPkgUrl, startServer, stopDebugServer, tryAdbPortReversing, tryHdcPortReversing };