@atomicservice/ascf-base 1.0.14 → 1.0.15
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 +113 -31
- package/dist/index.d.ts +113 -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 +237 -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 +43 -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 +72 -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 +20 -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 +110 -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 +41 -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 +22 -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 +102 -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 +41 -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 +58 -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 +28 -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 +19 -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>;
|
|
@@ -196,7 +191,7 @@ declare function ascfCompile(projectRoot: any, options?: any, onCp?: any): Promi
|
|
|
196
191
|
declare function ascfConvert(input: any, projectRoot: any, options?: any): Promise<void>;
|
|
197
192
|
declare function ascfGenCert(projectRoot: any, options: any): Promise<void>;
|
|
198
193
|
declare function ascfGenP12(projectRoot: any, options: any): Promise<void>;
|
|
199
|
-
declare function startDebugServerCmd(projectRoot: any, opts: any): Promise<unknown>;
|
|
194
|
+
declare function startDebugServerCmd(projectRoot: any, opts: any, progressObj: any): Promise<unknown>;
|
|
200
195
|
declare function stopDebugServer(): void;
|
|
201
196
|
declare function getDebugServerInfo(localPort: string | number, path: string): Promise<any>;
|
|
202
197
|
declare function getAscfDebuggerPidFile(pid: any): string | undefined;
|
|
@@ -209,6 +204,41 @@ declare function parseJsonSafe<T>(jsonStr: any, def: T): T;
|
|
|
209
204
|
declare function parseJsonFile<T>(filepath: any, def: T): T;
|
|
210
205
|
declare function mergeJson(oldJson: any, newJson: any): any;
|
|
211
206
|
|
|
207
|
+
declare const FAIL = "FAIL";
|
|
208
|
+
declare class AtomicServiceAppIconChecker {
|
|
209
|
+
private iconImgData;
|
|
210
|
+
private templateIconImgData;
|
|
211
|
+
private width;
|
|
212
|
+
private height;
|
|
213
|
+
constructor(iconImageData: IImageData, templateIconImageData: IImageData);
|
|
214
|
+
static imageDataInit(iconUrl: string): Promise<{
|
|
215
|
+
iconImageData: IImageData;
|
|
216
|
+
templateIconImageData: IImageData;
|
|
217
|
+
}>;
|
|
218
|
+
private static loadImageToCanvas;
|
|
219
|
+
bgraToHsv(bgraData: Uint8ClampedArray): Uint8Array;
|
|
220
|
+
inRange(hsvData: Uint8ClampedArray): Uint8Array;
|
|
221
|
+
argwhere(mask: Uint8Array): number[][];
|
|
222
|
+
extractNonTransparentHSB(hsvData: Uint8Array, coordinates: number[][]): any;
|
|
223
|
+
hsvToHsb(h: number, s: number, v: number): [number, number, number];
|
|
224
|
+
isColorInBlackOrWhite(h: number, s: number, b: number): string | null;
|
|
225
|
+
isCompare(): string;
|
|
226
|
+
/**
|
|
227
|
+
* 计算图片的锯齿度百分比
|
|
228
|
+
* @returns 锯齿度百分比
|
|
229
|
+
*/
|
|
230
|
+
calculateJaggednessByImageData(): number;
|
|
231
|
+
checkImgSize(): "FAIL: The atomic-service icon size does not meet the requirements(512px*512px)." | "The atomic-service icon size meets the requirements(512px*512px).";
|
|
232
|
+
/**
|
|
233
|
+
* 统计两张图中相同像素位置一个不透明而另一个透明的像素数量
|
|
234
|
+
* @returns 差异透明像素的数量
|
|
235
|
+
*/
|
|
236
|
+
compareTransparency(): number;
|
|
237
|
+
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.";
|
|
238
|
+
isSharpness(): "FAIL: The atomic-service icon is not clear." | "The atomic-service icon is clear.";
|
|
239
|
+
check(): Promise<string[]>;
|
|
240
|
+
}
|
|
241
|
+
|
|
212
242
|
/**
|
|
213
243
|
* 获取ADB工具的路径。
|
|
214
244
|
* 根据不同的操作系统平台(Windows, macOS, Linux),返回对应的ADB可执行文件路径。
|
|
@@ -219,9 +249,8 @@ declare function getAdbPath(): Promise<string>;
|
|
|
219
249
|
declare function runAdbCmdAsync(args?: string[], options?: any): Promise<any>;
|
|
220
250
|
declare const listTargets: () => Promise<any>;
|
|
221
251
|
declare const getDeviceName: (deviceId: string) => Promise<string>;
|
|
222
|
-
declare const tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number
|
|
252
|
+
declare const tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number>;
|
|
223
253
|
declare const startHostPkg: (deviceId: string, bundleName: string) => Promise<string>;
|
|
224
|
-
declare const startHostPkgUrl: (deviceId: string, bundleName: string, reqUrl: string, legacyPkg: string) => Promise<string>;
|
|
225
254
|
declare const fportListCmd: (deviceId: string) => Promise<string>;
|
|
226
255
|
declare const fportRmCmd: (deviceId: string, localnode: string) => Promise<string>;
|
|
227
256
|
declare const fportCmd: (deviceId: string, localnode: string, remotenode: string) => Promise<string>;
|
|
@@ -229,16 +258,59 @@ declare const rportCmd: (deviceId: string, localnode: string, remotenode: string
|
|
|
229
258
|
declare const rportRmCmd: (deviceId: string, devicenode: string) => Promise<string>;
|
|
230
259
|
declare const getDevicesCmd: () => Promise<string>;
|
|
231
260
|
declare const getLegacyDeviceName: (deviceId: any) => Promise<string>;
|
|
232
|
-
declare const getLegacyProcess: (deviceId: any,
|
|
261
|
+
declare const getLegacyProcess: (deviceId: any, hostPkg: any) => Promise<string>;
|
|
262
|
+
declare const getLegacyHosVersion: (deviceId: any) => Promise<string>;
|
|
233
263
|
/**
|
|
234
264
|
* 查找包安装信息
|
|
235
265
|
*
|
|
236
266
|
* @param deviceId 设备id
|
|
237
267
|
* @param bundleName 包名
|
|
238
268
|
*/
|
|
239
|
-
declare function getLegacyPackInfo(deviceId: any
|
|
269
|
+
declare function getLegacyPackInfo(deviceId: any): Promise<string>;
|
|
240
270
|
declare function getPid(deviceId: string, bundleName: string): Promise<string>;
|
|
241
271
|
|
|
272
|
+
type TemplateEngineOptions = {
|
|
273
|
+
force?: boolean;
|
|
274
|
+
dryRun?: boolean;
|
|
275
|
+
ejsOptions?: any;
|
|
276
|
+
webview?: any;
|
|
277
|
+
};
|
|
278
|
+
type TemplateContext = {
|
|
279
|
+
rootOut: string;
|
|
280
|
+
data: any;
|
|
281
|
+
};
|
|
282
|
+
type TemplateFile = {
|
|
283
|
+
type: 'template' | 'file' | 'modify' | 'delete' | 'copy' | 'rename';
|
|
284
|
+
tpl: string;
|
|
285
|
+
excludes?: string[];
|
|
286
|
+
path: string;
|
|
287
|
+
force?: boolean;
|
|
288
|
+
onModify?: (old: any, data?: any) => boolean;
|
|
289
|
+
};
|
|
290
|
+
type TemplateInfo = {
|
|
291
|
+
templateDir: string;
|
|
292
|
+
files: TemplateFile[];
|
|
293
|
+
};
|
|
294
|
+
declare class TemplateEngine {
|
|
295
|
+
private options;
|
|
296
|
+
constructor(options: TemplateEngineOptions);
|
|
297
|
+
mkdirSync(path: any): void;
|
|
298
|
+
copyFileSync(src: any, dest: any): void;
|
|
299
|
+
copyDirSync(src: any, dest: any, filter?: (sourceFullPath: string, destination: string) => boolean): void;
|
|
300
|
+
writeFileSync(filepath: any, content: any, encoding: any, force?: boolean): void;
|
|
301
|
+
fileRename(filePath: any): any;
|
|
302
|
+
generateByTemplateFile(templateInfo: TemplateInfo, ctx: TemplateContext, tplFile: TemplateFile): Promise<void>;
|
|
303
|
+
generate(templateInfo: TemplateInfo, ctx: TemplateContext): Promise<void[]>;
|
|
304
|
+
}
|
|
305
|
+
declare function createAscfProject(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void>;
|
|
306
|
+
declare function createAscfPage(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
307
|
+
declare function createAscfComponent(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
308
|
+
declare function createServiceWidget(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
309
|
+
|
|
310
|
+
declare function fetchJson(url: string, options: any): Promise<any>;
|
|
311
|
+
declare function fetchHttpsJson(url: string, options: any): Promise<any>;
|
|
312
|
+
declare function downloadApk(url: string, outputDir: string, vscodeProgress: any, options: any): Promise<string>;
|
|
313
|
+
|
|
242
314
|
declare function installAscfTools(): Promise<string>;
|
|
243
315
|
|
|
244
316
|
/**
|
|
@@ -261,12 +333,13 @@ declare function hdcShared({ logger, getDevEcoSdkHome, getPath, getHdcPath }: {
|
|
|
261
333
|
getPath: any;
|
|
262
334
|
getHdcPath: any;
|
|
263
335
|
}): {
|
|
264
|
-
runCmd: (cmd: any, args?: string[], cb?: any, options?: any, onCp?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
336
|
+
runCmd: (cmd: any, args?: string[], cb?: any, options?: any, onCp?: any, progressObj?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
265
337
|
runCmdAsync: (cmd: any, args?: string[], options?: any, onCp?: any) => Promise<any>;
|
|
266
338
|
runExecAsync: (cmd: any, args?: string[], options?: any) => Promise<any>;
|
|
267
339
|
runHdcCmd: (args?: string[], cb?: any, options?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
268
340
|
runHdcCmdAsync: (args?: string[], options?: any) => Promise<any>;
|
|
269
341
|
getDeviceName: (deviceId: string) => Promise<string>;
|
|
342
|
+
getHosVersion: (deviceId: string) => Promise<string>;
|
|
270
343
|
};
|
|
271
344
|
type deviceType = typeof LEGACY_DEVICE | typeof HOS_DEVICE;
|
|
272
345
|
declare class DeviceInfo {
|
|
@@ -310,7 +383,7 @@ declare class BuildProcessFactory {
|
|
|
310
383
|
static create(options: BuilderOptions): Promise<BuildProcess>;
|
|
311
384
|
}
|
|
312
385
|
declare class DebuggerProcessFactory {
|
|
313
|
-
static create(options:
|
|
386
|
+
static create(options: DebuggerOptions): Promise<DebuggerProcess>;
|
|
314
387
|
}
|
|
315
388
|
|
|
316
389
|
declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
@@ -319,9 +392,8 @@ declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
|
319
392
|
}): {
|
|
320
393
|
listTargets: () => Promise<any>;
|
|
321
394
|
getDeviceName: (deviceId: string) => Promise<string>;
|
|
322
|
-
tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number
|
|
395
|
+
tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number>;
|
|
323
396
|
startHostPkg: (deviceId: string, bundleName: string) => Promise<string>;
|
|
324
|
-
startHostPkgUrl: (deviceId: string, bundleName: string, reqUrl: string, legacyPkg: string) => Promise<string>;
|
|
325
397
|
fportListCmd: (deviceId: string) => Promise<string>;
|
|
326
398
|
fportRmCmd: (deviceId: string, localnode: string) => Promise<string>;
|
|
327
399
|
fportCmd: (deviceId: string, localnode: string, remotenode: string) => Promise<string>;
|
|
@@ -329,7 +401,8 @@ declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
|
329
401
|
rportRmCmd: (deviceId: string, devicenode: string) => Promise<string>;
|
|
330
402
|
getDevicesCmd: () => Promise<string>;
|
|
331
403
|
getLegacyDeviceName: (deviceId: any) => Promise<string>;
|
|
332
|
-
getLegacyProcess: (deviceId: any,
|
|
404
|
+
getLegacyProcess: (deviceId: any, hostPkg: any) => Promise<string>;
|
|
405
|
+
getLegacyHosVersion: (deviceId: any) => Promise<string>;
|
|
333
406
|
};
|
|
334
407
|
|
|
335
408
|
declare const ERROR_MSG: string;
|
|
@@ -341,6 +414,15 @@ declare function portManagerShared({ logger, fportListCmd, fportRmCmd, isPortRea
|
|
|
341
414
|
|
|
342
415
|
declare function tryHdcPortReversing(deviceId: any, localPort: any, times?: number): Promise<number | undefined>;
|
|
343
416
|
|
|
344
|
-
declare function installSpkShared({ logger, projectRoot, deviceId
|
|
417
|
+
declare function installSpkShared({ logger, projectRoot, deviceId }: IInstallSpkShared): Promise<void>;
|
|
418
|
+
|
|
419
|
+
declare class DebugPort {
|
|
420
|
+
port: number;
|
|
421
|
+
private static instance;
|
|
422
|
+
private constructor();
|
|
423
|
+
static getInstance(): DebugPort;
|
|
424
|
+
getPort(): number;
|
|
425
|
+
}
|
|
426
|
+
declare const debugPort: DebugPort;
|
|
345
427
|
|
|
346
|
-
export { $async, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE,
|
|
428
|
+
export { $async, ADB_CONNECTOR, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, AtomicServiceAppIconChecker, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE, BuildProcessFactory, DEBUG_TYPE_SERVICE, DEBUG_TYPE_VIEW, DebuggerProcessFactory, ERROR_MSG, FAIL, FASTAPP_LOADER_PKG_NAME, HARMONY_OS, HDC_CONNECTOR, HOS_DEVICE, IS_MACOS, IS_WIN32, LEGACY_DEVICE, 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, 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>;
|
|
@@ -196,7 +191,7 @@ declare function ascfCompile(projectRoot: any, options?: any, onCp?: any): Promi
|
|
|
196
191
|
declare function ascfConvert(input: any, projectRoot: any, options?: any): Promise<void>;
|
|
197
192
|
declare function ascfGenCert(projectRoot: any, options: any): Promise<void>;
|
|
198
193
|
declare function ascfGenP12(projectRoot: any, options: any): Promise<void>;
|
|
199
|
-
declare function startDebugServerCmd(projectRoot: any, opts: any): Promise<unknown>;
|
|
194
|
+
declare function startDebugServerCmd(projectRoot: any, opts: any, progressObj: any): Promise<unknown>;
|
|
200
195
|
declare function stopDebugServer(): void;
|
|
201
196
|
declare function getDebugServerInfo(localPort: string | number, path: string): Promise<any>;
|
|
202
197
|
declare function getAscfDebuggerPidFile(pid: any): string | undefined;
|
|
@@ -209,6 +204,41 @@ declare function parseJsonSafe<T>(jsonStr: any, def: T): T;
|
|
|
209
204
|
declare function parseJsonFile<T>(filepath: any, def: T): T;
|
|
210
205
|
declare function mergeJson(oldJson: any, newJson: any): any;
|
|
211
206
|
|
|
207
|
+
declare const FAIL = "FAIL";
|
|
208
|
+
declare class AtomicServiceAppIconChecker {
|
|
209
|
+
private iconImgData;
|
|
210
|
+
private templateIconImgData;
|
|
211
|
+
private width;
|
|
212
|
+
private height;
|
|
213
|
+
constructor(iconImageData: IImageData, templateIconImageData: IImageData);
|
|
214
|
+
static imageDataInit(iconUrl: string): Promise<{
|
|
215
|
+
iconImageData: IImageData;
|
|
216
|
+
templateIconImageData: IImageData;
|
|
217
|
+
}>;
|
|
218
|
+
private static loadImageToCanvas;
|
|
219
|
+
bgraToHsv(bgraData: Uint8ClampedArray): Uint8Array;
|
|
220
|
+
inRange(hsvData: Uint8ClampedArray): Uint8Array;
|
|
221
|
+
argwhere(mask: Uint8Array): number[][];
|
|
222
|
+
extractNonTransparentHSB(hsvData: Uint8Array, coordinates: number[][]): any;
|
|
223
|
+
hsvToHsb(h: number, s: number, v: number): [number, number, number];
|
|
224
|
+
isColorInBlackOrWhite(h: number, s: number, b: number): string | null;
|
|
225
|
+
isCompare(): string;
|
|
226
|
+
/**
|
|
227
|
+
* 计算图片的锯齿度百分比
|
|
228
|
+
* @returns 锯齿度百分比
|
|
229
|
+
*/
|
|
230
|
+
calculateJaggednessByImageData(): number;
|
|
231
|
+
checkImgSize(): "FAIL: The atomic-service icon size does not meet the requirements(512px*512px)." | "The atomic-service icon size meets the requirements(512px*512px).";
|
|
232
|
+
/**
|
|
233
|
+
* 统计两张图中相同像素位置一个不透明而另一个透明的像素数量
|
|
234
|
+
* @returns 差异透明像素的数量
|
|
235
|
+
*/
|
|
236
|
+
compareTransparency(): number;
|
|
237
|
+
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.";
|
|
238
|
+
isSharpness(): "FAIL: The atomic-service icon is not clear." | "The atomic-service icon is clear.";
|
|
239
|
+
check(): Promise<string[]>;
|
|
240
|
+
}
|
|
241
|
+
|
|
212
242
|
/**
|
|
213
243
|
* 获取ADB工具的路径。
|
|
214
244
|
* 根据不同的操作系统平台(Windows, macOS, Linux),返回对应的ADB可执行文件路径。
|
|
@@ -219,9 +249,8 @@ declare function getAdbPath(): Promise<string>;
|
|
|
219
249
|
declare function runAdbCmdAsync(args?: string[], options?: any): Promise<any>;
|
|
220
250
|
declare const listTargets: () => Promise<any>;
|
|
221
251
|
declare const getDeviceName: (deviceId: string) => Promise<string>;
|
|
222
|
-
declare const tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number
|
|
252
|
+
declare const tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number>;
|
|
223
253
|
declare const startHostPkg: (deviceId: string, bundleName: string) => Promise<string>;
|
|
224
|
-
declare const startHostPkgUrl: (deviceId: string, bundleName: string, reqUrl: string, legacyPkg: string) => Promise<string>;
|
|
225
254
|
declare const fportListCmd: (deviceId: string) => Promise<string>;
|
|
226
255
|
declare const fportRmCmd: (deviceId: string, localnode: string) => Promise<string>;
|
|
227
256
|
declare const fportCmd: (deviceId: string, localnode: string, remotenode: string) => Promise<string>;
|
|
@@ -229,16 +258,59 @@ declare const rportCmd: (deviceId: string, localnode: string, remotenode: string
|
|
|
229
258
|
declare const rportRmCmd: (deviceId: string, devicenode: string) => Promise<string>;
|
|
230
259
|
declare const getDevicesCmd: () => Promise<string>;
|
|
231
260
|
declare const getLegacyDeviceName: (deviceId: any) => Promise<string>;
|
|
232
|
-
declare const getLegacyProcess: (deviceId: any,
|
|
261
|
+
declare const getLegacyProcess: (deviceId: any, hostPkg: any) => Promise<string>;
|
|
262
|
+
declare const getLegacyHosVersion: (deviceId: any) => Promise<string>;
|
|
233
263
|
/**
|
|
234
264
|
* 查找包安装信息
|
|
235
265
|
*
|
|
236
266
|
* @param deviceId 设备id
|
|
237
267
|
* @param bundleName 包名
|
|
238
268
|
*/
|
|
239
|
-
declare function getLegacyPackInfo(deviceId: any
|
|
269
|
+
declare function getLegacyPackInfo(deviceId: any): Promise<string>;
|
|
240
270
|
declare function getPid(deviceId: string, bundleName: string): Promise<string>;
|
|
241
271
|
|
|
272
|
+
type TemplateEngineOptions = {
|
|
273
|
+
force?: boolean;
|
|
274
|
+
dryRun?: boolean;
|
|
275
|
+
ejsOptions?: any;
|
|
276
|
+
webview?: any;
|
|
277
|
+
};
|
|
278
|
+
type TemplateContext = {
|
|
279
|
+
rootOut: string;
|
|
280
|
+
data: any;
|
|
281
|
+
};
|
|
282
|
+
type TemplateFile = {
|
|
283
|
+
type: 'template' | 'file' | 'modify' | 'delete' | 'copy' | 'rename';
|
|
284
|
+
tpl: string;
|
|
285
|
+
excludes?: string[];
|
|
286
|
+
path: string;
|
|
287
|
+
force?: boolean;
|
|
288
|
+
onModify?: (old: any, data?: any) => boolean;
|
|
289
|
+
};
|
|
290
|
+
type TemplateInfo = {
|
|
291
|
+
templateDir: string;
|
|
292
|
+
files: TemplateFile[];
|
|
293
|
+
};
|
|
294
|
+
declare class TemplateEngine {
|
|
295
|
+
private options;
|
|
296
|
+
constructor(options: TemplateEngineOptions);
|
|
297
|
+
mkdirSync(path: any): void;
|
|
298
|
+
copyFileSync(src: any, dest: any): void;
|
|
299
|
+
copyDirSync(src: any, dest: any, filter?: (sourceFullPath: string, destination: string) => boolean): void;
|
|
300
|
+
writeFileSync(filepath: any, content: any, encoding: any, force?: boolean): void;
|
|
301
|
+
fileRename(filePath: any): any;
|
|
302
|
+
generateByTemplateFile(templateInfo: TemplateInfo, ctx: TemplateContext, tplFile: TemplateFile): Promise<void>;
|
|
303
|
+
generate(templateInfo: TemplateInfo, ctx: TemplateContext): Promise<void[]>;
|
|
304
|
+
}
|
|
305
|
+
declare function createAscfProject(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void>;
|
|
306
|
+
declare function createAscfPage(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
307
|
+
declare function createAscfComponent(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
308
|
+
declare function createServiceWidget(templatesDir: string, ctx: TemplateContext, options?: TemplateEngineOptions): Promise<void[]>;
|
|
309
|
+
|
|
310
|
+
declare function fetchJson(url: string, options: any): Promise<any>;
|
|
311
|
+
declare function fetchHttpsJson(url: string, options: any): Promise<any>;
|
|
312
|
+
declare function downloadApk(url: string, outputDir: string, vscodeProgress: any, options: any): Promise<string>;
|
|
313
|
+
|
|
242
314
|
declare function installAscfTools(): Promise<string>;
|
|
243
315
|
|
|
244
316
|
/**
|
|
@@ -261,12 +333,13 @@ declare function hdcShared({ logger, getDevEcoSdkHome, getPath, getHdcPath }: {
|
|
|
261
333
|
getPath: any;
|
|
262
334
|
getHdcPath: any;
|
|
263
335
|
}): {
|
|
264
|
-
runCmd: (cmd: any, args?: string[], cb?: any, options?: any, onCp?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
336
|
+
runCmd: (cmd: any, args?: string[], cb?: any, options?: any, onCp?: any, progressObj?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
265
337
|
runCmdAsync: (cmd: any, args?: string[], options?: any, onCp?: any) => Promise<any>;
|
|
266
338
|
runExecAsync: (cmd: any, args?: string[], options?: any) => Promise<any>;
|
|
267
339
|
runHdcCmd: (args?: string[], cb?: any, options?: any) => child_process.ChildProcessWithoutNullStreams;
|
|
268
340
|
runHdcCmdAsync: (args?: string[], options?: any) => Promise<any>;
|
|
269
341
|
getDeviceName: (deviceId: string) => Promise<string>;
|
|
342
|
+
getHosVersion: (deviceId: string) => Promise<string>;
|
|
270
343
|
};
|
|
271
344
|
type deviceType = typeof LEGACY_DEVICE | typeof HOS_DEVICE;
|
|
272
345
|
declare class DeviceInfo {
|
|
@@ -310,7 +383,7 @@ declare class BuildProcessFactory {
|
|
|
310
383
|
static create(options: BuilderOptions): Promise<BuildProcess>;
|
|
311
384
|
}
|
|
312
385
|
declare class DebuggerProcessFactory {
|
|
313
|
-
static create(options:
|
|
386
|
+
static create(options: DebuggerOptions): Promise<DebuggerProcess>;
|
|
314
387
|
}
|
|
315
388
|
|
|
316
389
|
declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
@@ -319,9 +392,8 @@ declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
|
319
392
|
}): {
|
|
320
393
|
listTargets: () => Promise<any>;
|
|
321
394
|
getDeviceName: (deviceId: string) => Promise<string>;
|
|
322
|
-
tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number
|
|
395
|
+
tryAdbPortReversing: (deviceId: any, localPort: any, times?: number) => Promise<number>;
|
|
323
396
|
startHostPkg: (deviceId: string, bundleName: string) => Promise<string>;
|
|
324
|
-
startHostPkgUrl: (deviceId: string, bundleName: string, reqUrl: string, legacyPkg: string) => Promise<string>;
|
|
325
397
|
fportListCmd: (deviceId: string) => Promise<string>;
|
|
326
398
|
fportRmCmd: (deviceId: string, localnode: string) => Promise<string>;
|
|
327
399
|
fportCmd: (deviceId: string, localnode: string, remotenode: string) => Promise<string>;
|
|
@@ -329,7 +401,8 @@ declare function devicesLegacyShared({ logger, runAdbCmdAsync }: {
|
|
|
329
401
|
rportRmCmd: (deviceId: string, devicenode: string) => Promise<string>;
|
|
330
402
|
getDevicesCmd: () => Promise<string>;
|
|
331
403
|
getLegacyDeviceName: (deviceId: any) => Promise<string>;
|
|
332
|
-
getLegacyProcess: (deviceId: any,
|
|
404
|
+
getLegacyProcess: (deviceId: any, hostPkg: any) => Promise<string>;
|
|
405
|
+
getLegacyHosVersion: (deviceId: any) => Promise<string>;
|
|
333
406
|
};
|
|
334
407
|
|
|
335
408
|
declare const ERROR_MSG: string;
|
|
@@ -341,6 +414,15 @@ declare function portManagerShared({ logger, fportListCmd, fportRmCmd, isPortRea
|
|
|
341
414
|
|
|
342
415
|
declare function tryHdcPortReversing(deviceId: any, localPort: any, times?: number): Promise<number | undefined>;
|
|
343
416
|
|
|
344
|
-
declare function installSpkShared({ logger, projectRoot, deviceId
|
|
417
|
+
declare function installSpkShared({ logger, projectRoot, deviceId }: IInstallSpkShared): Promise<void>;
|
|
418
|
+
|
|
419
|
+
declare class DebugPort {
|
|
420
|
+
port: number;
|
|
421
|
+
private static instance;
|
|
422
|
+
private constructor();
|
|
423
|
+
static getInstance(): DebugPort;
|
|
424
|
+
getPort(): number;
|
|
425
|
+
}
|
|
426
|
+
declare const debugPort: DebugPort;
|
|
345
427
|
|
|
346
|
-
export { $async, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE,
|
|
428
|
+
export { $async, ADB_CONNECTOR, ASCF_LOG_FILE, AscfBuilder, AscfDebugger, AsyncResult, AtomicServiceAppIconChecker, BUILD_MODE_DEBUG, BUILD_MODE_RELEASE, BuildProcessFactory, DEBUG_TYPE_SERVICE, DEBUG_TYPE_VIEW, DebuggerProcessFactory, ERROR_MSG, FAIL, FASTAPP_LOADER_PKG_NAME, HARMONY_OS, HDC_CONNECTOR, HOS_DEVICE, IS_MACOS, IS_WIN32, LEGACY_DEVICE, 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, 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 };
|