@atomicservice/ascf-base 1.0.14 → 1.0.16
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 +119 -31
- package/dist/index.d.ts +119 -31
- package/dist/index.js +340 -69
- package/dist/index.mjs +340 -69
- package/dist/media/service_app_icon_template.png +0 -0
- package/dist/templates/ascfDemos/app.css +283 -0
- package/dist/templates/ascfDemos/app.js +6 -0
- package/dist/templates/ascfDemos/app.json +124 -0
- package/dist/templates/ascfDemos/asui/as-cell/as-cell.css +18 -0
- package/dist/templates/ascfDemos/asui/as-cell/as-cell.hxml +11 -0
- package/dist/templates/ascfDemos/asui/as-cell/as-cell.js +29 -0
- package/dist/templates/ascfDemos/asui/as-cell/as-cell.json +4 -0
- package/dist/templates/ascfDemos/asui/as-container/as-container.css +48 -0
- package/dist/templates/ascfDemos/asui/as-container/as-container.hxml +11 -0
- package/dist/templates/ascfDemos/asui/as-container/as-container.js +35 -0
- package/dist/templates/ascfDemos/asui/as-container/as-container.json +4 -0
- package/dist/templates/ascfDemos/asui/as-toggle-list/as-toggle-list.css +43 -0
- package/dist/templates/ascfDemos/asui/as-toggle-list/as-toggle-list.hxml +19 -0
- package/dist/templates/ascfDemos/asui/as-toggle-list/as-toggle-list.js +41 -0
- package/dist/templates/ascfDemos/asui/as-toggle-list/as-toggle-list.json +4 -0
- package/dist/templates/ascfDemos/config/api.config.js +195 -0
- package/dist/templates/ascfDemos/config/component.config.js +152 -0
- package/dist/templates/ascfDemos/config/framework.config.js +29 -0
- package/dist/templates/ascfDemos/config/global.config.js +28 -0
- package/dist/templates/ascfDemos/config/open.config.js +41 -0
- package/dist/templates/ascfDemos/extConfig.json +5 -0
- package/dist/templates/ascfDemos/gitignore +15 -0
- package/dist/templates/ascfDemos/image/exitscreen.png +0 -0
- package/dist/templates/ascfDemos/image/fullscreen.png +0 -0
- package/dist/templates/ascfDemos/image/green_tri.png +0 -0
- package/dist/templates/ascfDemos/image/icon_api.svg +11 -0
- package/dist/templates/ascfDemos/image/icon_api_HL.svg +11 -0
- package/dist/templates/ascfDemos/image/icon_component.svg +11 -0
- package/dist/templates/ascfDemos/image/icon_component_HL.svg +11 -0
- package/dist/templates/ascfDemos/image/icon_framework.svg +10 -0
- package/dist/templates/ascfDemos/image/icon_framework_HL.svg +12 -0
- package/dist/templates/ascfDemos/image/icon_open.svg +11 -0
- package/dist/templates/ascfDemos/image/icon_open_HL.svg +10 -0
- package/dist/templates/ascfDemos/image/location.png +0 -0
- package/dist/templates/ascfDemos/image/logo_api.svg +17 -0
- package/dist/templates/ascfDemos/image/logo_component.svg +17 -0
- package/dist/templates/ascfDemos/image/logo_framework.svg +18 -0
- package/dist/templates/ascfDemos/image/logo_open.svg +16 -0
- package/dist/templates/ascfDemos/image/pause.png +0 -0
- package/dist/templates/ascfDemos/image/play.png +0 -0
- package/dist/templates/ascfDemos/image/plus.png +0 -0
- package/dist/templates/ascfDemos/image/record.png +0 -0
- package/dist/templates/ascfDemos/image/share.png +0 -0
- package/dist/templates/ascfDemos/image/stop.png +0 -0
- package/dist/templates/ascfDemos/image/test.gif +0 -0
- package/dist/templates/ascfDemos/image/toggle_arrow_down.svg +14 -0
- package/dist/templates/ascfDemos/image/toggle_arrow_right.svg +14 -0
- package/dist/templates/ascfDemos/image/toggle_arrow_up.svg +14 -0
- package/dist/templates/ascfDemos/image/trash.png +0 -0
- package/dist/templates/ascfDemos/packageA/index/index.css +0 -0
- package/dist/templates/ascfDemos/packageA/index/index.hxml +1 -0
- package/dist/templates/ascfDemos/packageA/index/index.js +1 -0
- package/dist/templates/ascfDemos/packageA/index/index.json +4 -0
- package/dist/templates/ascfDemos/page/API/image/brightness_dark.png +0 -0
- package/dist/templates/ascfDemos/page/API/image/brightness_light.png +0 -0
- package/dist/templates/ascfDemos/page/API/image/user.png +0 -0
- package/dist/templates/ascfDemos/page/API/image/wifi_0.png +0 -0
- package/dist/templates/ascfDemos/page/API/image/wifi_1.png +0 -0
- package/dist/templates/ascfDemos/page/API/image/wifi_2.png +0 -0
- package/dist/templates/ascfDemos/page/API/image/wifi_3.png +0 -0
- package/dist/templates/ascfDemos/page/API/image/wifi_4.png +0 -0
- package/dist/templates/ascfDemos/page/API/index.css +11 -0
- package/dist/templates/ascfDemos/page/API/index.hxml +8 -0
- package/dist/templates/ascfDemos/page/API/index.js +23 -0
- package/dist/templates/ascfDemos/page/API/index.json +8 -0
- package/dist/templates/ascfDemos/page/API/pages/add-contact/add-contact.js +27 -0
- package/dist/templates/ascfDemos/page/API/pages/appEvent/appEvent.css +7 -0
- package/dist/templates/ascfDemos/page/API/pages/appEvent/appEvent.hxml +39 -0
- package/dist/templates/ascfDemos/page/API/pages/appEvent/appEvent.js +238 -0
- package/dist/templates/ascfDemos/page/API/pages/appEvent/appEvent.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/battery/battery.css +4 -0
- package/dist/templates/ascfDemos/page/API/pages/battery/battery.hxml +16 -0
- package/dist/templates/ascfDemos/page/API/pages/battery/battery.js +34 -0
- package/dist/templates/ascfDemos/page/API/pages/battery/battery.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/bluetooth/bluetooth.css +49 -0
- package/dist/templates/ascfDemos/page/API/pages/bluetooth/bluetooth.hxml +18 -0
- package/dist/templates/ascfDemos/page/API/pages/bluetooth/bluetooth.js +143 -0
- package/dist/templates/ascfDemos/page/API/pages/bluetooth/bluetooth.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/calendar/calendar.css +0 -0
- package/dist/templates/ascfDemos/page/API/pages/calendar/calendar.hxml +6 -0
- package/dist/templates/ascfDemos/page/API/pages/calendar/calendar.js +37 -0
- package/dist/templates/ascfDemos/page/API/pages/calendar/calendar.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/camera/camera.css +40 -0
- package/dist/templates/ascfDemos/page/API/pages/camera/camera.hxml +27 -0
- package/dist/templates/ascfDemos/page/API/pages/camera/camera.js +153 -0
- package/dist/templates/ascfDemos/page/API/pages/camera/camera.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/canIUse/canIUse.css +27 -0
- package/dist/templates/ascfDemos/page/API/pages/canIUse/canIUse.hxml +7 -0
- package/dist/templates/ascfDemos/page/API/pages/canIUse/canIUse.js +22 -0
- package/dist/templates/ascfDemos/page/API/pages/canIUse/canIUse.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/choose-location/choose-location.css +1 -0
- package/dist/templates/ascfDemos/page/API/pages/choose-location/choose-location.hxml +45 -0
- package/dist/templates/ascfDemos/page/API/pages/choose-location/choose-location.js +26 -0
- package/dist/templates/ascfDemos/page/API/pages/choose-location/choose-location.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/compass/compass.css +47 -0
- package/dist/templates/ascfDemos/page/API/pages/compass/compass.hxml +29 -0
- package/dist/templates/ascfDemos/page/API/pages/compass/compass.js +84 -0
- package/dist/templates/ascfDemos/page/API/pages/compass/compass.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/compass/compass.png +0 -0
- package/dist/templates/ascfDemos/page/API/pages/contact/add-contact/add-contact.css +1 -0
- package/dist/templates/ascfDemos/page/API/pages/contact/add-contact/add-contact.hxml +53 -0
- package/dist/templates/ascfDemos/page/API/pages/contact/add-contact/add-contact.js +59 -0
- package/dist/templates/ascfDemos/page/API/pages/contact/add-contact/add-contact.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/contact/contact.css +29 -0
- package/dist/templates/ascfDemos/page/API/pages/contact/contact.hxml +34 -0
- package/dist/templates/ascfDemos/page/API/pages/contact/contact.js +47 -0
- package/dist/templates/ascfDemos/page/API/pages/contact/contact.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/deviceMotionListening/deviceMotionListening.css +21 -0
- package/dist/templates/ascfDemos/page/API/pages/deviceMotionListening/deviceMotionListening.hxml +20 -0
- package/dist/templates/ascfDemos/page/API/pages/deviceMotionListening/deviceMotionListening.js +35 -0
- package/dist/templates/ascfDemos/page/API/pages/deviceMotionListening/deviceMotionListening.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/downRefresh/downRefresh.css +0 -0
- package/dist/templates/ascfDemos/page/API/pages/downRefresh/downRefresh.hxml +3 -0
- package/dist/templates/ascfDemos/page/API/pages/downRefresh/downRefresh.js +16 -0
- package/dist/templates/ascfDemos/page/API/pages/downRefresh/downRefresh.json +5 -0
- package/dist/templates/ascfDemos/page/API/pages/download-file/download-file.css +6 -0
- package/dist/templates/ascfDemos/page/API/pages/download-file/download-file.hxml +4 -0
- package/dist/templates/ascfDemos/page/API/pages/download-file/download-file.js +42 -0
- package/dist/templates/ascfDemos/page/API/pages/download-file/download-file.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/env/env.css +1 -0
- package/dist/templates/ascfDemos/page/API/pages/env/env.hxml +16 -0
- package/dist/templates/ascfDemos/page/API/pages/env/env.js +15 -0
- package/dist/templates/ascfDemos/page/API/pages/env/env.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/file/file.css +9 -0
- package/dist/templates/ascfDemos/page/API/pages/file/file.hxml +8 -0
- package/dist/templates/ascfDemos/page/API/pages/file/file.js +75 -0
- package/dist/templates/ascfDemos/page/API/pages/file/file.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/fileManager/fileManager.css +16 -0
- package/dist/templates/ascfDemos/page/API/pages/fileManager/fileManager.hxml +17 -0
- package/dist/templates/ascfDemos/page/API/pages/fileManager/fileManager.js +16 -0
- package/dist/templates/ascfDemos/page/API/pages/fileManager/fileManager.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/get-ext-config/get-ext-config.css +0 -0
- package/dist/templates/ascfDemos/page/API/pages/get-ext-config/get-ext-config.hxml +3 -0
- package/dist/templates/ascfDemos/page/API/pages/get-ext-config/get-ext-config.js +22 -0
- package/dist/templates/ascfDemos/page/API/pages/get-ext-config/get-ext-config.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/get-fuzzy-location/get-fuzzy-location.css +27 -0
- package/dist/templates/ascfDemos/page/API/pages/get-fuzzy-location/get-fuzzy-location.hxml +10 -0
- package/dist/templates/ascfDemos/page/API/pages/get-fuzzy-location/get-fuzzy-location.js +25 -0
- package/dist/templates/ascfDemos/page/API/pages/get-fuzzy-location/get-fuzzy-location.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/get-hxml-info/get-hxml-info.css +47 -0
- package/dist/templates/ascfDemos/page/API/pages/get-hxml-info/get-hxml-info.hxml +35 -0
- package/dist/templates/ascfDemos/page/API/pages/get-hxml-info/get-hxml-info.js +29 -0
- package/dist/templates/ascfDemos/page/API/pages/get-hxml-info/get-hxml-info.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/get-location/get-location.css +27 -0
- package/dist/templates/ascfDemos/page/API/pages/get-location/get-location.hxml +10 -0
- package/dist/templates/ascfDemos/page/API/pages/get-location/get-location.js +23 -0
- package/dist/templates/ascfDemos/page/API/pages/get-location/get-location.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/get-system-info/get-system-info.css +1 -0
- package/dist/templates/ascfDemos/page/API/pages/get-system-info/get-system-info.hxml +38 -0
- package/dist/templates/ascfDemos/page/API/pages/get-system-info/get-system-info.js +51 -0
- package/dist/templates/ascfDemos/page/API/pages/get-system-info/get-system-info.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/get-system-info-sync/get-system-info-sync.css +1 -0
- package/dist/templates/ascfDemos/page/API/pages/get-system-info-sync/get-system-info-sync.hxml +39 -0
- package/dist/templates/ascfDemos/page/API/pages/get-system-info-sync/get-system-info-sync.js +45 -0
- package/dist/templates/ascfDemos/page/API/pages/get-system-info-sync/get-system-info-sync.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/getLaunchOptions/getLaunchOptions.css +12 -0
- package/dist/templates/ascfDemos/page/API/pages/getLaunchOptions/getLaunchOptions.hxml +24 -0
- package/dist/templates/ascfDemos/page/API/pages/getLaunchOptions/getLaunchOptions.js +17 -0
- package/dist/templates/ascfDemos/page/API/pages/getLaunchOptions/getLaunchOptions.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/getNetworkType/getNetworkType.css +10 -0
- package/dist/templates/ascfDemos/page/API/pages/getNetworkType/getNetworkType.hxml +4 -0
- package/dist/templates/ascfDemos/page/API/pages/getNetworkType/getNetworkType.js +15 -0
- package/dist/templates/ascfDemos/page/API/pages/getNetworkType/getNetworkType.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/gyroscope/gyroscope.css +18 -0
- package/dist/templates/ascfDemos/page/API/pages/gyroscope/gyroscope.hxml +29 -0
- package/dist/templates/ascfDemos/page/API/pages/gyroscope/gyroscope.js +111 -0
- package/dist/templates/ascfDemos/page/API/pages/gyroscope/gyroscope.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/image/image.css +40 -0
- package/dist/templates/ascfDemos/page/API/pages/image/image.hxml +17 -0
- package/dist/templates/ascfDemos/page/API/pages/image/image.js +82 -0
- package/dist/templates/ascfDemos/page/API/pages/image/image.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/intervalAndTimeOut/intervalAndTimeOut.css +0 -0
- package/dist/templates/ascfDemos/page/API/pages/intervalAndTimeOut/intervalAndTimeOut.hxml +10 -0
- package/dist/templates/ascfDemos/page/API/pages/intervalAndTimeOut/intervalAndTimeOut.js +54 -0
- package/dist/templates/ascfDemos/page/API/pages/intervalAndTimeOut/intervalAndTimeOut.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/make-phone-call/make-phone-call.css +17 -0
- package/dist/templates/ascfDemos/page/API/pages/make-phone-call/make-phone-call.hxml +6 -0
- package/dist/templates/ascfDemos/page/API/pages/make-phone-call/make-phone-call.js +15 -0
- package/dist/templates/ascfDemos/page/API/pages/make-phone-call/make-phone-call.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/navigationBar/navigationBar.css +6 -0
- package/dist/templates/ascfDemos/page/API/pages/navigationBar/navigationBar.hxml +10 -0
- package/dist/templates/ascfDemos/page/API/pages/navigationBar/navigationBar.js +93 -0
- package/dist/templates/ascfDemos/page/API/pages/navigationBar/navigationBar.json +4 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/navigate/navigate.css +0 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/navigate/navigate.hxml +1 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/navigate/navigate.js +2 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/navigate/navigate.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/navigator.css +0 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/navigator.hxml +6 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/navigator.js +22 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/navigator.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/redirect/redirect.css +0 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/redirect/redirect.hxml +1 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/redirect/redirect.js +2 -0
- package/dist/templates/ascfDemos/page/API/pages/navigator/redirect/redirect.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/open-location/open-location.css +1 -0
- package/dist/templates/ascfDemos/page/API/pages/open-location/open-location.hxml +48 -0
- package/dist/templates/ascfDemos/page/API/pages/open-location/open-location.js +44 -0
- package/dist/templates/ascfDemos/page/API/pages/open-location/open-location.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/page-scroll/page-scroll.css +11 -0
- package/dist/templates/ascfDemos/page/API/pages/page-scroll/page-scroll.hxml +13 -0
- package/dist/templates/ascfDemos/page/API/pages/page-scroll/page-scroll.js +35 -0
- package/dist/templates/ascfDemos/page/API/pages/page-scroll/page-scroll.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/request/request.css +0 -0
- package/dist/templates/ascfDemos/page/API/pages/request/request.hxml +3 -0
- package/dist/templates/ascfDemos/page/API/pages/request/request.js +34 -0
- package/dist/templates/ascfDemos/page/API/pages/request/request.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/scan-code/scan-code.css +35 -0
- package/dist/templates/ascfDemos/page/API/pages/scan-code/scan-code.hxml +9 -0
- package/dist/templates/ascfDemos/page/API/pages/scan-code/scan-code.js +16 -0
- package/dist/templates/ascfDemos/page/API/pages/scan-code/scan-code.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/set-tab-bar/set-tab-bar.css +30 -0
- package/dist/templates/ascfDemos/page/API/pages/set-tab-bar/set-tab-bar.hxml +17 -0
- package/dist/templates/ascfDemos/page/API/pages/set-tab-bar/set-tab-bar.js +61 -0
- package/dist/templates/ascfDemos/page/API/pages/set-tab-bar/set-tab-bar.json +4 -0
- package/dist/templates/ascfDemos/page/API/pages/setNavigationBarTitle/setNavigationBarTitle.css +24 -0
- package/dist/templates/ascfDemos/page/API/pages/setNavigationBarTitle/setNavigationBarTitle.hxml +7 -0
- package/dist/templates/ascfDemos/page/API/pages/setNavigationBarTitle/setNavigationBarTitle.js +15 -0
- package/dist/templates/ascfDemos/page/API/pages/setNavigationBarTitle/setNavigationBarTitle.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/setScreenBrightness/setScreenBrightness.css +28 -0
- package/dist/templates/ascfDemos/page/API/pages/setScreenBrightness/setScreenBrightness.hxml +14 -0
- package/dist/templates/ascfDemos/page/API/pages/setScreenBrightness/setScreenBrightness.js +47 -0
- package/dist/templates/ascfDemos/page/API/pages/setScreenBrightness/setScreenBrightness.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/setting/setting.css +12 -0
- package/dist/templates/ascfDemos/page/API/pages/setting/setting.hxml +77 -0
- package/dist/templates/ascfDemos/page/API/pages/setting/setting.js +19 -0
- package/dist/templates/ascfDemos/page/API/pages/setting/setting.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/loading/loading.css +3 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/loading/loading.hxml +4 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/loading/loading.js +30 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/loading/loading.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/modal/modal.css +3 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/modal/modal.hxml +4 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/modal/modal.js +38 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/modal/modal.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/toast/toast.css +3 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/toast/toast.hxml +3 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/toast/toast.js +16 -0
- package/dist/templates/ascfDemos/page/API/pages/showToast/toast/toast.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/storage/storage.css +22 -0
- package/dist/templates/ascfDemos/page/API/pages/storage/storage.hxml +15 -0
- package/dist/templates/ascfDemos/page/API/pages/storage/storage.js +140 -0
- package/dist/templates/ascfDemos/page/API/pages/storage/storage.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/upload-file/upload-file.css +10 -0
- package/dist/templates/ascfDemos/page/API/pages/upload-file/upload-file.hxml +13 -0
- package/dist/templates/ascfDemos/page/API/pages/upload-file/upload-file.js +41 -0
- package/dist/templates/ascfDemos/page/API/pages/upload-file/upload-file.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/vibrate/vibrate.css +7 -0
- package/dist/templates/ascfDemos/page/API/pages/vibrate/vibrate.hxml +8 -0
- package/dist/templates/ascfDemos/page/API/pages/vibrate/vibrate.js +11 -0
- package/dist/templates/ascfDemos/page/API/pages/vibrate/vibrate.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/video/index.css +20 -0
- package/dist/templates/ascfDemos/page/API/pages/video/index.hxml +14 -0
- package/dist/templates/ascfDemos/page/API/pages/video/index.js +38 -0
- package/dist/templates/ascfDemos/page/API/pages/video/index.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/video/video.css +17 -0
- package/dist/templates/ascfDemos/page/API/pages/video/video.hxml +7 -0
- package/dist/templates/ascfDemos/page/API/pages/video/video.js +23 -0
- package/dist/templates/ascfDemos/page/API/pages/video/video.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/webSocket/webSocket.css +33 -0
- package/dist/templates/ascfDemos/page/API/pages/webSocket/webSocket.hxml +17 -0
- package/dist/templates/ascfDemos/page/API/pages/webSocket/webSocket.js +103 -0
- package/dist/templates/ascfDemos/page/API/pages/webSocket/webSocket.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/wifi/wifi.css +95 -0
- package/dist/templates/ascfDemos/page/API/pages/wifi/wifi.hxml +32 -0
- package/dist/templates/ascfDemos/page/API/pages/wifi/wifi.js +42 -0
- package/dist/templates/ascfDemos/page/API/pages/wifi/wifi.json +3 -0
- package/dist/templates/ascfDemos/page/API/pages/wx/navigationBarTitle/navigationBarTitle.css +2 -0
- package/dist/templates/ascfDemos/page/API/pages/wx/navigationBarTitle/navigationBarTitle.hxml +19 -0
- package/dist/templates/ascfDemos/page/API/pages/wx/navigationBarTitle/navigationBarTitle.js +182 -0
- package/dist/templates/ascfDemos/page/API/pages/wx/navigationBarTitle/navigationBarTitle.json +4 -0
- package/dist/templates/ascfDemos/page/common/index.css +117 -0
- package/dist/templates/ascfDemos/page/common/lib/asui.css +1036 -0
- package/dist/templates/ascfDemos/page/component/image/green_tri.png +0 -0
- package/dist/templates/ascfDemos/page/component/image/location.png +0 -0
- package/dist/templates/ascfDemos/page/component/image/logo.png +0 -0
- package/dist/templates/ascfDemos/page/component/image/roadway.png +0 -0
- package/dist/templates/ascfDemos/page/component/index.css +11 -0
- package/dist/templates/ascfDemos/page/component/index.hxml +7 -0
- package/dist/templates/ascfDemos/page/component/index.js +10 -0
- package/dist/templates/ascfDemos/page/component/index.json +7 -0
- package/dist/templates/ascfDemos/page/component/pages/button/button.css +11 -0
- package/dist/templates/ascfDemos/page/component/pages/button/button.hxml +11 -0
- package/dist/templates/ascfDemos/page/component/pages/button/button.js +4 -0
- package/dist/templates/ascfDemos/page/component/pages/button/button.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/camera/camera.css +12 -0
- package/dist/templates/ascfDemos/page/component/pages/camera/camera.hxml +8 -0
- package/dist/templates/ascfDemos/page/component/pages/camera/camera.js +113 -0
- package/dist/templates/ascfDemos/page/component/pages/camera/camera.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/canvas/canvas.css +10 -0
- package/dist/templates/ascfDemos/page/component/pages/canvas/canvas.hxml +5 -0
- package/dist/templates/ascfDemos/page/component/pages/canvas/canvas.js +49 -0
- package/dist/templates/ascfDemos/page/component/pages/canvas/canvas.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/checkbox/checkbox.css +13 -0
- package/dist/templates/ascfDemos/page/component/pages/checkbox/checkbox.hxml +8 -0
- package/dist/templates/ascfDemos/page/component/pages/checkbox/checkbox.js +17 -0
- package/dist/templates/ascfDemos/page/component/pages/checkbox/checkbox.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/checkboxgroup/checkboxgroup.css +14 -0
- package/dist/templates/ascfDemos/page/component/pages/checkboxgroup/checkboxgroup.hxml +26 -0
- package/dist/templates/ascfDemos/page/component/pages/checkboxgroup/checkboxgroup.js +21 -0
- package/dist/templates/ascfDemos/page/component/pages/checkboxgroup/checkboxgroup.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/form/form.css +27 -0
- package/dist/templates/ascfDemos/page/component/pages/form/form.hxml +53 -0
- package/dist/templates/ascfDemos/page/component/pages/form/form.js +33 -0
- package/dist/templates/ascfDemos/page/component/pages/form/form.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/icon/icon.css +39 -0
- package/dist/templates/ascfDemos/page/component/pages/icon/icon.hxml +120 -0
- package/dist/templates/ascfDemos/page/component/pages/icon/icon.js +22 -0
- package/dist/templates/ascfDemos/page/component/pages/icon/icon.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/image/image.css +3 -0
- package/dist/templates/ascfDemos/page/component/pages/image/image.hxml +6 -0
- package/dist/templates/ascfDemos/page/component/pages/image/image.js +2 -0
- package/dist/templates/ascfDemos/page/component/pages/image/image.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/input/input.css +9 -0
- package/dist/templates/ascfDemos/page/component/pages/input/input.hxml +9 -0
- package/dist/templates/ascfDemos/page/component/pages/input/input.js +11 -0
- package/dist/templates/ascfDemos/page/component/pages/input/input.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/label/label.css +10 -0
- package/dist/templates/ascfDemos/page/component/pages/label/label.hxml +31 -0
- package/dist/templates/ascfDemos/page/component/pages/label/label.js +12 -0
- package/dist/templates/ascfDemos/page/component/pages/label/label.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/map/map.css +0 -0
- package/dist/templates/ascfDemos/page/component/pages/map/map.hxml +1 -0
- package/dist/templates/ascfDemos/page/component/pages/map/map.js +33 -0
- package/dist/templates/ascfDemos/page/component/pages/map/map.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/movable-area/movable-area.css +39 -0
- package/dist/templates/ascfDemos/page/component/pages/movable-area/movable-area.hxml +44 -0
- package/dist/templates/ascfDemos/page/component/pages/movable-area/movable-area.js +59 -0
- package/dist/templates/ascfDemos/page/component/pages/movable-area/movable-area.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/movable-view/movable-view.css +21 -0
- package/dist/templates/ascfDemos/page/component/pages/movable-view/movable-view.hxml +27 -0
- package/dist/templates/ascfDemos/page/component/pages/movable-view/movable-view.js +2 -0
- package/dist/templates/ascfDemos/page/component/pages/movable-view/movable-view.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/navigate/navigate.css +0 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/navigate/navigate.hxml +1 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/navigate/navigate.js +2 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/navigate/navigate.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/navigator.css +12 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/navigator.hxml +11 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/navigator.js +3 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/navigator.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/reLaunch/reLaunch.css +0 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/reLaunch/reLaunch.hxml +1 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/reLaunch/reLaunch.js +4 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/reLaunch/reLaunch.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/redirect/redirect.css +0 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/redirect/redirect.hxml +1 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/redirect/redirect.js +3 -0
- package/dist/templates/ascfDemos/page/component/pages/navigator/redirect/redirect.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/picker/picker.css +25 -0
- package/dist/templates/ascfDemos/page/component/pages/picker/picker.hxml +47 -0
- package/dist/templates/ascfDemos/page/component/pages/picker/picker.js +57 -0
- package/dist/templates/ascfDemos/page/component/pages/picker/picker.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/picker-view/picker-view.css +9 -0
- package/dist/templates/ascfDemos/page/component/pages/picker-view/picker-view.hxml +15 -0
- package/dist/templates/ascfDemos/page/component/pages/picker-view/picker-view.js +39 -0
- package/dist/templates/ascfDemos/page/component/pages/picker-view/picker-view.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/progress/progress.css +0 -0
- package/dist/templates/ascfDemos/page/component/pages/progress/progress.hxml +3 -0
- package/dist/templates/ascfDemos/page/component/pages/progress/progress.js +4 -0
- package/dist/templates/ascfDemos/page/component/pages/progress/progress.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/radio/radio.css +13 -0
- package/dist/templates/ascfDemos/page/component/pages/radio/radio.hxml +8 -0
- package/dist/templates/ascfDemos/page/component/pages/radio/radio.js +29 -0
- package/dist/templates/ascfDemos/page/component/pages/radio/radio.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/rich-text/rich-text.css +16 -0
- package/dist/templates/ascfDemos/page/component/pages/rich-text/rich-text.hxml +9 -0
- package/dist/templates/ascfDemos/page/component/pages/rich-text/rich-text.js +35 -0
- package/dist/templates/ascfDemos/page/component/pages/rich-text/rich-text.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/scroll-view/scroll-view.css +70 -0
- package/dist/templates/ascfDemos/page/component/pages/scroll-view/scroll-view.hxml +21 -0
- package/dist/templates/ascfDemos/page/component/pages/scroll-view/scroll-view.js +5 -0
- package/dist/templates/ascfDemos/page/component/pages/scroll-view/scroll-view.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/slider/slider.css +0 -0
- package/dist/templates/ascfDemos/page/component/pages/slider/slider.hxml +6 -0
- package/dist/templates/ascfDemos/page/component/pages/slider/slider.js +1 -0
- package/dist/templates/ascfDemos/page/component/pages/slider/slider.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/swiper/swiper.css +71 -0
- package/dist/templates/ascfDemos/page/component/pages/swiper/swiper.hxml +21 -0
- package/dist/templates/ascfDemos/page/component/pages/swiper/swiper.js +29 -0
- package/dist/templates/ascfDemos/page/component/pages/swiper/swiper.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/switch/switch.css +13 -0
- package/dist/templates/ascfDemos/page/component/pages/switch/switch.hxml +10 -0
- package/dist/templates/ascfDemos/page/component/pages/switch/switch.js +20 -0
- package/dist/templates/ascfDemos/page/component/pages/switch/switch.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/text/text.css +14 -0
- package/dist/templates/ascfDemos/page/component/pages/text/text.hxml +9 -0
- package/dist/templates/ascfDemos/page/component/pages/text/text.js +37 -0
- package/dist/templates/ascfDemos/page/component/pages/text/text.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/textarea/textarea.css +0 -0
- package/dist/templates/ascfDemos/page/component/pages/textarea/textarea.hxml +6 -0
- package/dist/templates/ascfDemos/page/component/pages/textarea/textarea.js +1 -0
- package/dist/templates/ascfDemos/page/component/pages/textarea/textarea.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/video/video.css +19 -0
- package/dist/templates/ascfDemos/page/component/pages/video/video.hxml +7 -0
- package/dist/templates/ascfDemos/page/component/pages/video/video.js +26 -0
- package/dist/templates/ascfDemos/page/component/pages/video/video.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/view/view.css +89 -0
- package/dist/templates/ascfDemos/page/component/pages/view/view.hxml +14 -0
- package/dist/templates/ascfDemos/page/component/pages/view/view.js +3 -0
- package/dist/templates/ascfDemos/page/component/pages/view/view.json +3 -0
- package/dist/templates/ascfDemos/page/component/pages/web-view/web-view.css +0 -0
- package/dist/templates/ascfDemos/page/component/pages/web-view/web-view.hxml +2 -0
- package/dist/templates/ascfDemos/page/component/pages/web-view/web-view.js +1 -0
- package/dist/templates/ascfDemos/page/component/pages/web-view/web-view.json +3 -0
- package/dist/templates/ascfDemos/page/framework/index.css +11 -0
- package/dist/templates/ascfDemos/page/framework/index.hxml +7 -0
- package/dist/templates/ascfDemos/page/framework/index.js +10 -0
- package/dist/templates/ascfDemos/page/framework/index.json +7 -0
- package/dist/templates/ascfDemos/page/open/index.css +11 -0
- package/dist/templates/ascfDemos/page/open/index.hxml +7 -0
- package/dist/templates/ascfDemos/page/open/index.js +14 -0
- package/dist/templates/ascfDemos/page/open/index.json +7 -0
- package/dist/templates/ascfDemos/page/open/pages/authorize/authorize.css +0 -0
- package/dist/templates/ascfDemos/page/open/pages/authorize/authorize.hxml +3 -0
- package/dist/templates/ascfDemos/page/open/pages/authorize/authorize.js +18 -0
- package/dist/templates/ascfDemos/page/open/pages/authorize/authorize.json +3 -0
- package/dist/templates/ascfDemos/page/open/pages/choose-address/choose-address.css +12 -0
- package/dist/templates/ascfDemos/page/open/pages/choose-address/choose-address.hxml +61 -0
- package/dist/templates/ascfDemos/page/open/pages/choose-address/choose-address.js +20 -0
- package/dist/templates/ascfDemos/page/open/pages/choose-address/choose-address.json +3 -0
- package/dist/templates/ascfDemos/page/open/pages/choose-invoice-title/choose-invoice-title.css +11 -0
- package/dist/templates/ascfDemos/page/open/pages/choose-invoice-title/choose-invoice-title.hxml +77 -0
- package/dist/templates/ascfDemos/page/open/pages/choose-invoice-title/choose-invoice-title.js +27 -0
- package/dist/templates/ascfDemos/page/open/pages/choose-invoice-title/choose-invoice-title.json +3 -0
- package/dist/templates/ascfDemos/page/open/pages/getPhoneNumber/getPhoneNumber.css +25 -0
- package/dist/templates/ascfDemos/page/open/pages/getPhoneNumber/getPhoneNumber.hxml +4 -0
- package/dist/templates/ascfDemos/page/open/pages/getPhoneNumber/getPhoneNumber.js +12 -0
- package/dist/templates/ascfDemos/page/open/pages/getPhoneNumber/getPhoneNumber.json +3 -0
- package/dist/templates/ascfDemos/page/open/pages/login/login.css +13 -0
- package/dist/templates/ascfDemos/page/open/pages/login/login.hxml +5 -0
- package/dist/templates/ascfDemos/page/open/pages/login/login.js +20 -0
- package/dist/templates/ascfDemos/page/open/pages/login/login.json +3 -0
- package/dist/templates/ascfDemos/page/open/pages/message/message.css +0 -0
- package/dist/templates/ascfDemos/page/open/pages/message/message.hxml +3 -0
- package/dist/templates/ascfDemos/page/open/pages/message/message.js +63 -0
- package/dist/templates/ascfDemos/page/open/pages/message/message.json +3 -0
- package/dist/templates/ascfDemos/page/open/pages/openSetting/openSetting.css +0 -0
- package/dist/templates/ascfDemos/page/open/pages/openSetting/openSetting.hxml +3 -0
- package/dist/templates/ascfDemos/page/open/pages/openSetting/openSetting.js +5 -0
- package/dist/templates/ascfDemos/page/open/pages/openSetting/openSetting.json +3 -0
- package/dist/templates/ascfDemos/video/tempVideo.mp4 +0 -0
- package/dist/templates/ascfDemosQs/app.json +129 -0
- package/dist/templates/ascfDemosQs/app_icon.png +0 -0
- package/dist/templates/ascfProject/AppScope/app.json5 +11 -0
- package/dist/templates/ascfProject/AppScope/resources/base/element/string.json +8 -0
- package/dist/templates/ascfProject/AppScope/resources/base/media/app_icon.png +0 -0
- package/dist/templates/ascfProject/build-profile.json5 +42 -0
- package/dist/templates/ascfProject/code-linter.json5 +20 -0
- package/dist/templates/ascfProject/entry/build-profile.json5 +28 -0
- package/dist/templates/ascfProject/entry/hvigorfile.ts +6 -0
- package/dist/templates/ascfProject/entry/obfuscation-rules.txt +23 -0
- package/dist/templates/ascfProject/entry/oh-package.json5 +11 -0
- package/dist/templates/ascfProject/entry/src/main/ets/abilitystage/AbilityStage.ets +7 -0
- package/dist/templates/ascfProject/entry/src/main/ets/entryability/EntryAbility.ets +4 -0
- package/dist/templates/ascfProject/entry/src/main/ets/pages/Index.ets +10 -0
- package/dist/templates/ascfProject/entry/src/main/module.json5 +65 -0
- package/dist/templates/ascfProject/entry/src/main/resources/base/element/color.json +8 -0
- package/dist/templates/ascfProject/entry/src/main/resources/base/element/string.json +16 -0
- package/dist/templates/ascfProject/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/dist/templates/ascfProject/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/dist/templates/ascfProject/entry/src/main/resources/en_US/element/string.json +16 -0
- package/dist/templates/ascfProject/entry/src/main/resources/zh_CN/element/string.json +16 -0
- package/dist/templates/ascfProject/entry/src/mock/mock-config.json5 +2 -0
- package/dist/templates/ascfProject/entry/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/dist/templates/ascfProject/entry/src/ohosTest/ets/test/List.test.ets +5 -0
- package/dist/templates/ascfProject/entry/src/ohosTest/module.json5 +12 -0
- package/dist/templates/ascfProject/entry/src/test/List.test.ets +5 -0
- package/dist/templates/ascfProject/entry/src/test/LocalUnit.test.ets +33 -0
- package/dist/templates/ascfProject/gitignore +12 -0
- package/dist/templates/ascfProject/hvigor/hvigor-config.json5 +23 -0
- package/dist/templates/ascfProject/hvigorfile.ts +10 -0
- package/dist/templates/ascfProject/oh-package.json5 +9 -0
- package/dist/templates/ascfSrcHello/app.js +14 -0
- package/dist/templates/ascfSrcHello/app.json +5 -0
- package/dist/templates/ascfSrcHelloQs/app.json +11 -0
- package/dist/templates/ascfSrcHelloQs/app_icon.png +0 -0
- package/dist/templates/newComponent/comp.css +6 -0
- package/dist/templates/newComponent/comp.hxml +3 -0
- package/dist/templates/newComponent/comp.js +15 -0
- package/dist/templates/newComponent/comp.json +4 -0
- package/dist/templates/newPage/page.css +18 -0
- package/dist/templates/newPage/page.hxml +3 -0
- package/dist/templates/newPage/page.js +5 -0
- package/dist/templates/newPage/page.json +4 -0
- package/dist/templates/newServiceWidget/EntryCard/entry/base/snapshot/HelloWidget-1x2.png +0 -0
- package/dist/templates/newServiceWidget/EntryCard/entry/base/snapshot/HelloWidget-2x2.png +0 -0
- package/dist/templates/newServiceWidget/EntryCard/entry/base/snapshot/HelloWidget-2x4.png +0 -0
- package/dist/templates/newServiceWidget/EntryCard/entry/base/snapshot/HelloWidget-4x4.png +0 -0
- package/dist/templates/newServiceWidget/EntryCard/entry/base/snapshot/HelloWidget-6x4.png +0 -0
- package/dist/templates/newServiceWidget/entry/src/main/ets/entryformability/EntryFormAbility.ets +32 -0
- package/dist/templates/newServiceWidget/entry/src/main/ets/hellowidget/pages/HelloWidgetCard.ets +21 -0
- package/dist/templates/newServiceWidget/entry/src/main/module.json5 +19 -0
- package/dist/templates/newServiceWidget/entry/src/main/resources/base/element/string.json +20 -0
- package/dist/templates/newServiceWidget/entry/src/main/resources/base/profile/form_config.json +23 -0
- package/package.json +9 -4
package/dist/index.d.mts
CHANGED
|
@@ -22,29 +22,27 @@ declare class Logger {
|
|
|
22
22
|
}
|
|
23
23
|
declare function getLogger(categories: any): Logger;
|
|
24
24
|
|
|
25
|
-
declare const
|
|
26
|
-
declare const LEGACY_PKG_NAME = "com.huawei.fastapp.dev/com.huawei.ascf.main.AscfActivity";
|
|
25
|
+
declare const FASTAPP_LOADER_PKG_NAME = "com.huawei.fastapp.dev";
|
|
27
26
|
declare const LEGACY_DEVICE = "legacy";
|
|
28
27
|
declare const HOS_DEVICE = "hos";
|
|
29
28
|
declare const DEBUG_TYPE_VIEW = "view";
|
|
30
29
|
declare const DEBUG_TYPE_SERVICE = "service";
|
|
31
|
-
declare const
|
|
32
|
-
declare const
|
|
30
|
+
declare const HARMONY_OS = "HarmonyOS";
|
|
31
|
+
declare const HDC_CONNECTOR = "hdc";
|
|
32
|
+
declare const ADB_CONNECTOR = "adb";
|
|
33
|
+
declare const V8_PORT = "9229";
|
|
33
34
|
|
|
34
35
|
type BuildModeType = 'debug' | 'release';
|
|
35
|
-
type BuildTargetType = typeof BUILD_TARGET_AS | typeof BUILD_TARGET_QS;
|
|
36
36
|
type BuildDeviceType = typeof HOS_DEVICE | typeof LEGACY_DEVICE;
|
|
37
37
|
type BuilderOptions = {
|
|
38
38
|
projectRoot?: string;
|
|
39
39
|
deviceId?: string;
|
|
40
40
|
buildMode?: BuildModeType;
|
|
41
|
-
targets?: BuildTargetType;
|
|
42
41
|
deviceType?: BuildDeviceType;
|
|
43
42
|
subCmd: string;
|
|
44
43
|
};
|
|
45
44
|
type DebuggerOptions = {
|
|
46
45
|
open?: '' | 'default' | 'chrome' | 'edge';
|
|
47
|
-
targets?: BuildTargetType;
|
|
48
46
|
deviceType?: BuildDeviceType;
|
|
49
47
|
deviceId?: string;
|
|
50
48
|
bundleName?: string;
|
|
@@ -53,13 +51,11 @@ interface IInstallSpkShared {
|
|
|
53
51
|
logger: any;
|
|
54
52
|
projectRoot: any;
|
|
55
53
|
deviceId: any;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
rportRmCmd: any;
|
|
62
|
-
legacyPkg?: string;
|
|
54
|
+
}
|
|
55
|
+
interface IImageData {
|
|
56
|
+
data: Uint8ClampedArray;
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
declare function getDebugees(localPort: string | number): Promise<never[]>;
|
|
@@ -77,8 +73,9 @@ declare abstract class DebuggerProcess {
|
|
|
77
73
|
abstract stopService(): any;
|
|
78
74
|
abstract checkAndGetBundleName(): Promise<string | boolean | undefined>;
|
|
79
75
|
openBrowser(type: any, localPort: any, fallback?: string): Promise<void>;
|
|
80
|
-
startDebugServer(url:
|
|
76
|
+
startDebugServer(url: String, v8WsUrl: string): Promise<void>;
|
|
81
77
|
stopDebugServer(): void;
|
|
78
|
+
reversePort(port: number): Promise<boolean>;
|
|
82
79
|
}
|
|
83
80
|
|
|
84
81
|
declare class AscfDebugger extends DebuggerProcess {
|
|
@@ -114,8 +111,6 @@ declare abstract class BuildProcess {
|
|
|
114
111
|
installDeps(): Promise<void>;
|
|
115
112
|
prepareAssemble(projectRoot: string, args?: string[]): Promise<void>;
|
|
116
113
|
abstract start(): void;
|
|
117
|
-
abstract assembleHap(): void;
|
|
118
|
-
abstract assembleApp(): void;
|
|
119
114
|
abstract installHap(): void;
|
|
120
115
|
abstract assembleAndInstallHap(): void;
|
|
121
116
|
abstract uninstall(): void;
|
|
@@ -126,14 +121,14 @@ declare abstract class BuildProcess {
|
|
|
126
121
|
init(): void;
|
|
127
122
|
runCmdAsync(cmd: any, args?: string[], options?: any): Promise<any>;
|
|
128
123
|
clean(): Promise<void>;
|
|
124
|
+
assembleHap(): Promise<void>;
|
|
125
|
+
assembleApp(): Promise<void>;
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
declare class AscfBuilder extends BuildProcess {
|
|
132
129
|
constructor(options: BuilderOptions);
|
|
133
130
|
runHdcCmdAsync(args?: string[], options?: any): Promise<any>;
|
|
134
131
|
start(): Promise<void>;
|
|
135
|
-
assembleHap(): Promise<void>;
|
|
136
|
-
assembleApp(): Promise<void>;
|
|
137
132
|
usingTmpDir(deviceId: any, cb: any): Promise<void>;
|
|
138
133
|
installHap(): Promise<void>;
|
|
139
134
|
assembleAndInstallHap(): Promise<void>;
|
|
@@ -147,6 +142,11 @@ declare function isMpProject(path: any): boolean;
|
|
|
147
142
|
|
|
148
143
|
declare const IS_WIN32: boolean;
|
|
149
144
|
declare const IS_MACOS: boolean;
|
|
145
|
+
declare const IS_OPENHARMONY: boolean;
|
|
146
|
+
declare const TOOLS_DIR_OSX = "/Applications/DevEco-Studio.app/Contents/tools";
|
|
147
|
+
declare const TOOLS_DIR_WIN = "C:\\Program Files\\Huawei\\DevEco Studio\\tools";
|
|
148
|
+
declare const TOOLS_DIR_OPENHARMONY = "/data/app";
|
|
149
|
+
declare const DEFAULT_TOOLS_DIR: string;
|
|
150
150
|
declare function getDevEcoToolsDir(): string;
|
|
151
151
|
declare function getPath(...args: any[]): string;
|
|
152
152
|
declare function getNodePath(): string;
|
|
@@ -156,6 +156,7 @@ declare function getHvigorwPath(): string;
|
|
|
156
156
|
declare function getDevEcoSdkHome(): string;
|
|
157
157
|
declare function getHdcPath(): string;
|
|
158
158
|
declare function getNodeBinPath(): string;
|
|
159
|
+
declare function getNodeDirPath(): string;
|
|
159
160
|
declare function getJavaBinPath(): string;
|
|
160
161
|
|
|
161
162
|
declare class AsyncResult<T> {
|
|
@@ -196,7 +197,7 @@ declare function ascfCompile(projectRoot: any, options?: any, onCp?: any): Promi
|
|
|
196
197
|
declare function ascfConvert(input: any, projectRoot: any, options?: any): Promise<void>;
|
|
197
198
|
declare function ascfGenCert(projectRoot: any, options: any): Promise<void>;
|
|
198
199
|
declare function ascfGenP12(projectRoot: any, options: any): Promise<void>;
|
|
199
|
-
declare function startDebugServerCmd(projectRoot: any, opts: any): Promise<unknown>;
|
|
200
|
+
declare function startDebugServerCmd(projectRoot: any, opts: any, progressObj: any): Promise<unknown>;
|
|
200
201
|
declare function stopDebugServer(): void;
|
|
201
202
|
declare function getDebugServerInfo(localPort: string | number, path: string): Promise<any>;
|
|
202
203
|
declare function getAscfDebuggerPidFile(pid: any): string | undefined;
|
|
@@ -209,6 +210,41 @@ declare function parseJsonSafe<T>(jsonStr: any, def: T): T;
|
|
|
209
210
|
declare function parseJsonFile<T>(filepath: any, def: T): T;
|
|
210
211
|
declare function mergeJson(oldJson: any, newJson: any): any;
|
|
211
212
|
|
|
213
|
+
declare const FAIL = "FAIL";
|
|
214
|
+
declare class AtomicServiceAppIconChecker {
|
|
215
|
+
private iconImgData;
|
|
216
|
+
private templateIconImgData;
|
|
217
|
+
private width;
|
|
218
|
+
private height;
|
|
219
|
+
constructor(iconImageData: IImageData, templateIconImageData: IImageData);
|
|
220
|
+
static imageDataInit(iconUrl: string): Promise<{
|
|
221
|
+
iconImageData: IImageData;
|
|
222
|
+
templateIconImageData: IImageData;
|
|
223
|
+
}>;
|
|
224
|
+
private static loadImageToCanvas;
|
|
225
|
+
bgraToHsv(bgraData: Uint8ClampedArray): Uint8Array;
|
|
226
|
+
inRange(hsvData: Uint8ClampedArray): Uint8Array;
|
|
227
|
+
argwhere(mask: Uint8Array): number[][];
|
|
228
|
+
extractNonTransparentHSB(hsvData: Uint8Array, coordinates: number[][]): any;
|
|
229
|
+
hsvToHsb(h: number, s: number, v: number): [number, number, number];
|
|
230
|
+
isColorInBlackOrWhite(h: number, s: number, b: number): string | null;
|
|
231
|
+
isCompare(): string;
|
|
232
|
+
/**
|
|
233
|
+
* 计算图片的锯齿度百分比
|
|
234
|
+
* @returns 锯齿度百分比
|
|
235
|
+
*/
|
|
236
|
+
calculateJaggednessByImageData(): number;
|
|
237
|
+
checkImgSize(): "FAIL: The atomic-service icon size does not meet the requirements(512px*512px)." | "The atomic-service icon size meets the requirements(512px*512px).";
|
|
238
|
+
/**
|
|
239
|
+
* 统计两张图中相同像素位置一个不透明而另一个透明的像素数量
|
|
240
|
+
* @returns 差异透明像素的数量
|
|
241
|
+
*/
|
|
242
|
+
compareTransparency(): number;
|
|
243
|
+
isFeatures(): "FAIL: The outer circle line of the atomic-service icon does not comply with the specifications, or the center circle of the icon is incomplete and independent." | "The outer line of the atomic-service icon meets the specification requirements.";
|
|
244
|
+
isSharpness(): "FAIL: The atomic-service icon is not clear." | "The atomic-service icon is clear.";
|
|
245
|
+
check(): Promise<string[]>;
|
|
246
|
+
}
|
|
247
|
+
|
|
212
248
|
/**
|
|
213
249
|
* 获取ADB工具的路径。
|
|
214
250
|
* 根据不同的操作系统平台(Windows, macOS, Linux),返回对应的ADB可执行文件路径。
|
|
@@ -219,9 +255,8 @@ declare function getAdbPath(): Promise<string>;
|
|
|
219
255
|
declare function runAdbCmdAsync(args?: string[], options?: any): Promise<any>;
|
|
220
256
|
declare const listTargets: () => Promise<any>;
|
|
221
257
|
declare const getDeviceName: (deviceId: string) => Promise<string>;
|
|
222
|
-
declare const tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number
|
|
258
|
+
declare const tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number>;
|
|
223
259
|
declare const startHostPkg: (deviceId: string, bundleName: string) => Promise<string>;
|
|
224
|
-
declare const startHostPkgUrl: (deviceId: string, bundleName: string, reqUrl: string, legacyPkg: string) => Promise<string>;
|
|
225
260
|
declare const fportListCmd: (deviceId: string) => Promise<string>;
|
|
226
261
|
declare const fportRmCmd: (deviceId: string, localnode: string) => Promise<string>;
|
|
227
262
|
declare const fportCmd: (deviceId: string, localnode: string, remotenode: string) => Promise<string>;
|
|
@@ -229,16 +264,59 @@ declare const rportCmd: (deviceId: string, localnode: string, remotenode: string
|
|
|
229
264
|
declare const rportRmCmd: (deviceId: string, devicenode: string) => Promise<string>;
|
|
230
265
|
declare const getDevicesCmd: () => Promise<string>;
|
|
231
266
|
declare const getLegacyDeviceName: (deviceId: any) => Promise<string>;
|
|
232
|
-
declare const getLegacyProcess: (deviceId: any,
|
|
267
|
+
declare const getLegacyProcess: (deviceId: any, hostPkg: any) => Promise<string>;
|
|
268
|
+
declare const getLegacyHosVersion: (deviceId: any) => Promise<string>;
|
|
233
269
|
/**
|
|
234
270
|
* 查找包安装信息
|
|
235
271
|
*
|
|
236
272
|
* @param deviceId 设备id
|
|
237
273
|
* @param bundleName 包名
|
|
238
274
|
*/
|
|
239
|
-
declare function getLegacyPackInfo(deviceId: any
|
|
275
|
+
declare function getLegacyPackInfo(deviceId: any): Promise<string>;
|
|
240
276
|
declare function getPid(deviceId: string, bundleName: string): Promise<string>;
|
|
241
277
|
|
|
278
|
+
type TemplateEngineOptions = {
|
|
279
|
+
force?: boolean;
|
|
280
|
+
dryRun?: boolean;
|
|
281
|
+
ejsOptions?: any;
|
|
282
|
+
webview?: any;
|
|
283
|
+
};
|
|
284
|
+
type TemplateContext = {
|
|
285
|
+
rootOut: string;
|
|
286
|
+
data: any;
|
|
287
|
+
};
|
|
288
|
+
type TemplateFile = {
|
|
289
|
+
type: 'template' | 'file' | 'modify' | 'delete' | 'copy' | 'rename';
|
|
290
|
+
tpl: string;
|
|
291
|
+
excludes?: string[];
|
|
292
|
+
path: string;
|
|
293
|
+
force?: boolean;
|
|
294
|
+
onModify?: (old: any, data?: any) => boolean;
|
|
295
|
+
};
|
|
296
|
+
type TemplateInfo = {
|
|
297
|
+
templateDir: string;
|
|
298
|
+
files: TemplateFile[];
|
|
299
|
+
};
|
|
300
|
+
declare class TemplateEngine {
|
|
301
|
+
private options;
|
|
302
|
+
constructor(options: TemplateEngineOptions);
|
|
303
|
+
mkdirSync(path: any): void;
|
|
304
|
+
copyFileSync(src: any, dest: any): void;
|
|
305
|
+
copyDirSync(src: any, dest: any, filter?: (sourceFullPath: string, destination: string) => boolean): void;
|
|
306
|
+
writeFileSync(filepath: any, content: any, encoding: any, force?: boolean): void;
|
|
307
|
+
fileRename(filePath: any): any;
|
|
308
|
+
generateByTemplateFile(templateInfo: TemplateInfo, ctx: TemplateContext, tplFile: TemplateFile): Promise<void>;
|
|
309
|
+
generate(templateInfo: TemplateInfo, ctx: TemplateContext): Promise<void[]>;
|
|
310
|
+
}
|
|
311
|
+
declare function createAscfProject(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void>;
|
|
312
|
+
declare function createAscfPage(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
313
|
+
declare function createAscfComponent(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
314
|
+
declare function createServiceWidget(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
315
|
+
|
|
316
|
+
declare function fetchJson(url: string, options: any): Promise<any>;
|
|
317
|
+
declare function fetchHttpsJson(url: string, options: any): Promise<any>;
|
|
318
|
+
declare function downloadApk(url: string, outputDir: string, vscodeProgress: any, options: any): Promise<string>;
|
|
319
|
+
|
|
242
320
|
declare function installAscfTools(): Promise<string>;
|
|
243
321
|
|
|
244
322
|
/**
|
|
@@ -261,12 +339,13 @@ declare function hdcShared({ logger, getDevEcoSdkHome, getPath, getHdcPath }: {
|
|
|
261
339
|
getPath: any;
|
|
262
340
|
getHdcPath: any;
|
|
263
341
|
}): {
|
|
264
|
-
runCmd: (cmd: any, args?: string[], cb?: any, options?: any, onCp?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
342
|
+
runCmd: (cmd: any, args?: string[], cb?: any, options?: any, onCp?: any, progressObj?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
265
343
|
runCmdAsync: (cmd: any, args?: string[], options?: any, onCp?: any) => Promise<any>;
|
|
266
344
|
runExecAsync: (cmd: any, args?: string[], options?: any) => Promise<any>;
|
|
267
345
|
runHdcCmd: (args?: string[], cb?: any, options?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
268
346
|
runHdcCmdAsync: (args?: string[], options?: any) => Promise<any>;
|
|
269
347
|
getDeviceName: (deviceId: string) => Promise<string>;
|
|
348
|
+
getHosVersion: (deviceId: string) => Promise<string>;
|
|
270
349
|
};
|
|
271
350
|
type deviceType = typeof LEGACY_DEVICE | typeof HOS_DEVICE;
|
|
272
351
|
declare class DeviceInfo {
|
|
@@ -310,7 +389,7 @@ declare class BuildProcessFactory {
|
|
|
310
389
|
static create(options: BuilderOptions): Promise<BuildProcess>;
|
|
311
390
|
}
|
|
312
391
|
declare class DebuggerProcessFactory {
|
|
313
|
-
static create(options:
|
|
392
|
+
static create(options: DebuggerOptions): Promise<DebuggerProcess>;
|
|
314
393
|
}
|
|
315
394
|
|
|
316
395
|
declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
@@ -319,9 +398,8 @@ declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
|
319
398
|
}): {
|
|
320
399
|
listTargets: () => Promise<any>;
|
|
321
400
|
getDeviceName: (deviceId: string) => Promise<string>;
|
|
322
|
-
tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number
|
|
401
|
+
tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number>;
|
|
323
402
|
startHostPkg: (deviceId: string, bundleName: string) => Promise<string>;
|
|
324
|
-
startHostPkgUrl: (deviceId: string, bundleName: string, reqUrl: string, legacyPkg: string) => Promise<string>;
|
|
325
403
|
fportListCmd: (deviceId: string) => Promise<string>;
|
|
326
404
|
fportRmCmd: (deviceId: string, localnode: string) => Promise<string>;
|
|
327
405
|
fportCmd: (deviceId: string, localnode: string, remotenode: string) => Promise<string>;
|
|
@@ -329,7 +407,8 @@ declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
|
329
407
|
rportRmCmd: (deviceId: string, devicenode: string) => Promise<string>;
|
|
330
408
|
getDevicesCmd: () => Promise<string>;
|
|
331
409
|
getLegacyDeviceName: (deviceId: any) => Promise<string>;
|
|
332
|
-
getLegacyProcess: (deviceId: any,
|
|
410
|
+
getLegacyProcess: (deviceId: any, hostPkg: any) => Promise<string>;
|
|
411
|
+
getLegacyHosVersion: (deviceId: any) => Promise<string>;
|
|
333
412
|
};
|
|
334
413
|
|
|
335
414
|
declare const ERROR_MSG: string;
|
|
@@ -341,6 +420,15 @@ declare function portManagerShared({ logger, fportListCmd, fportRmCmd, isPortRea
|
|
|
341
420
|
|
|
342
421
|
declare function tryHdcPortReversing(deviceId: any, localPort: any, times?: number): Promise<number | undefined>;
|
|
343
422
|
|
|
344
|
-
declare function installSpkShared({ logger, projectRoot, deviceId
|
|
423
|
+
declare function installSpkShared({ logger, projectRoot, deviceId }: IInstallSpkShared): Promise<void>;
|
|
424
|
+
|
|
425
|
+
declare class DebugPort {
|
|
426
|
+
port: number;
|
|
427
|
+
private static instance;
|
|
428
|
+
private constructor();
|
|
429
|
+
static getInstance(): DebugPort;
|
|
430
|
+
getPort(): number;
|
|
431
|
+
}
|
|
432
|
+
declare const debugPort: DebugPort;
|
|
345
433
|
|
|
346
|
-
export { $async, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE,
|
|
434
|
+
export { $async, ADB_CONNECTOR, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, AtomicServiceAppIconChecker, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE, BuildProcessFactory, DEBUG_TYPE_SERVICE, DEBUG_TYPE_VIEW, DEFAULT_TOOLS_DIR, DebuggerProcessFactory, ERROR_MSG, FAIL, FASTAPP_LOADER_PKG_NAME, HARMONY_OS, HDC_CONNECTOR, HOS_DEVICE, IS_MACOS, IS_OPENHARMONY, IS_WIN32, LEGACY_DEVICE, TOOLS_DIR_OPENHARMONY, TOOLS_DIR_OSX, TOOLS_DIR_WIN, type TemplateContext, TemplateEngine, type TemplateEngineOptions, type TemplateFile, type TemplateInfo, V8_PORT, ascfCompile, ascfConvert, ascfGenCert, ascfGenP12, ascfRun, clearAscfDepDirCache, configureLogger, copyDirectory, createAscfComponent, createAscfPage, createAscfProject, createServiceWidget, debugPort, type deviceType, devicesLegacyShared, downloadApk, execSafe, fetchHttpsJson, fetchJson, findAvailablePort, fixHvigorPath, fportCmd, fportListCmd, fportRmCmd, getAdbPath, getAscfDebuggerPidFile, getAscfDepDir, getBuildProfile, getBundleInfo, getCmdAndArgs, getDebugServerInfo, getDebugees, getDevEcoSdkHome, getDevEcoToolsDir, getDeviceName, getDevicesCmd, getHdcPath, getHvigorwPath, getJavaBinPath, getLegacyDeviceName, getLegacyHosVersion, getLegacyPackInfo, getLegacyProcess, getLogLevelGetter, getLogger, getNodeBinPath, getNodeDirPath, 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, rportCmd, rportRmCmd, runAdbCmdAsync, setLogLevelGetter, setLoggerConfig, startDebugServerCmd, startHostPkg, startServer, stopDebugServer, tryAdbPortReversing, tryHdcPortReversing };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,29 +22,27 @@ declare class Logger {
|
|
|
22
22
|
}
|
|
23
23
|
declare function getLogger(categories: any): Logger;
|
|
24
24
|
|
|
25
|
-
declare const
|
|
26
|
-
declare const LEGACY_PKG_NAME = "com.huawei.fastapp.dev/com.huawei.ascf.main.AscfActivity";
|
|
25
|
+
declare const FASTAPP_LOADER_PKG_NAME = "com.huawei.fastapp.dev";
|
|
27
26
|
declare const LEGACY_DEVICE = "legacy";
|
|
28
27
|
declare const HOS_DEVICE = "hos";
|
|
29
28
|
declare const DEBUG_TYPE_VIEW = "view";
|
|
30
29
|
declare const DEBUG_TYPE_SERVICE = "service";
|
|
31
|
-
declare const
|
|
32
|
-
declare const
|
|
30
|
+
declare const HARMONY_OS = "HarmonyOS";
|
|
31
|
+
declare const HDC_CONNECTOR = "hdc";
|
|
32
|
+
declare const ADB_CONNECTOR = "adb";
|
|
33
|
+
declare const V8_PORT = "9229";
|
|
33
34
|
|
|
34
35
|
type BuildModeType = 'debug' | 'release';
|
|
35
|
-
type BuildTargetType = typeof BUILD_TARGET_AS | typeof BUILD_TARGET_QS;
|
|
36
36
|
type BuildDeviceType = typeof HOS_DEVICE | typeof LEGACY_DEVICE;
|
|
37
37
|
type BuilderOptions = {
|
|
38
38
|
projectRoot?: string;
|
|
39
39
|
deviceId?: string;
|
|
40
40
|
buildMode?: BuildModeType;
|
|
41
|
-
targets?: BuildTargetType;
|
|
42
41
|
deviceType?: BuildDeviceType;
|
|
43
42
|
subCmd: string;
|
|
44
43
|
};
|
|
45
44
|
type DebuggerOptions = {
|
|
46
45
|
open?: '' | 'default' | 'chrome' | 'edge';
|
|
47
|
-
targets?: BuildTargetType;
|
|
48
46
|
deviceType?: BuildDeviceType;
|
|
49
47
|
deviceId?: string;
|
|
50
48
|
bundleName?: string;
|
|
@@ -53,13 +51,11 @@ interface IInstallSpkShared {
|
|
|
53
51
|
logger: any;
|
|
54
52
|
projectRoot: any;
|
|
55
53
|
deviceId: any;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
rportRmCmd: any;
|
|
62
|
-
legacyPkg?: string;
|
|
54
|
+
}
|
|
55
|
+
interface IImageData {
|
|
56
|
+
data: Uint8ClampedArray;
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
declare function getDebugees(localPort: string | number): Promise<never[]>;
|
|
@@ -77,8 +73,9 @@ declare abstract class DebuggerProcess {
|
|
|
77
73
|
abstract stopService(): any;
|
|
78
74
|
abstract checkAndGetBundleName(): Promise<string | boolean | undefined>;
|
|
79
75
|
openBrowser(type: any, localPort: any, fallback?: string): Promise<void>;
|
|
80
|
-
startDebugServer(url:
|
|
76
|
+
startDebugServer(url: String, v8WsUrl: string): Promise<void>;
|
|
81
77
|
stopDebugServer(): void;
|
|
78
|
+
reversePort(port: number): Promise<boolean>;
|
|
82
79
|
}
|
|
83
80
|
|
|
84
81
|
declare class AscfDebugger extends DebuggerProcess {
|
|
@@ -114,8 +111,6 @@ declare abstract class BuildProcess {
|
|
|
114
111
|
installDeps(): Promise<void>;
|
|
115
112
|
prepareAssemble(projectRoot: string, args?: string[]): Promise<void>;
|
|
116
113
|
abstract start(): void;
|
|
117
|
-
abstract assembleHap(): void;
|
|
118
|
-
abstract assembleApp(): void;
|
|
119
114
|
abstract installHap(): void;
|
|
120
115
|
abstract assembleAndInstallHap(): void;
|
|
121
116
|
abstract uninstall(): void;
|
|
@@ -126,14 +121,14 @@ declare abstract class BuildProcess {
|
|
|
126
121
|
init(): void;
|
|
127
122
|
runCmdAsync(cmd: any, args?: string[], options?: any): Promise<any>;
|
|
128
123
|
clean(): Promise<void>;
|
|
124
|
+
assembleHap(): Promise<void>;
|
|
125
|
+
assembleApp(): Promise<void>;
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
declare class AscfBuilder extends BuildProcess {
|
|
132
129
|
constructor(options: BuilderOptions);
|
|
133
130
|
runHdcCmdAsync(args?: string[], options?: any): Promise<any>;
|
|
134
131
|
start(): Promise<void>;
|
|
135
|
-
assembleHap(): Promise<void>;
|
|
136
|
-
assembleApp(): Promise<void>;
|
|
137
132
|
usingTmpDir(deviceId: any, cb: any): Promise<void>;
|
|
138
133
|
installHap(): Promise<void>;
|
|
139
134
|
assembleAndInstallHap(): Promise<void>;
|
|
@@ -147,6 +142,11 @@ declare function isMpProject(path: any): boolean;
|
|
|
147
142
|
|
|
148
143
|
declare const IS_WIN32: boolean;
|
|
149
144
|
declare const IS_MACOS: boolean;
|
|
145
|
+
declare const IS_OPENHARMONY: boolean;
|
|
146
|
+
declare const TOOLS_DIR_OSX = "/Applications/DevEco-Studio.app/Contents/tools";
|
|
147
|
+
declare const TOOLS_DIR_WIN = "C:\\Program Files\\Huawei\\DevEco Studio\\tools";
|
|
148
|
+
declare const TOOLS_DIR_OPENHARMONY = "/data/app";
|
|
149
|
+
declare const DEFAULT_TOOLS_DIR: string;
|
|
150
150
|
declare function getDevEcoToolsDir(): string;
|
|
151
151
|
declare function getPath(...args: any[]): string;
|
|
152
152
|
declare function getNodePath(): string;
|
|
@@ -156,6 +156,7 @@ declare function getHvigorwPath(): string;
|
|
|
156
156
|
declare function getDevEcoSdkHome(): string;
|
|
157
157
|
declare function getHdcPath(): string;
|
|
158
158
|
declare function getNodeBinPath(): string;
|
|
159
|
+
declare function getNodeDirPath(): string;
|
|
159
160
|
declare function getJavaBinPath(): string;
|
|
160
161
|
|
|
161
162
|
declare class AsyncResult<T> {
|
|
@@ -196,7 +197,7 @@ declare function ascfCompile(projectRoot: any, options?: any, onCp?: any): Promi
|
|
|
196
197
|
declare function ascfConvert(input: any, projectRoot: any, options?: any): Promise<void>;
|
|
197
198
|
declare function ascfGenCert(projectRoot: any, options: any): Promise<void>;
|
|
198
199
|
declare function ascfGenP12(projectRoot: any, options: any): Promise<void>;
|
|
199
|
-
declare function startDebugServerCmd(projectRoot: any, opts: any): Promise<unknown>;
|
|
200
|
+
declare function startDebugServerCmd(projectRoot: any, opts: any, progressObj: any): Promise<unknown>;
|
|
200
201
|
declare function stopDebugServer(): void;
|
|
201
202
|
declare function getDebugServerInfo(localPort: string | number, path: string): Promise<any>;
|
|
202
203
|
declare function getAscfDebuggerPidFile(pid: any): string | undefined;
|
|
@@ -209,6 +210,41 @@ declare function parseJsonSafe<T>(jsonStr: any, def: T): T;
|
|
|
209
210
|
declare function parseJsonFile<T>(filepath: any, def: T): T;
|
|
210
211
|
declare function mergeJson(oldJson: any, newJson: any): any;
|
|
211
212
|
|
|
213
|
+
declare const FAIL = "FAIL";
|
|
214
|
+
declare class AtomicServiceAppIconChecker {
|
|
215
|
+
private iconImgData;
|
|
216
|
+
private templateIconImgData;
|
|
217
|
+
private width;
|
|
218
|
+
private height;
|
|
219
|
+
constructor(iconImageData: IImageData, templateIconImageData: IImageData);
|
|
220
|
+
static imageDataInit(iconUrl: string): Promise<{
|
|
221
|
+
iconImageData: IImageData;
|
|
222
|
+
templateIconImageData: IImageData;
|
|
223
|
+
}>;
|
|
224
|
+
private static loadImageToCanvas;
|
|
225
|
+
bgraToHsv(bgraData: Uint8ClampedArray): Uint8Array;
|
|
226
|
+
inRange(hsvData: Uint8ClampedArray): Uint8Array;
|
|
227
|
+
argwhere(mask: Uint8Array): number[][];
|
|
228
|
+
extractNonTransparentHSB(hsvData: Uint8Array, coordinates: number[][]): any;
|
|
229
|
+
hsvToHsb(h: number, s: number, v: number): [number, number, number];
|
|
230
|
+
isColorInBlackOrWhite(h: number, s: number, b: number): string | null;
|
|
231
|
+
isCompare(): string;
|
|
232
|
+
/**
|
|
233
|
+
* 计算图片的锯齿度百分比
|
|
234
|
+
* @returns 锯齿度百分比
|
|
235
|
+
*/
|
|
236
|
+
calculateJaggednessByImageData(): number;
|
|
237
|
+
checkImgSize(): "FAIL: The atomic-service icon size does not meet the requirements(512px*512px)." | "The atomic-service icon size meets the requirements(512px*512px).";
|
|
238
|
+
/**
|
|
239
|
+
* 统计两张图中相同像素位置一个不透明而另一个透明的像素数量
|
|
240
|
+
* @returns 差异透明像素的数量
|
|
241
|
+
*/
|
|
242
|
+
compareTransparency(): number;
|
|
243
|
+
isFeatures(): "FAIL: The outer circle line of the atomic-service icon does not comply with the specifications, or the center circle of the icon is incomplete and independent." | "The outer line of the atomic-service icon meets the specification requirements.";
|
|
244
|
+
isSharpness(): "FAIL: The atomic-service icon is not clear." | "The atomic-service icon is clear.";
|
|
245
|
+
check(): Promise<string[]>;
|
|
246
|
+
}
|
|
247
|
+
|
|
212
248
|
/**
|
|
213
249
|
* 获取ADB工具的路径。
|
|
214
250
|
* 根据不同的操作系统平台(Windows, macOS, Linux),返回对应的ADB可执行文件路径。
|
|
@@ -219,9 +255,8 @@ declare function getAdbPath(): Promise<string>;
|
|
|
219
255
|
declare function runAdbCmdAsync(args?: string[], options?: any): Promise<any>;
|
|
220
256
|
declare const listTargets: () => Promise<any>;
|
|
221
257
|
declare const getDeviceName: (deviceId: string) => Promise<string>;
|
|
222
|
-
declare const tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number
|
|
258
|
+
declare const tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number>;
|
|
223
259
|
declare const startHostPkg: (deviceId: string, bundleName: string) => Promise<string>;
|
|
224
|
-
declare const startHostPkgUrl: (deviceId: string, bundleName: string, reqUrl: string, legacyPkg: string) => Promise<string>;
|
|
225
260
|
declare const fportListCmd: (deviceId: string) => Promise<string>;
|
|
226
261
|
declare const fportRmCmd: (deviceId: string, localnode: string) => Promise<string>;
|
|
227
262
|
declare const fportCmd: (deviceId: string, localnode: string, remotenode: string) => Promise<string>;
|
|
@@ -229,16 +264,59 @@ declare const rportCmd: (deviceId: string, localnode: string, remotenode: string
|
|
|
229
264
|
declare const rportRmCmd: (deviceId: string, devicenode: string) => Promise<string>;
|
|
230
265
|
declare const getDevicesCmd: () => Promise<string>;
|
|
231
266
|
declare const getLegacyDeviceName: (deviceId: any) => Promise<string>;
|
|
232
|
-
declare const getLegacyProcess: (deviceId: any,
|
|
267
|
+
declare const getLegacyProcess: (deviceId: any, hostPkg: any) => Promise<string>;
|
|
268
|
+
declare const getLegacyHosVersion: (deviceId: any) => Promise<string>;
|
|
233
269
|
/**
|
|
234
270
|
* 查找包安装信息
|
|
235
271
|
*
|
|
236
272
|
* @param deviceId 设备id
|
|
237
273
|
* @param bundleName 包名
|
|
238
274
|
*/
|
|
239
|
-
declare function getLegacyPackInfo(deviceId: any
|
|
275
|
+
declare function getLegacyPackInfo(deviceId: any): Promise<string>;
|
|
240
276
|
declare function getPid(deviceId: string, bundleName: string): Promise<string>;
|
|
241
277
|
|
|
278
|
+
type TemplateEngineOptions = {
|
|
279
|
+
force?: boolean;
|
|
280
|
+
dryRun?: boolean;
|
|
281
|
+
ejsOptions?: any;
|
|
282
|
+
webview?: any;
|
|
283
|
+
};
|
|
284
|
+
type TemplateContext = {
|
|
285
|
+
rootOut: string;
|
|
286
|
+
data: any;
|
|
287
|
+
};
|
|
288
|
+
type TemplateFile = {
|
|
289
|
+
type: 'template' | 'file' | 'modify' | 'delete' | 'copy' | 'rename';
|
|
290
|
+
tpl: string;
|
|
291
|
+
excludes?: string[];
|
|
292
|
+
path: string;
|
|
293
|
+
force?: boolean;
|
|
294
|
+
onModify?: (old: any, data?: any) => boolean;
|
|
295
|
+
};
|
|
296
|
+
type TemplateInfo = {
|
|
297
|
+
templateDir: string;
|
|
298
|
+
files: TemplateFile[];
|
|
299
|
+
};
|
|
300
|
+
declare class TemplateEngine {
|
|
301
|
+
private options;
|
|
302
|
+
constructor(options: TemplateEngineOptions);
|
|
303
|
+
mkdirSync(path: any): void;
|
|
304
|
+
copyFileSync(src: any, dest: any): void;
|
|
305
|
+
copyDirSync(src: any, dest: any, filter?: (sourceFullPath: string, destination: string) => boolean): void;
|
|
306
|
+
writeFileSync(filepath: any, content: any, encoding: any, force?: boolean): void;
|
|
307
|
+
fileRename(filePath: any): any;
|
|
308
|
+
generateByTemplateFile(templateInfo: TemplateInfo, ctx: TemplateContext, tplFile: TemplateFile): Promise<void>;
|
|
309
|
+
generate(templateInfo: TemplateInfo, ctx: TemplateContext): Promise<void[]>;
|
|
310
|
+
}
|
|
311
|
+
declare function createAscfProject(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void>;
|
|
312
|
+
declare function createAscfPage(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
313
|
+
declare function createAscfComponent(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
314
|
+
declare function createServiceWidget(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
315
|
+
|
|
316
|
+
declare function fetchJson(url: string, options: any): Promise<any>;
|
|
317
|
+
declare function fetchHttpsJson(url: string, options: any): Promise<any>;
|
|
318
|
+
declare function downloadApk(url: string, outputDir: string, vscodeProgress: any, options: any): Promise<string>;
|
|
319
|
+
|
|
242
320
|
declare function installAscfTools(): Promise<string>;
|
|
243
321
|
|
|
244
322
|
/**
|
|
@@ -261,12 +339,13 @@ declare function hdcShared({ logger, getDevEcoSdkHome, getPath, getHdcPath }: {
|
|
|
261
339
|
getPath: any;
|
|
262
340
|
getHdcPath: any;
|
|
263
341
|
}): {
|
|
264
|
-
runCmd: (cmd: any, args?: string[], cb?: any, options?: any, onCp?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
342
|
+
runCmd: (cmd: any, args?: string[], cb?: any, options?: any, onCp?: any, progressObj?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
265
343
|
runCmdAsync: (cmd: any, args?: string[], options?: any, onCp?: any) => Promise<any>;
|
|
266
344
|
runExecAsync: (cmd: any, args?: string[], options?: any) => Promise<any>;
|
|
267
345
|
runHdcCmd: (args?: string[], cb?: any, options?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
268
346
|
runHdcCmdAsync: (args?: string[], options?: any) => Promise<any>;
|
|
269
347
|
getDeviceName: (deviceId: string) => Promise<string>;
|
|
348
|
+
getHosVersion: (deviceId: string) => Promise<string>;
|
|
270
349
|
};
|
|
271
350
|
type deviceType = typeof LEGACY_DEVICE | typeof HOS_DEVICE;
|
|
272
351
|
declare class DeviceInfo {
|
|
@@ -310,7 +389,7 @@ declare class BuildProcessFactory {
|
|
|
310
389
|
static create(options: BuilderOptions): Promise<BuildProcess>;
|
|
311
390
|
}
|
|
312
391
|
declare class DebuggerProcessFactory {
|
|
313
|
-
static create(options:
|
|
392
|
+
static create(options: DebuggerOptions): Promise<DebuggerProcess>;
|
|
314
393
|
}
|
|
315
394
|
|
|
316
395
|
declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
@@ -319,9 +398,8 @@ declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
|
319
398
|
}): {
|
|
320
399
|
listTargets: () => Promise<any>;
|
|
321
400
|
getDeviceName: (deviceId: string) => Promise<string>;
|
|
322
|
-
tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number
|
|
401
|
+
tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number>;
|
|
323
402
|
startHostPkg: (deviceId: string, bundleName: string) => Promise<string>;
|
|
324
|
-
startHostPkgUrl: (deviceId: string, bundleName: string, reqUrl: string, legacyPkg: string) => Promise<string>;
|
|
325
403
|
fportListCmd: (deviceId: string) => Promise<string>;
|
|
326
404
|
fportRmCmd: (deviceId: string, localnode: string) => Promise<string>;
|
|
327
405
|
fportCmd: (deviceId: string, localnode: string, remotenode: string) => Promise<string>;
|
|
@@ -329,7 +407,8 @@ declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
|
329
407
|
rportRmCmd: (deviceId: string, devicenode: string) => Promise<string>;
|
|
330
408
|
getDevicesCmd: () => Promise<string>;
|
|
331
409
|
getLegacyDeviceName: (deviceId: any) => Promise<string>;
|
|
332
|
-
getLegacyProcess: (deviceId: any,
|
|
410
|
+
getLegacyProcess: (deviceId: any, hostPkg: any) => Promise<string>;
|
|
411
|
+
getLegacyHosVersion: (deviceId: any) => Promise<string>;
|
|
333
412
|
};
|
|
334
413
|
|
|
335
414
|
declare const ERROR_MSG: string;
|
|
@@ -341,6 +420,15 @@ declare function portManagerShared({ logger, fportListCmd, fportRmCmd, isPortRea
|
|
|
341
420
|
|
|
342
421
|
declare function tryHdcPortReversing(deviceId: any, localPort: any, times?: number): Promise<number | undefined>;
|
|
343
422
|
|
|
344
|
-
declare function installSpkShared({ logger, projectRoot, deviceId
|
|
423
|
+
declare function installSpkShared({ logger, projectRoot, deviceId }: IInstallSpkShared): Promise<void>;
|
|
424
|
+
|
|
425
|
+
declare class DebugPort {
|
|
426
|
+
port: number;
|
|
427
|
+
private static instance;
|
|
428
|
+
private constructor();
|
|
429
|
+
static getInstance(): DebugPort;
|
|
430
|
+
getPort(): number;
|
|
431
|
+
}
|
|
432
|
+
declare const debugPort: DebugPort;
|
|
345
433
|
|
|
346
|
-
export { $async, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE,
|
|
434
|
+
export { $async, ADB_CONNECTOR, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, AtomicServiceAppIconChecker, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE, BuildProcessFactory, DEBUG_TYPE_SERVICE, DEBUG_TYPE_VIEW, DEFAULT_TOOLS_DIR, DebuggerProcessFactory, ERROR_MSG, FAIL, FASTAPP_LOADER_PKG_NAME, HARMONY_OS, HDC_CONNECTOR, HOS_DEVICE, IS_MACOS, IS_OPENHARMONY, IS_WIN32, LEGACY_DEVICE, TOOLS_DIR_OPENHARMONY, TOOLS_DIR_OSX, TOOLS_DIR_WIN, type TemplateContext, TemplateEngine, type TemplateEngineOptions, type TemplateFile, type TemplateInfo, V8_PORT, ascfCompile, ascfConvert, ascfGenCert, ascfGenP12, ascfRun, clearAscfDepDirCache, configureLogger, copyDirectory, createAscfComponent, createAscfPage, createAscfProject, createServiceWidget, debugPort, type deviceType, devicesLegacyShared, downloadApk, execSafe, fetchHttpsJson, fetchJson, findAvailablePort, fixHvigorPath, fportCmd, fportListCmd, fportRmCmd, getAdbPath, getAscfDebuggerPidFile, getAscfDepDir, getBuildProfile, getBundleInfo, getCmdAndArgs, getDebugServerInfo, getDebugees, getDevEcoSdkHome, getDevEcoToolsDir, getDeviceName, getDevicesCmd, getHdcPath, getHvigorwPath, getJavaBinPath, getLegacyDeviceName, getLegacyHosVersion, getLegacyPackInfo, getLegacyProcess, getLogLevelGetter, getLogger, getNodeBinPath, getNodeDirPath, 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, rportCmd, rportRmCmd, runAdbCmdAsync, setLogLevelGetter, setLoggerConfig, startDebugServerCmd, startHostPkg, startServer, stopDebugServer, tryAdbPortReversing, tryHdcPortReversing };
|