diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 431ea35..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-jobs:
- hello_world_job:
- runs-on: windows-latest
- name: Build and Analyse
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Set up JDK 11
- uses: actions/setup-java@v2
- with:
- java-version: '11'
- distribution: 'adopt'
- - uses: actions/setup-node@v2
- with:
- node-version: '14'
- - run: npm install
- - id: main
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- LANG: JS
- uses: applibgroup/HarmonyOs-build@v2.8
- - name: Upload Artifact
- uses: actions/upload-artifact@v2
- with:
- name: assets-for-download
- path: build\outputs\hap\debug\phone
diff --git a/.idea/.deveco/module/entry.cache.json b/.idea/.deveco/module/entry.cache.json
new file mode 100644
index 0000000..00d50a0
--- /dev/null
+++ b/.idea/.deveco/module/entry.cache.json
@@ -0,0 +1,14 @@
+{
+ "BuildOptions":{
+ "SELECT_BUILD_TARGET":"default",
+ "BUILD_PATH":{
+ "OUTPUT_PATH":"D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\build\\default\\outputs\\default",
+ "RES_PATH":"D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\build\\default\\intermediates\\res\\default",
+ "ETS_SUPER_VISUAL_PATH":"D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\build\\default\\cache\\default\\CompileETS",
+ "JS_ASSETS_PATH":"D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\build\\default\\intermediates\\assets\\default",
+ "RES_PROFILE_PATH":"D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
+ "WORKER_LOADER":"D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\build\\default\\intermediates\\loader\\default\\loader.json",
+ "MANIFEST_JSON":"D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\build\\default\\intermediates\\manifest\\default"
+ }
+ }
+}
\ No newline at end of file
diff --git a/.idea/.deveco/project.cache.json b/.idea/.deveco/project.cache.json
new file mode 100644
index 0000000..a58109b
--- /dev/null
+++ b/.idea/.deveco/project.cache.json
@@ -0,0 +1,12 @@
+{
+ "BuildOptions":{
+ "BUNDLE_NAME":"",
+ "BUILD_PATH":{
+ "OUTPUT_PATH":"D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\build\\outputs\\default"
+ },
+ "SELECT_BUILD_PRODUCT":"default"
+ },
+ "CommonInfo":{
+ "project.ide.version":"3.0.0.900"
+ }
+}
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/configurationModuleSettings.xml b/.idea/configurationModuleSettings.xml
new file mode 100644
index 0000000..d5d7057
--- /dev/null
+++ b/.idea/configurationModuleSettings.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7d16ac2
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/previewer/phone/phoneSettingConfig_MateX2.json b/.idea/previewer/phone/phoneSettingConfig_MateX2.json
new file mode 100644
index 0000000..f505e6b
--- /dev/null
+++ b/.idea/previewer/phone/phoneSettingConfig_MateX2.json
@@ -0,0 +1,25 @@
+{
+ "setting": {
+ "1.0.1": {
+ "Language": {
+ "args": {
+ "Language": "zh-CN"
+ }
+ }
+ }
+ },
+ "frontend": {
+ "1.0.0": {
+ "Resolution": {
+ "args": {
+ "Resolution": "360*780"
+ }
+ },
+ "DeviceType": {
+ "args": {
+ "DeviceType": "phone"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/.idea/previewer/phone/phoneSettingConfig_P40.json b/.idea/previewer/phone/phoneSettingConfig_P40.json
new file mode 100644
index 0000000..69beee7
--- /dev/null
+++ b/.idea/previewer/phone/phoneSettingConfig_P40.json
@@ -0,0 +1,25 @@
+{
+ "setting": {
+ "1.0.1": {
+ "Language": {
+ "args": {
+ "Language": "zh_CN"
+ }
+ }
+ }
+ },
+ "frontend": {
+ "1.0.0": {
+ "Resolution": {
+ "args": {
+ "Resolution": "360*780"
+ }
+ },
+ "DeviceType": {
+ "args": {
+ "DeviceType": "phone"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/.idea/previewer/previewConfigV2.json b/.idea/previewer/previewConfigV2.json
new file mode 100644
index 0000000..2d3493f
--- /dev/null
+++ b/.idea/previewer/previewConfigV2.json
@@ -0,0 +1,49 @@
+{
+ "1.0.0": {
+ "LastPreviewDevice": {}
+ },
+ "1.0.1": {
+ "profileList": [
+ {
+ "id": "P40",
+ "deviceType": "phone",
+ "width": 1080,
+ "height": 2340,
+ "shape": "rect",
+ "dpi": 480,
+ "orientation": "portrait",
+ "language": "zh_CN",
+ "colorMode": "light"
+ },
+ {
+ "id": "MateX2",
+ "deviceType": "phone",
+ "width": 2200,
+ "height": 2480,
+ "shape": "rect",
+ "dpi": 520,
+ "orientation": "portrait",
+ "language": "zh_CN",
+ "colorMode": "light"
+ },
+ {
+ "id": "MatePadPro",
+ "deviceType": "tablet",
+ "width": 2560,
+ "height": 1600,
+ "shape": "rect",
+ "dpi": 400,
+ "orientation": "landscape",
+ "language": "zh_CN",
+ "colorMode": "light"
+ }
+ ],
+ "runningProfileList": [
+ "P40"
+ ],
+ "availableProfileList": [
+ "MateX2",
+ "MatePadPro"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/.idea/previewer/tablet/tabletSettingConfig_MatePadPro.json b/.idea/previewer/tablet/tabletSettingConfig_MatePadPro.json
new file mode 100644
index 0000000..e241bd4
--- /dev/null
+++ b/.idea/previewer/tablet/tabletSettingConfig_MatePadPro.json
@@ -0,0 +1,25 @@
+{
+ "setting": {
+ "1.0.1": {
+ "Language": {
+ "args": {
+ "Language": "zh-CN"
+ }
+ }
+ }
+ },
+ "frontend": {
+ "1.0.0": {
+ "Resolution": {
+ "args": {
+ "Resolution": "1024*640"
+ }
+ },
+ "DeviceType": {
+ "args": {
+ "DeviceType": "tablet"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/.idea/smart_watch_seven-1.iml b/.idea/smart_watch_seven-1.iml
new file mode 100644
index 0000000..f07b3d6
--- /dev/null
+++ b/.idea/smart_watch_seven-1.iml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..fa16b7d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [2021] [Application library engineering group]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..10da712
--- /dev/null
+++ b/README.md
@@ -0,0 +1,33 @@
+# Smart Watch Seven
+
+一UI design for Smart Watch in OpenHarmony.
+
+
+## Smart Watch 7 Design :
+
+
+
+## Functionalities:
+
+The smart watch seven has the following functionalities
+
+1.Displays current weather , date , month.
+
+2.Displays calendar notification.
+
+3.Displays number of foot steps covered by user.
+
+4.Displays calories burnt by user.
+
+
+## Compatibility:
+Supports OpenHarmony API version 8
+
+
+## Open source License
+This project is based on [Apache License 2.0](https://gitee.com/openharmony-sig/Dropdown/blob/master/LICENSE.txt) ,please enjoy and participate in open source freely.
+
+## Reference:
+
+https://xd.adobe.com/view/0badc14c-4471-45c3-acc2-b9042b17febf-5efe/specs/
+
diff --git a/build-profile.json5 b/build-profile.json5
new file mode 100644
index 0000000..3854f71
--- /dev/null
+++ b/build-profile.json5
@@ -0,0 +1,27 @@
+{
+ "app": {
+ "signingConfigs": [],
+ "compileSdkVersion": 8,
+ "compatibleSdkVersion": 8,
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ }
+ ]
+ },
+ "modules": [
+ {
+ "name": "entry",
+ "srcPath": "./entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/entry/.preview/cache/.rich_cache/default-development/0.pack b/entry/.preview/cache/.rich_cache/default-development/0.pack
new file mode 100644
index 0000000..cd19e68
Binary files /dev/null and b/entry/.preview/cache/.rich_cache/default-development/0.pack differ
diff --git a/entry/.preview/cache/.rich_cache/default-development/1.pack b/entry/.preview/cache/.rich_cache/default-development/1.pack
new file mode 100644
index 0000000..5c66fb1
Binary files /dev/null and b/entry/.preview/cache/.rich_cache/default-development/1.pack differ
diff --git a/entry/.preview/cache/.rich_cache/default-development/2.pack b/entry/.preview/cache/.rich_cache/default-development/2.pack
new file mode 100644
index 0000000..f3f8d77
Binary files /dev/null and b/entry/.preview/cache/.rich_cache/default-development/2.pack differ
diff --git a/entry/.preview/cache/.rich_cache/default-development/index.pack b/entry/.preview/cache/.rich_cache/default-development/index.pack
new file mode 100644
index 0000000..4b44b16
Binary files /dev/null and b/entry/.preview/cache/.rich_cache/default-development/index.pack differ
diff --git a/entry/.preview/cache/.rich_cache/default-development/index.pack.old b/entry/.preview/cache/.rich_cache/default-development/index.pack.old
new file mode 100644
index 0000000..b6bf36c
Binary files /dev/null and b/entry/.preview/cache/.rich_cache/default-development/index.pack.old differ
diff --git a/entry/.preview/cache/css.json b/entry/.preview/cache/css.json
new file mode 100644
index 0000000..566ef3a
--- /dev/null
+++ b/entry/.preview/cache/css.json
@@ -0,0 +1,5 @@
+{
+ "entry": {
+ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.css": true
+ }
+}
\ No newline at end of file
diff --git a/entry/.preview/default/intermediates/merge_profile/default/config.json b/entry/.preview/default/intermediates/merge_profile/default/config.json
new file mode 100644
index 0000000..b0c84b7
--- /dev/null
+++ b/entry/.preview/default/intermediates/merge_profile/default/config.json
@@ -0,0 +1,73 @@
+{
+ "app": {
+ "vendor": "example",
+ "bundleName": "com.example.myapplication",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "target": 8,
+ "compatible": 8,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {
+ "default": {
+ "debug": true
+ }
+ },
+ "module": {
+ "mainAbility": ".MainAbility",
+ "deviceType": [
+ "phone",
+ "tablet"
+ ],
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:MainAbility_desc",
+ "formsEnabled": false,
+ "label": "$string:MainAbility_label",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "distro": {
+ "moduleType": "entry",
+ "installationFree": false,
+ "deliveryWithInstall": true,
+ "moduleName": "entry"
+ },
+ "package": "com.example.smartwatchseven",
+ "srcPath": "",
+ "name": ".entry",
+ "js": [
+ {
+ "pages": [
+ "pages/index/index"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ]
+ }
+}
diff --git a/entry/.preview/default/intermediates/merge_res/default/merge_npm_res_file.json b/entry/.preview/default/intermediates/merge_res/default/merge_npm_res_file.json
new file mode 100644
index 0000000..3cbdbcf
--- /dev/null
+++ b/entry/.preview/default/intermediates/merge_res/default/merge_npm_res_file.json
@@ -0,0 +1 @@
+{"dependencies":[],"local":{"path":[],"name":[]}}
diff --git a/entry/.preview/default/intermediates/process_profile/default/config.json b/entry/.preview/default/intermediates/process_profile/default/config.json
new file mode 100644
index 0000000..4924bc3
--- /dev/null
+++ b/entry/.preview/default/intermediates/process_profile/default/config.json
@@ -0,0 +1 @@
+{"app":{"vendor":"example","bundleName":"com.example.myapplication","version":{"code":1000000,"name":"1.0.0"},"apiVersion":{"target":8,"compatible":8,"releaseType":"Release"}},"deviceConfig":{"default":{"debug":true}},"module":{"mainAbility":".MainAbility","deviceType":["phone","tablet"],"abilities":[{"skills":[{"entities":["entity.system.home"],"actions":["action.system.home"]}],"orientation":"unspecified","visible":true,"srcPath":"MainAbility","name":".MainAbility","srcLanguage":"js","icon":"$media:icon","description":"$string:MainAbility_desc","formsEnabled":false,"label":"$string:MainAbility_label","type":"page","launchType":"standard"}],"distro":{"moduleType":"entry","installationFree":false,"deliveryWithInstall":true,"moduleName":"entry","virtualMachine":"ark0.0.0.2"},"package":"com.example.smartwatchseven","srcPath":"","name":".entry","js":[{"pages":["pages/index/index"],"name":".MainAbility","window":{"designWidth":720,"autoDesignWidth":false}}]}}
diff --git a/entry/.preview/default/intermediates/res/default/ResourceTable.txt b/entry/.preview/default/intermediates/res/default/ResourceTable.txt
new file mode 100644
index 0000000..a9dbf34
--- /dev/null
+++ b/entry/.preview/default/intermediates/res/default/ResourceTable.txt
@@ -0,0 +1,4 @@
+string MainAbility_desc 0x01000000
+string MainAbility_label 0x01000001
+string entry_desc 0x01000002
+media icon 0x01000003
\ No newline at end of file
diff --git a/entry/.preview/default/intermediates/res/default/config.json b/entry/.preview/default/intermediates/res/default/config.json
new file mode 100644
index 0000000..afc3d42
--- /dev/null
+++ b/entry/.preview/default/intermediates/res/default/config.json
@@ -0,0 +1,92 @@
+{
+ "app" :
+ {
+ "apiVersion" :
+ {
+ "compatible" : 8,
+ "releaseType" : "Release",
+ "target" : 8
+ },
+ "bundleName" : "com.example.myapplication",
+ "vendor" : "example",
+ "version" :
+ {
+ "code" : 1000000,
+ "name" : "1.0.0"
+ }
+ },
+ "deviceConfig" :
+ {
+ "default" :
+ {
+ "debug" : true
+ }
+ },
+ "module" :
+ {
+ "abilities" :
+ [
+ {
+ "description" : "$string:MainAbility_desc",
+ "descriptionId" : 16777216,
+ "formsEnabled" : false,
+ "icon" : "$media:icon",
+ "iconId" : 16777219,
+ "label" : "$string:MainAbility_label",
+ "labelId" : 16777217,
+ "launchType" : "standard",
+ "name" : ".MainAbility",
+ "orientation" : "unspecified",
+ "skills" :
+ [
+ {
+ "actions" :
+ [
+ "action.system.home"
+ ],
+ "entities" :
+ [
+ "entity.system.home"
+ ]
+ }
+ ],
+ "srcLanguage" : "js",
+ "srcPath" : "MainAbility",
+ "type" : "page",
+ "visible" : true
+ }
+ ],
+ "deviceType" :
+ [
+ "phone",
+ "tablet"
+ ],
+ "distro" :
+ {
+ "deliveryWithInstall" : true,
+ "installationFree" : false,
+ "moduleName" : "entry",
+ "moduleType" : "entry",
+ "virtualMachine" : "ark0.0.0.2"
+ },
+ "js" :
+ [
+ {
+ "name" : ".MainAbility",
+ "pages" :
+ [
+ "pages/index/index"
+ ],
+ "window" :
+ {
+ "autoDesignWidth" : false,
+ "designWidth" : 720
+ }
+ }
+ ],
+ "mainAbility" : ".MainAbility",
+ "name" : ".entry",
+ "package" : "com.example.smartwatchseven",
+ "srcPath" : ""
+ }
+}
\ No newline at end of file
diff --git a/entry/.preview/default/intermediates/res/default/resources.index b/entry/.preview/default/intermediates/res/default/resources.index
new file mode 100644
index 0000000..7b6664d
Binary files /dev/null and b/entry/.preview/default/intermediates/res/default/resources.index differ
diff --git a/entry/.preview/default/intermediates/res/default/resources/base/media/icon.png b/entry/.preview/default/intermediates/res/default/resources/base/media/icon.png
new file mode 100644
index 0000000..ce307a8
Binary files /dev/null and b/entry/.preview/default/intermediates/res/default/resources/base/media/icon.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/app.js b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/app.js
new file mode 100644
index 0000000..85d1053
--- /dev/null
+++ b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/app.js
@@ -0,0 +1,138 @@
+var Ze5cdea8K;
+/******/ (() => { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ "./lib/script.js!./node_modules/babel-loader/lib/index.js?presets[]=C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\preset-env&plugins[]=C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\plugin-transform-modules-commonjs&comments=false!./lib/resource-reference-script.js!./lib/manifest-loader.js?path=D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\app.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\app.js":
+/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./lib/script.js!./node_modules/babel-loader/lib/index.js?presets[]=C:\Users\Pallavi\AppData\Local\OpenHarmony\Sdk\js\3.1.5.5\build-tools\ace-loader\node_modules\@babel\preset-env&plugins[]=C:\Users\Pallavi\AppData\Local\OpenHarmony\Sdk\js\3.1.5.5\build-tools\ace-loader\node_modules\@babel\plugin-transform-modules-commonjs&comments=false!./lib/resource-reference-script.js!./lib/manifest-loader.js?path=D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\app.js!D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\app.js ***!
+ \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+module.exports = function(module, exports, $app_require$){"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports["default"] = void 0;
+var _default = {
+ onCreate: function onCreate() {
+ console.info('AceApplication onCreate');
+ },
+ onDestroy: function onDestroy() {
+ console.info('AceApplication onDestroy');
+ }
+};
+exports["default"] = _default;
+;
+(exports["default"] || module.exports).manifest = __webpack_require__(/*! !!./lib/manifest-plugin.js!../../../../.preview/jsManifest/MainAbility/manifest.json */ "./lib/manifest-plugin.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\.preview\\jsManifest\\MainAbility\\manifest.json");
+
+function requireModule(moduleName) {
+ const systemList = ['system.router', 'system.app', 'system.prompt', 'system.configuration',
+ 'system.image', 'system.device', 'system.mediaquery', 'ohos.animator', 'system.grid', 'system.resource']
+ var target = ''
+ if (systemList.includes(moduleName.replace('@', ''))) {
+ target = $app_require$('@app-module/' + moduleName.substring(1));
+ return target;
+ }
+ var shortName = moduleName.replace(/@[^.]+.([^.]+)/, '$1');
+ target = requireNapi(shortName);
+ if (typeof target !== 'undefined' && /@ohos/.test(moduleName)) {
+ return target;
+ }
+ if (typeof ohosplugin !== 'undefined' && /@ohos/.test(moduleName)) {
+ target = ohosplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ if (typeof systemplugin !== 'undefined') {
+ target = systemplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ return target;
+}
+}
+/* generated by ace-loader */
+
+
+/***/ }),
+
+/***/ "./lib/manifest-plugin.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\.preview\\jsManifest\\MainAbility\\manifest.json":
+/*!*****************************************************************************************************************************************!*\
+ !*** ./lib/manifest-plugin.js!D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\.preview\jsManifest\MainAbility\manifest.json ***!
+ \*****************************************************************************************************************************************/
+/***/ ((module) => {
+
+"use strict";
+module.exports = JSON.parse('{"appID":"com.example.myapplication","versionName":"1.0.0","versionCode":1000000,"minPlatformVersion":8,"appName":".MainAbility","deviceType":["phone","tablet"],"window":{"designWidth":720,"autoDesignWidth":false},"pages":["pages/index/index"]}');
+
+/***/ })
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ var commonCachedModule = globalThis["__common_module_cache__Ze5cdea8K"] ? globalThis["__common_module_cache__Ze5cdea8K"][moduleId]: null;
+/******/ if (commonCachedModule) { return commonCachedModule.exports; }
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ if (globalThis["__common_module_cache__Ze5cdea8K"] && moduleId.indexOf("?name=") < 0 && Object.keys(globalThis["__common_module_cache__Ze5cdea8K"]).indexOf(moduleId) >= 0) {
+/******/ globalThis["__common_module_cache__Ze5cdea8K"][moduleId] = module;
+/******/ }
+/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+var __webpack_exports__ = {};
+// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
+(() => {
+/*!*******************************************************************************************************!*\
+ !*** D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\app.js?entry ***!
+ \*******************************************************************************************************/
+var $app_script$ = __webpack_require__(/*! !!./lib/script.js!./node_modules/babel-loader?presets[]=C:\Users\Pallavi\AppData\Local\OpenHarmony\Sdk\js\3.1.5.5\build-tools\ace-loader\node_modules\@babel\preset-env&plugins[]=C:\Users\Pallavi\AppData\Local\OpenHarmony\Sdk\js\3.1.5.5\build-tools\ace-loader\node_modules\@babel\plugin-transform-modules-commonjs&comments=false!./lib/resource-reference-script.js!./lib/manifest-loader.js?path=D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\app.js!./app.js */ "./lib/script.js!./node_modules/babel-loader/lib/index.js?presets[]=C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\preset-env&plugins[]=C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\plugin-transform-modules-commonjs&comments=false!./lib/resource-reference-script.js!./lib/manifest-loader.js?path=D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\app.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\app.js")
+
+ $app_define$('@app-application/app', [], function($app_require$, $app_exports$, $app_module$) {
+
+ $app_script$($app_module$, $app_exports$, $app_require$)
+ if ($app_exports$.__esModule && $app_exports$.default) {
+ $app_module$.exports = $app_exports$.default
+ }
+
+ })
+ $app_bootstrap$('@app-application/app',undefined,undefined)
+})();
+
+Ze5cdea8K = __webpack_exports__;
+/******/ })()
+;
+//# sourceMappingURL=app.js.map
\ No newline at end of file
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/app.js.map b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/app.js.map
new file mode 100644
index 0000000..0cf030a
--- /dev/null
+++ b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/app.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"./app.js","mappings":";;;;;;;;;;;;;;;;eAgBe;AACXA,EAAAA,QADW,sBACA;AACPC,IAAAA,OAAO,CAACC,IAAR,CAAa,yBAAb;AACH,GAHU;AAIXC,EAAAA,SAJW,uBAIC;AACRF,IAAAA,OAAO,CAACC,IAAR,CAAa,0BAAb;AACH;AANU;;AAOb;AAAC,CAACE,OAAO,WAAP,IAAmBC,MAAM,CAACD,OAA3B,EAAoCE,QAApC,GAA+CC,mBAAO,CAAC,wOAAD,CAAtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UCvBH;UACA;;UAEA;UACA;UACA;UACA,2BAA2B;UAC3B;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;UACA;UACA;;UAEA;UACA;UACA;;;;;;;;;AC1BA,mBAAmB,mBAAO,CAAC,0mCAA63B;;AAEx5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,iE","sources":["webpack:///D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\app.js","webpack:///webpack/bootstrap","webpack:///D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\app.js?entry"],"names":["onCreate","console","info","onDestroy","exports","module","manifest","require"],"sourceRoot":""}
\ No newline at end of file
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Calories_icon.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Calories_icon.png
new file mode 100644
index 0000000..92e4dfe
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Calories_icon.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Hour_mark_point.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Hour_mark_point.png
new file mode 100644
index 0000000..3a9bf21
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Hour_mark_point.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Hour_needle.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Hour_needle.png
new file mode 100644
index 0000000..de05118
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Hour_needle.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Minutes_needle.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Minutes_needle.png
new file mode 100644
index 0000000..0737619
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Minutes_needle.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/MyApplication2.zip b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/MyApplication2.zip
new file mode 100644
index 0000000..ac14c26
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/MyApplication2.zip differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Schedule_icon.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Schedule_icon.png
new file mode 100644
index 0000000..89b5af0
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Schedule_icon.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Thunderstorm.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Thunderstorm.png
new file mode 100644
index 0000000..4e132ca
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/Thunderstorm.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/antique_midpoint.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/antique_midpoint.png
new file mode 100644
index 0000000..0d7f444
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/antique_midpoint.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/bg.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/bg.png
new file mode 100644
index 0000000..c7d2528
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/bg.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/bg_black.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/bg_black.png
new file mode 100644
index 0000000..e4f42d7
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/bg_black.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/cloudy.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/cloudy.png
new file mode 100644
index 0000000..8ac53c9
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/cloudy.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/lens effect.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/lens effect.png
new file mode 100644
index 0000000..ca214d5
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/lens effect.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/partly_sunny.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/partly_sunny.png
new file mode 100644
index 0000000..1b774de
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/partly_sunny.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/rainy.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/rainy.png
new file mode 100644
index 0000000..52e32a7
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/rainy.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/seconds_needle.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/seconds_needle.png
new file mode 100644
index 0000000..1393b38
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/seconds_needle.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sleeting.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sleeting.png
new file mode 100644
index 0000000..aa2eabe
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sleeting.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/steps_icon.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/steps_icon.png
new file mode 100644
index 0000000..d47acf2
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/steps_icon.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sun & rain.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sun & rain.png
new file mode 100644
index 0000000..6d4597b
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sun & rain.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sun & windy.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sun & windy.png
new file mode 100644
index 0000000..ded7b49
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sun & windy.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sunny.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sunny.png
new file mode 100644
index 0000000..1d8aa50
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/sunny.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/thunderstorm & rain.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/thunderstorm & rain.png
new file mode 100644
index 0000000..39642a8
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/thunderstorm & rain.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/windy.png b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/windy.png
new file mode 100644
index 0000000..caf5dd6
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/images/windy.png differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/CenturyGothic-Bold.TTF b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/CenturyGothic-Bold.TTF
new file mode 100644
index 0000000..93faeb3
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/CenturyGothic-Bold.TTF differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/Poppins-Regular.otf b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/Poppins-Regular.otf
new file mode 100644
index 0000000..e5c4eee
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/Poppins-Regular.otf differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/Poppins-SemiBold.otf b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/Poppins-SemiBold.otf
new file mode 100644
index 0000000..fcd0845
Binary files /dev/null and b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/common/poppins/Poppins-SemiBold.otf differ
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/i18n/weather_api.json b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/i18n/weather_api.json
new file mode 100644
index 0000000..21a8017
--- /dev/null
+++ b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/i18n/weather_api.json
@@ -0,0 +1,7 @@
+[
+ {
+ "latitude": "28.4595",
+ "longitude": "77.0266",
+ "api_key": "55e15ebc8fdd929dd4c16583773384f3"
+ }
+]
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/manifest.json b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/manifest.json
new file mode 100644
index 0000000..5cb5695
--- /dev/null
+++ b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/manifest.json
@@ -0,0 +1 @@
+{"appID":"com.example.myapplication","versionName":"1.0.0","versionCode":1000000,"minPlatformVersion":8,"appName":".MainAbility","deviceType":["phone","tablet"],"window":{"designWidth":720,"autoDesignWidth":false},"pages":["pages/index/index"]}
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/pages/index/index.js b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/pages/index/index.js
new file mode 100644
index 0000000..2df6589
--- /dev/null
+++ b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/pages/index/index.js
@@ -0,0 +1,1163 @@
+var Ze5cdea8K;
+/******/ (() => { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.hml?entry":
+/*!**********************************************************************************************************************!*\
+ !*** D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\pages\index\index.hml?entry ***!
+ \**********************************************************************************************************************/
+/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
+
+var $app_template$ = __webpack_require__(/*! !!./lib/json.js!./lib/template.js!./index.hml */ "./lib/json.js!./lib/template.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.hml")
+var $app_style$ = __webpack_require__(/*! !!./lib/json.js!./lib/style.js!./index.css */ "./lib/json.js!./lib/style.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.css")
+var $app_script$ = __webpack_require__(/*! !!./lib/script.js!./node_modules/babel-loader?presets[]=C:\Users\Pallavi\AppData\Local\OpenHarmony\Sdk\js\3.1.5.5\build-tools\ace-loader\node_modules\@babel\preset-env&plugins[]=C:\Users\Pallavi\AppData\Local\OpenHarmony\Sdk\js\3.1.5.5\build-tools\ace-loader\node_modules\@babel\plugin-transform-modules-commonjs&comments=false!./lib/resource-reference-script.js!./index.js */ "./lib/script.js!./node_modules/babel-loader/lib/index.js?presets[]=C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\preset-env&plugins[]=C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\plugin-transform-modules-commonjs&comments=false!./lib/resource-reference-script.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.js")
+
+$app_define$('@app-component/index', [], function($app_require$, $app_exports$, $app_module$) {
+
+$app_script$($app_module$, $app_exports$, $app_require$)
+if ($app_exports$.__esModule && $app_exports$.default) {
+$app_module$.exports = $app_exports$.default
+}
+
+$app_module$.exports.template = $app_template$
+
+$app_module$.exports.style = $app_style$
+
+})
+$app_bootstrap$('@app-component/index',undefined,undefined)
+
+/***/ }),
+
+/***/ "./lib/json.js!./lib/style.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.css":
+/*!*********************************************************************************************************************************************!*\
+ !*** ./lib/json.js!./lib/style.js!D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\pages\index\index.css ***!
+ \*********************************************************************************************************************************************/
+/***/ ((module) => {
+
+module.exports = {
+ ".background": {
+ "width": "230px",
+ "height": "230px",
+ "position": "absolute",
+ "zIndex": -3,
+ "top": "1px",
+ "left": "1px",
+ "display": "flex",
+ "justifyContent": "center",
+ "alignItems": "center"
+ },
+ ".bgblack": {
+ "width": "230px",
+ "height": "230px",
+ "position": "absolute",
+ "top": "1px",
+ "left": "1px",
+ "zIndex": -2,
+ "display": "flex",
+ "justifyContent": "center",
+ "alignItems": "center"
+ },
+ ".lens": {
+ "width": "230px",
+ "height": "230px",
+ "position": "absolute",
+ "zIndex": -2,
+ "top": "5px",
+ "left": "0px",
+ "display": "flex",
+ "justifyContent": "center",
+ "alignItems": "center"
+ },
+ ".centre": {
+ "height": "20px",
+ "width": "20px",
+ "top": "105px",
+ "left": "106px",
+ "alignItems": "center"
+ },
+ ".second": {
+ "height": "85px",
+ "width": "3px",
+ "top": "125px",
+ "left": "94.5px",
+ "borderBottomLeftRadius": "10px",
+ "borderBottomRightRadius": "10px",
+ "borderTopLeftRadius": "10px",
+ "borderTopRightRadius": "10px",
+ "zIndex": 1
+ },
+ ".hour": {
+ "height": "50.08px",
+ "width": "50.08px",
+ "top": "69px",
+ "left": "46px",
+ "zIndex": 1
+ },
+ ".minute": {
+ "height": "48px",
+ "width": "80px",
+ "top": "70px",
+ "left": "38px",
+ "zIndex": -1
+ },
+ ".point": {
+ "height": "10px",
+ "width": "9px"
+ },
+ ".point1": {
+ "position": "absolute",
+ "top": "110px",
+ "left": "0px"
+ },
+ ".point2": {
+ "position": "absolute",
+ "top": "110px",
+ "left": "-200px"
+ },
+ ".point3": {
+ "position": "absolute",
+ "top": "7px",
+ "left": "-100px"
+ },
+ ".point4": {
+ "position": "absolute",
+ "top": "215px",
+ "left": "-98.5px"
+ },
+ "@FONT-FACE": [
+ {
+ "fontFamily": "poppins-regular",
+ "src": "url('/common/poppins/Poppins-Regular.otf')"
+ }
+ ],
+ ".calendar": {
+ "height": "20px",
+ "width": "20px",
+ "top": "155px",
+ "left": "-47px",
+ "alignItems": "center"
+ },
+ ".notification": {
+ "fontSize": "6.5px",
+ "fontFamily": "poppins-regular",
+ "color": "#FFFFFF",
+ "height": "11px",
+ "width": "86px",
+ "top": "180px",
+ "left": "75px",
+ "alignItems": "center",
+ "flexDirection": "column",
+ "position": "absolute",
+ "textOverflow": "ellipsis"
+ },
+ ".weather": {
+ "height": "10.52px",
+ "width": "13.46px",
+ "top": "24.5px",
+ "left": "-70px"
+ },
+ ".weather_description": {
+ "fontSize": "6.5px",
+ "fontFamily": "poppins-regular",
+ "color": "#FFFFFF",
+ "width": "23px",
+ "height": "10px",
+ "top": "25.5px",
+ "left": "-70px",
+ "textOverflow": "ellipsis"
+ },
+ ".date": {
+ "position": "absolute",
+ "fontSize": "6.5px",
+ "fontFamily": "poppins-regular",
+ "color": "#FFFFFF",
+ "width": "57px",
+ "height": "8px",
+ "top": "40px",
+ "left": "92px",
+ "alignItems": "center",
+ "flexDirection": "column",
+ "textOverflow": "ellipsis"
+ },
+ ".container": {
+ "position": "absolute",
+ "height": "100%",
+ "width": "100%",
+ "top": "100px",
+ "left": "40px",
+ "flexDirection": "column",
+ "justifyContent": "center",
+ "alignItems": "center"
+ },
+ ".calories_img": {
+ "position": "absolute",
+ "width": "10px",
+ "height": "17px",
+ "top": "103px",
+ "left": "57px",
+ "alignItems": "center",
+ "flexDirection": "column"
+ },
+ ".foots": {
+ "position": "absolute",
+ "width": "17px",
+ "height": "20px",
+ "top": "105px",
+ "left": "169px",
+ "alignItems": "center",
+ "flexDirection": "column"
+ },
+ ".calories": {
+ "position": "absolute",
+ "flexDirection": "column",
+ "height": "100%",
+ "width": "100%",
+ "alignItems": "center",
+ "top": "95px",
+ "left": "-55px"
+ },
+ ".min_progress_calories": {
+ "width": "45px",
+ "height": "45px",
+ "backgroundColor": "#454545",
+ "color": "{\"values\":[{\"type\":\"linearGradient\",\"directions\":[\"to\",\"bottom\"],\"values\":[\"#ff8c00\",\"#ff4500\"]}]}",
+ "strokeWidth": "5px",
+ "justifyContent": "center",
+ "alignItems": "center",
+ "flexDirection": "column"
+ },
+ ".foot_steps": {
+ "position": "absolute",
+ "flexDirection": "column",
+ "height": "100%",
+ "width": "100%",
+ "alignItems": "center",
+ "top": "97px",
+ "left": "60px"
+ },
+ ".min_progress_footSteps": {
+ "width": "45px",
+ "height": "45px",
+ "backgroundColor": "#454545",
+ "color": "{\"values\":[{\"type\":\"linearGradient\",\"directions\":[\"to\",\"bottom\"],\"values\":[\"#00ff7f\",\"#0dbab1\"]}]}",
+ "strokeWidth": "5px"
+ },
+ "#value_container_calories": {
+ "position": "absolute",
+ "fontFamily": "poppins-regular",
+ "fontSize": "6.5px",
+ "top": "124px",
+ "left": "54px"
+ },
+ "#value_container_footSteps": {
+ "position": "absolute",
+ "fontFamily": "poppins-regular",
+ "fontSize": "6.5px",
+ "top": "125px",
+ "left": "170px"
+ }
+}
+
+/***/ }),
+
+/***/ "./lib/json.js!./lib/template.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.hml":
+/*!************************************************************************************************************************************************!*\
+ !*** ./lib/json.js!./lib/template.js!D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\pages\index\index.hml ***!
+ \************************************************************************************************************************************************/
+/***/ ((module) => {
+
+module.exports = {
+ "attr": {
+ "debugLine": "pages/index/index:1",
+ "className": "clock"
+ },
+ "type": "div",
+ "classList": [
+ "clock"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:2",
+ "className": "centre"
+ },
+ "type": "div",
+ "classList": [
+ "centre"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:3",
+ "src": "common/images/antique_midpoint.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:5",
+ "className": "second"
+ },
+ "type": "div",
+ "classList": [
+ "second"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:6",
+ "src": "common/images/seconds_needle.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:8",
+ "className": "hour"
+ },
+ "type": "div",
+ "classList": [
+ "hour"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:9",
+ "src": "common/images/Hour_needle.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:11",
+ "className": "minute"
+ },
+ "type": "div",
+ "classList": [
+ "minute"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:12",
+ "src": "common/images/Minutes_needle.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:14",
+ "className": "calendar"
+ },
+ "type": "div",
+ "classList": [
+ "calendar"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:15",
+ "src": "common/images/Schedule_icon.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:17",
+ "className": "notification"
+ },
+ "type": "div",
+ "classList": [
+ "notification"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:18",
+ "value": function () {return this.notification}
+ },
+ "type": "text",
+ "style": {
+ "textDecoration": "underline"
+ }
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:20",
+ "className": "weather"
+ },
+ "type": "div",
+ "classList": [
+ "weather"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:21",
+ "src": "common/images/partly_sunny.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='partly_sunny'}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:22",
+ "src": "common/images/cloudy.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='Clouds'&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:23",
+ "src": "common/images/windy.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='windy'&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:24",
+ "src": "common/images/rainy.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='Rain'&&!(this.weather=='windy')&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:25",
+ "src": "common/images/sleeting.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='sleeting'&&!(this.weather=='Rain')&&!(this.weather=='windy')&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:26",
+ "src": "common/images/sun_n_rain.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='sun_n_rain'&&!(this.weather=='sleeting')&&!(this.weather=='Rain')&&!(this.weather=='windy')&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:27",
+ "src": "common/images/sun_n_windy.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='sun_n_windy'&&!(this.weather=='sun_n_rain')&&!(this.weather=='sleeting')&&!(this.weather=='Rain')&&!(this.weather=='windy')&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:28",
+ "src": "common/images/sunny.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='sunny'&&!(this.weather=='sun_n_windy')&&!(this.weather=='sun_n_rain')&&!(this.weather=='sleeting')&&!(this.weather=='Rain')&&!(this.weather=='windy')&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:29",
+ "src": "common/images/thunderstorm.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='thunderstorm'&&!(this.weather=='sunny')&&!(this.weather=='sun_n_windy')&&!(this.weather=='sun_n_rain')&&!(this.weather=='sleeting')&&!(this.weather=='Rain')&&!(this.weather=='windy')&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:30",
+ "src": "common/images/thunderstorm_n_rain.png"
+ },
+ "type": "image",
+ "shown": function () {return this.weather=='thunderstorm_n_rain'&&!(this.weather=='thunderstorm')&&!(this.weather=='sunny')&&!(this.weather=='sun_n_windy')&&!(this.weather=='sun_n_rain')&&!(this.weather=='sleeting')&&!(this.weather=='Rain')&&!(this.weather=='windy')&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:31",
+ "src": "common/images/sunny.png"
+ },
+ "type": "image",
+ "shown": function () {return !(this.weather=='thunderstorm_n_rain')&&!(this.weather=='thunderstorm')&&!(this.weather=='sunny')&&!(this.weather=='sun_n_windy')&&!(this.weather=='sun_n_rain')&&!(this.weather=='sleeting')&&!(this.weather=='Rain')&&!(this.weather=='windy')&&!(this.weather=='Clouds')&&!(this.weather=='partly_sunny')}
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:33",
+ "className": "weather_description"
+ },
+ "type": "div",
+ "classList": [
+ "weather_description"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:34",
+ "value": function () {return this.weather_description}
+ },
+ "type": "text"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:36",
+ "className": "date"
+ },
+ "type": "div",
+ "classList": [
+ "date"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:37",
+ "value": function () {return (this.date_d) + decodeURI('%20') + (this.date_m) + decodeURI('%20%7C%20') + (this.date_w)}
+ },
+ "type": "text"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:39",
+ "className": "point"
+ },
+ "type": "div",
+ "classList": [
+ "point"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:40",
+ "className": "point1",
+ "src": "common/images/12,3,6,9_point.png"
+ },
+ "type": "image",
+ "classList": [
+ "point1"
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:41",
+ "className": "point2",
+ "src": "common/images/12,3,6,9_point.png"
+ },
+ "type": "image",
+ "classList": [
+ "point2"
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:42",
+ "className": "point3",
+ "src": "common/images/12,3,6,9_point.png"
+ },
+ "type": "image",
+ "classList": [
+ "point3"
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:43",
+ "className": "point4",
+ "src": "common/images/12,3,6,9_point.png"
+ },
+ "type": "image",
+ "classList": [
+ "point4"
+ ]
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:45",
+ "className": "background"
+ },
+ "type": "div",
+ "classList": [
+ "background"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:46",
+ "src": "common/images/bg.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:48",
+ "className": "bgblack"
+ },
+ "type": "div",
+ "classList": [
+ "bgblack"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:49",
+ "src": "common/images/bg_black.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:51",
+ "className": "lens"
+ },
+ "type": "div",
+ "classList": [
+ "lens"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:52",
+ "src": "common/images/lens effect.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:55",
+ "className": "calories_img"
+ },
+ "type": "div",
+ "classList": [
+ "calories_img"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:55",
+ "src": "common/images/Calories_icon.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:56",
+ "className": "foots"
+ },
+ "type": "div",
+ "classList": [
+ "foots"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:56",
+ "src": "common/images/steps_icon.png"
+ },
+ "type": "image"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:58",
+ "className": "calories"
+ },
+ "type": "div",
+ "classList": [
+ "calories"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:59",
+ "className": "min_progress_calories",
+ "type": "ring",
+ "percent": function () {return this.min_progress_calories}
+ },
+ "type": "progress",
+ "classList": [
+ "min_progress_calories"
+ ]
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:61",
+ "id": "value_container_calories"
+ },
+ "type": "div",
+ "id": "value_container_calories",
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:61",
+ "value": function () {return this.min_progress_calories*100}
+ },
+ "type": "text"
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:62",
+ "className": "foot_steps"
+ },
+ "type": "div",
+ "classList": [
+ "foot_steps"
+ ],
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:63",
+ "className": "min_progress_footSteps",
+ "type": "ring",
+ "percent": function () {return this.min_progress_footSteps}
+ },
+ "type": "progress",
+ "classList": [
+ "min_progress_footSteps"
+ ]
+ }
+ ]
+ },
+ {
+ "attr": {
+ "debugLine": "pages/index/index:65",
+ "id": "value_container_footSteps"
+ },
+ "type": "div",
+ "id": "value_container_footSteps",
+ "children": [
+ {
+ "attr": {
+ "debugLine": "pages/index/index:65",
+ "value": function () {return this.min_progress_footSteps/100*this.target_footSteps}
+ },
+ "type": "text"
+ }
+ ]
+ }
+ ]
+}
+
+/***/ }),
+
+/***/ "./lib/script.js!./node_modules/babel-loader/lib/index.js?presets[]=C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\preset-env&plugins[]=C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\plugin-transform-modules-commonjs&comments=false!./lib/resource-reference-script.js!D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.js":
+/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./lib/script.js!./node_modules/babel-loader/lib/index.js?presets[]=C:\Users\Pallavi\AppData\Local\OpenHarmony\Sdk\js\3.1.5.5\build-tools\ace-loader\node_modules\@babel\preset-env&plugins[]=C:\Users\Pallavi\AppData\Local\OpenHarmony\Sdk\js\3.1.5.5\build-tools\ace-loader\node_modules\@babel\plugin-transform-modules-commonjs&comments=false!./lib/resource-reference-script.js!D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\pages\index\index.js ***!
+ \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+module.exports = function(module, exports, $app_require$){"use strict";
+
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports["default"] = void 0;
+
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"));
+
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
+
+var _newArrowCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/newArrowCheck */ "./node_modules/@babel/runtime/helpers/newArrowCheck.js"));
+
+var _ohosAbility = _interopRequireDefault(requireModule("@ohos.ability.featureAbility"));
+
+var _system = _interopRequireDefault(requireModule("@system.sensor"));
+
+var _system2 = _interopRequireDefault(requireModule("@system.fetch"));
+
+var _weather_api = _interopRequireDefault(__webpack_require__(/*! ../../i18n/weather_api.json */ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\i18n\\weather_api.json"));
+
+var _default = {
+ data: {
+ weather: "",
+ weather_description: "",
+ notification: "Team Meeting 11am",
+ min_progress_calories: '50',
+ min_progress_footSteps: '65',
+ target_footSteps: '5000',
+ Pedometer: "",
+ sensorPermission: false
+ },
+ fetchDate: function fetchDate() {
+ var date = new Date();
+ this.date_d = String(date.getDate());
+ this.date_m = String(date.getMonth() + 1);
+ var dayOfWeek = date.getDay();
+ var month = date.getMonth();
+ var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
+ this.date_w = days[dayOfWeek];
+ var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
+ this.date_m = months[month];
+ },
+ fetchWeather: function fetchWeather() {
+ var _this = this;
+
+ var dataw = JSON.stringify(_weather_api["default"]);
+ var weather_api_input = JSON.parse(dataw);
+ var data;
+
+ _system2["default"].fetch({
+ url: "https://api.openweathermap.org/data/2.5/weather?lat=" + weather_api_input[0].latitude + "&lon=" + weather_api_input[0].longitude + "&appid=" + weather_api_input[0].api_key,
+ responseType: "json",
+ method: 'GET',
+ success: function success(resp) {
+ data = JSON.stringify(resp);
+ console.info('Weather data fetch success. Resp: ' + data);
+ },
+ fail: function fail(data, code) {
+ console.log('in Fail');
+ console.log("fail data: " + JSON.stringify(data) + " fail code: " + code);
+ },
+ complete: function complete() {
+ (0, _newArrowCheck2["default"])(this, _this);
+ console.info('Data: ' + data);
+ console.log('In Complete fetchWeather');
+ var main = data.weather[0].main;
+ this.weather = main;
+ this.weather_description = main;
+ }.bind(this)
+ });
+ },
+ fetchNotification: function fetchNotification() {
+ var _this2 = this;
+
+ var data;
+
+ _system2["default"].fetch({
+ complete: function complete() {
+ (0, _newArrowCheck2["default"])(this, _this2);
+ this.notification = data.notification;
+ this.min_progress_calories = data.min_progress_calories;
+ }.bind(this)
+ });
+ },
+ fetchPedometer: function () {
+ var _fetchPedometer = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee() {
+ return _regenerator["default"].wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ if (this.sensorPermission) {
+ _context.next = 6;
+ break;
+ }
+
+ _context.next = 3;
+ return verifyPermissions();
+
+ case 3:
+ this.sensorPermission = _context.sent;
+ _context.next = 7;
+ break;
+
+ case 6:
+ subscribePedometerSensor(this);
+
+ case 7:
+ case "end":
+ return _context.stop();
+ }
+ }
+ }, _callee, this);
+ }));
+
+ function fetchPedometer() {
+ return _fetchPedometer.apply(this, arguments);
+ }
+
+ return fetchPedometer;
+ }(),
+ onInit: function onInit() {
+ this.fetchWeather();
+ this.fetchNotification();
+ this.fetchDate();
+ this.fetchPedometer();
+ this.Pedometer = this.$t('strings.start_count');
+ },
+ verifyPermissions: function verifyPermissions() {
+ var _this3 = this;
+
+ var context = _ohosAbility["default"].getContext();
+
+ var permission = "ohos.permission.ACTIVITY_MOTION";
+ var result = new Promise(function (resolve, reject) {
+ var _this4 = this;
+
+ (0, _newArrowCheck2["default"])(this, _this3);
+ context.verifyPermission(permission).then(function (data) {
+ (0, _newArrowCheck2["default"])(this, _this4);
+ resolve(true);
+ }.bind(this))["catch"](function (error) {
+ (0, _newArrowCheck2["default"])(this, _this4);
+ reject(false);
+ }.bind(this));
+ }.bind(this));
+ return result;
+ },
+ subscribePedometerSensor: function subscribePedometerSensor(context) {
+ _system["default"].subscribeStepCounter({
+ success: function success(ret) {
+ this.min_progress_footSteps = ret.steps.toString();
+ },
+ fail: function fail(data, code) {
+ console.log('Subscription failed. Code: ' + code + '; Data: ' + data);
+ }
+ });
+ }
+};
+exports["default"] = _default;
+
+function requireModule(moduleName) {
+ const systemList = ['system.router', 'system.app', 'system.prompt', 'system.configuration',
+ 'system.image', 'system.device', 'system.mediaquery', 'ohos.animator', 'system.grid', 'system.resource']
+ var target = ''
+ if (systemList.includes(moduleName.replace('@', ''))) {
+ target = $app_require$('@app-module/' + moduleName.substring(1));
+ return target;
+ }
+ var shortName = moduleName.replace(/@[^.]+.([^.]+)/, '$1');
+ target = requireNapi(shortName);
+ if (typeof target !== 'undefined' && /@ohos/.test(moduleName)) {
+ return target;
+ }
+ if (typeof ohosplugin !== 'undefined' && /@ohos/.test(moduleName)) {
+ target = ohosplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ if (typeof systemplugin !== 'undefined') {
+ target = systemplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ return target;
+}
+
+var moduleOwn = exports.default || module.exports;
+var accessors = ['public', 'protected', 'private'];
+if (moduleOwn.data && accessors.some(function (acc) {
+ return moduleOwn[acc];
+ })) {
+ throw new Error('For VM objects, attribute data must not coexist with public, protected, or private. Please replace data with public.');
+} else if (!moduleOwn.data) {
+ moduleOwn.data = {};
+ moduleOwn._descriptor = {};
+ accessors.forEach(function(acc) {
+ var accType = typeof moduleOwn[acc];
+ if (accType === 'object') {
+ moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]);
+ for (var name in moduleOwn[acc]) {
+ moduleOwn._descriptor[name] = {access : acc};
+ }
+ } else if (accType === 'function') {
+ console.warn('For VM objects, attribute ' + acc + ' value must not be a function. Change the value to an object.');
+ }
+ });
+}}
+/* generated by ace-loader */
+
+
+/***/ }),
+
+/***/ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\i18n\\weather_api.json":
+/*!****************************************************************************************************************!*\
+ !*** D:\Desktop\git\Smart_watch_seven\smart_watch_seven-1\entry\src\main\js\MainAbility\i18n\weather_api.json ***!
+ \****************************************************************************************************************/
+/***/ ((module) => {
+
+"use strict";
+module.exports = JSON.parse('[{"latitude":"28.4595","longitude":"77.0266","api_key":"55e15ebc8fdd929dd4c16583773384f3"}]');
+
+/***/ })
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ var commonCachedModule = globalThis["__common_module_cache__Ze5cdea8K"] ? globalThis["__common_module_cache__Ze5cdea8K"][moduleId]: null;
+/******/ if (commonCachedModule) { return commonCachedModule.exports; }
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ id: moduleId,
+/******/ loaded: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ if (globalThis["__common_module_cache__Ze5cdea8K"] && moduleId.indexOf("?name=") < 0 && Object.keys(globalThis["__common_module_cache__Ze5cdea8K"]).indexOf(moduleId) >= 0) {
+/******/ globalThis["__common_module_cache__Ze5cdea8K"][moduleId] = module;
+/******/ }
+/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = __webpack_modules__;
+/******/
+/************************************************************************/
+/******/ /* webpack/runtime/chunk loaded */
+/******/ (() => {
+/******/ var deferred = [];
+/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
+/******/ if(chunkIds) {
+/******/ priority = priority || 0;
+/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
+/******/ deferred[i] = [chunkIds, fn, priority];
+/******/ return;
+/******/ }
+/******/ var notFulfilled = Infinity;
+/******/ for (var i = 0; i < deferred.length; i++) {
+/******/ var [chunkIds, fn, priority] = deferred[i];
+/******/ var fulfilled = true;
+/******/ for (var j = 0; j < chunkIds.length; j++) {
+/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
+/******/ chunkIds.splice(j--, 1);
+/******/ } else {
+/******/ fulfilled = false;
+/******/ if(priority < notFulfilled) notFulfilled = priority;
+/******/ }
+/******/ }
+/******/ if(fulfilled) {
+/******/ deferred.splice(i--, 1)
+/******/ var r = fn();
+/******/ if (r !== undefined) result = r;
+/******/ }
+/******/ }
+/******/ return result;
+/******/ };
+/******/ })();
+/******/
+/******/ /* webpack/runtime/hasOwnProperty shorthand */
+/******/ (() => {
+/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
+/******/ })();
+/******/
+/******/ /* webpack/runtime/node module decorator */
+/******/ (() => {
+/******/ __webpack_require__.nmd = (module) => {
+/******/ module.paths = [];
+/******/ if (!module.children) module.children = [];
+/******/ return module;
+/******/ };
+/******/ })();
+/******/
+/******/ /* webpack/runtime/jsonp chunk loading */
+/******/ (() => {
+/******/ // no baseURI
+/******/
+/******/ // object to store loaded and loading chunks
+/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
+/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
+/******/ var installedChunks = {
+/******/ "./pages/index/index": 0
+/******/ };
+/******/
+/******/ // no chunk on demand loading
+/******/
+/******/ // no prefetching
+/******/
+/******/ // no preloaded
+/******/
+/******/ // no HMR
+/******/
+/******/ // no HMR manifest
+/******/
+/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
+/******/
+/******/ // install a JSONP callback for chunk loading
+/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
+/******/ var [chunkIds, moreModules, runtime] = data;
+/******/ // add "moreModules" to the modules object,
+/******/ // then flag all "chunkIds" as loaded and fire callback
+/******/ var moduleId, chunkId, i = 0;
+/******/ for(moduleId in moreModules) {
+/******/ if(__webpack_require__.o(moreModules, moduleId)) {
+/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
+/******/ }
+/******/ }
+/******/ if(runtime) var result = runtime(__webpack_require__);
+/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
+/******/ for(;i < chunkIds.length; i++) {
+/******/ chunkId = chunkIds[i];
+/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
+/******/ installedChunks[chunkId][0]();
+/******/ }
+/******/ installedChunks[chunkIds[i]] = 0;
+/******/ }
+/******/ return __webpack_require__.O(result);
+/******/ }
+/******/
+/******/ var chunkLoadingGlobal = globalThis["webpackChunkZe5cdea8K"] = globalThis["webpackChunkZe5cdea8K"] || [];
+/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
+/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
+/******/ })();
+/******/
+/************************************************************************/
+/******/
+/******/ // startup
+/******/ // Load entry module and return exports
+/******/ // This entry module depends on other loaded chunks and execution need to be delayed
+/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["vendors"], () => (__webpack_require__("D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.hml?entry")))
+/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
+/******/ Ze5cdea8K = __webpack_exports__;
+/******/
+/******/ })()
+;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/pages/index/index.js.map b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/pages/index/index.js.map
new file mode 100644
index 0000000..108a407
--- /dev/null
+++ b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/pages/index/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"./pages/index/index.js","mappings":";;;;;;;;;;AAAA,qBAAqB,mBAAO,CAAC,2MAAqO;AAClQ,kBAAkB,mBAAO,CAAC,qMAAkO;AAC5P,mBAAmB,mBAAO,CAAC,k4BAAkqB;;AAE7rB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,CAAC;AACD;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,aAAa,oGAAoG,EAAE;AAClI;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,aAAa,oGAAoG,EAAE;AAClI;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC9NA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,gCAAgC;AAChC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACleA;;AACA;;AACA;;AACA;;eAGe;AACXA,EAAAA,IAAI,EAAE;AAEFC,IAAAA,OAAO,EAAE,EAFP;AAGFC,IAAAA,mBAAmB,EAAE,EAHnB;AAIFC,IAAAA,YAAY,EAAE,mBAJZ;AAKFC,IAAAA,qBAAqB,EAAE,IALrB;AAMFC,IAAAA,sBAAsB,EAAE,IANtB;AAOFC,IAAAA,gBAAgB,EAAE,MAPhB;AAQFC,IAAAA,SAAS,EAAE,EART;AASFC,IAAAA,gBAAgB,EAAE;AAThB,GADK;AAYXC,EAAAA,SAAS,EAAE,qBAAY;AACnB,QAAMC,IAAI,GAAG,IAAIC,IAAJ,EAAb;AACA,SAAKC,MAAL,GAAeC,MAAM,CAACH,IA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C3B;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WChCA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;;;;;WCAA;WACA;WACA;WACA;WACA;;;;;WCJA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UE9CA;UACA;UACA;UACA;UACA","sources":["webpack:///D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.hml?entry","webpack:///D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.css","webpack:///D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.hml","webpack:///D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1\\entry\\src\\main\\js\\MainAbility\\pages\\index\\index.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/chunk loaded","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/node module decorator","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"names":["data","weather","weather_description","notification","min_progress_calories","min_progress_footSteps","target_footSteps","Pedometer","sensorPermission","fetchDate","date","Date","date_d","String","getDate","date_m","getMonth","dayOfWeek","getDay","month","days","date_w","months","fetchWeather","dataw","JSON","stringify","item","weather_api_input","parse","fetch","url","latitude","longitude","api_key","responseType","method","success","resp","console","info","fail","code","log","complete","main","fetchNotification","fetchPedometer","verifyPermissions","subscribePedometerSensor","onInit","$t","context","ability_featureAbility","getContext","permission","result","Promise","resolve","reject","verifyPermission","then","error","sensor","subscribeStepCounter","ret","steps","toString"],"sourceRoot":""}
\ No newline at end of file
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/vendors.js b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/vendors.js
new file mode 100644
index 0000000..eb21e7a
--- /dev/null
+++ b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/vendors.js
@@ -0,0 +1,1114 @@
+"use strict";
+(globalThis["webpackChunkZe5cdea8K"] = globalThis["webpackChunkZe5cdea8K"] || []).push([["vendors"],{
+
+/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
+/*!*****************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
+ \*****************************************************************/
+/***/ ((module) => {
+
+
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ Promise.resolve(value).then(_next, _throw);
+ }
+}
+
+function _asyncToGenerator(fn) {
+ return function () {
+ var self = this,
+ args = arguments;
+ return new Promise(function (resolve, reject) {
+ var gen = fn.apply(self, args);
+
+ function _next(value) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+ }
+
+ function _throw(err) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+ }
+
+ _next(undefined);
+ });
+ };
+}
+
+module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports.default = module.exports;
+
+function requireModule(moduleName) {
+ const systemList = ['system.router', 'system.app', 'system.prompt', 'system.configuration',
+ 'system.image', 'system.device', 'system.mediaquery', 'ohos.animator', 'system.grid', 'system.resource']
+ var target = ''
+ if (systemList.includes(moduleName.replace('@', ''))) {
+ target = $app_require$('@app-module/' + moduleName.substring(1));
+ return target;
+ }
+ var shortName = moduleName.replace(/@[^.]+.([^.]+)/, '$1');
+ target = requireNapi(shortName);
+ if (typeof target !== 'undefined' && /@ohos/.test(moduleName)) {
+ return target;
+ }
+ if (typeof ohosplugin !== 'undefined' && /@ohos/.test(moduleName)) {
+ target = ohosplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ if (typeof systemplugin !== 'undefined') {
+ target = systemplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ return target;
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
+/*!**********************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
+ \**********************************************************************/
+/***/ ((module) => {
+
+
+
+function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : {
+ "default": obj
+ };
+}
+
+module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports.default = module.exports;
+
+function requireModule(moduleName) {
+ const systemList = ['system.router', 'system.app', 'system.prompt', 'system.configuration',
+ 'system.image', 'system.device', 'system.mediaquery', 'ohos.animator', 'system.grid', 'system.resource']
+ var target = ''
+ if (systemList.includes(moduleName.replace('@', ''))) {
+ target = $app_require$('@app-module/' + moduleName.substring(1));
+ return target;
+ }
+ var shortName = moduleName.replace(/@[^.]+.([^.]+)/, '$1');
+ target = requireNapi(shortName);
+ if (typeof target !== 'undefined' && /@ohos/.test(moduleName)) {
+ return target;
+ }
+ if (typeof ohosplugin !== 'undefined' && /@ohos/.test(moduleName)) {
+ target = ohosplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ if (typeof systemplugin !== 'undefined') {
+ target = systemplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ return target;
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/newArrowCheck.js":
+/*!**************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/newArrowCheck.js ***!
+ \**************************************************************/
+/***/ ((module) => {
+
+
+
+function _newArrowCheck(innerThis, boundThis) {
+ if (innerThis !== boundThis) {
+ throw new TypeError("Cannot instantiate an arrow function");
+ }
+}
+
+module.exports = _newArrowCheck, module.exports.__esModule = true, module.exports.default = module.exports;
+
+function requireModule(moduleName) {
+ const systemList = ['system.router', 'system.app', 'system.prompt', 'system.configuration',
+ 'system.image', 'system.device', 'system.mediaquery', 'ohos.animator', 'system.grid', 'system.resource']
+ var target = ''
+ if (systemList.includes(moduleName.replace('@', ''))) {
+ target = $app_require$('@app-module/' + moduleName.substring(1));
+ return target;
+ }
+ var shortName = moduleName.replace(/@[^.]+.([^.]+)/, '$1');
+ target = requireNapi(shortName);
+ if (typeof target !== 'undefined' && /@ohos/.test(moduleName)) {
+ return target;
+ }
+ if (typeof ohosplugin !== 'undefined' && /@ohos/.test(moduleName)) {
+ target = ohosplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ if (typeof systemplugin !== 'undefined') {
+ target = systemplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ return target;
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
+/*!*******************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
+ \*******************************************************/
+/***/ ((module) => {
+
+
+
+function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+ return typeof obj;
+ } : function (obj) {
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ }, module.exports.__esModule = true, module.exports.default = module.exports), _typeof(obj);
+}
+
+module.exports = _typeof, module.exports.__esModule = true, module.exports.default = module.exports;
+
+function requireModule(moduleName) {
+ const systemList = ['system.router', 'system.app', 'system.prompt', 'system.configuration',
+ 'system.image', 'system.device', 'system.mediaquery', 'ohos.animator', 'system.grid', 'system.resource']
+ var target = ''
+ if (systemList.includes(moduleName.replace('@', ''))) {
+ target = $app_require$('@app-module/' + moduleName.substring(1));
+ return target;
+ }
+ var shortName = moduleName.replace(/@[^.]+.([^.]+)/, '$1');
+ target = requireNapi(shortName);
+ if (typeof target !== 'undefined' && /@ohos/.test(moduleName)) {
+ return target;
+ }
+ if (typeof ohosplugin !== 'undefined' && /@ohos/.test(moduleName)) {
+ target = ohosplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ if (typeof systemplugin !== 'undefined') {
+ target = systemplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ return target;
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/regenerator/index.js":
+/*!**********************************************************!*\
+ !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
+ \**********************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
+
+function requireModule(moduleName) {
+ const systemList = ['system.router', 'system.app', 'system.prompt', 'system.configuration',
+ 'system.image', 'system.device', 'system.mediaquery', 'ohos.animator', 'system.grid', 'system.resource']
+ var target = ''
+ if (systemList.includes(moduleName.replace('@', ''))) {
+ target = $app_require$('@app-module/' + moduleName.substring(1));
+ return target;
+ }
+ var shortName = moduleName.replace(/@[^.]+.([^.]+)/, '$1');
+ target = requireNapi(shortName);
+ if (typeof target !== 'undefined' && /@ohos/.test(moduleName)) {
+ return target;
+ }
+ if (typeof ohosplugin !== 'undefined' && /@ohos/.test(moduleName)) {
+ target = ohosplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ if (typeof systemplugin !== 'undefined') {
+ target = systemplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ return target;
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/regenerator-runtime/runtime.js":
+/*!*****************************************************!*\
+ !*** ./node_modules/regenerator-runtime/runtime.js ***!
+ \*****************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/* module decorator */ module = __webpack_require__.nmd(module);
+
+
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
+
+var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"));
+
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+var runtime = function (exports) {
+ "use strict";
+
+ var Op = Object.prototype;
+ var hasOwn = Op.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
+
+ function define(obj, key, value) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ return obj[key];
+ }
+
+ try {
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
+ define({}, "");
+ } catch (err) {
+ define = function define(obj, key, value) {
+ return obj[key] = value;
+ };
+ }
+
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
+ var generator = Object.create(protoGenerator.prototype);
+ var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
+ // .throw, and .return methods.
+
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
+ return generator;
+ }
+
+ exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+
+ function tryCatch(fn, obj, arg) {
+ try {
+ return {
+ type: "normal",
+ arg: fn.call(obj, arg)
+ };
+ } catch (err) {
+ return {
+ type: "throw",
+ arg: err
+ };
+ }
+ }
+
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+
+ var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+
+ function Generator() {}
+
+ function GeneratorFunction() {}
+
+ function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
+ // don't natively support it.
+
+
+ var IteratorPrototype = {};
+ define(IteratorPrototype, iteratorSymbol, function () {
+ return this;
+ });
+ var getProto = Object.getPrototypeOf;
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
+
+ if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
+ // This environment has a native %IteratorPrototype%; use it instead
+ // of the polyfill.
+ IteratorPrototype = NativeIteratorPrototype;
+ }
+
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
+ define(Gp, "constructor", GeneratorFunctionPrototype);
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
+ GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
+ // Iterator interface in terms of a single ._invoke method.
+
+ function defineIteratorMethods(prototype) {
+ ["next", "throw", "return"].forEach(function (method) {
+ define(prototype, method, function (arg) {
+ return this._invoke(method, arg);
+ });
+ });
+ }
+
+ exports.isGeneratorFunction = function (genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
+ };
+
+ exports.mark = function (genFun) {
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+ } else {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
+ }
+
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ }; // Within the body of any async function, `await x` is transformed to
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
+ // meant to be awaited.
+
+
+ exports.awrap = function (arg) {
+ return {
+ __await: arg
+ };
+ };
+
+ function AsyncIterator(generator, PromiseImpl) {
+ function invoke(method, arg, resolve, reject) {
+ var record = tryCatch(generator[method], generator, arg);
+
+ if (record.type === "throw") {
+ reject(record.arg);
+ } else {
+ var result = record.arg;
+ var value = result.value;
+
+ if (value && (0, _typeof2["default"])(value) === "object" && hasOwn.call(value, "__await")) {
+ return PromiseImpl.resolve(value.__await).then(function (value) {
+ invoke("next", value, resolve, reject);
+ }, function (err) {
+ invoke("throw", err, resolve, reject);
+ });
+ }
+
+ return PromiseImpl.resolve(value).then(function (unwrapped) {
+ // When a yielded Promise is resolved, its final value becomes
+ // the .value of the Promise<{value,done}> result for the
+ // current iteration.
+ result.value = unwrapped;
+ resolve(result);
+ }, function (error) {
+ // If a rejected Promise was yielded, throw the rejection back
+ // into the async generator function so it can be handled there.
+ return invoke("throw", error, resolve, reject);
+ });
+ }
+ }
+
+ var previousPromise;
+
+ function enqueue(method, arg) {
+ function callInvokeWithMethodAndArg() {
+ return new PromiseImpl(function (resolve, reject) {
+ invoke(method, arg, resolve, reject);
+ });
+ }
+
+ return previousPromise = // If enqueue has been called before, then we want to wait until
+ // all previous Promises have been resolved before calling invoke,
+ // so that results are always delivered in the correct order. If
+ // enqueue has not been called before, then it is important to
+ // call invoke immediately, without waiting on a callback to fire,
+ // so that the async generator function has the opportunity to do
+ // any necessary setup in a predictable way. This predictability
+ // is why the Promise constructor synchronously invokes its
+ // executor callback, and why async functions synchronously
+ // execute code before the first await. Since we implement simple
+ // async functions in terms of async generators, it is especially
+ // important to get this right, even though it requires care.
+ previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
+ // invocations of the iterator.
+ callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
+ } // Define the unified helper method that is used to implement .next,
+ // .throw, and .return (see defineIteratorMethods).
+
+
+ this._invoke = enqueue;
+ }
+
+ defineIteratorMethods(AsyncIterator.prototype);
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
+ return this;
+ });
+ exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
+ // AsyncIterator objects; they just return a Promise for the value of
+ // the final result produced by the iterator.
+
+ exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
+ return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
+ : iter.next().then(function (result) {
+ return result.done ? result.value : iter.next();
+ });
+ };
+
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
+
+ if (state === GenStateCompleted) {
+ if (method === "throw") {
+ throw arg;
+ } // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+
+
+ return doneResult();
+ }
+
+ context.method = method;
+ context.arg = arg;
+
+ while (true) {
+ var delegate = context.delegate;
+
+ if (delegate) {
+ var delegateResult = maybeInvokeDelegate(delegate, context);
+
+ if (delegateResult) {
+ if (delegateResult === ContinueSentinel) continue;
+ return delegateResult;
+ }
+ }
+
+ if (context.method === "next") {
+ // Setting context._sent for legacy support of Babel's
+ // function.sent implementation.
+ context.sent = context._sent = context.arg;
+ } else if (context.method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw context.arg;
+ }
+
+ context.dispatchException(context.arg);
+ } else if (context.method === "return") {
+ context.abrupt("return", context.arg);
+ }
+
+ state = GenStateExecuting;
+ var record = tryCatch(innerFn, self, context);
+
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done ? GenStateCompleted : GenStateSuspendedYield;
+
+ if (record.arg === ContinueSentinel) {
+ continue;
+ }
+
+ return {
+ value: record.arg,
+ done: context.done
+ };
+ } else if (record.type === "throw") {
+ state = GenStateCompleted; // Dispatch the exception by looping back around to the
+ // context.dispatchException(context.arg) call above.
+
+ context.method = "throw";
+ context.arg = record.arg;
+ }
+ }
+ };
+ } // Call delegate.iterator[context.method](context.arg) and handle the
+ // result, either by returning a { value, done } result from the
+ // delegate iterator, or by modifying context.method and context.arg,
+ // setting context.delegate to null, and returning the ContinueSentinel.
+
+
+ function maybeInvokeDelegate(delegate, context) {
+ var method = delegate.iterator[context.method];
+
+ if (method === undefined) {
+ // A .throw or .return when the delegate iterator has no .throw
+ // method always terminates the yield* loop.
+ context.delegate = null;
+
+ if (context.method === "throw") {
+ // Note: ["return"] must be used for ES3 parsing compatibility.
+ if (delegate.iterator["return"]) {
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ context.method = "return";
+ context.arg = undefined;
+ maybeInvokeDelegate(delegate, context);
+
+ if (context.method === "throw") {
+ // If maybeInvokeDelegate(context) changed context.method from
+ // "return" to "throw", let that override the TypeError below.
+ return ContinueSentinel;
+ }
+ }
+
+ context.method = "throw";
+ context.arg = new TypeError("The iterator does not provide a 'throw' method");
+ }
+
+ return ContinueSentinel;
+ }
+
+ var record = tryCatch(method, delegate.iterator, context.arg);
+
+ if (record.type === "throw") {
+ context.method = "throw";
+ context.arg = record.arg;
+ context.delegate = null;
+ return ContinueSentinel;
+ }
+
+ var info = record.arg;
+
+ if (!info) {
+ context.method = "throw";
+ context.arg = new TypeError("iterator result is not an object");
+ context.delegate = null;
+ return ContinueSentinel;
+ }
+
+ if (info.done) {
+ // Assign the result of the finished delegate to the temporary
+ // variable specified by delegate.resultName (see delegateYield).
+ context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
+
+ context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
+ // exception, let the outer generator proceed normally. If
+ // context.method was "next", forget context.arg since it has been
+ // "consumed" by the delegate iterator. If context.method was
+ // "return", allow the original .return call to continue in the
+ // outer generator.
+
+ if (context.method !== "return") {
+ context.method = "next";
+ context.arg = undefined;
+ }
+ } else {
+ // Re-yield the result returned by the delegate method.
+ return info;
+ } // The delegate iterator is finished, so forget it and continue with
+ // the outer generator.
+
+
+ context.delegate = null;
+ return ContinueSentinel;
+ } // Define Generator.prototype.{next,throw,return} in terms of the
+ // unified ._invoke helper method.
+
+
+ defineIteratorMethods(Gp);
+ define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
+ // @@iterator function is called on it. Some browsers' implementations of the
+ // iterator prototype chain incorrectly implement this, causing the Generator
+ // object to not be returned from this call. This ensures that doesn't happen.
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
+
+ define(Gp, iteratorSymbol, function () {
+ return this;
+ });
+ define(Gp, "toString", function () {
+ return "[object Generator]";
+ });
+
+ function pushTryEntry(locs) {
+ var entry = {
+ tryLoc: locs[0]
+ };
+
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
+
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
+
+ this.tryEntries.push(entry);
+ }
+
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
+ }
+
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{
+ tryLoc: "root"
+ }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset(true);
+ }
+
+ exports.keys = function (object) {
+ var keys = [];
+
+ for (var key in object) {
+ keys.push(key);
+ }
+
+ keys.reverse(); // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ } // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+
+
+ next.done = true;
+ return next;
+ };
+ };
+
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
+
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+
+ if (!isNaN(iterable.length)) {
+ var i = -1,
+ next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+
+ next.value = undefined;
+ next.done = true;
+ return next;
+ };
+
+ return next.next = next;
+ }
+ } // Return an iterator with no values.
+
+
+ return {
+ next: doneResult
+ };
+ }
+
+ exports.values = values;
+
+ function doneResult() {
+ return {
+ value: undefined,
+ done: true
+ };
+ }
+
+ Context.prototype = {
+ constructor: Context,
+ reset: function reset(skipTempReset) {
+ this.prev = 0;
+ this.next = 0; // Resetting context._sent for legacy support of Babel's
+ // function.sent implementation.
+
+ this.sent = this._sent = undefined;
+ this.done = false;
+ this.delegate = null;
+ this.method = "next";
+ this.arg = undefined;
+ this.tryEntries.forEach(resetTryEntry);
+
+ if (!skipTempReset) {
+ for (var name in this) {
+ // Not sure about the optimal order of these conditions:
+ if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
+ this[name] = undefined;
+ }
+ }
+ }
+ },
+ stop: function stop() {
+ this.done = true;
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
+
+ return this.rval;
+ },
+ dispatchException: function dispatchException(exception) {
+ if (this.done) {
+ throw exception;
+ }
+
+ var context = this;
+
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
+
+ if (caught) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ context.method = "next";
+ context.arg = undefined;
+ }
+
+ return !!caught;
+ }
+
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
+
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
+
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
+ }
+ }
+ },
+ abrupt: function abrupt(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
+
+ if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
+
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
+
+ if (finallyEntry) {
+ this.method = "next";
+ this.next = finallyEntry.finallyLoc;
+ return ContinueSentinel;
+ }
+
+ return this.complete(record);
+ },
+ complete: function complete(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+
+ if (record.type === "break" || record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = this.arg = record.arg;
+ this.method = "return";
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+
+ return ContinueSentinel;
+ },
+ finish: function finish(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+ "catch": function _catch(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+
+ return thrown;
+ }
+ } // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+
+
+ throw new Error("illegal catch attempt");
+ },
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+
+ if (this.method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ this.arg = undefined;
+ }
+
+ return ContinueSentinel;
+ }
+ }; // Regardless of whether this script is executing as a CommonJS module
+ // or not, return the runtime object so that we can declare the variable
+ // regeneratorRuntime in the outer scope, which allows this module to be
+ // injected easily by `bin/regenerator --include-runtime script.js`.
+
+ return exports;
+}( // If this script is executing as a CommonJS module, use module.exports
+// as the regeneratorRuntime namespace. Otherwise create a new empty
+// object. Either way, the resulting object will be used to initialize
+// the regeneratorRuntime variable at the top of this file.
+( false ? 0 : (0, _typeof2["default"])(module)) === "object" ? module.exports : {});
+
+try {
+ regeneratorRuntime = runtime;
+} catch (accidentalStrictMode) {
+ // This module should not be running in strict mode, so the above
+ // assignment should always work unless something is misconfigured. Just
+ // in case runtime.js accidentally runs in strict mode, in modern engines
+ // we can explicitly access globalThis. In older engines we can escape
+ // strict mode using a global Function call. This could conceivably fail
+ // if a Content Security Policy forbids using Function, but in that case
+ // the proper solution is to fix the accidental strict mode problem. If
+ // you've misconfigured your bundler to force strict mode and applied a
+ // CSP to forbid Function, and you're not willing to fix either of those
+ // problems, please detail your unique predicament in a GitHub issue.
+ if ((typeof globalThis === "undefined" ? "undefined" : (0, _typeof2["default"])(globalThis)) === "object") {
+ globalThis.regeneratorRuntime = runtime;
+ } else {
+ Function("r", "regeneratorRuntime = r")(runtime);
+ }
+}
+
+function requireModule(moduleName) {
+ const systemList = ['system.router', 'system.app', 'system.prompt', 'system.configuration',
+ 'system.image', 'system.device', 'system.mediaquery', 'ohos.animator', 'system.grid', 'system.resource']
+ var target = ''
+ if (systemList.includes(moduleName.replace('@', ''))) {
+ target = $app_require$('@app-module/' + moduleName.substring(1));
+ return target;
+ }
+ var shortName = moduleName.replace(/@[^.]+.([^.]+)/, '$1');
+ target = requireNapi(shortName);
+ if (typeof target !== 'undefined' && /@ohos/.test(moduleName)) {
+ return target;
+ }
+ if (typeof ohosplugin !== 'undefined' && /@ohos/.test(moduleName)) {
+ target = ohosplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ if (typeof systemplugin !== 'undefined') {
+ target = systemplugin;
+ for (let key of shortName.split('.')) {
+ target = target[key];
+ if(!target) {
+ break;
+ }
+ }
+ if (typeof target !== 'undefined') {
+ return target;
+ }
+ }
+ return target;
+}
+
+
+/***/ })
+
+}]);
+ globalThis["__common_module_cache__Ze5cdea8K"] = globalThis["__common_module_cache__Ze5cdea8K"] || {};
+ globalThis["webpackChunkZe5cdea8K"].forEach((item)=> {
+ Object.keys(item[1]).forEach((element) => {
+ globalThis["__common_module_cache__Ze5cdea8K"][element] = null;
+ })
+ });
+//# sourceMappingURL=vendors.js.map
\ No newline at end of file
diff --git a/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/vendors.js.map b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/vendors.js.map
new file mode 100644
index 0000000..32bdf3f
--- /dev/null
+++ b/entry/.preview/intermediates/res/debug/rich/assets/js/MainAbility/vendors.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"vendors.js","mappings":";;;;;;;;;;;AAAA,SAASA,kBAAT,CAA4BC,GAA5B,EAAiCC,OAAjC,EAA0CC,MAA1C,EAAkDC,KAAlD,EAAyDC,MAAzD,EAAiEC,GAAjE,EAAsEC,GAAtE,EAA2E;AACzE,MAAI;AACF,QAAIC,IAAI,GAAGP,GAAG,CAACK,GAAD,CAAH,CAASC,GAAT,CAAX;AACA,QAAIE,KAAK,GAAGD,IAAI,CAACC,KAAjB;AACD,GAHD,CAGE,OAAOC,KAAP,EAAc;AACdP,IAAAA,MAAM,CAACO,KAAD,CAAN;AACA;AACD;;AAED,MAAIF,IAAI,CAACG,IAAT,EAAe;AACbT,IAAAA,OAAO,CAACO,KAAD,CAAP;AACD,GAFD,MAEO;AACLG,IAAAA,OAAO,CAACV,OAAR,CAAgBO,KAAhB,EAAuBI,IAAvB,CAA4BT,KAA5B,EAAmCC,MAAnC;AACD;AACF;;AAED,SAASS,iBAAT,CAA2BC,EAA3B,EAA+B;AAC7B,SAAO,YAAY;AACjB,QAAIC,IAAI,GAAG,IAAX;AAAA,QACIC,IAAI,GAAGC,SADX;AAEA,WAAO,IAAIN,OAAJ,CAAY,UAAUV,OAAV,EAAmBC,MAAnB,EAA2B;AAC5C,UAAIF,GAAG,GAAGc,EAAE,CAACI,KAAH,CAASH,IAAT,EAAeC,IAAf,CAAV;;AAEA,eAASb,KAAT,CAAeK,KAAf,EAAsB;AACpBT,QAAAA,kBAAkB,CAACC,GAAD,EAAMC,OAAN,EAAeC,MAAf,EAAuBC,KAAvB,EAA8BC,MAA9B,EAAsC,MAAtC,EAA8CI,KAA9C,CAAlB;AACD;;AAED,eAASJ,MAAT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AAKR,QAAL,GAAgB;AACd5E,QAAAA,QAAQ,EAAE8C,MAAM,CAACwD,QAAD,CADF;AAEdnB,QAAAA,UAAU,EAAEA,UAFE;AAGdC,QAAAA,OAAO,EAAEA;AAHK,OAAhB;;AAMA,UAAI,KAAKjC,MAAL,KAAgB,MAApB,EAA4B;AAC1B;AACA;AACA,aAAK7E,GAAL,GAAWc,SAAX;AACD;;AAED,aAAOmD,gBAAP;AACD;AArMiB,GAApB,CAlgBgC,CA0sBhC;AACA;AACA;AACA;;AACA,SAAOjD,OAAP;AAED,CAhtBc,EAitBb;AACA;AACA;AACA;AACA,uCAAOD,MAAP,OAAkB,QAAlB,GAA6BA,MAAM,CAACC,OAApC,GAA8C,EArtBjC,CAAf;;AAwtBA,IAAI;AACFuI,EAAAA,kBAAkB,GAAGzH,OAArB;AACD,CAFD,CAEE,OAAO0H,oBAAP,EAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAI,QAAOC,UAAP,0DAAOA,UAAP,OAAsB,QAA1B,EAAoC;AAClCA,IAAAA,UAAU,CAACF,kBAAX,GAAgCzH,OAAhC;AACD,GAFD,MAEO;AACL4H,IAAAA,QAAQ,CAAC,GAAD,EAAM,wBAAN,CAAR,CAAwC5H,OAAxC;AACD;AACF","sources":["webpack:///C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\runtime\\helpers\\asyncToGenerator.js","webpack:///C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\runtime\\helpers\\interopRequireDefault.js","webpack:///C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\runtime\\helpers\\newArrowCheck.js","webpack:///C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\runtime\\helpers\\typeof.js","webpack:///C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\@babel\\runtime\\regenerator\\index.js","webpack:///C:\\Users\\Pallavi\\AppData\\Local\\OpenHarmony\\Sdk\\js\\3.1.5.5\\build-tools\\ace-loader\\node_modules\\regenerator-runtime\\runtime.js"],"names":["asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","module","exports","__esModule","_interopRequireDefault","obj","_newArrowCheck","innerThis","boundThis","TypeError","_typeof","Symbol","iterator","constructor","prototype","require","runtime","Op","Object","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","defineProperty","enumerable","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","type","call","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","displayName","defineIteratorMethods","forEach","method","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","PromiseImpl","invoke","record","result","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","async","iter","next","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","keys","object","reverse","length","pop","iterable","iteratorMethod","isNaN","i","skipTempReset","prev","charAt","slice","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function"],"sourceRoot":""}
\ No newline at end of file
diff --git a/entry/.preview/jsManifest/MainAbility/manifest.json b/entry/.preview/jsManifest/MainAbility/manifest.json
new file mode 100644
index 0000000..5cb5695
--- /dev/null
+++ b/entry/.preview/jsManifest/MainAbility/manifest.json
@@ -0,0 +1 @@
+{"appID":"com.example.myapplication","versionName":"1.0.0","versionCode":1000000,"minPlatformVersion":8,"appName":".MainAbility","deviceType":["phone","tablet"],"window":{"designWidth":720,"autoDesignWidth":false},"pages":["pages/index/index"]}
diff --git a/entry/build-profile.json5 b/entry/build-profile.json5
new file mode 100644
index 0000000..09fbaf4
--- /dev/null
+++ b/entry/build-profile.json5
@@ -0,0 +1,10 @@
+{
+ "apiType": 'faMode',
+ "buildOption": {
+ },
+ "targets": [
+ {
+ "name": "default",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/entry/hvigorfile.js b/entry/hvigorfile.js
new file mode 100644
index 0000000..bcec4c9
--- /dev/null
+++ b/entry/hvigorfile.js
@@ -0,0 +1,2 @@
+// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
+module.exports = require('@ohos/hvigor-ohos-plugin').legacyHapTasks
diff --git a/entry/package-lock.json b/entry/package-lock.json
new file mode 100644
index 0000000..15bc714
--- /dev/null
+++ b/entry/package-lock.json
@@ -0,0 +1,5 @@
+{
+ "name": "entry",
+ "version": "1.0.0",
+ "lockfileVersion": 1
+}
diff --git a/entry/package.json b/entry/package.json
new file mode 100644
index 0000000..c4e988f
--- /dev/null
+++ b/entry/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "entry",
+ "version": "1.0.0",
+ "ohos": {
+ "org": "huawei",
+ "buildTool": "hvigor",
+ "directoryLevel": "module"
+ },
+ "description": "example description",
+ "repository": {},
+ "license": "ISC",
+ "dependencies": {}
+}
diff --git a/entry/src/main/config.json b/entry/src/main/config.json
new file mode 100644
index 0000000..0e0d49d
--- /dev/null
+++ b/entry/src/main/config.json
@@ -0,0 +1,64 @@
+{
+ "app": {
+ "vendor": "example",
+ "bundleName": "com.example.myapplication",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "mainAbility": ".MainAbility",
+ "deviceType": [
+ "phone",
+ "tablet"
+ ],
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:MainAbility_desc",
+ "formsEnabled": false,
+ "label": "$string:MainAbility_label",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "distro": {
+ "moduleType": "entry",
+ "installationFree": false,
+ "deliveryWithInstall": true,
+ "moduleName": "entry"
+ },
+ "package": "com.example.smartwatchseven",
+ "srcPath": "",
+ "name": ".entry",
+ "js": [
+ {
+ "pages": [
+ "pages/index/index"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/entry/src/main/js/MainAbility/app.js b/entry/src/main/js/MainAbility/app.js
new file mode 100644
index 0000000..fc40daf
--- /dev/null
+++ b/entry/src/main/js/MainAbility/app.js
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2022 Application Library Engineering Group
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export default {
+ onCreate() {
+ console.info('AceApplication onCreate');
+ },
+ onDestroy() {
+ console.info('AceApplication onDestroy');
+ }
+};
\ No newline at end of file
diff --git a/entry/src/main/js/MainAbility/common/images/Calories_icon.png b/entry/src/main/js/MainAbility/common/images/Calories_icon.png
new file mode 100644
index 0000000..92e4dfe
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/Calories_icon.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/Hour_mark_point.png b/entry/src/main/js/MainAbility/common/images/Hour_mark_point.png
new file mode 100644
index 0000000..3a9bf21
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/Hour_mark_point.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/Hour_needle.png b/entry/src/main/js/MainAbility/common/images/Hour_needle.png
new file mode 100644
index 0000000..de05118
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/Hour_needle.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/Minutes_needle.png b/entry/src/main/js/MainAbility/common/images/Minutes_needle.png
new file mode 100644
index 0000000..0737619
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/Minutes_needle.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/MyApplication2.zip b/entry/src/main/js/MainAbility/common/images/MyApplication2.zip
new file mode 100644
index 0000000..ac14c26
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/MyApplication2.zip differ
diff --git a/entry/src/main/js/MainAbility/common/images/Schedule_icon.png b/entry/src/main/js/MainAbility/common/images/Schedule_icon.png
new file mode 100644
index 0000000..89b5af0
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/Schedule_icon.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/Thunderstorm.png b/entry/src/main/js/MainAbility/common/images/Thunderstorm.png
new file mode 100644
index 0000000..4e132ca
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/Thunderstorm.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/antique_midpoint.png b/entry/src/main/js/MainAbility/common/images/antique_midpoint.png
new file mode 100644
index 0000000..0d7f444
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/antique_midpoint.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/bg.png b/entry/src/main/js/MainAbility/common/images/bg.png
new file mode 100644
index 0000000..c7d2528
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/bg.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/bg_black.png b/entry/src/main/js/MainAbility/common/images/bg_black.png
new file mode 100644
index 0000000..e4f42d7
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/bg_black.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/cloudy.png b/entry/src/main/js/MainAbility/common/images/cloudy.png
new file mode 100644
index 0000000..8ac53c9
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/cloudy.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/lens effect.png b/entry/src/main/js/MainAbility/common/images/lens effect.png
new file mode 100644
index 0000000..ca214d5
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/lens effect.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/partly_sunny.png b/entry/src/main/js/MainAbility/common/images/partly_sunny.png
new file mode 100644
index 0000000..1b774de
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/partly_sunny.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/rainy.png b/entry/src/main/js/MainAbility/common/images/rainy.png
new file mode 100644
index 0000000..52e32a7
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/rainy.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/seconds_needle.png b/entry/src/main/js/MainAbility/common/images/seconds_needle.png
new file mode 100644
index 0000000..1393b38
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/seconds_needle.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/sleeting.png b/entry/src/main/js/MainAbility/common/images/sleeting.png
new file mode 100644
index 0000000..aa2eabe
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/sleeting.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/steps_icon.png b/entry/src/main/js/MainAbility/common/images/steps_icon.png
new file mode 100644
index 0000000..d47acf2
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/steps_icon.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/sun & rain.png b/entry/src/main/js/MainAbility/common/images/sun & rain.png
new file mode 100644
index 0000000..6d4597b
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/sun & rain.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/sun & windy.png b/entry/src/main/js/MainAbility/common/images/sun & windy.png
new file mode 100644
index 0000000..ded7b49
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/sun & windy.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/sunny.png b/entry/src/main/js/MainAbility/common/images/sunny.png
new file mode 100644
index 0000000..1d8aa50
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/sunny.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/thunderstorm & rain.png b/entry/src/main/js/MainAbility/common/images/thunderstorm & rain.png
new file mode 100644
index 0000000..39642a8
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/thunderstorm & rain.png differ
diff --git a/entry/src/main/js/MainAbility/common/images/windy.png b/entry/src/main/js/MainAbility/common/images/windy.png
new file mode 100644
index 0000000..caf5dd6
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/images/windy.png differ
diff --git a/entry/src/main/js/MainAbility/common/poppins/CenturyGothic-Bold.TTF b/entry/src/main/js/MainAbility/common/poppins/CenturyGothic-Bold.TTF
new file mode 100644
index 0000000..93faeb3
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/poppins/CenturyGothic-Bold.TTF differ
diff --git a/entry/src/main/js/MainAbility/common/poppins/Poppins-Regular.otf b/entry/src/main/js/MainAbility/common/poppins/Poppins-Regular.otf
new file mode 100644
index 0000000..e5c4eee
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/poppins/Poppins-Regular.otf differ
diff --git a/entry/src/main/js/MainAbility/common/poppins/Poppins-SemiBold.otf b/entry/src/main/js/MainAbility/common/poppins/Poppins-SemiBold.otf
new file mode 100644
index 0000000..fcd0845
Binary files /dev/null and b/entry/src/main/js/MainAbility/common/poppins/Poppins-SemiBold.otf differ
diff --git a/entry/src/main/js/MainAbility/i18n/weather_api.json b/entry/src/main/js/MainAbility/i18n/weather_api.json
new file mode 100644
index 0000000..21a8017
--- /dev/null
+++ b/entry/src/main/js/MainAbility/i18n/weather_api.json
@@ -0,0 +1,7 @@
+[
+ {
+ "latitude": "28.4595",
+ "longitude": "77.0266",
+ "api_key": "55e15ebc8fdd929dd4c16583773384f3"
+ }
+]
diff --git a/entry/src/main/js/MainAbility/pages/index/index.css b/entry/src/main/js/MainAbility/pages/index/index.css
new file mode 100644
index 0000000..be8155d
--- /dev/null
+++ b/entry/src/main/js/MainAbility/pages/index/index.css
@@ -0,0 +1,249 @@
+.background {
+ width: 230px;
+ height: 230px;
+ position: absolute;
+ z-index: -3;
+ top: 1px;
+ left: 1px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.bgblack {
+ width: 230px;
+ height: 230px;
+ position: absolute;
+ top: 1px;
+ left: 1px;
+ z-index: -2;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.lens {
+ width: 230px;
+ height: 230px;
+ position: absolute;
+ z-index: -2;
+ top: 5px;
+ left: 0px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.centre {
+ height: 20px;
+ width: 20px;
+ top: 105px;
+ left: 106px;
+ align-items: center;
+}
+
+.second {
+ height: 85px;
+ width: 3px;
+ top: 125px;
+ left: 94.5px;
+ border-radius: 10px;
+ z-index: 1;
+}
+
+.hour {
+ height: 50.08px;
+ width: 50.08px;
+ top: 69px;
+ left: 46px;
+ z-index: 1;
+}
+
+.minute {
+ height: 48px;
+ width: 80px;
+ top: 70px;
+ left: 38px;
+ z-index: -1;
+}
+
+.point {
+ height: 10px;
+ width: 9px;
+}
+
+.point1 {
+ position: absolute;
+ top: 110px;
+ left: 0px;
+}
+
+.point2 {
+ position: absolute;
+ top: 110px;
+ left: -200px;
+}
+
+.point3 {
+ position: absolute;
+ top: 7px;
+ left: -100px;
+}
+
+.point4 {
+ position: absolute;
+ top: 215px;
+ left: -98.5px;
+}
+
+@font-face {
+ font-family: poppins-regular;
+ src: url('/common/poppins/Poppins-Regular.otf');
+}
+
+.calendar {
+ height: 20px;
+ width: 20px;
+ top: 155px;
+ left: -47px;
+ align-items: center;
+}
+
+.notification {
+ font-size: 6.5px;
+ font-family: poppins-regular;
+ color: white;
+ height: 11px;
+ width: 86px;
+ top: 180px;
+ left: 75px;
+ align-items: center;
+ flex-direction: column;
+ position: absolute;
+ text-overflow: ellipsis;
+}
+
+.weather {
+ height: 10.52px;
+ width: 13.46px;
+ top: 24.5px;
+ left: -70px;
+}
+
+.weather_description {
+ font-size: 6.5px;
+ font-family: poppins-regular;
+ color: white;
+ width: 23px;
+ height: 10px;
+ top: 25.5px;
+ left: -70px;
+ text-overflow: ellipsis;
+}
+
+.date {
+ position: absolute;
+ font-size: 6.5px;
+ font-family: poppins-regular;
+ color: white;
+ width: 57px;
+ height: 8px;
+ top: 40px;
+ left: 92px;
+ align-items: center;
+ flex-direction: column;
+ text-overflow: ellipsis;
+}
+
+.container {
+ position: absolute;
+ height: 45px;
+ width: 45px;
+ top: 100px;
+ left: 40px;
+}
+
+.calories_img {
+ position: absolute;
+ width: 10px;
+ height: 17px;
+ top: 103px;
+ left: 57px;
+ align-items: center;
+ flex-direction: column;
+}
+
+.foots {
+ position: absolute;
+ width: 17px;
+ height: 20px;
+ top: 105px;
+ left: 169px;
+ align-items: center;
+ flex-direction: column;
+}
+
+.calories {
+ position: absolute;
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+ align-items: center;
+ top: 95px;
+ left: -55px;
+ align-items: center;
+ flex-direction: column;
+}
+
+.min_progress_calories {
+ width: 45px;
+ height: 45px;
+ background-color: #454545;
+ color: linear-gradient(#ff8c00, #ff4500);
+ stroke-width: 5px;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+}
+
+.foot_steps {
+ position: absolute;
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+ align-items: center;
+ top: 97px;
+ left: 60px;
+}
+
+.min_progress_footSteps {
+ width: 45px;
+ height: 45px;
+ background-color: #454545;
+ color: linear-gradient(#00ff7f, #0dbab1);
+ stroke-width: 5px;
+}
+
+#value_container_calories {
+ position: absolute;
+ font-family: poppins-regular;
+ font-size: 6.5px;
+ top: 124px;
+ left: 54px;
+}
+
+#value_container_footSteps {
+ position: absolute;
+ font-family: poppins-regular;
+ font-size: 6.5px;
+ top: 125px;
+ left: 170px;
+}
+
+.container {
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 100%;
+}
\ No newline at end of file
diff --git a/entry/src/main/js/MainAbility/pages/index/index.hml b/entry/src/main/js/MainAbility/pages/index/index.hml
new file mode 100644
index 0000000..c9b84a3
--- /dev/null
+++ b/entry/src/main/js/MainAbility/pages/index/index.hml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{notification}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ weather_description }}
+
+
+ {{date_d}} {{date_m}} | {{date_w}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{min_progress_calories * 100}}
+
+
+
diff --git a/entry/src/main/js/MainAbility/pages/index/index.js b/entry/src/main/js/MainAbility/pages/index/index.js
new file mode 100644
index 0000000..48161ae
--- /dev/null
+++ b/entry/src/main/js/MainAbility/pages/index/index.js
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2022 Application Library Engineering Group
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// @ts-nocheck
+import ability_featureAbility from '@ohos.ability.featureAbility'
+import sensor from '@system.sensor'
+import fetch from '@system.fetch';
+import item from '../../i18n/weather_api.json';
+
+
+export default {
+ data: {
+ // cloudy, windy, partly_sunny, rainy, sleeting, sun_n_rain, sun_n_windy, sunny, thunderstorm_n_rain, thunderstorm
+ weather: "",
+ weather_description: "",
+ notification: "Team Meeting 11am",
+ min_progress_calories: '50',
+ min_progress_footSteps: '65',
+ target_footSteps: '5000',
+ Pedometer: "",
+ sensorPermission: false
+ },
+ fetchDate: function () {
+ const date = new Date();
+ this.date_d = (String(date.getDate()))
+ this.date_m = (String(date.getMonth() + 1))
+ const dayOfWeek = (date.getDay())
+ const month = (date.getMonth())
+
+ var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
+ this.date_w = days[dayOfWeek];
+
+ var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
+ this.date_m = months[month];
+ },
+
+ fetchWeather: function () {
+ var dataw = JSON.stringify(item);
+ let weather_api_input = JSON.parse(dataw);
+ let data;
+ fetch.fetch({
+ url: "https://api.openweathermap.org/data/2.5/weather?lat=" + weather_api_input[0].latitude + "&lon=" + weather_api_input[0].longitude + "&appid=" + weather_api_input[0].api_key,
+ responseType: "json",
+ method: 'GET',
+ success: function (resp) {
+ data = JSON.stringify(resp);
+ console.info('Weather data fetch success. Resp: ' + data);
+ },
+ fail: function (data, code) {
+ console.log('in Fail');
+ console.log("fail data: " + JSON.stringify(data) + " fail code: " + code);
+ },
+ complete: () => {
+ console.info('Data: ' + data);
+ console.log('In Complete fetchWeather');
+ const { main } = data.weather[0];
+ this.weather = main;
+ this.weather_description = main;
+ }
+ })
+ },
+
+ fetchNotification: function () {
+ let data;
+ fetch.fetch({
+ complete: () => {
+ this.notification = data.notification;
+ this.min_progress_calories = data.min_progress_calories;
+ }
+ })
+ },
+ fetchPedometer: async function () {
+ if (!this.sensorPermission) {
+ this.sensorPermission = await verifyPermissions()
+ } else {
+ subscribePedometerSensor(this)
+ }
+ },
+
+ onInit() {
+ this.fetchWeather();
+ this.fetchNotification();
+ this.fetchDate();
+ this.fetchPedometer();
+ this.Pedometer = this.$t('strings.start_count');
+ },
+
+ verifyPermissions: function () {
+ var context = ability_featureAbility.getContext()
+ let permission = "ohos.permission.ACTIVITY_MOTION"
+ var result = new Promise((resolve, reject) => {
+ context.verifyPermission(permission)
+ .then((data) => {
+ resolve(true)
+ }).catch((error) => {
+ reject(false)
+ })
+ })
+ return result
+ },
+
+ subscribePedometerSensor: function (context) {
+ sensor.subscribeStepCounter({
+ success: function (ret) {
+ this.min_progress_footSteps = ret.steps.toString()
+ },
+ fail: function (data, code) {
+ console.log('Subscription failed. Code: ' + code + '; Data: ' + data)
+ }
+ })
+ }
+}
+
diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json
new file mode 100644
index 0000000..490210a
--- /dev/null
+++ b/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "entry_desc",
+ "value": "description"
+ },
+ {
+ "name": "MainAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "MainAbility_label",
+ "value": "label"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/entry/src/main/resources/base/media/icon.png b/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 0000000..ce307a8
Binary files /dev/null and b/entry/src/main/resources/base/media/icon.png differ
diff --git a/hvigorfile.js b/hvigorfile.js
new file mode 100644
index 0000000..cff9f0d
--- /dev/null
+++ b/hvigorfile.js
@@ -0,0 +1,2 @@
+// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
+module.exports = require('@ohos/hvigor-ohos-plugin').legacyAppTasks
\ No newline at end of file
diff --git a/local.properties b/local.properties
new file mode 100644
index 0000000..8c234b9
--- /dev/null
+++ b/local.properties
@@ -0,0 +1,10 @@
+# This file is automatically generated by DevEco Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file should *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# For customization when using a Version Control System, please read the header note.
+sdk.dir=C:/Users/Pallavi/AppData/Local/OpenHarmony/Sdk
+nodejs.dir=D:/Downloads/DevEco Studio 3.0.0.900/tools/nodejs
+npm.dir=C:/Program Files/Huawei/DevEco Studio 3.0.0.900/tools/nodejs
\ No newline at end of file
diff --git a/node_modules/.bin/crc32 b/node_modules/.bin/crc32
new file mode 100644
index 0000000..e443ed4
--- /dev/null
+++ b/node_modules/.bin/crc32
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../crc-32/bin/crc32.njs" "$@"
+ ret=$?
+else
+ node "$basedir/../crc-32/bin/crc32.njs" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/node_modules/.bin/crc32.cmd b/node_modules/.bin/crc32.cmd
new file mode 100644
index 0000000..d52f757
--- /dev/null
+++ b/node_modules/.bin/crc32.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\crc-32\bin\crc32.njs" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/node_modules/.bin/crc32.ps1 b/node_modules/.bin/crc32.ps1
new file mode 100644
index 0000000..f420224
--- /dev/null
+++ b/node_modules/.bin/crc32.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../crc-32/bin/crc32.njs" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../crc-32/bin/crc32.njs" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/node_modules/.bin/hvigor b/node_modules/.bin/hvigor
new file mode 100644
index 0000000..88ada51
--- /dev/null
+++ b/node_modules/.bin/hvigor
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../@ohos/hvigor/bin/hvigor.js" "$@"
+ ret=$?
+else
+ node "$basedir/../@ohos/hvigor/bin/hvigor.js" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/node_modules/.bin/hvigor.cmd b/node_modules/.bin/hvigor.cmd
new file mode 100644
index 0000000..ba94439
--- /dev/null
+++ b/node_modules/.bin/hvigor.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\@ohos\hvigor\bin\hvigor.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/node_modules/.bin/hvigor.ps1 b/node_modules/.bin/hvigor.ps1
new file mode 100644
index 0000000..791445c
--- /dev/null
+++ b/node_modules/.bin/hvigor.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../@ohos/hvigor/bin/hvigor.js" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../@ohos/hvigor/bin/hvigor.js" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5
new file mode 100644
index 0000000..882cecd
--- /dev/null
+++ b/node_modules/.bin/json5
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
+ ret=$?
+else
+ node "$basedir/../json5/lib/cli.js" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/node_modules/.bin/json5.cmd b/node_modules/.bin/json5.cmd
new file mode 100644
index 0000000..b030d83
--- /dev/null
+++ b/node_modules/.bin/json5.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\json5\lib\cli.js" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/node_modules/.bin/json5.ps1 b/node_modules/.bin/json5.ps1
new file mode 100644
index 0000000..585f9ad
--- /dev/null
+++ b/node_modules/.bin/json5.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../json5/lib/cli.js" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve
new file mode 100644
index 0000000..fc0df5e
--- /dev/null
+++ b/node_modules/.bin/resolve
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../resolve/bin/resolve" "$@"
+ ret=$?
+else
+ node "$basedir/../resolve/bin/resolve" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/node_modules/.bin/resolve.cmd b/node_modules/.bin/resolve.cmd
new file mode 100644
index 0000000..084c0b1
--- /dev/null
+++ b/node_modules/.bin/resolve.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\resolve\bin\resolve" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/node_modules/.bin/resolve.ps1 b/node_modules/.bin/resolve.ps1
new file mode 100644
index 0000000..12d6724
--- /dev/null
+++ b/node_modules/.bin/resolve.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../resolve/bin/resolve" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver
new file mode 100644
index 0000000..10497aa
--- /dev/null
+++ b/node_modules/.bin/semver
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+else
+ node "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd
new file mode 100644
index 0000000..eb3aaa1
--- /dev/null
+++ b/node_modules/.bin/semver.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\semver\bin\semver" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1
new file mode 100644
index 0000000..a3315ff
--- /dev/null
+++ b/node_modules/.bin/semver.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../semver/bin/semver" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/node_modules/.bin/which b/node_modules/.bin/which
new file mode 100644
index 0000000..12cde79
--- /dev/null
+++ b/node_modules/.bin/which
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../which/bin/which" "$@"
+ ret=$?
+else
+ node "$basedir/../which/bin/which" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/node_modules/.bin/which.cmd b/node_modules/.bin/which.cmd
new file mode 100644
index 0000000..0664965
--- /dev/null
+++ b/node_modules/.bin/which.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+"%_prog%" "%dp0%\..\which\bin\which" %*
+ENDLOCAL
+EXIT /b %errorlevel%
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
diff --git a/node_modules/.bin/which.ps1 b/node_modules/.bin/which.ps1
new file mode 100644
index 0000000..d023170
--- /dev/null
+++ b/node_modules/.bin/which.ps1
@@ -0,0 +1,18 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ & "$basedir/node$exe" "$basedir/../which/bin/which" $args
+ $ret=$LASTEXITCODE
+} else {
+ & "node$exe" "$basedir/../which/bin/which" $args
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/node_modules/@ohos/hvigor-base/LICENSE.txt b/node_modules/@ohos/hvigor-base/LICENSE.txt
new file mode 100644
index 0000000..b9629b5
Binary files /dev/null and b/node_modules/@ohos/hvigor-base/LICENSE.txt differ
diff --git a/node_modules/@ohos/hvigor-base/README.md b/node_modules/@ohos/hvigor-base/README.md
new file mode 100644
index 0000000..89c6b42
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/README.md
@@ -0,0 +1,65 @@
+Hvigor
+A new automated build tool for OpenHarmonyOS application
+
+## Hvigor是什么?
+***
+- Hvigor是基于任务管理机制实现的一款全新的自动化构建工具,主要提供任务注册编排,编译工程模型管理,编译配置定制,插件扩展等核心能力,当前主要面向OpenHarmonyOS应用JS/eTS开发场景。
+- Hvigor结构化模型:hvigor工程主要以build-profile.json5与hvigorfile.js组成
+```
+rootProject // Hvigor工程根目录
+├── build-profile.json5 // 工程级别Hvigor配置,主要配置工程相关信息,包括子模块名字、路径等。
+├── hvigorfile.js // 工程级别任务脚本,当前暂不支持自定义
+├── moduleA
+│ ├── build-profile.json5 // 模块级别Hvigor配置,主要模块构建相关参数
+│ └── hvigorfile.js // 模块级别任务脚本,当前暂不支持自定义
+└── moduleB
+ ├── build-profile.json5 // 模块级别Hvigor配置,主要模块构建相关参数
+ └── hvigorfile.js // 模块级别任务脚本,当前暂不支持自定义
+```
+
+## 安装使用
+***
+- 安装相应的nodejs与npm
+- 通过npm命令行安装Hvigor
+```shell
+ npm install @ohos/hvigor
+```
+注:当前需要配合hvigor-ohos-plugin使用,所以也需要 npm install @ohos/hvigor-ohos-plugin
+- 在DevEco Studio内使用Hvigor
+ 工程级package.json内配置:
+```json
+ "dependencies": {
+ "@ohos/hvigor": "1.0.6",
+ "@ohos/hvigor-ohos-plugin": "1.0.6"
+ }
+```
+注:
+hvigor-ohos-plugin是基于hvigor插件机制开发的一款插件,服务于OpenHarmonyOS应用构建工作流,完成HAP/APP打包。详细指导:
+DevEco Studio
+
+- hvigor命令行
+
+ 运行命令行的结构
+ ```shell
+ hvigor [taskName...] [--option-name]
+ ```
+ 详细参数:
+ ```shell
+ Usage: hvigor [options]
+ Options:
+ --version, -v Print the global and local vigor versions. [boolean]
+ --cwd Manually set the CWD. The search for the vigorfile, as well as
+ the relativity of all requires will be from here. [string]
+ --require Will require a module before running the vigorfile. This is
+ useful for transpilers but also has other applications.[string]
+ --prop, -p Define extra properties. [string]
+ --mode, -m Specifies the mode in which the command is currently executed.[string]
+ --sync, -s Sync the information in plugin for other platform. [boolean]
+ --error, -e Log errors only. [boolean]
+ --warn, -w Set log level to warn. [boolean]
+ --info, -i Set log level to info. [boolean]
+ --debug,-d Set log level to debug. [boolean]
+ ```
+## 约束
+***
+ node版本要求: v14.18.3以及以上版本
diff --git a/node_modules/@ohos/hvigor-base/index.d.ts b/node_modules/@ohos/hvigor-base/index.d.ts
new file mode 100644
index 0000000..97bf201
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/index.d.ts
@@ -0,0 +1,50 @@
+import { Project } from "./src/impl/hvigor-module.js";
+export * from "./src/plugin/plugin.js";
+export * from "./src/impl/hvigor-module.js";
+export * from "./src/task/task.js";
+export * from "./src/options/common-const.js";
+export * from "./src/log/hvigor-log.js";
+declare const Undertaker: any;
+/**
+ * 提供前端工程打包的工具的主入口
+ *
+ * @since 2021/12/09
+ */
+export declare class Hvigor extends Undertaker {
+ constructor();
+}
+/**
+ * 提供前端工程配置信息的数据类
+ *
+ * @since 2021/12/09
+ */
+export declare class VigorConfig {
+ private _log;
+ private _project;
+ private _projectDir;
+ private _projectConfigFile;
+ private _extraConfig;
+ constructor();
+ /**
+ * 返回Project模型
+ *
+ * @returns {Project | undefined}
+ */
+ getProject(): Project | undefined;
+ /**
+ * 返回在命令行中传递的额外参数
+ *
+ * @returns {Map}
+ */
+ getExtraConfig(): Map;
+ setExtraConfig(value: Map): void;
+ /**
+ * 以工程根路径下的配置文件,对工程进行初始化
+ *
+ * @param {string} projectConfigFile 工程级别build-profile.json5的路径
+ * @param {string} projectRootDir 工程根路径
+ * @returns {Project}
+ */
+ initRootProject(projectConfigFile: string, projectRootDir: string): Project;
+}
+export declare const vigorConfigInst: VigorConfig;
diff --git a/node_modules/@ohos/hvigor-base/index.js b/node_modules/@ohos/hvigor-base/index.js
new file mode 100644
index 0000000..ce3576f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/index.js
@@ -0,0 +1,109 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.vigorConfigInst = exports.VigorConfig = exports.Hvigor = void 0;
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+const path_1 = __importDefault(require("path"));
+const json5_reader_js_1 = require("./src/util/json5-reader.js");
+const project_impl_js_1 = require("./src/impl/project-impl.js");
+const module_impl_js_1 = require("./src/impl/module-impl.js");
+const common_const_js_1 = require("./src/options/common-const.js");
+const validate_util_js_1 = require("./src/util/validate-util.js");
+const hvigor_log_js_1 = require("./src/log/hvigor-log.js");
+__exportStar(require("./src/plugin/plugin.js"), exports);
+__exportStar(require("./src/impl/hvigor-module.js"), exports);
+__exportStar(require("./src/task/task.js"), exports);
+__exportStar(require("./src/options/common-const.js"), exports);
+__exportStar(require("./src/log/hvigor-log.js"), exports);
+const Undertaker = require('undertaker');
+/**
+ * 提供前端工程打包的工具的主入口
+ *
+ * @since 2021/12/09
+ */
+class Hvigor extends Undertaker {
+ constructor() {
+ super();
+ }
+}
+exports.Hvigor = Hvigor;
+/**
+ * 提供前端工程配置信息的数据类
+ *
+ * @since 2021/12/09
+ */
+class VigorConfig {
+ constructor() {
+ this._log = hvigor_log_js_1.HvigorLogger.getLogger(VigorConfig.name);
+ this._project = undefined;
+ this._projectDir = "";
+ this._projectConfigFile = "";
+ this._extraConfig = new Map();
+ }
+ /**
+ * 返回Project模型
+ *
+ * @returns {Project | undefined}
+ */
+ getProject() {
+ return this._project;
+ }
+ /**
+ * 返回在命令行中传递的额外参数
+ *
+ * @returns {Map}
+ */
+ getExtraConfig() {
+ return this._extraConfig;
+ }
+ setExtraConfig(value) {
+ this._extraConfig = value;
+ }
+ /**
+ * 以工程根路径下的配置文件,对工程进行初始化
+ *
+ * @param {string} projectConfigFile 工程级别build-profile.json5的路径
+ * @param {string} projectRootDir 工程根路径
+ * @returns {Project}
+ */
+ initRootProject(projectConfigFile, projectRootDir) {
+ var _a;
+ this._projectConfigFile = projectConfigFile;
+ this._projectDir = projectRootDir;
+ const projectImpl = new project_impl_js_1.ProjectImpl(path_1.default.basename(projectRootDir), projectRootDir);
+ const projectStructureOpt = json5_reader_js_1.Json5Reader.getJson5Obj(this._projectConfigFile);
+ const moduleOpts = projectStructureOpt.modules;
+ if (moduleOpts.length === 0) {
+ this._log.errorMessageExit(`No modules found,Please check root project ${common_const_js_1.HvigorCommonConst.PROJECT_CONFIG_FILE}
+ at ${projectImpl.getModuleDir()}:1:1`);
+ }
+ (_a = projectStructureOpt.modules) === null || _a === void 0 ? void 0 : _a.forEach(module => {
+ validate_util_js_1.ValidateUtil.validateModule(module);
+ projectImpl.addSubProject(new module_impl_js_1.ModuleImpl(projectImpl, module.name, module.srcPath));
+ });
+ this._project = projectImpl;
+ return projectImpl;
+ }
+}
+exports.VigorConfig = VigorConfig;
+exports.vigorConfigInst = new VigorConfig();
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/package.json b/node_modules/@ohos/hvigor-base/package.json
new file mode 100644
index 0000000..773109c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/package.json
@@ -0,0 +1,71 @@
+{
+ "_args": [
+ [
+ "@ohos/hvigor-base@1.0.6",
+ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1"
+ ]
+ ],
+ "_from": "@ohos/hvigor-base@1.0.6",
+ "_id": "@ohos/hvigor-base@1.0.6",
+ "_inBundle": false,
+ "_integrity": "sha512-cRDnWICTxmpNiFb9clIioqP5Oik1seLCICztXVhZqultrHuxwTheCRUZrHwlpyWdkSB2Al+FFBqmSwzIgZX4IQ==",
+ "_location": "/@ohos/hvigor-base",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@ohos/hvigor-base@1.0.6",
+ "name": "@ohos/hvigor-base",
+ "escapedName": "@ohos%2fhvigor-base",
+ "scope": "@ohos",
+ "rawSpec": "1.0.6",
+ "saveSpec": null,
+ "fetchSpec": "1.0.6"
+ },
+ "_requiredBy": [
+ "/@ohos/hvigor",
+ "/@ohos/hvigor-ohos-plugin"
+ ],
+ "_resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-base/-/@ohos/hvigor-base-1.0.6.tgz",
+ "_spec": "1.0.6",
+ "_where": "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1",
+ "author": {
+ "name": "huawei"
+ },
+ "dependencies": {
+ "json5": "2.2.0",
+ "log4js": "6.4.1",
+ "undertaker": "1.2.1"
+ },
+ "description": "The vigor build system",
+ "devDependencies": {
+ "@types/node": "^16.11.11",
+ "@typescript-eslint/eslint-plugin": "5.10.2",
+ "@typescript-eslint/parser": "5.10.2",
+ "eslint": "^7.32.0"
+ },
+ "files": [
+ "**/*.js",
+ "**/*.d.ts",
+ "!.eslintrc.js"
+ ],
+ "keywords": [
+ "hvigor"
+ ],
+ "license": "SEE LICENSE IN LICENSE.txt",
+ "main": "./index.js",
+ "name": "@ohos/hvigor-base",
+ "ohos": {
+ "org": "huawei"
+ },
+ "scripts": {
+ "build": "tsc -p .",
+ "clean": "tsc --build --clean",
+ "patch-publish": "npm --no-git-tag-version version prepatch&&npm publish",
+ "prepare": "npm run build",
+ "rebuild": "npm run clean&&npm run build",
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "watch": "tsc --watch"
+ },
+ "version": "1.0.6"
+}
diff --git a/node_modules/@ohos/hvigor-base/src/external/default-tooling-model-bean-registry.d.ts b/node_modules/@ohos/hvigor-base/src/external/default-tooling-model-bean-registry.d.ts
new file mode 100644
index 0000000..0768f5d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/external/default-tooling-model-bean-registry.d.ts
@@ -0,0 +1,16 @@
+import { ToolingModelBeanRegistry } from "./tooling-model-bean-registry";
+import { ToolingModelBean } from "./tooling-model-bean";
+/**
+ * 默认的Hvigor的数据扩展模型的注册器
+ *
+ * @since 2022/2/19
+ */
+declare class DefaultToolingModelBeanRegistry implements ToolingModelBeanRegistry {
+ private _log;
+ private readonly _modelMap;
+ constructor();
+ registry(modelBean: ToolingModelBean): void;
+ getModelMap(): Map;
+}
+export declare const defaultModelRegistry: DefaultToolingModelBeanRegistry;
+export {};
diff --git a/node_modules/@ohos/hvigor-base/src/external/default-tooling-model-bean-registry.js b/node_modules/@ohos/hvigor-base/src/external/default-tooling-model-bean-registry.js
new file mode 100644
index 0000000..44c2391
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/external/default-tooling-model-bean-registry.js
@@ -0,0 +1,32 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.defaultModelRegistry = void 0;
+const hvigor_log_js_1 = require("../log/hvigor-log.js");
+/**
+ * 默认的Hvigor的数据扩展模型的注册器
+ *
+ * @since 2022/2/19
+ */
+class DefaultToolingModelBeanRegistry {
+ constructor() {
+ this._log = hvigor_log_js_1.HvigorLogger.getLogger("ToolingModelBeanRegistry");
+ this._modelMap = new Map();
+ }
+ registry(modelBean) {
+ const beanId = modelBean.modelId;
+ if (this._modelMap.has(beanId)) {
+ this._log.error("Multiple model has bean registered,Please check!");
+ }
+ this._modelMap.set(beanId, modelBean);
+ }
+ getModelMap() {
+ return this._modelMap;
+ }
+}
+// 全局单例,保证不同插件中注册的模型数据不冲突
+exports.defaultModelRegistry = new DefaultToolingModelBeanRegistry();
+//# sourceMappingURL=default-tooling-model-bean-registry.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean-registry.d.ts b/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean-registry.d.ts
new file mode 100644
index 0000000..f4dcfd5
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean-registry.d.ts
@@ -0,0 +1,10 @@
+import { ToolingModelBean } from "./tooling-model-bean";
+/**
+ * Hvigor的数据扩展模型的注册器接口定义
+ *
+ * @since 2022/2/19
+ */
+export interface ToolingModelBeanRegistry {
+ registry(modelBean: ToolingModelBean): void;
+ getModelMap(): Map;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean-registry.js b/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean-registry.js
new file mode 100644
index 0000000..2011f4d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean-registry.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=tooling-model-bean-registry.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean.d.ts b/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean.d.ts
new file mode 100644
index 0000000..8a30fa1
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean.d.ts
@@ -0,0 +1,9 @@
+/**
+ * Hvigor扩展数据模型的接口类型定义
+ *
+ * @since 2022/2/19
+ */
+export interface ToolingModelBean {
+ modelId: string;
+ buildModel(): string | undefined;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean.js b/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean.js
new file mode 100644
index 0000000..488b328
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/external/tooling-model-bean.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=tooling-model-bean.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/impl/default-module-impl.d.ts b/node_modules/@ohos/hvigor-base/src/impl/default-module-impl.d.ts
new file mode 100644
index 0000000..5a89c76
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/impl/default-module-impl.d.ts
@@ -0,0 +1,58 @@
+import { DefaultModule, Project } from "./hvigor-module";
+import { HvigorPlugin } from "../plugin/plugin";
+/**
+ * hvigor中module的默认公共父类
+ *
+ * @since 2022/1/8
+ */
+export declare abstract class DefaultModuleImpl implements DefaultModule {
+ /**
+ * 保存对应hvigorfile.js中export的对象
+ */
+ exported: any;
+ protected _plugin: HvigorPlugin | undefined;
+ protected readonly _moduleName: string;
+ protected readonly _modulePath: string;
+ protected readonly _packageJsonPath: string;
+ protected readonly _buildFilePath: string;
+ protected constructor(moduleName: string, modulePath: string);
+ /**
+ * 获取构建的hvigorfile.js路径
+ */
+ getBuildFilePath(): string;
+ /**
+ * 获取模块的路径
+ */
+ getModuleDir(): string;
+ /**
+ * 获取模块的名称
+ */
+ getName(): string;
+ /**
+ * 获取模块下的package.json路径
+ */
+ getPackageJsonPath(): string;
+ /**
+ * 绑定具体的Plugin对象到Module对象上
+ *
+ * @param plugin
+ * @protected
+ */
+ bindPlugin(plugin: HvigorPlugin): void;
+ /**
+ * 获取Module对象的plugin对象
+ *
+ * @returns {HvigorPlugin | undefined}
+ */
+ getPlugin(): HvigorPlugin | undefined;
+ /**
+ * 根据ModuleName获取DefaultModule模型
+ *
+ * @param moduleName
+ */
+ abstract findModuleByName(moduleName: string): DefaultModule | undefined;
+ /**
+ * 获取根项目的Project对象
+ */
+ abstract getProject(): Project;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/impl/default-module-impl.js b/node_modules/@ohos/hvigor-base/src/impl/default-module-impl.js
new file mode 100644
index 0000000..083a714
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/impl/default-module-impl.js
@@ -0,0 +1,68 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DefaultModuleImpl = void 0;
+const path_1 = __importDefault(require("path"));
+const common_const_1 = require("../options/common-const");
+/**
+ * hvigor中module的默认公共父类
+ *
+ * @since 2022/1/8
+ */
+class DefaultModuleImpl {
+ constructor(moduleName, modulePath) {
+ this._moduleName = moduleName;
+ this._modulePath = modulePath;
+ this._packageJsonPath = path_1.default.resolve(modulePath, "package.json");
+ this._buildFilePath = path_1.default.resolve(modulePath, common_const_1.HvigorCommonConst.BUILD_FILE_NAME);
+ }
+ /**
+ * 获取构建的hvigorfile.js路径
+ */
+ getBuildFilePath() {
+ return this._buildFilePath;
+ }
+ /**
+ * 获取模块的路径
+ */
+ getModuleDir() {
+ return this._modulePath;
+ }
+ /**
+ * 获取模块的名称
+ */
+ getName() {
+ return this._moduleName;
+ }
+ /**
+ * 获取模块下的package.json路径
+ */
+ getPackageJsonPath() {
+ return this._packageJsonPath;
+ }
+ /**
+ * 绑定具体的Plugin对象到Module对象上
+ *
+ * @param plugin
+ * @protected
+ */
+ bindPlugin(plugin) {
+ this._plugin = plugin;
+ }
+ /**
+ * 获取Module对象的plugin对象
+ *
+ * @returns {HvigorPlugin | undefined}
+ */
+ getPlugin() {
+ return this._plugin;
+ }
+}
+exports.DefaultModuleImpl = DefaultModuleImpl;
+//# sourceMappingURL=default-module-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/impl/hvigor-module.d.ts b/node_modules/@ohos/hvigor-base/src/impl/hvigor-module.d.ts
new file mode 100644
index 0000000..1d85f1b
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/impl/hvigor-module.d.ts
@@ -0,0 +1,74 @@
+import { HvigorPlugin } from "../plugin/plugin";
+/**
+ * hvigor的module模型
+ *
+ * @since 2021/12/27
+ */
+export interface DefaultModule {
+ /**
+ * hvigorfile.js导出对象
+ */
+ exported: any;
+ /**
+ * 获取Module名称
+ */
+ getName: () => string;
+ /**
+ * 获取Module的hvigorFile.js路径
+ */
+ getBuildFilePath: () => string;
+ /**
+ * 获取模块路径
+ */
+ getModuleDir: () => string;
+ /**
+ * 获取Module的packageJson
+ */
+ getPackageJsonPath: () => string;
+ /**
+ * 获取根项目project
+ */
+ getProject: () => Project;
+ /**
+ * 通过名称获取Module
+ *
+ * @param moduleName
+ */
+ findModuleByName: (moduleName: string) => DefaultModule | undefined;
+ /**
+ * 注入plugin对象
+ *
+ * @param plugin
+ */
+ bindPlugin: (plugin: HvigorPlugin) => void;
+ /**
+ * 获取plugin对象
+ */
+ getPlugin: () => HvigorPlugin | undefined;
+}
+/**
+ * hvigor项目中的根module
+ *
+ * @since 2022/1/8
+ */
+export interface Project extends DefaultModule {
+ /**
+ * 获取子模块
+ * 根据name直接获取子模块
+ */
+ getSubProjects: () => Map;
+ /**
+ * 添加子模块
+ */
+ addSubProject: (module: DefaultModule) => void;
+ /**
+ * 获取所有的的子模块
+ */
+ getAllSubProjects: () => DefaultModule[];
+}
+/**
+ * hvigor项目中的子模块module
+ *
+ * @since 2022/1/8
+ */
+export declare type Module = DefaultModule;
diff --git a/node_modules/@ohos/hvigor-base/src/impl/hvigor-module.js b/node_modules/@ohos/hvigor-base/src/impl/hvigor-module.js
new file mode 100644
index 0000000..8076382
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/impl/hvigor-module.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=hvigor-module.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/impl/module-impl.d.ts b/node_modules/@ohos/hvigor-base/src/impl/module-impl.d.ts
new file mode 100644
index 0000000..38a56b8
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/impl/module-impl.d.ts
@@ -0,0 +1,13 @@
+import { Module, Project } from "./hvigor-module";
+import { DefaultModuleImpl } from "./default-module-impl";
+/**
+ * hvigor工程的基础module
+ *
+ * @since 2021/12/27
+ */
+export declare class ModuleImpl extends DefaultModuleImpl implements Module {
+ private readonly _project;
+ constructor(project: Project, moduleName: string, moduleDir: string);
+ findModuleByName(moduleName: string): Module | undefined;
+ getProject(): Project;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/impl/module-impl.js b/node_modules/@ohos/hvigor-base/src/impl/module-impl.js
new file mode 100644
index 0000000..5b011dc
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/impl/module-impl.js
@@ -0,0 +1,27 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ModuleImpl = void 0;
+const default_module_impl_1 = require("./default-module-impl");
+/**
+ * hvigor工程的基础module
+ *
+ * @since 2021/12/27
+ */
+class ModuleImpl extends default_module_impl_1.DefaultModuleImpl {
+ constructor(project, moduleName, moduleDir) {
+ super(moduleName, moduleDir);
+ this._project = project;
+ }
+ findModuleByName(moduleName) {
+ return this._project.getSubProjects().get(moduleName);
+ }
+ getProject() {
+ return this._project;
+ }
+}
+exports.ModuleImpl = ModuleImpl;
+//# sourceMappingURL=module-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/impl/project-impl.d.ts b/node_modules/@ohos/hvigor-base/src/impl/project-impl.d.ts
new file mode 100644
index 0000000..265588b
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/impl/project-impl.d.ts
@@ -0,0 +1,17 @@
+import { DefaultModule, Module, Project } from "./hvigor-module";
+import { DefaultModuleImpl } from "./default-module-impl";
+/**
+ * hvigor工程的基础root module
+ *
+ * @since 2021/12/27
+ */
+export declare class ProjectImpl extends DefaultModuleImpl implements Project {
+ private readonly _projectStructureFile;
+ private readonly _subProjects;
+ constructor(moduleName: string, moduleDir: string);
+ findModuleByName(moduleName: string): Module | undefined;
+ getProject(): Project;
+ getSubProjects(): Map;
+ addSubProject(module: Module): void;
+ getAllSubProjects(): DefaultModule[];
+}
diff --git a/node_modules/@ohos/hvigor-base/src/impl/project-impl.js b/node_modules/@ohos/hvigor-base/src/impl/project-impl.js
new file mode 100644
index 0000000..2cf619b
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/impl/project-impl.js
@@ -0,0 +1,46 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProjectImpl = void 0;
+const path_1 = __importDefault(require("path"));
+const common_const_1 = require("../options/common-const");
+const default_module_impl_1 = require("./default-module-impl");
+/**
+ * hvigor工程的基础root module
+ *
+ * @since 2021/12/27
+ */
+class ProjectImpl extends default_module_impl_1.DefaultModuleImpl {
+ constructor(moduleName, moduleDir) {
+ super(moduleName, moduleDir);
+ this._projectStructureFile = path_1.default.resolve(moduleDir, common_const_1.HvigorCommonConst.PROJECT_CONFIG_FILE);
+ this._subProjects = new Map();
+ }
+ findModuleByName(moduleName) {
+ return this._subProjects.get(moduleName);
+ }
+ getProject() {
+ return this;
+ }
+ getSubProjects() {
+ return this._subProjects;
+ }
+ addSubProject(module) {
+ this._subProjects.set(module.getName(), module);
+ }
+ getAllSubProjects() {
+ const modules = [];
+ for (const subModule of this._subProjects.values()) {
+ modules.push(subModule);
+ }
+ return modules;
+ }
+}
+exports.ProjectImpl = ProjectImpl;
+//# sourceMappingURL=project-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/log/default-configuration.d.ts b/node_modules/@ohos/hvigor-base/src/log/default-configuration.d.ts
new file mode 100644
index 0000000..91f76fe
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/log/default-configuration.d.ts
@@ -0,0 +1,5 @@
+import { Configuration, Level } from "log4js";
+export declare const setConfiguration: (config: Configuration) => void;
+export declare const getConfiguration: () => Configuration;
+export declare const setLevel: (level: Level) => void;
+export declare const getLevel: () => Level;
diff --git a/node_modules/@ohos/hvigor-base/src/log/default-configuration.js b/node_modules/@ohos/hvigor-base/src/log/default-configuration.js
new file mode 100644
index 0000000..f9fcaff
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/log/default-configuration.js
@@ -0,0 +1,61 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getLevel = exports.setLevel = exports.getConfiguration = exports.setConfiguration = void 0;
+const log4js_1 = require("log4js");
+let configuration = {
+ "appenders": {
+ "debug": {
+ "type": "stdout",
+ "layout": {
+ "type": "pattern",
+ "pattern": "> hvigor %p %c %[%m%]"
+ }
+ },
+ "info": {
+ "type": "stdout",
+ "layout": {
+ "type": "pattern",
+ "pattern": "> hvigor %[%m%]"
+ }
+ },
+ "wrong": {
+ "type": "stderr",
+ "layout": {
+ "type": "pattern",
+ "pattern": "> hvigor %[%p: %m%]"
+ }
+ },
+ "just-debug": { "type": "logLevelFilter", "appender": "debug", "level": "debug", "maxLevel": "debug" },
+ "just-info": { "type": "logLevelFilter", "appender": "info", "level": "info", "maxLevel": "info" },
+ "just-wrong": { "type": "logLevelFilter", "appender": "wrong", "level": "warn", "maxLevel": "error" }
+ },
+ "categories": {
+ "default": { "appenders": ["just-debug", "just-info", "just-wrong"], "level": "debug" }
+ }
+};
+const setConfiguration = (config) => {
+ configuration = config;
+};
+exports.setConfiguration = setConfiguration;
+const getConfiguration = () => {
+ return configuration;
+};
+exports.getConfiguration = getConfiguration;
+let contextLevel = log4js_1.levels.DEBUG;
+const setLevel = (level) => {
+ contextLevel = level;
+ const categories = configuration.categories;
+ for (const category in categories) {
+ categories[category].level = level.levelStr;
+ }
+};
+exports.setLevel = setLevel;
+const getLevel = () => {
+ return contextLevel;
+};
+exports.getLevel = getLevel;
+//# sourceMappingURL=default-configuration.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/log/hvigor-log.d.ts b/node_modules/@ohos/hvigor-base/src/log/hvigor-log.d.ts
new file mode 100644
index 0000000..a2fa6d2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/log/hvigor-log.d.ts
@@ -0,0 +1,30 @@
+import { Configuration, Level, Logger } from "log4js";
+export * from 'log4js';
+/**
+ * 基于log4js封装的HvigorLogger
+ *
+ * @since 2022/03/02
+ */
+export declare class HvigorLogger {
+ protected readonly _logger: Logger;
+ protected constructor(category?: string);
+ /**
+ * 获取对于类别的HvigorLogger实例
+ *
+ * @param category 默认是default
+ */
+ static getLogger(category?: string): HvigorLogger;
+ log(level: Level | string, ...args: any[]): void;
+ logArray(level: Level | string, array: any[], title?: string): void;
+ debug(message: any, ...args: any[]): void;
+ info(message: any, ...args: any[]): void;
+ warn(message: any, ...args: any[]): void;
+ error(message: any, ...args: any[]): void;
+ errorMessageExit(message: string, ...args: any[]): void;
+ errorExit(e: Error, message?: string, ...args: any[]): void;
+ errorNoExit(e: Error): void;
+ setLevel(level: Level): void;
+ getLevel(): Level | string;
+ configure(configuration: Configuration): void;
+ getConfig(): Configuration;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/log/hvigor-log.js b/node_modules/@ohos/hvigor-base/src/log/hvigor-log.js
new file mode 100644
index 0000000..cc808a2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/log/hvigor-log.js
@@ -0,0 +1,104 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.HvigorLogger = void 0;
+const log4js_1 = __importDefault(require("log4js"));
+const default_configuration_js_1 = require("./default-configuration.js");
+__exportStar(require("log4js"), exports);
+/**
+ * 基于log4js封装的HvigorLogger
+ *
+ * @since 2022/03/02
+ */
+class HvigorLogger {
+ constructor(category) {
+ log4js_1.default.configure((0, default_configuration_js_1.getConfiguration)());
+ this._logger = log4js_1.default.getLogger(category);
+ this._logger.level = (0, default_configuration_js_1.getLevel)();
+ }
+ /**
+ * 获取对于类别的HvigorLogger实例
+ *
+ * @param category 默认是default
+ */
+ static getLogger(category) {
+ return new HvigorLogger(category);
+ }
+ log(level, ...args) {
+ this._logger.log(level, ...args);
+ }
+ logArray(level, array, title) {
+ if (title) {
+ this.log(level, title);
+ }
+ array.forEach(value => this.log(level, value));
+ }
+ debug(message, ...args) {
+ this._logger.debug(message, ...args);
+ }
+ info(message, ...args) {
+ this._logger.info(message, ...args);
+ }
+ warn(message, ...args) {
+ if (message === undefined || message === "") {
+ return;
+ }
+ this._logger.warn(message, ...args);
+ }
+ error(message, ...args) {
+ this._logger.error(message, ...args);
+ }
+ errorMessageExit(message, ...args) {
+ this._logger.error(message, ...args);
+ process.exit(-1);
+ }
+ errorExit(e, message, ...args) {
+ if (message) {
+ this._logger.error(message, args);
+ }
+ this._logger.error(e.stack);
+ process.exit(-1);
+ }
+ errorNoExit(e) {
+ this._logger.error(e.stack);
+ }
+ setLevel(level) {
+ (0, default_configuration_js_1.setLevel)(level);
+ log4js_1.default.shutdown();
+ log4js_1.default.configure((0, default_configuration_js_1.getConfiguration)());
+ }
+ getLevel() {
+ return this._logger.level;
+ }
+ configure(configuration) {
+ const result = Object.assign(Object.assign({}, (0, default_configuration_js_1.getConfiguration)()), configuration);
+ (0, default_configuration_js_1.setConfiguration)(result);
+ log4js_1.default.shutdown();
+ log4js_1.default.configure(result);
+ }
+ getConfig() {
+ return (0, default_configuration_js_1.getConfiguration)();
+ }
+}
+exports.HvigorLogger = HvigorLogger;
+//# sourceMappingURL=hvigor-log.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/options/common-const.d.ts b/node_modules/@ohos/hvigor-base/src/options/common-const.d.ts
new file mode 100644
index 0000000..778eb6b
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/options/common-const.d.ts
@@ -0,0 +1,9 @@
+export declare class HvigorCommonConst {
+ static readonly PROJECT_CONFIG_FILE_NAME: string;
+ static readonly PROJECT_CONFIG_FILE: string;
+ static readonly BUILD_FILE_NAME: string;
+}
+export declare class HvigorBuildConst {
+ static readonly MODULE_MODE: string;
+ static readonly PROJECT_MODE: string;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/options/common-const.js b/node_modules/@ohos/hvigor-base/src/options/common-const.js
new file mode 100644
index 0000000..846f4be
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/options/common-const.js
@@ -0,0 +1,19 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.HvigorBuildConst = exports.HvigorCommonConst = void 0;
+class HvigorCommonConst {
+}
+exports.HvigorCommonConst = HvigorCommonConst;
+HvigorCommonConst.PROJECT_CONFIG_FILE_NAME = "build-profile";
+HvigorCommonConst.PROJECT_CONFIG_FILE = "build-profile.json5";
+HvigorCommonConst.BUILD_FILE_NAME = "hvigorfile.js";
+class HvigorBuildConst {
+}
+exports.HvigorBuildConst = HvigorBuildConst;
+HvigorBuildConst.MODULE_MODE = "module";
+HvigorBuildConst.PROJECT_MODE = "project";
+//# sourceMappingURL=common-const.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/options/project-structure-opt.d.ts b/node_modules/@ohos/hvigor-base/src/options/project-structure-opt.d.ts
new file mode 100644
index 0000000..1ae3c6e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/options/project-structure-opt.d.ts
@@ -0,0 +1,7 @@
+export interface ModuleOpt {
+ name: string;
+ srcPath: string;
+}
+export interface ProjectStructureOpt {
+ modules: ModuleOpt[];
+}
diff --git a/node_modules/@ohos/hvigor-base/src/options/project-structure-opt.js b/node_modules/@ohos/hvigor-base/src/options/project-structure-opt.js
new file mode 100644
index 0000000..d20a511
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/options/project-structure-opt.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=project-structure-opt.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/plugin/plugin.d.ts b/node_modules/@ohos/hvigor-base/src/plugin/plugin.d.ts
new file mode 100644
index 0000000..804843d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/plugin/plugin.d.ts
@@ -0,0 +1,7 @@
+/**
+ * 对外暴露接口的plugin的基类
+ *
+ * @since 2021/12/16
+ */
+export interface HvigorPlugin {
+}
diff --git a/node_modules/@ohos/hvigor-base/src/plugin/plugin.js b/node_modules/@ohos/hvigor-base/src/plugin/plugin.js
new file mode 100644
index 0000000..07564d6
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/plugin/plugin.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=plugin.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/task/task.d.ts b/node_modules/@ohos/hvigor-base/src/task/task.d.ts
new file mode 100644
index 0000000..996fd2f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/task/task.d.ts
@@ -0,0 +1,24 @@
+import { DefaultModule } from "../impl/hvigor-module";
+/**
+ * Hvigor可执行任务的基础类
+ *
+ * @since 2022/1/20
+ */
+export declare abstract class Task {
+ /**
+ * 注册task function
+ */
+ abstract registry(): (cb: () => void) => void;
+}
+/**
+ * Hvigor同步类型任务的基础类
+ *
+ * @since 2022/1/20
+ */
+export declare abstract class DefaultSyncTask extends Task {
+ private _log;
+ protected defaultModule: DefaultModule;
+ protected constructor(defaultModule: DefaultModule);
+ registry: () => (cb: () => void) => void;
+ protected abstract doTaskAction(hvigorModel: DefaultModule): void;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/task/task.js b/node_modules/@ohos/hvigor-base/src/task/task.js
new file mode 100644
index 0000000..b069952
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/task/task.js
@@ -0,0 +1,37 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DefaultSyncTask = exports.Task = void 0;
+const hvigor_log_js_1 = require("../log/hvigor-log.js");
+/**
+ * Hvigor可执行任务的基础类
+ *
+ * @since 2022/1/20
+ */
+class Task {
+}
+exports.Task = Task;
+/**
+ * Hvigor同步类型任务的基础类
+ *
+ * @since 2022/1/20
+ */
+class DefaultSyncTask extends Task {
+ constructor(defaultModule) {
+ super();
+ this._log = hvigor_log_js_1.HvigorLogger.getLogger();
+ this.registry = () => {
+ return (cb) => {
+ this._log.info("Sync...");
+ this.doTaskAction(this.defaultModule);
+ cb();
+ };
+ };
+ this.defaultModule = defaultModule;
+ }
+}
+exports.DefaultSyncTask = DefaultSyncTask;
+//# sourceMappingURL=task.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/util/json5-reader.d.ts b/node_modules/@ohos/hvigor-base/src/util/json5-reader.d.ts
new file mode 100644
index 0000000..3c7f03d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/util/json5-reader.d.ts
@@ -0,0 +1,10 @@
+export declare class Json5Reader {
+ private static logger;
+ /**
+ * 获取json5对象
+ *
+ * @param json5path json5路径
+ * @param encodingStr 编码方式
+ */
+ static getJson5Obj(json5path: string, encodingStr?: string): any;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/util/json5-reader.js b/node_modules/@ohos/hvigor-base/src/util/json5-reader.js
new file mode 100644
index 0000000..67c8d35
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/util/json5-reader.js
@@ -0,0 +1,57 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Json5Reader = void 0;
+const json5 = __importStar(require("json5"));
+const path_1 = __importDefault(require("path"));
+const hvigor_log_js_1 = require("../log/hvigor-log.js");
+const fs = __importStar(require("fs"));
+class Json5Reader {
+ /**
+ * 获取json5对象
+ *
+ * @param json5path json5路径
+ * @param encodingStr 编码方式
+ */
+ static getJson5Obj(json5path, encodingStr = "utf-8") {
+ const text = fs.readFileSync(path_1.default.resolve(json5path), { encoding: encodingStr });
+ try {
+ return json5.parse(text);
+ }
+ catch (e) {
+ Json5Reader.logger.errorMessageExit(`${json5path} is not the correct JSON/JSON5 format.`);
+ }
+ }
+}
+exports.Json5Reader = Json5Reader;
+Json5Reader.logger = hvigor_log_js_1.HvigorLogger.getLogger(Json5Reader.name);
+//# sourceMappingURL=json5-reader.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-base/src/util/validate-util.d.ts b/node_modules/@ohos/hvigor-base/src/util/validate-util.d.ts
new file mode 100644
index 0000000..41327ca
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/util/validate-util.d.ts
@@ -0,0 +1,10 @@
+import { ModuleOpt } from "../options/project-structure-opt.js";
+/**
+ * 工程初始化时校验build-profile.json5
+ *
+ * @since 2022/3/10
+ */
+export declare class ValidateUtil {
+ private static logger;
+ static validateModule(module: ModuleOpt): void;
+}
diff --git a/node_modules/@ohos/hvigor-base/src/util/validate-util.js b/node_modules/@ohos/hvigor-base/src/util/validate-util.js
new file mode 100644
index 0000000..bf46bb9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-base/src/util/validate-util.js
@@ -0,0 +1,26 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ValidateUtil = void 0;
+const hvigor_log_js_1 = require("../log/hvigor-log.js");
+/**
+ * 工程初始化时校验build-profile.json5
+ *
+ * @since 2022/3/10
+ */
+class ValidateUtil {
+ static validateModule(module) {
+ if (module.name === undefined) {
+ this.logger.errorMessageExit(`Project level build-profile.json5 lose required property: module-name`);
+ }
+ if (module.srcPath === undefined) {
+ this.logger.errorMessageExit(`Project level build-profile.json5 lose required property: module-srcPath`);
+ }
+ }
+}
+exports.ValidateUtil = ValidateUtil;
+ValidateUtil.logger = hvigor_log_js_1.HvigorLogger.getLogger(ValidateUtil.name);
+//# sourceMappingURL=validate-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/LICENSE.txt b/node_modules/@ohos/hvigor-ohos-plugin/LICENSE.txt
new file mode 100644
index 0000000..b9629b5
Binary files /dev/null and b/node_modules/@ohos/hvigor-ohos-plugin/LICENSE.txt differ
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/README.md b/node_modules/@ohos/hvigor-ohos-plugin/README.md
new file mode 100644
index 0000000..5cecab1
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/README.md
@@ -0,0 +1,50 @@
+hvigor-ohos-plugin
+A new hvigor plugin for OpenHarmonyOS application
+
+## hvigor-ohos-plugin介绍
+***
+- 基于hvigor构建工具开发的一个插件,利用hvigor的任务编排机制完成OpenHarmony应用构建任务流的执行,完成OpenHarmony hap/app包的构建打包,只服务于OpenHarmony应用开发
+
+- 基于hvigor 的build-profile.json5扩展了相应的OpenHarmony应用的编译配置字段,用于定制OpenHarmony应用编译构建的相关任务
+
+## 安装使用
+***
+- 安装相应的nodejs与npm
+- 通过npm命令行安装hvigor 与 hvigor-ohos-plugin
+```shell
+ npm install @ohos/hvigor
+ npm install @ohos/hvigor-ohos-plugin
+```
+- 在DevEco Studio内使用Hvigor
+ 工程级package.json内配置:
+```json
+ "dependencies": {
+ "@ohos/hvigor": "1.0.6",
+ "@ohos/hvigor-ohos-plugin": "1.0.6"
+ }
+```
+注:
+hvigor-ohos-plugin是基于hvigor插件机制开发的一款插件,服务于OpenHarmonyOS应用构建工作流,完成HAP/APP打包。详细指导:
+DevEco Studio
+
+- 通过扩展hvigor -p参数完成OpenHarmony 应用或者服务的构建打包:
+
+ Hvigor工程当前模块分为根项目 project,和子模块 module,不支持模块嵌套,支持目录嵌套(具体
+ 参考build-profile.json5说明)
+ - 不指定: 则默认执行project和所有module的task,没有task则跳过
+ - -m project:只在project级别模块中执行对应的task,没有对应task则报错
+ - -m module:在所有module级别的模块中只执行对应的task
+ ```shell
+ hvigor clean -m project //clean project级别的build 目录
+ hvigor assembleHap //执行project和module级别的打包hap的任务
+ ```
+ 设置Hvigor运行时的额外参数,例如-p myprop=myvalue
+ ```shell
+ hvigor assembleApp -m project -p product=vip //指定打包时具体的product,默认为default 可不指定
+ hvigor assembleHap -m module=entry //指定需要打包hap的具体模块,不指定时默认打所有产物为HAP的模块
+ ```
+
+## 约束
+***
+ node版本要求: v14.18.3以及以上版本
+
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/index.js b/node_modules/@ohos/hvigor-ohos-plugin/index.js
new file mode 100644
index 0000000..01f2487
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/index.js
@@ -0,0 +1,106 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const plugin_factory_js_1 = require("./src/plugin/factory/plugin-factory.js");
+/**
+ * Stage模型的hap插件
+ *
+ * @param module hvigorModule
+ */
+const hapTasks = (module) => {
+ const plugin = plugin_factory_js_1.PluginFactory.getHapPlugin(module);
+ return {
+ plugin,
+ assembleHap: plugin.assembleHap,
+ clean: plugin.clean,
+ compileNative: plugin.compileNative,
+ sync: plugin.sync,
+ buildPreviewerResource: plugin.buildPreviewerRes
+ };
+};
+/**
+ * Fa模型的hap插件
+ *
+ * @param module hvigorModule
+ */
+const legacyHapTasks = (module) => {
+ const plugin = plugin_factory_js_1.PluginFactory.getHapPlugin(module, true);
+ return {
+ plugin,
+ assembleHap: plugin.assembleHap,
+ clean: plugin.clean,
+ compileNative: plugin.compileNative,
+ buildPreviewerResource: plugin.buildPreviewerRes,
+ sync: plugin.sync
+ };
+};
+/**
+ * Stage模型的app插件
+ *
+ * @param module hvigorProject
+ */
+const appTasks = (module) => {
+ const plugin = plugin_factory_js_1.PluginFactory.getAppPlugin(module);
+ return {
+ plugin,
+ assembleApp: plugin.assembleApp,
+ clean: plugin.clean,
+ sync: plugin.sync
+ };
+};
+/**
+ * Fa模型的app插件
+ *
+ * @param module hvigorProject
+ */
+const legacyAppTasks = (module) => {
+ const plugin = plugin_factory_js_1.PluginFactory.getAppPlugin(module, true);
+ return {
+ plugin,
+ assembleApp: plugin.assembleApp,
+ clean: plugin.clean,
+ sync: plugin.sync
+ };
+};
+/**
+ * Stage模型的Har插件
+ *
+ * @param module hvigorModule
+ */
+const harTasks = (module) => {
+ const plugin = plugin_factory_js_1.PluginFactory.getHarPlugin(module);
+ return {
+ plugin,
+ clean: plugin.clean,
+ assembleHar: plugin.assembleHar,
+ assembleSubHar: plugin.assembleSubHar,
+ buildPreviewerResource: plugin.buildHarPreviewerRes
+ };
+};
+/**
+ * Fa模型的Har插件
+ *
+ * @param module hvigorModule
+ */
+const legacyHarTasks = (module) => {
+ const plugin = plugin_factory_js_1.PluginFactory.getHarPlugin(module, true);
+ return {
+ plugin,
+ clean: plugin.clean,
+ assembleHar: plugin.assembleHar,
+ assembleSubHar: plugin.assembleSubHar,
+ buildPreviewerResource: plugin.buildHarPreviewerRes
+ };
+};
+module.exports = {
+ hapTasks,
+ legacyHapTasks,
+ appTasks,
+ legacyAppTasks,
+ harTasks,
+ legacyHarTasks
+};
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/CHANGELOG.md b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/CHANGELOG.md
new file mode 100644
index 0000000..42d3e9e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/CHANGELOG.md
@@ -0,0 +1,932 @@
+10.0.0 / 2021-05-03
+-------------------
+
+### Breaking changes
+
+- Require Node.js v12+ ([#886](https://github.com/jprichardson/node-fs-extra/issues/886), [#893](https://github.com/jprichardson/node-fs-extra/pull/893), [#890](https://github.com/jprichardson/node-fs-extra/pull/890), [#894](https://github.com/jprichardson/node-fs-extra/pull/894), [#895]( https://github.com/jprichardson/node-fs-extra/pull/895))
+- Allow copying broken symlinks ([#779](https://github.com/jprichardson/node-fs-extra/pull/779), [#765](https://github.com/jprichardson/node-fs-extra/issues/765), [#638](https://github.com/jprichardson/node-fs-extra/issues/638), [#761](https://github.com/jprichardson/node-fs-extra/issues/761))
+
+**The following changes, although technically semver-major, will not affect the vast majority of users:**
+
+- Ensure correct type when destination exists for `ensureLink*()`/`ensureSymlink*()` ([#826](https://github.com/jprichardson/node-fs-extra/pull/826), [#786](https://github.com/jprichardson/node-fs-extra/issues/786), [#870](https://github.com/jprichardson/node-fs-extra/issues/870))
+- Error when attempting to `copy*()` unknown file type ([#880](https://github.com/jprichardson/node-fs-extra/pull/880))
+- Remove undocumented options for `remove*()` ([#882](https://github.com/jprichardson/node-fs-extra/pull/882))
+
+### Improvements
+
+- Allow changing case of filenames with `move*()`, even on technically case-insensitive filesystems ([#759](https://github.com/jprichardson/node-fs-extra/issues/759), [#801](https://github.com/jprichardson/node-fs-extra/pull/801))
+- Use native `fs.rm*()` for `remove*()` in environments that support it ([#882](https://github.com/jprichardson/node-fs-extra/pull/882), [#806](https://github.com/jprichardson/node-fs-extra/issues/806))
+- Improve `emptyDir()` performance ([#885](https://github.com/jprichardson/node-fs-extra/pull/885))
+
+### Bugfixes
+
+- Ensure `copy*()`'s `filter` function is not called more than necessary ([#883](https://github.com/jprichardson/node-fs-extra/pull/883), [#809](https://github.com/jprichardson/node-fs-extra/issues/809))
+- Fix `move*()` raising `EPERM` error when moving a file to the root of a drive on Windows ([#897](https://github.com/jprichardson/node-fs-extra/pull/897), [#819](https://github.com/jprichardson/node-fs-extra/issues/819))
+
+### Miscellaneous changes
+
+- Do not use `at-least-node` as a dependency ([#896](https://github.com/jprichardson/node-fs-extra/pull/896))
+- Improve documentation ([#888](https://github.com/jprichardson/node-fs-extra/pull/888), [#830](https://github.com/jprichardson/node-fs-extra/issues/830), [#884](https://github.com/jprichardson/node-fs-extra/pull/884), [#843](https://github.com/jprichardson/node-fs-extra/issues/843))
+
+9.1.0 / 2021-01-19
+------------------
+
+- Add promise support for `fs.rm()` ([#841](https://github.com/jprichardson/node-fs-extra/issues/841), [#860](https://github.com/jprichardson/node-fs-extra/pull/860))
+- Upgrade universalify for performance improvments ([#825](https://github.com/jprichardson/node-fs-extra/pull/825))
+
+9.0.1 / 2020-06-03
+------------------
+
+- Fix issue with `ensureFile()` when used with Jest on Windows ([#804](https://github.com/jprichardson/node-fs-extra/issues/804), [#805](https://github.com/jprichardson/node-fs-extra/pull/805))
+- Remove unneeded `process.umask()` call ([#791](https://github.com/jprichardson/node-fs-extra/pull/791))
+- Docs improvements ([#753](https://github.com/jprichardson/node-fs-extra/pull/753), [#795](https://github.com/jprichardson/node-fs-extra/pull/795), [#797](https://github.com/jprichardson/node-fs-extra/pull/797))
+
+9.0.0 / 2020-03-19
+------------------
+
+### Breaking changes
+
+- Requires Node.js version 10 or greater ([#725](https://github.com/jprichardson/node-fs-extra/issues/725), [#751](https://github.com/jprichardson/node-fs-extra/pull/751))
+- Switched `ensureDir*` to use a fork of https://github.com/sindresorhus/make-dir to make use of native recursive `fs.mkdir` where possible ([#619](https://github.com/jprichardson/node-fs-extra/issues/619), [#756](https://github.com/jprichardson/node-fs-extra/pull/756))
+- Properly preserve `atime` for `copy*` with `preserveTimestamps` option ([#633](https://github.com/jprichardson/node-fs-extra/pull/633))
+
+**The following changes, allthough technically breaking, will not affect the vast majority of users:**
+
+- `outputJson` now outputs objects as they were when the function was called, even if they are mutated later ([#702](https://github.com/jprichardson/node-fs-extra/issues/702), [#768](https://github.com/jprichardson/node-fs-extra/pull/768))
+- Cannot pass `null` as an options parameter to `*Json*` methods ([#745](https://github.com/jprichardson/node-fs-extra/issues/745), [#768](https://github.com/jprichardson/node-fs-extra/pull/768))
+
+### Improvements
+
+- Add promise shims for `fs.writev` & `fs.opendir` ([#747](https://github.com/jprichardson/node-fs-extra/pull/747))
+- Better errors for `ensureFile` ([#696](https://github.com/jprichardson/node-fs-extra/issues/696), [#744](https://github.com/jprichardson/node-fs-extra/pull/744))
+- Better file comparison for older Node versions ([#694](https://github.com/jprichardson/node-fs-extra/pull/694))
+
+### Miscellaneous changes
+- Peformance optimizations ([#762](https://github.com/jprichardson/node-fs-extra/issues/762), [#764](https://github.com/jprichardson/node-fs-extra/pull/764))
+- Add missing documentation for aliases ([#758](https://github.com/jprichardson/node-fs-extra/issues/758), [#766](https://github.com/jprichardson/node-fs-extra/pull/766))
+- Update `universalify` dependency ([#767](https://github.com/jprichardson/node-fs-extra/pull/767))
+
+8.1.0 / 2019-06-28
+------------------
+
+- Add support for promisified `fs.realpath.native` in Node v9.2+ ([#650](https://github.com/jprichardson/node-fs-extra/issues/650), [#682](https://github.com/jprichardson/node-fs-extra/pull/682))
+- Update `graceful-fs` dependency ([#700](https://github.com/jprichardson/node-fs-extra/pull/700))
+- Use `graceful-fs` everywhere ([#700](https://github.com/jprichardson/node-fs-extra/pull/700))
+
+8.0.1 / 2019-05-13
+------------------
+
+- Fix bug `Maximum call stack size exceeded` error in `util/stat` ([#679](https://github.com/jprichardson/node-fs-extra/pull/679))
+
+8.0.0 / 2019-05-11
+------------------
+
+**NOTE:** Node.js v6 support is deprecated, and will be dropped in the next major release.
+
+- Use `renameSync()` under the hood in `moveSync()`
+- Fix bug with bind-mounted directories in `copy*()` ([#613](https://github.com/jprichardson/node-fs-extra/issues/613), [#618](https://github.com/jprichardson/node-fs-extra/pull/618))
+- Fix bug in `move()` with case-insensitive file systems
+- Use `fs.stat()`'s `bigint` option in `copy*()` & `move*()` where possible ([#657](https://github.com/jprichardson/node-fs-extra/issues/657))
+
+7.0.1 / 2018-11-07
+------------------
+
+- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646))
+- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587))
+- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643))
+
+7.0.0 / 2018-07-16
+------------------
+
+- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582))
+- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600))
+- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596))
+- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580))
+
+6.0.1 / 2018-05-09
+------------------
+
+- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578))
+
+6.0.0 / 2018-05-01
+------------------
+
+- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564))
+- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549))
+- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554))
+- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563))
+- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541))
+- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568))
+
+5.0.0 / 2017-12-11
+------------------
+
+Significant refactor of `copy()` & `copySync()`, including breaking changes. No changes to other functions in this release.
+
+Huge thanks to **[@manidlou](https://github.com/manidlou)** for doing most of the work on this release.
+
+- The `filter` option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. [#512](https://github.com/jprichardson/node-fs-extra/pull/512)
+- `copy()`'s `filter` option can now be a function that returns a Promise. [#518](https://github.com/jprichardson/node-fs-extra/pull/518)
+- `copy()` & `copySync()` now use `fs.copyFile()`/`fs.copyFileSync()` in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. [#505](https://github.com/jprichardson/node-fs-extra/pull/505)
+- Don't allow copying a directory into itself. [#83](https://github.com/jprichardson/node-fs-extra/issues/83)
+- Handle copying between identical files. [#198](https://github.com/jprichardson/node-fs-extra/issues/198)
+- Error out when copying an empty folder to a path that already exists. [#464](https://github.com/jprichardson/node-fs-extra/issues/464)
+- Don't create `dest`'s parent if the `filter` function aborts the `copy()` operation. [#517](https://github.com/jprichardson/node-fs-extra/pull/517)
+- Fix `writeStream` not being closed if there was an error in `copy()`. [#516](https://github.com/jprichardson/node-fs-extra/pull/516)
+
+4.0.3 / 2017-12-05
+------------------
+
+- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501)
+- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520)
+
+4.0.2 / 2017-09-12
+------------------
+
+- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4)
+- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+
+- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485)
+
+4.0.1 / 2017-07-31
+------------------
+
+### Fixed
+
+- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470)
+
+4.0.0 / 2017-07-14
+------------------
+
+### Changed
+
+- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449)
+- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458)
+- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459)
+
+### Fixed
+
+- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428)
+
+Also clarified the docs in a few places.
+
+3.0.1 / 2017-05-04
+------------------
+
+- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415)
+
+3.0.0 / 2017-04-27
+------------------
+
+### Added
+
+- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403)
+- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406)
+
+### Removed
+
+- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+
+### Changed
+
+- Upgraded jsonfile dependency to v3.0.0:
+ - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`.
+- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394)
+
+### Fixed
+
+- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408)
+
+2.1.2 / 2017-03-16
+------------------
+
+### Fixed
+
+- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393)
+
+2.1.1 / 2017-03-15
+------------------
+
+### Fixed
+
+- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`.
+- Remove `Buffer.alloc()` usage in `moveSync()`.
+
+2.1.0 / 2017-03-15
+------------------
+
+Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release!
+
+### Added
+- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou))
+- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou))
+
+### Changed
+- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou))
+- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264)
+- Refactored docs. ([@manidlou](https://github.com/manidlou))
+
+### Fixed
+
+- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton))
+
+2.0.0 / 2017-01-16
+------------------
+
+### Removed
+- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it
+on Jan 1st, 2017.
+- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little
+over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just
+an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339]
+
+### Changed
+- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333]
+- Moved docs, to `docs/`. [#340]
+
+### Fixed
+- Apply filters to directories in `copySync()` like in `copy()`. [#324]
+- A specific condition when disk is under heavy use, `copy()` can fail. [#326]
+
+
+1.0.0 / 2016-11-01
+------------------
+
+After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes
+to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release!
+
+### Added
+- `walkSync()`
+
+### Changed
+- **BREAKING**: dropped Node v0.10 support.
+- disabled `rimaf` globbing, wasn't used. [#280]
+- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function.
+- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300]
+
+### Fixed
+- bug fix proper closing of file handle on `utimesMillis()` [#271]
+- proper escaping of files with dollar signs [#291]
+- `copySync()` failed if user didn't own file. [#199], [#301]
+
+
+0.30.0 / 2016-04-28
+-------------------
+- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**.
+
+0.29.0 / 2016-04-27
+-------------------
+- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well.
+
+0.28.0 / 2016-04-17
+-------------------
+- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192]
+- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237]
+- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93]
+
+0.27.0 / 2016-04-15
+-------------------
+- add `dereference` option to `copySync()`. [#235][#235]
+
+0.26.7 / 2016-03-16
+-------------------
+- fixed `copy()` if source and dest are the same. [#230][#230]
+
+0.26.6 / 2016-03-15
+-------------------
+- fixed if `emptyDir()` does not have a callback: [#229][#229]
+
+0.26.5 / 2016-01-27
+-------------------
+- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215]
+
+0.26.4 / 2016-01-05
+-------------------
+- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208]
+
+0.26.3 / 2015-12-17
+-------------------
+- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193]
+
+0.26.2 / 2015-11-02
+-------------------
+- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces`
+
+0.26.1 / 2015-11-02
+-------------------
+- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190]
+
+0.26.0 / 2015-10-25
+-------------------
+- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw).
+
+0.25.0 / 2015-10-24
+-------------------
+- now has a file walker `walk()`
+
+0.24.0 / 2015-08-28
+-------------------
+- removed alias `delete()` and `deleteSync()`. See: [#171][#171]
+
+0.23.1 / 2015-08-07
+-------------------
+- Better handling of errors for `move()` when moving across devices. [#170][#170]
+- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169]
+
+0.23.0 / 2015-08-06
+-------------------
+- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165]
+
+0.22.1 / 2015-07-09
+-------------------
+- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149].
+Fixes regression that was introduced in `0.21.0`.
+
+0.22.0 / 2015-07-09
+-------------------
+- preserve permissions / ownership in `copy()`. See: [#54][#54]
+
+0.21.0 / 2015-07-04
+-------------------
+- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141]
+- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks)
+
+0.20.1 / 2015-06-23
+-------------------
+- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26
+
+0.20.0 / 2015-06-19
+-------------------
+- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g.
+this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`.
+- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code.
+- started moving tests inline
+- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()`
+
+0.19.0 / 2015-06-08
+-------------------
+- `fs.copy()` had support for Node v0.8, dropped support
+
+0.18.4 / 2015-05-22
+-------------------
+- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0
+
+0.18.3 / 2015-05-08
+-------------------
+- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134]
+
+0.18.2 / 2015-04-17
+-------------------
+- bugfix: allow `F_OK` ([#120][#120])
+
+0.18.1 / 2015-04-15
+-------------------
+- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b
+- fixed a lot of tests for Windows (appveyor)
+
+0.18.0 / 2015-03-31
+-------------------
+- added `emptyDir()` and `emptyDirSync()`
+
+0.17.0 / 2015-03-28
+-------------------
+- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists).
+**Only works with files at the moment.**
+- `createOutputStream()` added. See: [#118][#118]
+
+0.16.5 / 2015-03-08
+-------------------
+- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114]
+
+0.16.4 / 2015-03-01
+-------------------
+- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66
+
+0.16.3 / 2015-01-28
+-------------------
+- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9
+
+
+0.16.2 / 2015-01-28
+-------------------
+- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future)
+
+0.16.1 / 2015-01-28
+-------------------
+- if `setImmediate` is not available, fall back to `process.nextTick`
+
+0.16.0 / 2015-01-28
+-------------------
+- bugfix `fs.move()` into itself. Closes [#104]
+- bugfix `fs.move()` moving directory across device. Closes [#108]
+- added coveralls support
+- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98]
+- misc fs.copy code cleanups
+
+0.15.0 / 2015-01-21
+-------------------
+- dropped `ncp`, imported code in
+- because of previous, now supports `io.js`
+- `graceful-fs` is now a dependency
+
+0.14.0 / 2015-01-05
+-------------------
+- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100]
+- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests)
+
+0.13.0 / 2014-12-10
+-------------------
+- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch)
+- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"`
+- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59])
+
+0.12.0 / 2014-09-22
+-------------------
+- copy symlinks in `copySync()` [#85][#85]
+
+0.11.1 / 2014-09-02
+-------------------
+- bugfix `copySync()` preserve file permissions [#80][#80]
+
+0.11.0 / 2014-08-11
+-------------------
+- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"`
+- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()`
+see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details.
+
+0.10.0 / 2014-06-29
+------------------
+* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change
+from `~` to `^`. [#67]
+
+0.9.1 / 2014-05-22
+------------------
+* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there
+
+0.9.0 / 2014-05-22
+------------------
+* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58]
+* upgraded `rimraf` from `~2.2.6` to `^2.2.8`
+* upgraded `mkdirp` from `0.3.x` to `^0.5.0`
+* added methods `ensureFile()`, `ensureFileSync()`
+* added methods `ensureDir()`, `ensureDirSync()` [#31]
+* added `move()` method. From: https://github.com/andrewrk/node-mv
+
+
+0.8.1 / 2013-10-24
+------------------
+* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39])
+
+0.8.0 / 2013-10-14
+------------------
+* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36])
+
+0.7.1 / 2013-10-12
+------------------
+* `copySync()` implemented (Srirangan / [#33])
+* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32]
+
+0.7.0 / 2013-10-07
+------------------
+* update readme conventions
+* `copy()` now works if destination directory does not exist. Closes [#29]
+
+0.6.4 / 2013-09-05
+------------------
+* changed `homepage` field in package.json to remove NPM warning
+
+0.6.3 / 2013-06-28
+------------------
+* changed JSON spacing default from `4` to `2` to follow Node conventions
+* updated `jsonfile` dep
+* updated `rimraf` dep
+
+0.6.2 / 2013-06-28
+------------------
+* added .npmignore, [#25]
+
+0.6.1 / 2013-05-14
+------------------
+* modified for `strict` mode, closes [#24]
+* added `outputJson()/outputJsonSync()`, closes [#23]
+
+0.6.0 / 2013-03-18
+------------------
+* removed node 0.6 support
+* added node 0.10 support
+* upgraded to latest `ncp` and `rimraf`.
+* optional `graceful-fs` support. Closes [#17]
+
+
+0.5.0 / 2013-02-03
+------------------
+* Removed `readTextFile`.
+* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write.
+* Restructured documentation a bit. Added roadmap.
+
+0.4.0 / 2013-01-28
+------------------
+* Set default spaces in `jsonfile` from 4 to 2.
+* Updated `testutil` deps for tests.
+* Renamed `touch()` to `createFile()`
+* Added `outputFile()` and `outputFileSync()`
+* Changed creation of testing diretories so the /tmp dir is not littered.
+* Added `readTextFile()` and `readTextFileSync()`.
+
+0.3.2 / 2012-11-01
+------------------
+* Added `touch()` and `touchSync()` methods.
+
+0.3.1 / 2012-10-11
+------------------
+* Fixed some stray globals.
+
+0.3.0 / 2012-10-09
+------------------
+* Removed all CoffeeScript from tests.
+* Renamed `mkdir` to `mkdirs`/`mkdirp`.
+
+0.2.1 / 2012-09-11
+------------------
+* Updated `rimraf` dep.
+
+0.2.0 / 2012-09-10
+------------------
+* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript)
+* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile)
+* Added Travis-CI.
+
+0.1.3 / 2012-08-13
+------------------
+* Added method `readJSONFile`.
+
+0.1.2 / 2012-06-15
+------------------
+* Bug fix: `deleteSync()` didn't exist.
+* Verified Node v0.8 compatibility.
+
+0.1.1 / 2012-06-15
+------------------
+* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed.
+
+0.1.0 / 2012-05-31
+------------------
+* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too.
+* Renamed `rmrf()` to `remove()`.
+* `remove()` aliased with `delete()`.
+* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`.
+* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead.
+
+0.0.4 / 2012-03-14
+------------------
+* Removed CoffeeScript dependency
+
+0.0.3 / 2012-01-11
+------------------
+* Added methods rmrf and rmrfSync
+* Moved tests from Jasmine to Mocha
+
+
+[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year"
+[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme"
+[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move"
+[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]"
+[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]"
+[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]"
+[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]"
+[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value"
+[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]"
+[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]"
+[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]"
+[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]"
+[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support"
+[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]"
+[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]"
+[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]"
+[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]"
+[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]"
+[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]"
+[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]"
+[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]"
+[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?"
+[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative"
+[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]"
+[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink "
+[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists"
+[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]"
+[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms"
+[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]"
+[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug."
+[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]"
+[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters."
+[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]"
+[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]"
+[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]"
+[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]"
+[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link"
+[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage"
+[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error"
+[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls"
+[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]"
+[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]"
+[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated"
+[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]"
+[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]"
+[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]"
+[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]"
+[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node"
+[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]"
+[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]"
+[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]"
+[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs"
+[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]"
+[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying"
+[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]"
+[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]"
+[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function"
+[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390"
+[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not"
+[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()"
+[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()"
+[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?"
+[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing"
+[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]"
+[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership"
+[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options"
+[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]"
+[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API"
+[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]"
+[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`"
+[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]"
+[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error"
+[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]"
+[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]"
+[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111"
+[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!"
+[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra"
+[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?"
+[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]"
+[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]"
+[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()"
+[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined"
+[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require"
+[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty"
+[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp"
+[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails"
+[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme "
+[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version"
+[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method"
+[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists"
+[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission"
+[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you"
+[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)"
+[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers"
+[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy"
+[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package"
+[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file"
+[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]"
+[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories"
+[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?"
+[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]"
+[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream"
+[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request"
+[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]"
+[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread."
+[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..."
+[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo"
+[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)"
+[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci"
+[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]"
+[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. "
+[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML"
+[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test"
+[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir"
+[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out"
+[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]"
+[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory"
+[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink"
+[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error"
+[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync"
+[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function"
+[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md"
+[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods."
+[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example"
+[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug"
+[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug"
+[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug"
+[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]"
+[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag"
+[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo"
+[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE"
+[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files"
+[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]"
+[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]"
+[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]"
+[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions"
+[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync"
+[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]"
+[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files"
+[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]"
+[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?"
+[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]"
+[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync"
+[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]"
+[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]"
+[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]"
+[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]"
+[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?"
+[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file"
+[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]"
+[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()"
+[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]"
+[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true"
+[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows"
+[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform"
+[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]"
+[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]"
+[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x"
+[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra"
+[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]"
+[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified"
+[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]"
+[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]"
+[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir"
+[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync "
+[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]"
+[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event"
+[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]"
+[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter"
+[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs"
+[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`"
+[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases"
+[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives"
+[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error"
+[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error"
+[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]"
+[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content"
+[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink"
+[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content"
+[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]"
+[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link"
+[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link"
+[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link"
+[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link"
+[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods"
+[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted"
+[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods"
+[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme"
+[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync"
+[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152"
+[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]"
+[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]"
+[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code."
+[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync"
+[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation"
+[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty"
+[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works"
+[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist."
+[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing"
+[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs"
+[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature"
+[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps"
+[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'"
+[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138"
+[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files"
+[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input"
+[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute"
+[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided"
+[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir"
+[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`"
+[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method"
+[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]"
+[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features."
+[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?"
+[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;"
+[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists"
+[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object # has no method 'access'"
+[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync"
+[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'"
+[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory"
+[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids."
+[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined"
+[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'"
+[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows"
+[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream"
+[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows"
+[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]"
+[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]"
+[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true"
+[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists"
+[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory"
+[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory "
+[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory"
+[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails"
+[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work"
+[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it"
+[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]"
+[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs"
+[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]"
+[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy"
+[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?"
+[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified"
+[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp"
+[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]"
+[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]"
+[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug"
+[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined."
+[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp"
+[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]"
+[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]"
+[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird"
+[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]"
+[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine"
+[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows"
+[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries"
+[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?"
+[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?"
+[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync"
+[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?"
+[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]"
+[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move"
+[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move"
+[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync"
+[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty"
+[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories"
+[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird"
+[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript"
+[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]"
+[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module"
+[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme"
+[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality"
+[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work"
+[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]"
+[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name"
+[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]"
+[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options"
+[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG"
+[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy"
+[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls"
+[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk"
+[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work"
+[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies"
+[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs"
+[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]"
+[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error"
+[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?"
+[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy "
+[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?"
+[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons"
+[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode"
+[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync"
+[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README"
+[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile"
+[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6"
+[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]"
+[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0"
+[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year"
+[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites"
+[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support"
+[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting "
+[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?"
+[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now"
+[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime "
+[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error"
+[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null"
+[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]"
+[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`"
+[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` "
+[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]"
+[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync"
+[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]"
+[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]"
+[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`"
+[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?"
+[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted."
+[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme"
+[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]"
+[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file"
+[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]"
+[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories"
+[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()"
+[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0"
+[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted"
+[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array"
+[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function"
+[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`"
+[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md"
+[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]"
+[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1"
+[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]"
+[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global"
+[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]"
+[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]"
+[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra"
+[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version"
+[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency"
+[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming"
+[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2"
+[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!"
+[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp"
+[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist"
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/LICENSE b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/LICENSE
new file mode 100644
index 0000000..93546df
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
+(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/README.md b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/README.md
new file mode 100644
index 0000000..b4a5370
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/README.md
@@ -0,0 +1,264 @@
+Node.js: fs-extra
+=================
+
+`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
+
+[](https://www.npmjs.org/package/fs-extra)
+[](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
+[](http://travis-ci.org/jprichardson/node-fs-extra)
+[](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
+[](https://www.npmjs.org/package/fs-extra)
+[](https://coveralls.io/github/jprichardson/node-fs-extra)
+[](https://standardjs.com)
+
+Why?
+----
+
+I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
+
+
+
+
+Installation
+------------
+
+ npm install fs-extra
+
+
+
+Usage
+-----
+
+`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
+
+You don't ever need to include the original `fs` module again:
+
+```js
+const fs = require('fs') // this is no longer necessary
+```
+
+you can now do this:
+
+```js
+const fs = require('fs-extra')
+```
+
+or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
+to name your `fs` variable `fse` like so:
+
+```js
+const fse = require('fs-extra')
+```
+
+you can also keep both, but it's redundant:
+
+```js
+const fs = require('fs')
+const fse = require('fs-extra')
+```
+
+Sync vs Async vs Async/Await
+-------------
+Most methods are async by default. All async methods will return a promise if the callback isn't passed.
+
+Sync methods on the other hand will throw if an error occurs.
+
+Also Async/Await will throw an error if one occurs.
+
+Example:
+
+```js
+const fs = require('fs-extra')
+
+// Async with promises:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ .then(() => console.log('success!'))
+ .catch(err => console.error(err))
+
+// Async with callbacks:
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+ console.log('success!')
+})
+
+// Sync:
+try {
+ fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+} catch (err) {
+ console.error(err)
+}
+
+// Async/Await:
+async function copyFiles () {
+ try {
+ await fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+ } catch (err) {
+ console.error(err)
+ }
+}
+
+copyFiles()
+```
+
+
+Methods
+-------
+
+### Async
+
+- [copy](docs/copy.md)
+- [emptyDir](docs/emptyDir.md)
+- [ensureFile](docs/ensureFile.md)
+- [ensureDir](docs/ensureDir.md)
+- [ensureLink](docs/ensureLink.md)
+- [ensureSymlink](docs/ensureSymlink.md)
+- [mkdirp](docs/ensureDir.md)
+- [mkdirs](docs/ensureDir.md)
+- [move](docs/move.md)
+- [outputFile](docs/outputFile.md)
+- [outputJson](docs/outputJson.md)
+- [pathExists](docs/pathExists.md)
+- [readJson](docs/readJson.md)
+- [remove](docs/remove.md)
+- [writeJson](docs/writeJson.md)
+
+### Sync
+
+- [copySync](docs/copy-sync.md)
+- [emptyDirSync](docs/emptyDir-sync.md)
+- [ensureFileSync](docs/ensureFile-sync.md)
+- [ensureDirSync](docs/ensureDir-sync.md)
+- [ensureLinkSync](docs/ensureLink-sync.md)
+- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
+- [mkdirpSync](docs/ensureDir-sync.md)
+- [mkdirsSync](docs/ensureDir-sync.md)
+- [moveSync](docs/move-sync.md)
+- [outputFileSync](docs/outputFile-sync.md)
+- [outputJsonSync](docs/outputJson-sync.md)
+- [pathExistsSync](docs/pathExists-sync.md)
+- [readJsonSync](docs/readJson-sync.md)
+- [removeSync](docs/remove-sync.md)
+- [writeJsonSync](docs/writeJson-sync.md)
+
+
+**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
+
+### What happened to `walk()` and `walkSync()`?
+
+They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
+
+
+Third Party
+-----------
+
+### CLI
+
+[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
+
+### TypeScript
+
+If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
+
+
+### File / Directory Watching
+
+If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
+
+### Obtain Filesystem (Devices, Partitions) Information
+
+[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
+
+### Misc.
+
+- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
+- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
+
+
+
+Hacking on fs-extra
+-------------------
+
+Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
+uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
+you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
+
+[](https://github.com/feross/standard)
+
+What's needed?
+- First, take a look at existing issues. Those are probably going to be where the priority lies.
+- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
+- Improve test coverage. See coveralls output for more info.
+
+Note: If you make any big changes, **you should definitely file an issue for discussion first.**
+
+### Running the Test Suite
+
+fs-extra contains hundreds of tests.
+
+- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
+- `npm run unit`: runs the unit tests
+- `npm test`: runs both the linter and the tests
+
+
+### Windows
+
+If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
+because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
+account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
+However, I didn't have much luck doing this.
+
+Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
+I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
+
+ net use z: "\\vmware-host\Shared Folders"
+
+I can then navigate to my `fs-extra` directory and run the tests.
+
+
+Naming
+------
+
+I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
+
+* https://github.com/jprichardson/node-fs-extra/issues/2
+* https://github.com/flatiron/utile/issues/11
+* https://github.com/ryanmcgrath/wrench-js/issues/29
+* https://github.com/substack/node-mkdirp/issues/17
+
+First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
+
+For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
+
+We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
+
+My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
+
+So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
+
+
+Credit
+------
+
+`fs-extra` wouldn't be possible without using the modules from the following authors:
+
+- [Isaac Shlueter](https://github.com/isaacs)
+- [Charlie McConnel](https://github.com/avianflu)
+- [James Halliday](https://github.com/substack)
+- [Andrew Kelley](https://github.com/andrewrk)
+
+
+
+
+License
+-------
+
+Licensed under MIT
+
+Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
+
+[1]: http://nodejs.org/docs/latest/api/fs.html
+
+
+[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy-sync/copy-sync.js
new file mode 100644
index 0000000..5e245b9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy-sync/copy-sync.js
@@ -0,0 +1,166 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirsSync = require('../mkdirs').mkdirsSync
+const utimesMillisSync = require('../util/utimes').utimesMillisSync
+const stat = require('../util/stat')
+
+function copySync (src, dest, opts) {
+ if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ opts = opts || {}
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
+ stat.checkParentPathsSync(src, srcStat, dest, 'copy')
+ return handleFilterAndCopy(destStat, src, dest, opts)
+}
+
+function handleFilterAndCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ const destParent = path.dirname(dest)
+ if (!fs.existsSync(destParent)) mkdirsSync(destParent)
+ return getStats(destStat, src, dest, opts)
+}
+
+function startCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ return getStats(destStat, src, dest, opts)
+}
+
+function getStats (destStat, src, dest, opts) {
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync
+ const srcStat = statSync(src)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
+ else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
+ else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
+ throw new Error(`Unknown file: ${src}`)
+}
+
+function onFile (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts)
+ return mayCopyFile(srcStat, src, dest, opts)
+}
+
+function mayCopyFile (srcStat, src, dest, opts) {
+ if (opts.overwrite) {
+ fs.unlinkSync(dest)
+ return copyFile(srcStat, src, dest, opts)
+ } else if (opts.errorOnExist) {
+ throw new Error(`'${dest}' already exists`)
+ }
+}
+
+function copyFile (srcStat, src, dest, opts) {
+ fs.copyFileSync(src, dest)
+ if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
+ return setDestMode(dest, srcStat.mode)
+}
+
+function handleTimestamps (srcMode, src, dest) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
+ return setDestTimestamps(src, dest)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode) {
+ return setDestMode(dest, srcMode | 0o200)
+}
+
+function setDestMode (dest, srcMode) {
+ return fs.chmodSync(dest, srcMode)
+}
+
+function setDestTimestamps (src, dest) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ const updatedSrcStat = fs.statSync(src)
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
+}
+
+function onDir (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
+ return copyDir(src, dest, opts)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts) {
+ fs.mkdirSync(dest)
+ copyDir(src, dest, opts)
+ return setDestMode(dest, srcMode)
+}
+
+function copyDir (src, dest, opts) {
+ fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
+}
+
+function copyDirItem (item, src, dest, opts) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
+ return startCopy(destStat, srcItem, destItem, opts)
+}
+
+function onLink (destStat, src, dest, opts) {
+ let resolvedSrc = fs.readlinkSync(src)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlinkSync(resolvedSrc, dest)
+ } else {
+ let resolvedDest
+ try {
+ resolvedDest = fs.readlinkSync(dest)
+ } catch (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
+ throw err
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
+ }
+
+ // prevent copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
+ }
+ return copyLink(resolvedSrc, dest)
+ }
+}
+
+function copyLink (resolvedSrc, dest) {
+ fs.unlinkSync(dest)
+ return fs.symlinkSync(resolvedSrc, dest)
+}
+
+module.exports = copySync
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy-sync/index.js
new file mode 100644
index 0000000..65945ae
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ copySync: require('./copy-sync')
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy/copy.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy/copy.js
new file mode 100644
index 0000000..2a2874f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy/copy.js
@@ -0,0 +1,232 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirs = require('../mkdirs').mkdirs
+const pathExists = require('../path-exists').pathExists
+const utimesMillis = require('../util/utimes').utimesMillis
+const stat = require('../util/stat')
+
+function copy (src, dest, opts, cb) {
+ if (typeof opts === 'function' && !cb) {
+ cb = opts
+ opts = {}
+ } else if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ cb = cb || function () {}
+ opts = opts || {}
+
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
+ if (err) return cb(err)
+ if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
+ return checkParentDir(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function checkParentDir (destStat, src, dest, opts, cb) {
+ const destParent = path.dirname(dest)
+ pathExists(destParent, (err, dirExists) => {
+ if (err) return cb(err)
+ if (dirExists) return getStats(destStat, src, dest, opts, cb)
+ mkdirs(destParent, err => {
+ if (err) return cb(err)
+ return getStats(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function handleFilter (onInclude, destStat, src, dest, opts, cb) {
+ Promise.resolve(opts.filter(src, dest)).then(include => {
+ if (include) return onInclude(destStat, src, dest, opts, cb)
+ return cb()
+ }, error => cb(error))
+}
+
+function startCopy (destStat, src, dest, opts, cb) {
+ if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
+ return getStats(destStat, src, dest, opts, cb)
+}
+
+function getStats (destStat, src, dest, opts, cb) {
+ const stat = opts.dereference ? fs.stat : fs.lstat
+ stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
+ else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
+ else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
+ return cb(new Error(`Unknown file: ${src}`))
+ })
+}
+
+function onFile (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
+ return mayCopyFile(srcStat, src, dest, opts, cb)
+}
+
+function mayCopyFile (srcStat, src, dest, opts, cb) {
+ if (opts.overwrite) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return copyFile(srcStat, src, dest, opts, cb)
+ })
+ } else if (opts.errorOnExist) {
+ return cb(new Error(`'${dest}' already exists`))
+ } else return cb()
+}
+
+function copyFile (srcStat, src, dest, opts, cb) {
+ fs.copyFile(src, dest, err => {
+ if (err) return cb(err)
+ if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
+ return setDestMode(dest, srcStat.mode, cb)
+ })
+}
+
+function handleTimestampsAndMode (srcMode, src, dest, cb) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) {
+ return makeFileWritable(dest, srcMode, err => {
+ if (err) return cb(err)
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+ })
+ }
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode, cb) {
+ return setDestMode(dest, srcMode | 0o200, cb)
+}
+
+function setDestTimestampsAndMode (srcMode, src, dest, cb) {
+ setDestTimestamps(src, dest, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+}
+
+function setDestMode (dest, srcMode, cb) {
+ return fs.chmod(dest, srcMode, cb)
+}
+
+function setDestTimestamps (src, dest, cb) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ fs.stat(src, (err, updatedSrcStat) => {
+ if (err) return cb(err)
+ return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
+ })
+}
+
+function onDir (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
+ return copyDir(src, dest, opts, cb)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts, cb) {
+ fs.mkdir(dest, err => {
+ if (err) return cb(err)
+ copyDir(src, dest, opts, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+ })
+}
+
+function copyDir (src, dest, opts, cb) {
+ fs.readdir(src, (err, items) => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+}
+
+function copyDirItems (items, src, dest, opts, cb) {
+ const item = items.pop()
+ if (!item) return cb()
+ return copyDirItem(items, item, src, dest, opts, cb)
+}
+
+function copyDirItem (items, item, src, dest, opts, cb) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { destStat } = stats
+ startCopy(destStat, srcItem, destItem, opts, err => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+ })
+}
+
+function onLink (destStat, src, dest, opts, cb) {
+ fs.readlink(src, (err, resolvedSrc) => {
+ if (err) return cb(err)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlink(resolvedSrc, dest, cb)
+ } else {
+ fs.readlink(dest, (err, resolvedDest) => {
+ if (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
+ return cb(err)
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
+ }
+
+ // do not copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
+ }
+ return copyLink(resolvedSrc, dest, cb)
+ })
+ }
+ })
+}
+
+function copyLink (resolvedSrc, dest, cb) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return fs.symlink(resolvedSrc, dest, cb)
+ })
+}
+
+module.exports = copy
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy/index.js
new file mode 100644
index 0000000..b7e4f7f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/copy/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ copy: u(require('./copy'))
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/empty/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/empty/index.js
new file mode 100644
index 0000000..b4a2e82
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/empty/index.js
@@ -0,0 +1,39 @@
+'use strict'
+
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const remove = require('../remove')
+
+const emptyDir = u(async function emptyDir (dir) {
+ let items
+ try {
+ items = await fs.readdir(dir)
+ } catch {
+ return mkdir.mkdirs(dir)
+ }
+
+ return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/file.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/file.js
new file mode 100644
index 0000000..15cc473
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/file.js
@@ -0,0 +1,69 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ fs.stat(dir, (err, stats) => {
+ if (err) {
+ // if the directory doesn't exist, make it
+ if (err.code === 'ENOENT') {
+ return mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ }
+ return callback(err)
+ }
+
+ if (stats.isDirectory()) makeFile()
+ else {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdir(dir, err => {
+ if (err) return callback(err)
+ })
+ }
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ try {
+ if (!fs.statSync(dir).isDirectory()) {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdirSync(dir)
+ }
+ } catch (err) {
+ // If the stat call above failed because the directory doesn't exist, create it
+ if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
+ else throw err
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/index.js
new file mode 100644
index 0000000..c1f67b7
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/index.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const file = require('./file')
+const link = require('./link')
+const symlink = require('./symlink')
+
+module.exports = {
+ // file
+ createFile: file.createFile,
+ createFileSync: file.createFileSync,
+ ensureFile: file.createFile,
+ ensureFileSync: file.createFileSync,
+ // link
+ createLink: link.createLink,
+ createLinkSync: link.createLinkSync,
+ ensureLink: link.createLink,
+ ensureLinkSync: link.createLinkSync,
+ // symlink
+ createSymlink: symlink.createSymlink,
+ createSymlinkSync: symlink.createSymlinkSync,
+ ensureSymlink: symlink.createSymlink,
+ ensureSymlinkSync: symlink.createSymlinkSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/link.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/link.js
new file mode 100644
index 0000000..f6d6748
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/link.js
@@ -0,0 +1,64 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+const { areIdentical } = require('../util/stat')
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ fs.lstat(dstpath, (_, dstStat) => {
+ fs.lstat(srcpath, (err, srcStat) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+ if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath) {
+ let dstStat
+ try {
+ dstStat = fs.lstatSync(dstpath)
+ } catch {}
+
+ try {
+ const srcStat = fs.lstatSync(srcpath)
+ if (dstStat && areIdentical(srcStat, dstStat)) return
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink-paths.js
new file mode 100644
index 0000000..33cd760
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink-paths.js
@@ -0,0 +1,99 @@
+'use strict'
+
+const path = require('path')
+const fs = require('graceful-fs')
+const pathExists = require('../path-exists').pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink-type.js
new file mode 100644
index 0000000..42dc0ce
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink-type.js
@@ -0,0 +1,31 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink.js
new file mode 100644
index 0000000..2b93052
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/ensure/symlink.js
@@ -0,0 +1,82 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('../fs')
+const _mkdirs = require('../mkdirs')
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = require('./symlink-paths')
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = require('./symlink-type')
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = require('../path-exists').pathExists
+
+const { areIdentical } = require('../util/stat')
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ fs.lstat(dstpath, (err, stats) => {
+ if (!err && stats.isSymbolicLink()) {
+ Promise.all([
+ fs.stat(srcpath),
+ fs.stat(dstpath)
+ ]).then(([srcStat, dstStat]) => {
+ if (areIdentical(srcStat, dstStat)) return callback(null)
+ _createSymlink(srcpath, dstpath, type, callback)
+ })
+ } else _createSymlink(srcpath, dstpath, type, callback)
+ })
+}
+
+function _createSymlink (srcpath, dstpath, type, callback) {
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type) {
+ let stats
+ try {
+ stats = fs.lstatSync(dstpath)
+ } catch {}
+ if (stats && stats.isSymbolicLink()) {
+ const srcStat = fs.statSync(srcpath)
+ const dstStat = fs.statSync(dstpath)
+ if (areIdentical(srcStat, dstStat)) return
+ }
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/fs/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/fs/index.js
new file mode 100644
index 0000000..e460b74
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/fs/index.js
@@ -0,0 +1,119 @@
+'use strict'
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchmod',
+ 'lchown',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'opendir',
+ 'readdir',
+ 'readFile',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rm',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.opendir was added in Node.js v12.12.0
+ // fs.rm was added in Node.js v14.14.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export cloned fs:
+Object.assign(exports, fs)
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+exports.realpath.native = u(fs.realpath.native)
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// We need to handle both cases, so we use ...args
+exports.write = function (fd, buffer, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.write(fd, buffer, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
+
+// fs.writev only available in Node v12.9.0+
+if (typeof fs.writev === 'function') {
+ // Function signature is
+ // s.writev(fd, buffers[, position], callback)
+ // We need to handle the optional arg, so we use ...args
+ exports.writev = function (fd, buffers, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.writev(fd, buffers, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffers })
+ })
+ })
+ }
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/index.js
new file mode 100644
index 0000000..cbc2aae
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/index.js
@@ -0,0 +1,18 @@
+'use strict'
+
+module.exports = {
+ // Export promiseified graceful-fs:
+ ...require('./fs'),
+ // Export extra methods:
+ ...require('./copy-sync'),
+ ...require('./copy'),
+ ...require('./empty'),
+ ...require('./ensure'),
+ ...require('./json'),
+ ...require('./mkdirs'),
+ ...require('./move-sync'),
+ ...require('./move'),
+ ...require('./output'),
+ ...require('./path-exists'),
+ ...require('./remove')
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/index.js
new file mode 100644
index 0000000..900126a
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const u = require('universalify').fromPromise
+const jsonFile = require('./jsonfile')
+
+jsonFile.outputJson = u(require('./output-json'))
+jsonFile.outputJsonSync = require('./output-json-sync')
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/jsonfile.js
new file mode 100644
index 0000000..f11d34d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/jsonfile.js
@@ -0,0 +1,11 @@
+'use strict'
+
+const jsonFile = require('jsonfile')
+
+module.exports = {
+ // jsonfile exports
+ readJson: jsonFile.readFile,
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: jsonFile.writeFile,
+ writeJsonSync: jsonFile.writeFileSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/output-json-sync.js
new file mode 100644
index 0000000..f76b474
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/output-json-sync.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFileSync } = require('../output')
+
+function outputJsonSync (file, data, options) {
+ const str = stringify(data, options)
+
+ outputFileSync(file, str, options)
+}
+
+module.exports = outputJsonSync
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/output-json.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/output-json.js
new file mode 100644
index 0000000..0fc6689
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/json/output-json.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFile } = require('../output')
+
+async function outputJson (file, data, options = {}) {
+ const str = stringify(data, options)
+
+ await outputFile(file, str, options)
+}
+
+module.exports = outputJson
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/index.js
new file mode 100644
index 0000000..9edecee
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/index.js
@@ -0,0 +1,14 @@
+'use strict'
+const u = require('universalify').fromPromise
+const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
+const makeDir = u(_makeDir)
+
+module.exports = {
+ mkdirs: makeDir,
+ mkdirsSync: makeDirSync,
+ // alias
+ mkdirp: makeDir,
+ mkdirpSync: makeDirSync,
+ ensureDir: makeDir,
+ ensureDirSync: makeDirSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/make-dir.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/make-dir.js
new file mode 100644
index 0000000..45ece64
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/make-dir.js
@@ -0,0 +1,27 @@
+'use strict'
+const fs = require('../fs')
+const { checkPath } = require('./utils')
+
+const getMode = options => {
+ const defaults = { mode: 0o777 }
+ if (typeof options === 'number') return options
+ return ({ ...defaults, ...options }).mode
+}
+
+module.exports.makeDir = async (dir, options) => {
+ checkPath(dir)
+
+ return fs.mkdir(dir, {
+ mode: getMode(options),
+ recursive: true
+ })
+}
+
+module.exports.makeDirSync = (dir, options) => {
+ checkPath(dir)
+
+ return fs.mkdirSync(dir, {
+ mode: getMode(options),
+ recursive: true
+ })
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/utils.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/utils.js
new file mode 100644
index 0000000..a4059ad
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/mkdirs/utils.js
@@ -0,0 +1,21 @@
+// Adapted from https://github.com/sindresorhus/make-dir
+// Copyright (c) Sindre Sorhus (sindresorhus.com)
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+'use strict'
+const path = require('path')
+
+// https://github.com/nodejs/node/issues/8987
+// https://github.com/libuv/libuv/pull/1088
+module.exports.checkPath = function checkPath (pth) {
+ if (process.platform === 'win32') {
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
+
+ if (pathHasInvalidWinCharacters) {
+ const error = new Error(`Path contains invalid characters: ${pth}`)
+ error.code = 'EINVAL'
+ throw error
+ }
+ }
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move-sync/index.js
new file mode 100644
index 0000000..af90b06
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ moveSync: require('./move-sync')
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move-sync/move-sync.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move-sync/move-sync.js
new file mode 100644
index 0000000..1c36799
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move-sync/move-sync.js
@@ -0,0 +1,54 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copySync = require('../copy-sync').copySync
+const removeSync = require('../remove').removeSync
+const mkdirpSync = require('../mkdirs').mkdirpSync
+const stat = require('../util/stat')
+
+function moveSync (src, dest, opts) {
+ opts = opts || {}
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)
+ stat.checkParentPathsSync(src, srcStat, dest, 'move')
+ if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))
+ return doRename(src, dest, overwrite, isChangingCase)
+}
+
+function isParentRoot (dest) {
+ const parent = path.dirname(dest)
+ const parsedPath = path.parse(parent)
+ return parsedPath.root === parent
+}
+
+function doRename (src, dest, overwrite, isChangingCase) {
+ if (isChangingCase) return rename(src, dest, overwrite)
+ if (overwrite) {
+ removeSync(dest)
+ return rename(src, dest, overwrite)
+ }
+ if (fs.existsSync(dest)) throw new Error('dest already exists.')
+ return rename(src, dest, overwrite)
+}
+
+function rename (src, dest, overwrite) {
+ try {
+ fs.renameSync(src, dest)
+ } catch (err) {
+ if (err.code !== 'EXDEV') throw err
+ return moveAcrossDevice(src, dest, overwrite)
+ }
+}
+
+function moveAcrossDevice (src, dest, overwrite) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copySync(src, dest, opts)
+ return removeSync(src)
+}
+
+module.exports = moveSync
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move/index.js
new file mode 100644
index 0000000..3785345
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ move: u(require('./move'))
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move/move.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move/move.js
new file mode 100644
index 0000000..e9523e6
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/move/move.js
@@ -0,0 +1,73 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copy = require('../copy').copy
+const remove = require('../remove').remove
+const mkdirp = require('../mkdirs').mkdirp
+const pathExists = require('../path-exists').pathExists
+const stat = require('../util/stat')
+
+function move (src, dest, opts, cb) {
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ stat.checkPaths(src, dest, 'move', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, isChangingCase = false } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'move', err => {
+ if (err) return cb(err)
+ if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb)
+ mkdirp(path.dirname(dest), err => {
+ if (err) return cb(err)
+ return doRename(src, dest, overwrite, isChangingCase, cb)
+ })
+ })
+ })
+}
+
+function isParentRoot (dest) {
+ const parent = path.dirname(dest)
+ const parsedPath = path.parse(parent)
+ return parsedPath.root === parent
+}
+
+function doRename (src, dest, overwrite, isChangingCase, cb) {
+ if (isChangingCase) return rename(src, dest, overwrite, cb)
+ if (overwrite) {
+ return remove(dest, err => {
+ if (err) return cb(err)
+ return rename(src, dest, overwrite, cb)
+ })
+ }
+ pathExists(dest, (err, destExists) => {
+ if (err) return cb(err)
+ if (destExists) return cb(new Error('dest already exists.'))
+ return rename(src, dest, overwrite, cb)
+ })
+}
+
+function rename (src, dest, overwrite, cb) {
+ fs.rename(src, dest, err => {
+ if (!err) return cb()
+ if (err.code !== 'EXDEV') return cb(err)
+ return moveAcrossDevice(src, dest, overwrite, cb)
+ })
+}
+
+function moveAcrossDevice (src, dest, overwrite, cb) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copy(src, dest, opts, err => {
+ if (err) return cb(err)
+ return remove(src, cb)
+ })
+}
+
+module.exports = move
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/output/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/output/index.js
new file mode 100644
index 0000000..92297ca
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/output/index.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function outputFile (file, data, encoding, callback) {
+ if (typeof encoding === 'function') {
+ callback = encoding
+ encoding = 'utf8'
+ }
+
+ const dir = path.dirname(file)
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return fs.writeFile(file, data, encoding, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+
+ fs.writeFile(file, data, encoding, callback)
+ })
+ })
+}
+
+function outputFileSync (file, ...args) {
+ const dir = path.dirname(file)
+ if (fs.existsSync(dir)) {
+ return fs.writeFileSync(file, ...args)
+ }
+ mkdir.mkdirsSync(dir)
+ fs.writeFileSync(file, ...args)
+}
+
+module.exports = {
+ outputFile: u(outputFile),
+ outputFileSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/path-exists/index.js
new file mode 100644
index 0000000..ddd9bc7
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/path-exists/index.js
@@ -0,0 +1,12 @@
+'use strict'
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+
+function pathExists (path) {
+ return fs.access(path).then(() => true).catch(() => false)
+}
+
+module.exports = {
+ pathExists: u(pathExists),
+ pathExistsSync: fs.existsSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/remove/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/remove/index.js
new file mode 100644
index 0000000..4428e59
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/remove/index.js
@@ -0,0 +1,22 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const u = require('universalify').fromCallback
+const rimraf = require('./rimraf')
+
+function remove (path, callback) {
+ // Node 14.14.0+
+ if (fs.rm) return fs.rm(path, { recursive: true, force: true }, callback)
+ rimraf(path, callback)
+}
+
+function removeSync (path) {
+ // Node 14.14.0+
+ if (fs.rmSync) return fs.rmSync(path, { recursive: true, force: true })
+ rimraf.sync(path)
+}
+
+module.exports = {
+ remove: u(remove),
+ removeSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/remove/rimraf.js
new file mode 100644
index 0000000..2c77102
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/remove/rimraf.js
@@ -0,0 +1,302 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const assert = require('assert')
+
+const isWindows = (process.platform === 'win32')
+
+function defaults (options) {
+ const methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(m => {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+}
+
+function rimraf (p, options, cb) {
+ let busyTries = 0
+
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ rimraf_(p, options, function CB (er) {
+ if (er) {
+ if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
+ busyTries < options.maxBusyTries) {
+ busyTries++
+ const time = busyTries * 100
+ // try again, with the same exact callback as this one.
+ return setTimeout(() => rimraf_(p, options, CB), time)
+ }
+
+ // already gone
+ if (er.code === 'ENOENT') er = null
+ }
+
+ cb(er)
+ })
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+function rimraf_ (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, (er, st) => {
+ if (er && er.code === 'ENOENT') {
+ return cb(null)
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === 'EPERM' && isWindows) {
+ return fixWinEPERM(p, options, er, cb)
+ }
+
+ if (st && st.isDirectory()) {
+ return rmdir(p, options, er, cb)
+ }
+
+ options.unlink(p, er => {
+ if (er) {
+ if (er.code === 'ENOENT') {
+ return cb(null)
+ }
+ if (er.code === 'EPERM') {
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ }
+ if (er.code === 'EISDIR') {
+ return rmdir(p, options, er, cb)
+ }
+ }
+ return cb(er)
+ })
+ })
+}
+
+function fixWinEPERM (p, options, er, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.chmod(p, 0o666, er2 => {
+ if (er2) {
+ cb(er2.code === 'ENOENT' ? null : er)
+ } else {
+ options.stat(p, (er3, stats) => {
+ if (er3) {
+ cb(er3.code === 'ENOENT' ? null : er)
+ } else if (stats.isDirectory()) {
+ rmdir(p, options, er, cb)
+ } else {
+ options.unlink(p, cb)
+ }
+ })
+ }
+ })
+}
+
+function fixWinEPERMSync (p, options, er) {
+ let stats
+
+ assert(p)
+ assert(options)
+
+ try {
+ options.chmodSync(p, 0o666)
+ } catch (er2) {
+ if (er2.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ try {
+ stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ if (stats.isDirectory()) {
+ rmdirSync(p, options, er)
+ } else {
+ options.unlinkSync(p)
+ }
+}
+
+function rmdir (p, options, originalEr, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, er => {
+ if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
+ rmkids(p, options, cb)
+ } else if (er && er.code === 'ENOTDIR') {
+ cb(originalEr)
+ } else {
+ cb(er)
+ }
+ })
+}
+
+function rmkids (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, (er, files) => {
+ if (er) return cb(er)
+
+ let n = files.length
+ let errState
+
+ if (n === 0) return options.rmdir(p, cb)
+
+ files.forEach(f => {
+ rimraf(path.join(p, f), options, er => {
+ if (errState) {
+ return
+ }
+ if (er) return cb(errState = er)
+ if (--n === 0) {
+ options.rmdir(p, cb)
+ }
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+function rimrafSync (p, options) {
+ let st
+
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ try {
+ st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === 'EPERM' && isWindows) {
+ fixWinEPERMSync(p, options, er)
+ }
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory()) {
+ rmdirSync(p, options, null)
+ } else {
+ options.unlinkSync(p)
+ }
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ } else if (er.code === 'EPERM') {
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ } else if (er.code !== 'EISDIR') {
+ throw er
+ }
+ rmdirSync(p, options, er)
+ }
+}
+
+function rmdirSync (p, options, originalEr) {
+ assert(p)
+ assert(options)
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === 'ENOTDIR') {
+ throw originalEr
+ } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
+ rmkidsSync(p, options)
+ } else if (er.code !== 'ENOENT') {
+ throw er
+ }
+ }
+}
+
+function rmkidsSync (p, options) {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+
+ if (isWindows) {
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ const startTime = Date.now()
+ do {
+ try {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ } catch {}
+ } while (Date.now() - startTime < 500) // give up after 500ms
+ } else {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ }
+}
+
+module.exports = rimraf
+rimraf.sync = rimrafSync
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/util/stat.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/util/stat.js
new file mode 100644
index 0000000..0ed5aec
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/util/stat.js
@@ -0,0 +1,154 @@
+'use strict'
+
+const fs = require('../fs')
+const path = require('path')
+const util = require('util')
+
+function getStats (src, dest, opts) {
+ const statFunc = opts.dereference
+ ? (file) => fs.stat(file, { bigint: true })
+ : (file) => fs.lstat(file, { bigint: true })
+ return Promise.all([
+ statFunc(src),
+ statFunc(dest).catch(err => {
+ if (err.code === 'ENOENT') return null
+ throw err
+ })
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
+}
+
+function getStatsSync (src, dest, opts) {
+ let destStat
+ const statFunc = opts.dereference
+ ? (file) => fs.statSync(file, { bigint: true })
+ : (file) => fs.lstatSync(file, { bigint: true })
+ const srcStat = statFunc(src)
+ try {
+ destStat = statFunc(dest)
+ } catch (err) {
+ if (err.code === 'ENOENT') return { srcStat, destStat: null }
+ throw err
+ }
+ return { srcStat, destStat }
+}
+
+function checkPaths (src, dest, funcName, opts, cb) {
+ util.callbackify(getStats)(src, dest, opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+
+ if (destStat) {
+ if (areIdentical(srcStat, destStat)) {
+ const srcBaseName = path.basename(src)
+ const destBaseName = path.basename(dest)
+ if (funcName === 'move' &&
+ srcBaseName !== destBaseName &&
+ srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
+ return cb(null, { srcStat, destStat, isChangingCase: true })
+ }
+ return cb(new Error('Source and destination must not be the same.'))
+ }
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
+ }
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))
+ }
+ }
+
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return cb(null, { srcStat, destStat })
+ })
+}
+
+function checkPathsSync (src, dest, funcName, opts) {
+ const { srcStat, destStat } = getStatsSync(src, dest, opts)
+
+ if (destStat) {
+ if (areIdentical(srcStat, destStat)) {
+ const srcBaseName = path.basename(src)
+ const destBaseName = path.basename(dest)
+ if (funcName === 'move' &&
+ srcBaseName !== destBaseName &&
+ srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
+ return { srcStat, destStat, isChangingCase: true }
+ }
+ throw new Error('Source and destination must not be the same.')
+ }
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
+ }
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
+ }
+ }
+
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return { srcStat, destStat }
+}
+
+// recursively check if dest parent is a subdirectory of src.
+// It works for all file types including symlinks since it
+// checks the src and dest inodes. It starts from the deepest
+// parent and stops once it reaches the src parent or the root path.
+function checkParentPaths (src, srcStat, dest, funcName, cb) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
+ fs.stat(destParent, { bigint: true }, (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb()
+ return cb(err)
+ }
+ if (areIdentical(srcStat, destStat)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return checkParentPaths(src, srcStat, destParent, funcName, cb)
+ })
+}
+
+function checkParentPathsSync (src, srcStat, dest, funcName) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return
+ let destStat
+ try {
+ destStat = fs.statSync(destParent, { bigint: true })
+ } catch (err) {
+ if (err.code === 'ENOENT') return
+ throw err
+ }
+ if (areIdentical(srcStat, destStat)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return checkParentPathsSync(src, srcStat, destParent, funcName)
+}
+
+function areIdentical (srcStat, destStat) {
+ return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// It only checks the path strings.
+function isSrcSubdir (src, dest) {
+ const srcArr = path.resolve(src).split(path.sep).filter(i => i)
+ const destArr = path.resolve(dest).split(path.sep).filter(i => i)
+ return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
+}
+
+function errMsg (src, dest, funcName) {
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
+}
+
+module.exports = {
+ checkPaths,
+ checkPathsSync,
+ checkParentPaths,
+ checkParentPathsSync,
+ isSrcSubdir,
+ areIdentical
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/util/utimes.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/util/utimes.js
new file mode 100644
index 0000000..75395de
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/lib/util/utimes.js
@@ -0,0 +1,26 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function utimesMillis (path, atime, mtime, callback) {
+ // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
+ fs.open(path, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, atime, mtime, futimesErr => {
+ fs.close(fd, closeErr => {
+ if (callback) callback(futimesErr || closeErr)
+ })
+ })
+ })
+}
+
+function utimesMillisSync (path, atime, mtime) {
+ const fd = fs.openSync(path, 'r+')
+ fs.futimesSync(fd, atime, mtime)
+ return fs.closeSync(fd)
+}
+
+module.exports = {
+ utimesMillis,
+ utimesMillisSync
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/package.json b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/package.json
new file mode 100644
index 0000000..e8fafe7
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/fs-extra/package.json
@@ -0,0 +1,104 @@
+{
+ "_args": [
+ [
+ "fs-extra@10.0.0",
+ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1"
+ ]
+ ],
+ "_from": "fs-extra@10.0.0",
+ "_id": "fs-extra@10.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
+ "_location": "/@ohos/hvigor-ohos-plugin/fs-extra",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "fs-extra@10.0.0",
+ "name": "fs-extra",
+ "escapedName": "fs-extra",
+ "rawSpec": "10.0.0",
+ "saveSpec": null,
+ "fetchSpec": "10.0.0"
+ },
+ "_requiredBy": [
+ "/@ohos/hvigor-ohos-plugin"
+ ],
+ "_resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-10.0.0.tgz",
+ "_spec": "10.0.0",
+ "_where": "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1",
+ "author": {
+ "name": "JP Richardson",
+ "email": "jprichardson@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/jprichardson/node-fs-extra/issues"
+ },
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",
+ "devDependencies": {
+ "at-least-node": "^1.0.0",
+ "coveralls": "^3.0.0",
+ "klaw": "^2.1.1",
+ "klaw-sync": "^3.0.2",
+ "minimist": "^1.1.1",
+ "mocha": "^5.0.5",
+ "nyc": "^15.0.0",
+ "proxyquire": "^2.0.1",
+ "read-dir-files": "^0.1.1",
+ "standard": "^14.1.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "files": [
+ "lib/",
+ "!lib/**/__tests__/"
+ ],
+ "homepage": "https://github.com/jprichardson/node-fs-extra",
+ "keywords": [
+ "fs",
+ "file",
+ "file system",
+ "copy",
+ "directory",
+ "extra",
+ "mkdirp",
+ "mkdir",
+ "mkdirs",
+ "recursive",
+ "json",
+ "read",
+ "write",
+ "extra",
+ "delete",
+ "remove",
+ "touch",
+ "create",
+ "text",
+ "output",
+ "move",
+ "promise"
+ ],
+ "license": "MIT",
+ "main": "./lib/index.js",
+ "name": "fs-extra",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jprichardson/node-fs-extra.git"
+ },
+ "scripts": {
+ "coverage": "nyc -r lcovonly npm run unit",
+ "coveralls": "coveralls < coverage/lcov.info",
+ "full-ci": "npm run lint && npm run coverage",
+ "lint": "standard",
+ "test": "npm run lint && npm run unit",
+ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
+ "unit": "node test.js"
+ },
+ "version": "10.0.0"
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/.jshintignore b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/.jshintignore
new file mode 100644
index 0000000..a860310
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/.jshintignore
@@ -0,0 +1 @@
+node_modules/**
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/.npmignore b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/.npmignore
new file mode 100644
index 0000000..2422e20
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/.npmignore
@@ -0,0 +1,10 @@
+.DS_Store
+*.log
+node_modules
+build
+*.node
+components
+*.orig
+.idea
+test
+.travis.yml
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/LICENSE b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/LICENSE
new file mode 100644
index 0000000..3d20afd
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013 [Richardson & Sons, LLC](http://richardsonandsons.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/README.md b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/README.md
new file mode 100644
index 0000000..3719851
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/README.md
@@ -0,0 +1,57 @@
+[](https://travis-ci.org/robrich/pretty-hrtime)
+[](https://david-dm.org/robrich/pretty-hrtime)
+
+pretty-hrtime
+============
+
+[process.hrtime()](http://nodejs.org/api/process.html#process_process_hrtime) to words
+
+Usage
+-----
+
+```javascript
+var prettyHrtime = require('pretty-hrtime');
+
+var start = process.hrtime();
+// do stuff
+var end = process.hrtime(start);
+
+var words = prettyHrtime(end);
+console.log(words); // '1.2 ms'
+
+words = prettyHrtime(end, {verbose:true});
+console.log(words); // '1 millisecond 209 microseconds'
+
+words = prettyHrtime(end, {precise:true});
+console.log(words); // '1.20958 ms'
+```
+
+Note: process.hrtime() has been available since 0.7.6.
+See [http://nodejs.org/changelog.html](http://nodejs.org/changelog.html)
+and [https://github.com/joyent/node/commit/f06abd](https://github.com/joyent/node/commit/f06abd).
+
+LICENSE
+-------
+
+(MIT License)
+
+Copyright (c) 2013 [Richardson & Sons, LLC](http://richardsonandsons.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/index.js b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/index.js
new file mode 100644
index 0000000..5fff50a
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/index.js
@@ -0,0 +1,80 @@
+/*jshint node:true */
+
+"use strict";
+
+var minimalDesc = ['h', 'min', 's', 'ms', 'μs', 'ns'];
+var verboseDesc = ['hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond'];
+var convert = [60*60, 60, 1, 1e6, 1e3, 1];
+
+module.exports = function (source, opts) {
+ var verbose, precise, i, spot, sourceAtStep, valAtStep, decimals, strAtStep, results, totalSeconds;
+
+ verbose = false;
+ precise = false;
+ if (opts) {
+ verbose = opts.verbose || false;
+ precise = opts.precise || false;
+ }
+
+ if (!Array.isArray(source) || source.length !== 2) {
+ return '';
+ }
+ if (typeof source[0] !== 'number' || typeof source[1] !== 'number') {
+ return '';
+ }
+
+ // normalize source array due to changes in node v5.4+
+ if (source[1] < 0) {
+ totalSeconds = source[0] + source[1] / 1e9;
+ source[0] = parseInt(totalSeconds);
+ source[1] = parseFloat((totalSeconds % 1).toPrecision(9)) * 1e9;
+ }
+
+ results = '';
+
+ // foreach unit
+ for (i = 0; i < 6; i++) {
+ spot = i < 3 ? 0 : 1; // grabbing first or second spot in source array
+ sourceAtStep = source[spot];
+ if (i !== 3 && i !== 0) {
+ sourceAtStep = sourceAtStep % convert[i-1]; // trim off previous portions
+ }
+ if (i === 2) {
+ sourceAtStep += source[1]/1e9; // get partial seconds from other portion of the array
+ }
+ valAtStep = sourceAtStep / convert[i]; // val at this unit
+ if (valAtStep >= 1) {
+ if (verbose) {
+ valAtStep = Math.floor(valAtStep); // deal in whole units, subsequent laps will get the decimal portion
+ }
+ if (!precise) {
+ // don't fling too many decimals
+ decimals = valAtStep >= 10 ? 0 : 2;
+ strAtStep = valAtStep.toFixed(decimals);
+ } else {
+ strAtStep = valAtStep.toString();
+ }
+ if (strAtStep.indexOf('.') > -1 && strAtStep[strAtStep.length-1] === '0') {
+ strAtStep = strAtStep.replace(/\.?0+$/,''); // remove trailing zeros
+ }
+ if (results) {
+ results += ' '; // append space if we have a previous value
+ }
+ results += strAtStep; // append the value
+ // append units
+ if (verbose) {
+ results += ' '+verboseDesc[i];
+ if (strAtStep !== '1') {
+ results += 's';
+ }
+ } else {
+ results += ' '+minimalDesc[i];
+ }
+ if (!verbose) {
+ break; // verbose gets as many groups as necessary, the rest get only one
+ }
+ }
+ }
+
+ return results;
+};
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/package.json b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/package.json
new file mode 100644
index 0000000..363f181
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/node_modules/pretty-hrtime/package.json
@@ -0,0 +1,62 @@
+{
+ "_args": [
+ [
+ "pretty-hrtime@1.0.3",
+ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1"
+ ]
+ ],
+ "_from": "pretty-hrtime@1.0.3",
+ "_id": "pretty-hrtime@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
+ "_location": "/@ohos/hvigor-ohos-plugin/pretty-hrtime",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "pretty-hrtime@1.0.3",
+ "name": "pretty-hrtime",
+ "escapedName": "pretty-hrtime",
+ "rawSpec": "1.0.3",
+ "saveSpec": null,
+ "fetchSpec": "1.0.3"
+ },
+ "_requiredBy": [
+ "/@ohos/hvigor-ohos-plugin"
+ ],
+ "_resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
+ "_spec": "1.0.3",
+ "_where": "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1",
+ "author": {
+ "name": "Rob Richardson",
+ "url": "http://robrich.org/"
+ },
+ "bugs": {
+ "url": "https://github.com/robrich/pretty-hrtime/issues"
+ },
+ "description": "process.hrtime() to words",
+ "devDependencies": {
+ "jshint": "^2.9.4",
+ "mocha": "^3.1.2",
+ "should": "^11.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "homepage": "https://github.com/robrich/pretty-hrtime",
+ "keywords": [
+ "hrtime",
+ "benchmark"
+ ],
+ "license": "MIT",
+ "main": "./index.js",
+ "name": "pretty-hrtime",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/robrich/pretty-hrtime.git"
+ },
+ "scripts": {
+ "test": "mocha && jshint ."
+ },
+ "version": "1.0.3"
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/package.json b/node_modules/@ohos/hvigor-ohos-plugin/package.json
new file mode 100644
index 0000000..0bdadc1
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/package.json
@@ -0,0 +1,97 @@
+{
+ "_args": [
+ [
+ "@ohos/hvigor-ohos-plugin@1.0.6",
+ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1"
+ ]
+ ],
+ "_from": "@ohos/hvigor-ohos-plugin@1.0.6",
+ "_id": "@ohos/hvigor-ohos-plugin@1.0.6",
+ "_inBundle": false,
+ "_integrity": "sha512-MAAi8uJxMzODUoSSNfBr+fU4HQ20dfQtkje9I+X4asc7qY2kAplW/q9f5XS8IOvv8zhC8OcSgsAXOAJuLMstOQ==",
+ "_location": "/@ohos/hvigor-ohos-plugin",
+ "_phantomChildren": {
+ "graceful-fs": "4.2.10",
+ "jsonfile": "6.1.0",
+ "universalify": "2.0.0"
+ },
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@ohos/hvigor-ohos-plugin@1.0.6",
+ "name": "@ohos/hvigor-ohos-plugin",
+ "escapedName": "@ohos%2fhvigor-ohos-plugin",
+ "scope": "@ohos",
+ "rawSpec": "1.0.6",
+ "saveSpec": null,
+ "fetchSpec": "1.0.6"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-ohos-plugin/-/@ohos/hvigor-ohos-plugin-1.0.6.tgz",
+ "_spec": "1.0.6",
+ "_where": "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1",
+ "author": {
+ "name": "huawei"
+ },
+ "dependencies": {
+ "@ohos/hvigor-base": "1.0.6",
+ "@ohos/sdkmanager-common": "1.1.3",
+ "ajv": "8.10.0",
+ "archiver": "5.3.0",
+ "execa": "5.1.1",
+ "fs-extra": "10.0.0",
+ "glob": "7.2.0",
+ "iconv-lite": "0.6.3",
+ "json5": "2.2.0",
+ "lodash": "4.17.21",
+ "pretty-hrtime": "1.0.3",
+ "resolve-package-path": "4.0.3"
+ },
+ "description": "ohos package build plugin.",
+ "devDependencies": {
+ "@types/archiver": "^5.3.1",
+ "@types/fs-extra": "^9.0.13",
+ "@types/glob": "7.2.0",
+ "@types/js-yaml": "^4.0.5",
+ "@types/lodash": "^4.14.178",
+ "@types/node": "^16.11.10",
+ "@types/pretty-hrtime": "^1.0.0",
+ "@typescript-eslint/eslint-plugin": "5.10.2",
+ "@typescript-eslint/parser": "5.10.2",
+ "eslint": "^7.32.0",
+ "ts-node": "^10.4.0",
+ "typescript": "^4.5.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "engines": {
+ "node": ">14.14.0"
+ },
+ "keywords": [
+ "hvigor",
+ "OpenHarmony"
+ ],
+ "license": "SEE LICENSE IN LICENSE.txt",
+ "main": "./index.js",
+ "name": "@ohos/hvigor-ohos-plugin",
+ "ohos": {
+ "org": "huawei"
+ },
+ "scripts": {
+ "build": "tsc -p .",
+ "clean": "tsc --build --clean",
+ "patch-publish": "npm --no-git-tag-version version prepatch&&npm publish",
+ "prepare": "npm run build",
+ "rebuild": "npm run clean&&npm run build",
+ "test-json5": "ts-node test/src/module/test-read-file.ts",
+ "test-module-model": "ts-node test/src/module/test-module-model.ts",
+ "test-process": "ts-node test/process-utils-test.ts",
+ "test-xml": "ts-node test/xml-parser-test.js",
+ "watch": "tsc --watch"
+ },
+ "type": "commonjs",
+ "version": "1.0.6"
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/res/schemas/ohos-module-build-profile-schema.json b/node_modules/@ohos/hvigor-ohos-plugin/res/schemas/ohos-module-build-profile-schema.json
new file mode 100644
index 0000000..e61ffa2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/res/schemas/ohos-module-build-profile-schema.json
@@ -0,0 +1,137 @@
+{
+ "title": "openHarmony module-level build-profile configuration",
+ "description": "This document describes the configuration details of the openHarmony module-level configuration file build-profile.json5.",
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "apiType",
+ "targets",
+ "showInServiceCenter",
+ "buildOption",
+ "entryModules"
+ ]
+ },
+ "properties": {
+ "targets": {
+ "description": "Defines different target schemes customized for the module. Multiple target schemes can be included. By default, a default target exists.",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "name"
+ ]
+ },
+ "properties": {
+ "name": {
+ "description": "Define the target name",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ },
+ "minItems": 1
+ },
+ "showInServiceCenter": {
+ "description": "Indicates whether the module is displayed in the service center of the openHarmony system.",
+ "type": "boolean"
+ },
+ "buildOption": {
+ "description": "Configure the related configurations used by the module during the build process.",
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "resOptions",
+ "arkEnable",
+ "externalNativeOptions",
+ "sourceOption"
+ ]
+ },
+ "properties": {
+ "resOptions": {
+ "description": "Configurations related to resource compilation",
+ "type": "object"
+ },
+ "arkEnable": {
+ "description": "Indicates whether to enable Ark compilation.",
+ "type": "boolean"
+ },
+ "externalNativeOptions": {
+ "description": "Configurations related to native compilation.",
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "path",
+ "abiFilters",
+ "arguments",
+ "cppFlags"
+ ]
+ },
+ "properties": {
+ "path": {
+ "description": "Path of the CMakeLists.txt file (relative to the configuration file), for example, ./src/main/cpp/CMakeLists.txt.",
+ "type": "string"
+ },
+ "abiFilters": {
+ "description": "Defines the CPU architecture type of the system where the CPP application runs. Multiple CPU architecture types can be included, for example, Arm64-v8a.",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "arm64-v8a",
+ "armeabi-v7a"
+ ]
+ },
+ "minItems": 1
+ },
+ "arguments": {
+ "description": "Specifies cmake compilation parameters, for example, -v -DOHOS_STL=c++_static",
+ "type": "string"
+ },
+ "cppFlags": {
+ "description": "Specifies the settings related to CMAKE_CXX_FLAGS.",
+ "type": "string"
+ }
+ }
+ },
+ "sourceOption": {
+ "description": "Different tags are used to classify source codes so that different source codes can be processed differently during the build process.",
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "workers"
+ ]
+ },
+ "properties": {
+ "workers": {
+ "description":"Specifies the JS/TS source code that uses node.js worker, The source code is processed separately during the build process.",
+ "type": "array",
+ "items":{
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "entryModules": {
+ "description": "If the module is a feature module, this field needs to be used to specify the associated entry module.",
+ "type": "array",
+ "items": {
+ "description": "Associated entry module name",
+ "type": "string"
+ },
+ "minItems": 1
+ },
+ "apiType": {
+ "type": "string",
+ "description": "Ability API model type. The faMode and updated stageMode models can be configured.",
+ "enum": [
+ "faMode",
+ "stageMode"
+ ]
+ }
+ }
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/res/schemas/ohos-project-build-profile-schema.json b/node_modules/@ohos/hvigor-ohos-plugin/res/schemas/ohos-project-build-profile-schema.json
new file mode 100644
index 0000000..af14614
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/res/schemas/ohos-project-build-profile-schema.json
@@ -0,0 +1,200 @@
+{
+ "title": "openHarmony project-level build-profile configuration",
+ "description": "This document describes the configuration details of the openHarmony project-level configuration file build-profile.json5.",
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "app",
+ "modules"
+ ]
+ },
+ "properties": {
+ "app": {
+ "description": "OpenHarmony application project-level configuration information, which is shared by all FA/PA modules, including the compilation API level, signature, and product information.",
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "supportHarmonyOS",
+ "compileSdkVersion",
+ "compatibleSdkVersion",
+ "signingConfigs",
+ "products"
+ ]
+ },
+ "properties": {
+ "supportHarmonyOS": {
+ "description": "If this function is enabled, the compiled product of the openHarmony application can run on the HarmonyOS system. This function takes effect only on the openHarmony of API8.",
+ "type": "boolean"
+ },
+ "compileSdkVersion": {
+ "description": "Specifies the SDK API version when the OpenHarmony application is compiled. This value determines the value of apiTargetVersion in the HAP package.",
+ "type": "integer",
+ "exclusiveMinimum": 7
+ },
+ "compatibleSdkVersion": {
+ "description": "Specifies the lowest SDK API level version compatible with the OpenHarmony application during compilation. This value determines the value of apiCompatibleVersion in the HAP package.",
+ "type": "integer",
+ "exclusiveMinimum": 3
+ },
+ "signingConfigs": {
+ "description": "This field contains the signature materials used for modifying the openHarmony application. Multiple signature materials can be configured.",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "name",
+ "material"
+ ]
+ },
+ "properties": {
+ "material": {
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "storePassword",
+ "certpath",
+ "keyAlias",
+ "keyPassword",
+ "profile",
+ "signAlg",
+ "storeFile"
+ ]
+ },
+ "properties": {
+ "storePassword": {
+ "type": "string"
+ },
+ "certpath": {
+ "type": "string"
+ },
+ "keyAlias": {
+ "type": "string"
+ },
+ "keyPassword": {
+ "type": "string"
+ },
+ "profile": {
+ "type": "string"
+ },
+ "signAlg": {
+ "type": "string",
+ "enum": [
+ "SHA256withECDSA"
+ ]
+ },
+ "storeFile": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "storeFile",
+ "storePassword",
+ "keyAlias",
+ "keyPassword",
+ "signAlg",
+ "profile",
+ "certpath"
+ ]
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "material"
+ ]
+ }
+ },
+ "products": {
+ "description": "This field is used to describe different product types defined by the openHarmony application. By default, a default product exists and different signature materials can be specified.",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "name",
+ "signingConfig"
+ ]
+ },
+ "properties": {
+ "name": {
+ "description": "Defines the product type name of the openHarmony application. By default, there is a product named default.",
+ "type": "string"
+ },
+ "signingConfig": {
+ "description": "Specifies the signature material used by the product. The current signature material must be the material declared in app/signingConfigs. You can select the signature material based on its name.",
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "required": [
+ "compileSdkVersion",
+ "compatibleSdkVersion"
+ ]
+ },
+ "modules": {
+ "description": "Describes all modules in the openHarmony application. The module configuration includes the name, path, and target-product association configuration.",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "name",
+ "srcPath",
+ "targets"
+ ]
+ },
+ "properties": {
+ "srcPath": {
+ "description": "This section describes the source code path of the module. It is the relative path of the current configuration file. The path must contain configurations related to hvigorfile.js and package.json.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Logical name of a module. The value must be the same as that of moduleName in the config.json/module.json file.",
+ "type": "string"
+ },
+ "targets": {
+ "description": "Configure the association between the target of the module and the product of the application.",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "propertyNames": {
+ "enum": [
+ "name",
+ "applyToProducts"
+ ]
+ },
+ "properties": {
+ "name": {
+ "description": "Name of the module target. The target name must be in the target configuration in build-profile.json5 of the module-level.",
+ "type": "string"
+ },
+ "applyToProducts": {
+ "description": "Describes which products the target is used for, which means that different products can contain different targets.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1
+ }
+ }
+ }
+ }
+ },
+ "required": [
+ "srcPath",
+ "name"
+ ]
+ },
+ "minItems": 1
+ }
+ },
+ "required": [
+ "app",
+ "modules"
+ ]
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/res/template/data.temp b/node_modules/@ohos/hvigor-ohos-plugin/res/template/data.temp
new file mode 100644
index 0000000..31be2aa
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/res/template/data.temp
@@ -0,0 +1,95 @@
+package PACKAGE_NAME;
+
+import ohos.aafwk.ability.AceDataAbility;
+
+public class ABILITY_NAME extends AceDataAbility {
+
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ }
+
+ @Override
+ protected void onInitialized(AbilityInfo abilityInfo) {
+ setInstanceName("ABILITY_SRC_PATH");
+ super.onInitialized(abilityInfo);
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+ @Override
+ public Uri normalizeUri(Uri uri) {
+ super.normalizeUri(uri);
+ return null;
+ }
+
+ @Override
+ public Uri denormalizeUri(Uri uri) {
+ super.denormalizeUri(uri);
+ return null;
+ }
+
+ @Override
+ public String getType(Uri uri) {
+ super.getType(uri);
+ return null;
+ }
+
+ @Override
+ public String[] getFileTypes(Uri uri, String mimeTypeFilter) {
+ super.getFileTypes(uri, mimeTypeFilter);
+ return null;
+ }
+
+ @Override
+ public FileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
+ super.openFile(uri, mode);
+ return null;
+ }
+
+ @Override
+ public PacMap call(String method, String arg, PacMap extras) {
+ super.call(method, arg, extras);
+ return null;
+ }
+
+ @Override
+ public int delete(Uri uri, DataAbilityPredicates predicates) {
+ super.delete(uri, predicates);
+ return -1;
+ }
+
+ @Override
+ public int update(Uri uri, ValuesBucket value, DataAbilityPredicates predicates) {
+ super.update(uri, value, predicates);
+ return -1;
+ }
+
+ @Override
+ public int insert(Uri uri, ValuesBucket value) {
+ super.insert(uri, value);
+ return -1;
+ }
+
+ @Override
+ public int batchInsert(Uri uri, ValuesBucket[] values) {
+ super.batchInsert(uri, values);
+ return -1;
+ }
+
+ @Override
+ public ResultSet query(Uri uri, String[] columns, DataAbilityPredicates predicates) {
+ super.query(uri, columns, predicates);
+ return null;
+ }
+
+ @Override
+ public DataAbilityResult[] executeBatch(ArrayList operations)
+ throws OperationExecuteException {
+ super.executeBatch(operations);
+ return null;
+ }
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/res/template/page.temp b/node_modules/@ohos/hvigor-ohos-plugin/res/template/page.temp
new file mode 100644
index 0000000..146ee60
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/res/template/page.temp
@@ -0,0 +1,91 @@
+package PACKAGE_NAME;
+
+import ohos.aafwk.ability.AceAbility;
+
+public class ABILITY_NAME extends AceAbility {
+
+ @Override
+ public void onStart(Intent intent) {
+ setInstanceName("ABILITY_SRC_PATH");
+ super.onStart(intent);
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+
+ @Override
+ public void onBackground() {
+ super.onBackground();
+ }
+
+ @Override
+ @SystemApi
+ public void onWindowDisplayModeChanged(boolean isShownInMultiWindow, Configuration newConfig) {
+ super.onWindowDisplayModeChanged(isShownInMultiWindow, newConfig);
+ }
+
+ @Override
+ public boolean onStartContinuation() {
+ super.onStartContinuation();
+ return false;
+ }
+
+ @Override
+ public boolean onSaveData(IntentParams saveData) {
+ super.onSaveData(saveData);
+ return false;
+ }
+
+ @Override
+ public void onCompleteContinuation(int code) {
+ super.onCompleteContinuation(code);
+ }
+
+ @Override
+ public boolean onRestoreData(IntentParams restoreData) {
+ super.onRestoreData(restoreData);
+ return false;
+ }
+
+ @Override
+ public void onRemoteTerminated() {
+ super.onRemoteTerminated();
+ }
+
+ @Override
+ public void onSaveAbilityState(PacMap outState) {
+ super.onSaveAbilityState(outState);
+ }
+
+ @Override
+ public void onRestoreAbilityState(PacMap outState) {
+ super.onRestoreAbilityState(outState);
+ }
+
+ @Override
+ public void onInactive() {
+ super.onInactive();
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onNewIntent(Intent intent) {
+ super.onNewIntent(intent);
+ }
+
+ @Override
+ public void onMemoryLevel(int level) {
+ super.onMemoryLevel();
+ }
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/res/template/service.temp b/node_modules/@ohos/hvigor-ohos-plugin/res/template/service.temp
new file mode 100644
index 0000000..0b0ef61
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/res/template/service.temp
@@ -0,0 +1,38 @@
+package PACKAGE_NAME;
+
+import ohos.aafwk.ability.AceServiceAbility;
+
+public class ABILITY_NAME extends AceServiceAbility {
+
+ @Override
+ public void onStart(Intent intent) {
+ setInstanceName("ABILITY_SRC_PATH");
+ super.onStart(intent);
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+ @Override
+ protected void onCommand(Intent intent, boolean restart, int startId) {
+ super.onCommand(intent, restart, startId);
+ }
+
+ @Override
+ protected IRemoteObject onConnect(Intent intent) {
+ super.onConnect(intent);
+ return null;
+ }
+
+ @Override
+ protected void onDisconnect(Intent intent) {
+ super.onDisconnect(intent);
+ }
+
+ @Override
+ public void onReconnect(Intent intent) {
+ super.onReconnect(intent);
+ }
+}
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/aapt2-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/aapt2-command-builder.js
new file mode 100644
index 0000000..a73a7e4
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/aapt2-command-builder.js
@@ -0,0 +1,61 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Aapt2CommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+class Aapt2CommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor(executor) {
+ super([]);
+ this.commandList.push(executor);
+ }
+ compile() {
+ this.commandList.push('compile');
+ return this;
+ }
+ link() {
+ this.commandList.push('link');
+ return this;
+ }
+ showDetail() {
+ this.commandList.push('-v');
+ return this;
+ }
+ addDirectory(dir) {
+ this.commandList.push('--dir');
+ this.commandList.push(dir);
+ return this;
+ }
+ addOutputPath(outputPath) {
+ this.commandList.push('-o');
+ this.commandList.push(outputPath);
+ return this;
+ }
+ addApkPath(apkPath) {
+ this.commandList.push('-I');
+ this.commandList.push(apkPath);
+ return this;
+ }
+ addRFilePath(rFilePath) {
+ this.commandList.push('--java');
+ this.commandList.push(rFilePath);
+ return this;
+ }
+ addManifestPath(manifest) {
+ this.commandList.push('--manifest');
+ this.commandList.push(manifest);
+ return this;
+ }
+ addPackageId(packageId) {
+ this.commandList.push('--package-id');
+ this.commandList.push(packageId);
+ return this;
+ }
+ addIntermediates(intermediates) {
+ this.commandList.push(intermediates);
+ return this;
+ }
+}
+exports.Aapt2CommandBuilder = Aapt2CommandBuilder;
+//# sourceMappingURL=aapt2-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/base-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/base-command-builder.js
new file mode 100644
index 0000000..8adb1e1
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/base-command-builder.js
@@ -0,0 +1,26 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BaseCommandBuilder = void 0;
+class BaseCommandBuilder {
+ constructor(commandList) {
+ this._commandList = commandList;
+ }
+ build() {
+ return this._commandList;
+ }
+ addAllParams(params) {
+ this._commandList = [...this._commandList, ...params];
+ return this._commandList;
+ }
+ get commandList() {
+ return this._commandList;
+ }
+ set commandList(value) {
+ this._commandList = value;
+ }
+}
+exports.BaseCommandBuilder = BaseCommandBuilder;
+//# sourceMappingURL=base-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/idl-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/idl-command-builder.js
new file mode 100644
index 0000000..d23d5a5
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/idl-command-builder.js
@@ -0,0 +1,29 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.IdlCommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+class IdlCommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor(executor) {
+ super([]);
+ this.commandList.push(executor);
+ }
+ generateJava() {
+ this.commandList.push('-gen-java');
+ return this;
+ }
+ addOutputDir(output) {
+ this.commandList.push('-d');
+ this.commandList.push(output);
+ return this;
+ }
+ compileIdlFile(file) {
+ this.commandList.push('-c');
+ this.commandList.push(file);
+ return this;
+ }
+}
+exports.IdlCommandBuilder = IdlCommandBuilder;
+//# sourceMappingURL=idl-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/binary-tool-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/binary-tool-options.js
new file mode 100644
index 0000000..fb863e2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/binary-tool-options.js
@@ -0,0 +1,24 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BinaryToolOptions = void 0;
+const java_command_builder_js_1 = require("../java-command-builder.js");
+class BinaryToolOptions extends java_command_builder_js_1.JavaCommandBuilder {
+ constructor() {
+ super();
+ }
+ addProjectPath(projectPath) {
+ this.commandList.push('--project-path');
+ this.commandList.push(projectPath);
+ return this;
+ }
+ addBinPath(binPath) {
+ this.commandList.push('--bin-path');
+ this.commandList.push(binPath);
+ return this;
+ }
+}
+exports.BinaryToolOptions = BinaryToolOptions;
+//# sourceMappingURL=binary-tool-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/d8-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/d8-options.js
new file mode 100644
index 0000000..0373dfe
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/d8-options.js
@@ -0,0 +1,37 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.D8Options = void 0;
+const java_command_builder_js_1 = require("../java-command-builder.js");
+class D8Options extends java_command_builder_js_1.JavaCommandBuilder {
+ constructor() {
+ super();
+ }
+ addInputFiles(inputFile) {
+ this.commandList.push(inputFile);
+ return this;
+ }
+ addInputDir(inputDir) {
+ this.commandList.push(`@${inputDir}`);
+ return this;
+ }
+ addOutputDir(outputDir) {
+ this.commandList.push('--output');
+ this.commandList.push(outputDir);
+ return this;
+ }
+ addLib(lib) {
+ this.commandList.push('--lib');
+ this.commandList.push(lib);
+ return this;
+ }
+ addMinApi(api) {
+ this.commandList.push('--min-api');
+ this.commandList.push(api);
+ return this;
+ }
+}
+exports.D8Options = D8Options;
+//# sourceMappingURL=d8-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/data-binding-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/data-binding-options.js
new file mode 100644
index 0000000..ec3403c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/data-binding-options.js
@@ -0,0 +1,29 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DataBindingOptions = void 0;
+const java_command_builder_js_1 = require("../java-command-builder.js");
+class DataBindingOptions extends java_command_builder_js_1.JavaCommandBuilder {
+ constructor() {
+ super();
+ }
+ setOutputDir(outputDir) {
+ this.commandList.push('--target-src-path');
+ this.commandList.push(outputDir);
+ return this;
+ }
+ setModulePackageName(packageName) {
+ this.commandList.push('--package-name');
+ this.commandList.push(packageName);
+ return this;
+ }
+ addInputDir(inputDir) {
+ this.commandList.push('--layout-path');
+ this.commandList.push(inputDir);
+ return this;
+ }
+}
+exports.DataBindingOptions = DataBindingOptions;
+//# sourceMappingURL=data-binding-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/new-signing-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/new-signing-options.js
new file mode 100644
index 0000000..e9311be
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/new-signing-options.js
@@ -0,0 +1,70 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.NewSigningOptions = void 0;
+const java_command_builder_js_1 = require("../java-command-builder.js");
+/**
+ * 新签名工具hap-sign-tool的签名options
+ *
+ * @since 2022/03/01
+ */
+class NewSigningOptions extends java_command_builder_js_1.JavaCommandBuilder {
+ sign() {
+ this.commandList.push('sign-app');
+ return this;
+ }
+ addMode(mode) {
+ this.commandList.push('-mode');
+ this.commandList.push(mode);
+ return this;
+ }
+ addProfileFile(profile) {
+ this.commandList.push('-profileFile');
+ this.commandList.push(profile);
+ return this;
+ }
+ addSignAlg(signAlg) {
+ this.commandList.push('-signAlg');
+ this.commandList.push(signAlg);
+ return this;
+ }
+ addKeyAlias(privateKey) {
+ this.commandList.push('-keyAlias');
+ this.commandList.push(privateKey);
+ return this;
+ }
+ addKeyStoreFile(keyStoreFile) {
+ this.commandList.push('-keystoreFile');
+ this.commandList.push(keyStoreFile);
+ return this;
+ }
+ addKeyStorePwd(keyStorePwd) {
+ this.commandList.push('-keystorePwd');
+ this.commandList.push(keyStorePwd);
+ return this;
+ }
+ addKeyPwd(keyAliasPwd) {
+ this.commandList.push('-keyPwd');
+ this.commandList.push(keyAliasPwd);
+ return this;
+ }
+ addAppCertFile(certPath) {
+ this.commandList.push('-appCertFile');
+ this.commandList.push(certPath);
+ return this;
+ }
+ addInputFile(inputFile) {
+ this.commandList.push('-inFile');
+ this.commandList.push(inputFile);
+ return this;
+ }
+ addOutputFile(outputFile) {
+ this.commandList.push('-outFile');
+ this.commandList.push(outputFile);
+ return this;
+ }
+}
+exports.NewSigningOptions = NewSigningOptions;
+//# sourceMappingURL=new-signing-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/packing-tool-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/packing-tool-options.js
new file mode 100644
index 0000000..53ed81e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/packing-tool-options.js
@@ -0,0 +1,117 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PackingToolOptions = void 0;
+const java_command_builder_js_1 = require("../java-command-builder.js");
+class PackingToolOptions extends java_command_builder_js_1.JavaCommandBuilder {
+ addMode(mode) {
+ this.commandList.push('--mode');
+ this.commandList.push(mode);
+ return this;
+ }
+ addHapPath(hapPath) {
+ this.commandList.push('--hap-path');
+ this.commandList.push(hapPath);
+ return this;
+ }
+ addHarPath(harPath) {
+ this.commandList.push('--har-path');
+ this.commandList.push(harPath);
+ return this;
+ }
+ addPackInfoPath(packInfoPath) {
+ this.commandList.push('--pack-info-path');
+ this.commandList.push(packInfoPath);
+ return this;
+ }
+ addOutPath(outPath) {
+ this.commandList.push('--out-path');
+ this.commandList.push(outPath);
+ return this;
+ }
+ addFilePath(filePath) {
+ this.commandList.push('--file-path');
+ this.commandList.push(filePath);
+ return this;
+ }
+ addBinPath(binPath) {
+ this.commandList.push('--bin-path');
+ this.commandList.push(binPath);
+ return this;
+ }
+ addJsonPath(jsonPath) {
+ this.commandList.push('--json-path');
+ this.commandList.push(jsonPath);
+ return this;
+ }
+ addPackResPath(packResPath) {
+ if (packResPath === undefined) {
+ return this;
+ }
+ this.commandList.push('--pack-res-path');
+ this.commandList.push(packResPath);
+ return this;
+ }
+ addEntryCardPath(entryCardFile) {
+ if (entryCardFile === undefined) {
+ return this;
+ }
+ this.commandList.push('--entrycard-path');
+ this.commandList.push(entryCardFile);
+ return this;
+ }
+ addResourcesPath(resourcesPath) {
+ this.commandList.push('--resources-path');
+ this.commandList.push(resourcesPath);
+ return this;
+ }
+ addResourceTableTxtPath(txtPath) {
+ this.commandList.push('--txt-path');
+ this.commandList.push(txtPath);
+ return this;
+ }
+ addJsPath(jsPath) {
+ this.commandList.push('--js-path');
+ this.commandList.push(jsPath);
+ return this;
+ }
+ addEtsPath(etsPath) {
+ this.commandList.push('--ets-path');
+ this.commandList.push(etsPath);
+ return this;
+ }
+ addAssetsPath(assetPath) {
+ this.commandList.push('--assets-path');
+ this.commandList.push(assetPath);
+ return this;
+ }
+ addIndexPath(indexPath) {
+ this.commandList.push('--index-path');
+ this.commandList.push(indexPath);
+ return this;
+ }
+ addLibPath(libPath) {
+ this.commandList.push('--lib-path');
+ this.commandList.push(libPath);
+ return this;
+ }
+ addJarPath(jarPath) {
+ this.commandList.push('--jar-path');
+ this.commandList.push(jarPath);
+ return this;
+ }
+ addSysCapPath(sysCapPath) {
+ this.commandList.push('--rpcid-path');
+ this.commandList.push(sysCapPath);
+ return this;
+ }
+ force(force) {
+ this.commandList.push('--force');
+ this.commandList.push(force.toString());
+ return this;
+ }
+}
+exports.PackingToolOptions = PackingToolOptions;
+//# sourceMappingURL=packing-tool-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/proguard-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/proguard-options.js
new file mode 100644
index 0000000..1b492fe
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/proguard-options.js
@@ -0,0 +1,38 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProguardOptions = void 0;
+const java_command_builder_js_1 = require("../java-command-builder.js");
+class ProguardOptions extends java_command_builder_js_1.JavaCommandBuilder {
+ constructor() {
+ super();
+ }
+ inJars(path) {
+ this.commandList.push('-injars');
+ this.commandList.push(path);
+ return this;
+ }
+ outJars(path) {
+ this.commandList.push('-outjars');
+ this.commandList.push(path);
+ return this;
+ }
+ libraryJars(path) {
+ this.commandList.push('-libraryjars');
+ this.commandList.push(path);
+ return this;
+ }
+ filePath(path) {
+ this.commandList.push(`@${path}`);
+ return this;
+ }
+ dontnote(filter) {
+ this.commandList.push('-dontnote');
+ this.commandList.push(filter);
+ return this;
+ }
+}
+exports.ProguardOptions = ProguardOptions;
+//# sourceMappingURL=proguard-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/signing-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/signing-options.js
new file mode 100644
index 0000000..2ffad5a
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/inner-java-command-builder/signing-options.js
@@ -0,0 +1,99 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SigningOptions = void 0;
+const java_command_builder_js_1 = require("../java-command-builder.js");
+class SigningOptions extends java_command_builder_js_1.JavaCommandBuilder {
+ sign() {
+ this.commandList.push('sign');
+ return this;
+ }
+ addMode(mode) {
+ this.commandList.push('-mode');
+ this.commandList.push(mode);
+ return this;
+ }
+ addProfile(profile) {
+ this.commandList.push('-profile');
+ this.commandList.push(profile);
+ return this;
+ }
+ addSignAlg(signAlg) {
+ this.commandList.push('-signAlg');
+ this.commandList.push(signAlg);
+ return this;
+ }
+ addPrivateKey(privateKey) {
+ this.commandList.push('-privatekey');
+ this.commandList.push(privateKey);
+ return this;
+ }
+ profileSigned() {
+ this.commandList.push('-profileSigned');
+ this.commandList.push('1');
+ return this;
+ }
+ addKeyStore(keyStoreFile) {
+ this.commandList.push('-keystore');
+ this.commandList.push(keyStoreFile);
+ return this;
+ }
+ addKeyStorePwd(keyStorePwd) {
+ this.commandList.push('-keystorepasswd');
+ this.commandList.push(keyStorePwd);
+ return this;
+ }
+ addKeyAliasPwd(keyAliasPwd) {
+ this.commandList.push('-keyaliaspasswd');
+ this.commandList.push(keyAliasPwd);
+ return this;
+ }
+ addCertPath(certPath) {
+ this.commandList.push('-certpath');
+ this.commandList.push(certPath);
+ return this;
+ }
+ addKs(ks) {
+ this.commandList.push('--ks');
+ this.commandList.push(ks);
+ return this;
+ }
+ addKsPass(ksPass) {
+ this.commandList.push('--ks-pass');
+ this.commandList.push(ksPass);
+ return this;
+ }
+ addKsKeyAlias(ksKeyAlias) {
+ this.commandList.push('--ks-key-alias');
+ this.commandList.push(ksKeyAlias);
+ return this;
+ }
+ addKeyPass(keyPass) {
+ this.commandList.push('--key-pass');
+ this.commandList.push(keyPass);
+ return this;
+ }
+ addOut(out) {
+ this.commandList.push('--out');
+ this.commandList.push(out);
+ return this;
+ }
+ addInputFile(inputFile) {
+ this.commandList.push('-inputFile');
+ this.commandList.push(inputFile);
+ return this;
+ }
+ addOutputFile(outputFile) {
+ this.commandList.push('-outputFile');
+ this.commandList.push(outputFile);
+ return this;
+ }
+ add(param) {
+ this.commandList.push(param);
+ return this;
+ }
+}
+exports.SigningOptions = SigningOptions;
+//# sourceMappingURL=signing-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/jar-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/jar-command-builder.js
new file mode 100644
index 0000000..853ff8d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/jar-command-builder.js
@@ -0,0 +1,32 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.JarCommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+class JarCommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor() {
+ super([]);
+ this.commandList.push('jar');
+ }
+ addOptions(options) {
+ this.commandList.push(options);
+ return this;
+ }
+ addJarFile(jarFile) {
+ this.commandList.push(jarFile);
+ return this;
+ }
+ addFiles(files) {
+ this.commandList.push(files);
+ return this;
+ }
+ addSpecDir(dir) {
+ this.commandList.push('-C');
+ this.commandList.push(dir);
+ return this;
+ }
+}
+exports.JarCommandBuilder = JarCommandBuilder;
+//# sourceMappingURL=jar-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/java-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/java-command-builder.js
new file mode 100644
index 0000000..d039ebf
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/java-command-builder.js
@@ -0,0 +1,41 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.JavaCommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+class JavaCommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor(javaCommandBuilder) {
+ super([]);
+ javaCommandBuilder ? this.addAllParams(javaCommandBuilder.commandList) : this.commandList.push("java");
+ }
+ // index
+ addCalledJarFile(jarFile) {
+ if (1 === this.commandList.length) {
+ this.commandList.push('-jar');
+ this.commandList.push(jarFile);
+ }
+ else {
+ const java = this.commandList.slice(0, 1);
+ const rest = this.commandList.slice(1);
+ this.commandList = [...java, ...['-jar', jarFile], ...rest];
+ }
+ return this;
+ }
+ addJvmOption(jvmOption) {
+ this.commandList.push(jvmOption);
+ return this;
+ }
+ addClassPath(classpath) {
+ this.commandList.push('-classpath');
+ this.commandList.push(classpath);
+ return this;
+ }
+ addMainClass(mainClass) {
+ this.commandList.push(mainClass);
+ return this;
+ }
+}
+exports.JavaCommandBuilder = JavaCommandBuilder;
+//# sourceMappingURL=java-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/java-compile-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/java-compile-command-builder.js
new file mode 100644
index 0000000..3bd7d09
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/java-compile-command-builder.js
@@ -0,0 +1,58 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.JavaCompileCommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+class JavaCompileCommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor() {
+ super([]);
+ this.commandList.push("javac");
+ }
+ addEncoding(encoding) {
+ this.commandList.push('-encoding');
+ this.commandList.push(encoding);
+ return this;
+ }
+ addTarget(target) {
+ this.commandList.push('-target');
+ this.commandList.push(target);
+ return this;
+ }
+ addBootClasspath(bootClasspath) {
+ this.commandList.push('-bootclasspath');
+ this.commandList.push(bootClasspath);
+ return this;
+ }
+ addClasspath(classpath) {
+ this.commandList.push('-classpath');
+ this.commandList.push(classpath);
+ return this;
+ }
+ addDest(dest) {
+ this.commandList.push('-d');
+ this.commandList.push(dest);
+ return this;
+ }
+ addProcessor(processor) {
+ this.commandList.push('-processor');
+ this.commandList.push(processor);
+ return this;
+ }
+ addProcessorPath(processorPath) {
+ this.commandList.push('-processorpath');
+ this.commandList.push(processorPath);
+ return this;
+ }
+ addIndexFile(indexFile) {
+ this.commandList.push(`@${indexFile}`);
+ return this;
+ }
+ showDebugInfo() {
+ this.commandList.push('-g');
+ return this;
+ }
+}
+exports.JavaCompileCommandBuilder = JavaCompileCommandBuilder;
+//# sourceMappingURL=java-compile-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/native-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/native-command-builder.js
new file mode 100644
index 0000000..f46b3e3
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/native-command-builder.js
@@ -0,0 +1,83 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.NativeCommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+/**
+ * ohos native代码编译命令行构造类
+ *
+ * @since 2022/1/21
+ */
+class NativeCommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor(executor) {
+ super([]);
+ this.commandList.push(executor);
+ }
+ addCmakeList(cmakeList) {
+ this.commandList.push(`-H${cmakeList}`);
+ return this;
+ }
+ addTempFilePath(tempFilePath) {
+ this.commandList.push(`-B${tempFilePath}`);
+ return this;
+ }
+ addOhosArch(arch) {
+ this.commandList.push(`-DOHOS_ARCH=${arch}`);
+ return this;
+ }
+ addOutputDir(outputDir) {
+ this.commandList.push(`-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${outputDir}`);
+ return this;
+ }
+ addBuildType(buildType) {
+ this.commandList.push(`-DCMAKE_BUILD_TYPE=${buildType}`);
+ return this;
+ }
+ addNativeSdk(nativeSdk) {
+ this.commandList.push(`-DOHOS_SDK_NATIVE=${nativeSdk}`);
+ return this;
+ }
+ addSystemName(systemName) {
+ this.commandList.push(`-DCMAKE_SYSTEM_NAME=${systemName}`);
+ return this;
+ }
+ addOhosArchAbi(archAbi) {
+ this.commandList.push(`-DCMAKE_OHOS_ARCH_ABI=${archAbi}`);
+ return this;
+ }
+ exportCompileCommands(exportCommand) {
+ this.commandList.push(`-DCMAKE_EXPORT_COMPILE_COMMANDS=${exportCommand}`);
+ return this;
+ }
+ addToolChain(toolchain) {
+ this.commandList.push(`-DCMAKE_TOOLCHAIN_FILE=${toolchain}`);
+ return this;
+ }
+ addGenerator(generator) {
+ this.commandList.push("-G");
+ this.commandList.push(generator);
+ return this;
+ }
+ addMakeProgramPath(makeProgramPath) {
+ this.commandList.push(`-DCMAKE_MAKE_PROGRAM=${makeProgramPath}`);
+ return this;
+ }
+ addCFlags(cFlags) {
+ this.commandList.push(`-DCMAKE_C_FLAGS=${cFlags}`);
+ return this;
+ }
+ addCxxFlags(cppFlags) {
+ this.commandList.push(`-DCMAKE_CXX_FLAGS=${cppFlags}`);
+ return this;
+ }
+ changeToDir(dir) {
+ this.commandList.push('-C');
+ this.commandList.push(dir);
+ return this;
+ }
+}
+exports.NativeCommandBuilder = NativeCommandBuilder;
+//# sourceMappingURL=native-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/node-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/node-command-builder.js
new file mode 100644
index 0000000..7923b0c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/node-command-builder.js
@@ -0,0 +1,118 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.NodeCommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+const path_1 = __importDefault(require("path"));
+const system_util_js_1 = require("../utils/system-util.js");
+class NodeCommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor(nodePath, supportNewEnvArgs) {
+ super([]);
+ this._supportNewEnvArgs = supportNewEnvArgs ? supportNewEnvArgs : false;
+ this._envArgs = [];
+ const nodeName = (0, system_util_js_1.isWindows)() ? "node.exe" : "node";
+ this.commandList.push(path_1.default.join(nodePath, nodeName));
+ }
+ get supportNewEnvArgs() {
+ return this._supportNewEnvArgs;
+ }
+ set supportNewEnvArgs(value) {
+ this._supportNewEnvArgs = value;
+ }
+ get envArgs() {
+ return this._envArgs;
+ }
+ set envArgs(value) {
+ this._envArgs = value;
+ }
+ extendBuilder(nodeCommandBuilder) {
+ this.addAllParams(nodeCommandBuilder.commandList);
+ this._supportNewEnvArgs = nodeCommandBuilder.isEtsLoader();
+ this._envArgs = nodeCommandBuilder.getEnvArgs();
+ return this;
+ }
+ addWebpackPath(webpackPath) {
+ this.commandList.push(webpackPath);
+ return this;
+ }
+ addJsPath(jsPath) {
+ this.commandList.push(jsPath);
+ return this;
+ }
+ getTsVersion() {
+ this.commandList.push('--bc-version');
+ return this;
+ }
+ addWebpackConfig(config) {
+ this.commandList.push('--config');
+ this.commandList.push(config);
+ return this;
+ }
+ addTitle(title) {
+ this.commandList.push(`--title=${title}`);
+ return this;
+ }
+ addDeviceType(deviceTypeList) {
+ const deviceTypes = deviceTypeList.join(',');
+ if (this.supportNewEnvArgs) {
+ this.addEnvArgs('deviceType', deviceTypes);
+ }
+ else {
+ this.commandList.push('--deviceType');
+ this.commandList.push(deviceTypes);
+ }
+ return this;
+ }
+ addBuildMode(isDebug) {
+ const buildMode = isDebug ? "debug" : "release";
+ if (this.supportNewEnvArgs) {
+ this.addEnvArgs('buildMode', buildMode);
+ }
+ else {
+ this.commandList.push('--buildMode');
+ this.commandList.push(buildMode);
+ }
+ return this;
+ }
+ addCompilerType(compilerType) {
+ if (this.supportNewEnvArgs) {
+ this.addEnvArgs('compilerType', compilerType);
+ }
+ else {
+ this.commandList.push('--compilerType');
+ this.commandList.push(compilerType);
+ }
+ return this;
+ }
+ // Override
+ build() {
+ this.appendEnvArgs();
+ return super.build();
+ }
+ isEtsLoader() {
+ return this._supportNewEnvArgs;
+ }
+ getEnvArgs() {
+ return this._envArgs;
+ }
+ addEnvArgs(key, value) {
+ this._envArgs.push(`${key}=${value}`);
+ }
+ appendEnvArgs() {
+ if (!this.supportNewEnvArgs || this._envArgs.length === 0) {
+ return;
+ }
+ if (this.commandList.indexOf('--env') == -1) {
+ this.commandList.push('--env');
+ }
+ super.commandList = this.commandList.concat(this._envArgs);
+ this._envArgs = [];
+ }
+}
+exports.NodeCommandBuilder = NodeCommandBuilder;
+//# sourceMappingURL=node-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/npm-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/npm-command-builder.js
new file mode 100644
index 0000000..08ddc33
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/npm-command-builder.js
@@ -0,0 +1,36 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.NpmCommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+const path_1 = __importDefault(require("path"));
+const system_util_js_1 = require("../utils/system-util.js");
+class NpmCommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor(npmPath) {
+ super([]);
+ const npmTool = (0, system_util_js_1.isWindows)() ? 'npm.cmd' : 'npm';
+ const npm = npmPath ? path_1.default.join(npmPath, npmTool) : npmTool;
+ this.commandList.push(npm);
+ }
+ runScript(script) {
+ this.commandList.push('run');
+ this.commandList.push(script);
+ return this;
+ }
+ addScriptsOptions() {
+ this.commandList.push('--scripts-prepend-node-path');
+ this.commandList.push('true');
+ return this;
+ }
+ install() {
+ this.commandList.push('install');
+ return this;
+ }
+}
+exports.NpmCommandBuilder = NpmCommandBuilder;
+//# sourceMappingURL=npm-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/builder/restool-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/restool-command-builder.js
new file mode 100644
index 0000000..5d62272
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/builder/restool-command-builder.js
@@ -0,0 +1,67 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.RestoolCommandBuilder = void 0;
+const base_command_builder_js_1 = require("./base-command-builder.js");
+class RestoolCommandBuilder extends base_command_builder_js_1.BaseCommandBuilder {
+ constructor(executor) {
+ super([]);
+ this.commandList.push(executor);
+ }
+ addInputVariantDir(inputVariantDir) {
+ this.commandList.push('-b');
+ this.commandList.push(inputVariantDir);
+ return this;
+ }
+ addInputDir(inputDir) {
+ this.commandList.push('-i');
+ this.commandList.push(inputDir);
+ return this;
+ }
+ addJsonFile(jsonFile) {
+ this.commandList.push('-j');
+ this.commandList.push(jsonFile);
+ return this;
+ }
+ addModulePackName(packName) {
+ this.commandList.push('-p');
+ this.commandList.push(packName);
+ return this;
+ }
+ addOutputDir(outputDir) {
+ this.commandList.push('-o');
+ this.commandList.push(outputDir);
+ return this;
+ }
+ addResTable(resTable) {
+ this.commandList.push('-r');
+ this.commandList.push(resTable);
+ return this;
+ }
+ forceDelete() {
+ this.commandList.push('-f');
+ return this;
+ }
+ incremental() {
+ this.commandList.push('-c');
+ return this;
+ }
+ compressImage() {
+ this.commandList.push('-z');
+ return this;
+ }
+ addOutputBak(outputBak) {
+ this.commandList.push('-n');
+ this.commandList.push(outputBak);
+ return this;
+ }
+ addModules(modules) {
+ this.commandList.push('-m');
+ this.commandList.push(modules);
+ return this;
+ }
+}
+exports.RestoolCommandBuilder = RestoolCommandBuilder;
+//# sourceMappingURL=restool-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/common/find-target-product.js b/node_modules/@ohos/hvigor-ohos-plugin/src/common/find-target-product.js
new file mode 100644
index 0000000..523b895
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/common/find-target-product.js
@@ -0,0 +1,33 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.findTargetProduct = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const array_util_js_1 = require("../utils/array-util.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const _log = ohos_logger_js_1.OhosLogger.getLogger("find-target-product");
+/**
+ * 根据命令行中的配置找到根项目下的build-profile.json5中的Product
+ *
+ * @param projectModuleModel
+ */
+function findTargetProduct(projectModuleModel) {
+ const configProduct = hvigor_base_1.vigorConfigInst.getExtraConfig().get("product");
+ // 没有配置时默认是default
+ const targetProduct = configProduct ? configProduct : "default";
+ _log.debug(`Find product from build-profile.json: %s`, targetProduct);
+ // 检查app中是否有该product
+ const mProduct = (0, array_util_js_1.getElementFromArr)(projectModuleModel.getProfileOpt().app.products, targetProduct);
+ if (!mProduct) {
+ _log._buildError(`Can not find product ${targetProduct}, please check!`)
+ ._solution('Please check attribute products from build-profile.json5.')
+ ._file(projectModuleModel.getProfilePath())
+ ._printErrorAndExit(projectModuleModel.getName());
+ }
+ return mProduct;
+}
+exports.findTargetProduct = findTargetProduct;
+//# sourceMappingURL=find-target-product.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/common/iml/module-path-info-iml.js b/node_modules/@ohos/hvigor-ohos-plugin/src/common/iml/module-path-info-iml.js
new file mode 100644
index 0000000..07c28f7
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/common/iml/module-path-info-iml.js
@@ -0,0 +1,117 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ModulePathInfoIml = void 0;
+const path_1 = __importDefault(require("path"));
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const common_const_js_1 = require("../../const/common-const.js");
+class ModulePathInfoIml {
+ constructor(curModule, targetName, productName, buildRoot = build_directory_const_js_1.BuildDirConst.BUILD_ROOT) {
+ this._curModule = curModule;
+ this._targetName = targetName;
+ this._modulePath = curModule.getProjectDir();
+ this._productName = productName;
+ this._buildRoot = buildRoot;
+ }
+ getBuildRoot() {
+ return this._buildRoot;
+ }
+ getModuleBuildPath() {
+ return path_1.default.resolve(this._modulePath, this._buildRoot);
+ }
+ getModuleProductPath() {
+ return path_1.default.resolve(this.getModuleBuildPath(), this._productName);
+ }
+ getModuleBuildIntermediates() {
+ return path_1.default.resolve(this.getModuleProductPath(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES);
+ }
+ getModuleBuildGenerated() {
+ return path_1.default.resolve(this.getModuleProductPath(), build_directory_const_js_1.BuildDirConst.GENERATED);
+ }
+ getModuleBuildOutputPath() {
+ return path_1.default.resolve(this.getModuleProductPath(), build_directory_const_js_1.BuildDirConst.BUILD_OUTPUTS, this._targetName);
+ }
+ getIntermediatesMergeRes() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES_MERGE_RES, this._targetName);
+ }
+ getIntermediatesMergeFile() {
+ return path_1.default.resolve(this.getIntermediatesMergeRes(), build_directory_const_js_1.BuildArtifactConst.MERGE_RES_FILE_INDEX);
+ }
+ getIntermediatesMergeProfile() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES_MERGE_PROFILE, this._targetName, common_const_js_1.CommonConst.MODULE_JSON);
+ }
+ getIntermediatesMergeProfileDir() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES_MERGE_PROFILE, this._targetName);
+ }
+ getGenerateSourceR() {
+ return path_1.default.resolve(this.getModuleBuildGenerated(), build_directory_const_js_1.BuildDirConst.R, this._targetName);
+ }
+ getIntermediatesProcessProfile() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES_PROCESS_PROFILE, this._targetName, common_const_js_1.CommonConst.MODULE_JSON);
+ }
+ getIntermediatesProcessLegacyProfile() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES_PROCESS_PROFILE, this._targetName, common_const_js_1.CommonConst.CONFIG_JSON);
+ }
+ getIntermediatesRes() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES_RES, this._targetName);
+ }
+ getIntermediatesOriginalRes() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES_ORIGINAL_RES, this._targetName);
+ }
+ /**
+ * restool编译结果的产物profile的路径
+ * 其中resources,base,profile是固定的,是restool中的定义
+ *
+ * @return ../intermediates/res/{targetName}/res/base/profile
+ */
+ getIntermediatesResProfilePath() {
+ return path_1.default.resolve(this.getIntermediatesRes(), build_directory_const_js_1.BuildDirConst.RESTOOL_BUILD_RESOURCES, build_directory_const_js_1.BuildDirConst.BASE, build_directory_const_js_1.BuildDirConst.PROFILE);
+ }
+ getIntermediatesAssetsPath() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.JS_BUILD_ASSETS, this._targetName);
+ }
+ getIntermediatesLoaderPath() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.LOADER, this._targetName);
+ }
+ getModuleBuildCachePath() {
+ return path_1.default.resolve(this.getModuleProductPath(), build_directory_const_js_1.BuildDirConst.BUILD_CACHE, this._targetName);
+ }
+ getIntermediatesMergeLegacyProfile() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.INTERMEDIATES_MERGE_PROFILE, this._targetName, common_const_js_1.CommonConst.CONFIG_JSON);
+ }
+ getIntermediatesLegacyManifestJson() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.LEGACY_MANIFEST, this._targetName);
+ }
+ getIntermediatesPackInfoDir() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.LEGACY_MANIFEST, this._targetName);
+ }
+ getIntermediatesProcessLibs() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.LIBS, this._targetName);
+ }
+ getIntermediatesSysCap() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.SYSCAP, this._targetName);
+ }
+ getCppOutputDir() {
+ return path_1.default.resolve(this._modulePath, build_directory_const_js_1.BuildDirConst.CPP_OUTPUT);
+ }
+ getModuleShellDir() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.SHELL);
+ }
+ getShellResourceDir() {
+ return path_1.default.resolve(this.getModuleShellDir(), build_directory_const_js_1.BuildDirConst.SRC, build_directory_const_js_1.BuildDirConst.MAIN, build_directory_const_js_1.BuildDirConst.INTERMEDIATES_RES);
+ }
+ getShellBuildResourceDir() {
+ return path_1.default.resolve(this.getModuleShellDir(), build_directory_const_js_1.BuildDirConst.BUILD_ROOT, build_directory_const_js_1.BuildDirConst.INTERMEDIATES_RES);
+ }
+ getIntermediatesCppOutPut() {
+ return path_1.default.resolve(this.getModuleBuildIntermediates(), build_directory_const_js_1.BuildDirConst.CMAKE, this._targetName, build_directory_const_js_1.BuildDirConst.OBJ);
+ }
+}
+exports.ModulePathInfoIml = ModulePathInfoIml;
+//# sourceMappingURL=module-path-info-iml.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/common/iml/project-path-info-iml.js b/node_modules/@ohos/hvigor-ohos-plugin/src/common/iml/project-path-info-iml.js
new file mode 100644
index 0000000..7f2e1a8
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/common/iml/project-path-info-iml.js
@@ -0,0 +1,27 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProjectPathInfoIml = void 0;
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const path_1 = __importDefault(require("path"));
+class ProjectPathInfoIml {
+ constructor(projectModel, productName) {
+ this._projectModel = projectModel;
+ this._productName = productName;
+ this._projectPath = projectModel.getProjectDir();
+ }
+ getProjectBuildPath() {
+ return path_1.default.resolve(this._projectPath, build_directory_const_js_1.BuildDirConst.BUILD_ROOT);
+ }
+ getProjectOutputPath() {
+ return path_1.default.resolve(this.getProjectBuildPath(), build_directory_const_js_1.BuildDirConst.BUILD_OUTPUTS, this._productName);
+ }
+}
+exports.ProjectPathInfoIml = ProjectPathInfoIml;
+//# sourceMappingURL=project-path-info-iml.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/common/legacy-path-info.js b/node_modules/@ohos/hvigor-ohos-plugin/src/common/legacy-path-info.js
new file mode 100644
index 0000000..7dc30ff
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/common/legacy-path-info.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=legacy-path-info.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/common/path-info.js b/node_modules/@ohos/hvigor-ohos-plugin/src/common/path-info.js
new file mode 100644
index 0000000..8a3a1c9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/common/path-info.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=path-info.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/const/build-directory-const.js b/node_modules/@ohos/hvigor-ohos-plugin/src/const/build-directory-const.js
new file mode 100644
index 0000000..9d5eabc
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/const/build-directory-const.js
@@ -0,0 +1,56 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BuildArtifactExtension = exports.BuildArtifactConst = exports.BuildDirConst = void 0;
+class BuildDirConst {
+}
+exports.BuildDirConst = BuildDirConst;
+BuildDirConst.BUILD_ROOT = "build";
+BuildDirConst.INTERMEDIATES = "intermediates";
+BuildDirConst.GENERATED = "generated";
+BuildDirConst.BUILD_OUTPUTS = "outputs";
+BuildDirConst.INTERMEDIATES_ORIGINAL_RES = 'original_res';
+BuildDirConst.INTERMEDIATES_MERGE_RES = 'merge_res';
+BuildDirConst.INTERMEDIATES_MERGE_PROFILE = 'merge_profile';
+BuildDirConst.INTERMEDIATES_PROCESS_PROFILE = 'process_profile';
+BuildDirConst.LEGACY_MANIFEST = 'manifest';
+BuildDirConst.INTERMEDIATES_JS = "js";
+BuildDirConst.INTERMEDIATES_RES = 'res';
+BuildDirConst.RESTOOL_BUILD_RESOURCES = 'resources';
+BuildDirConst.JS_BUILD_ASSETS = "assets";
+BuildDirConst.LOADER = "loader";
+BuildDirConst.BUILD_CACHE = "cache";
+BuildDirConst.CPP_OUTPUT = '.cxx';
+BuildDirConst.LIBS = "libs";
+BuildDirConst.SHELL = 'shell';
+BuildDirConst.SRC = 'src';
+BuildDirConst.MAIN = 'main';
+BuildDirConst.SYSCAP = "syscap";
+BuildDirConst.BASE = 'base';
+BuildDirConst.PROFILE = 'profile';
+BuildDirConst.R = 'r';
+BuildDirConst.CMAKE = 'cmake';
+BuildDirConst.OBJ = 'obj';
+class BuildArtifactConst {
+}
+exports.BuildArtifactConst = BuildArtifactConst;
+BuildArtifactConst.CONFIG_JSON = "config.json";
+BuildArtifactConst.RESOURCE_INDEX = "resources.index";
+BuildArtifactConst.MERGE_RES_FILE_INDEX = 'merge_res_file.index';
+BuildArtifactConst.MERGE_NPM_FILE_JSON = "merge_npm_res_file.json";
+BuildArtifactConst.RESOURCE_TABLE_H = 'ResourceTable.h';
+BuildArtifactConst.RESOURCE_TABLE_JAVA = "ResourceTable.java";
+BuildArtifactConst.RESOURCE_TABLE_TXT = 'ResourceTable.txt';
+BuildArtifactConst.LEGACY_MANIFEST_JSON = 'manifest.json';
+BuildArtifactConst.PACK_INFO = 'pack.info';
+BuildArtifactConst.RELEASE_MAP = "_releaseMap";
+BuildArtifactConst.LOADER_JSON = "loader.json";
+class BuildArtifactExtension {
+}
+exports.BuildArtifactExtension = BuildArtifactExtension;
+BuildArtifactExtension.DOT_HAP = ".hap";
+BuildArtifactExtension.DOT_APP = ".app";
+//# sourceMappingURL=build-directory-const.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/const/common-const.js b/node_modules/@ohos/hvigor-ohos-plugin/src/const/common-const.js
new file mode 100644
index 0000000..e701332
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/const/common-const.js
@@ -0,0 +1,48 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DefaultTargetConst = exports.CommonNodeConst = exports.CommonConst = void 0;
+/**
+ * 工程中的常用变量
+ *
+ * @since 2021/12/29
+ */
+class CommonConst {
+}
+exports.CommonConst = CommonConst;
+CommonConst.BUILD_FILE_NAME = 'hvigorfile.js';
+CommonConst.PACKAGE_JSON = 'package.json';
+CommonConst.LOCAL_PROPERTIES = 'local.properties';
+CommonConst.PROFILE_JSON5 = 'build-profile.json5';
+CommonConst.MODULE_JSON = "module.json";
+CommonConst.APP_SCHEMA_JSON = "app.json";
+CommonConst.MODULE_JSON5 = "module.json5";
+CommonConst.CONFIG_JSON = "config.json";
+CommonConst.APP_CONFIG = 'app.json5';
+CommonConst.ETS_WEBPACK_FILE = 'webpack.config.js';
+CommonConst.ACE_RICH_WEBPACK_FILE = 'webpack.rich.config.js';
+CommonConst.DEBUGGABLE = 'debuggable';
+CommonConst.RPCID_JSON = "rpcid.json";
+CommonConst.RPCID_SC = "rpcid.sc";
+CommonConst.SYSCAP_JSON = "syscap.json";
+/**
+ * Node环境中的常量
+ */
+class CommonNodeConst {
+}
+exports.CommonNodeConst = CommonNodeConst;
+CommonNodeConst.NODE_EXE = "node.exe";
+CommonNodeConst.NODE = "node";
+CommonNodeConst.NODE_MODULES = "node_modules";
+/**
+ * module默认包含的target
+ */
+class DefaultTargetConst {
+}
+exports.DefaultTargetConst = DefaultTargetConst;
+DefaultTargetConst.DEFAULT_TARGET = "default";
+DefaultTargetConst.OHOS_TEST_TARGET = "ohosTest";
+//# sourceMappingURL=common-const.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/const/inject-const.js b/node_modules/@ohos/hvigor-ohos-plugin/src/const/inject-const.js
new file mode 100644
index 0000000..d538cec
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/const/inject-const.js
@@ -0,0 +1,13 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InjectConst = void 0;
+class InjectConst {
+}
+exports.InjectConst = InjectConst;
+InjectConst.PREVIEWER_REPLACE_PAGE = "previewer.replace.page";
+InjectConst.PREVIEWER_REPLACE_SRC_PATH = "previewer.replace.srcPath";
+//# sourceMappingURL=inject-const.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/const/property-const.js b/node_modules/@ohos/hvigor-ohos-plugin/src/const/property-const.js
new file mode 100644
index 0000000..71619b8
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/const/property-const.js
@@ -0,0 +1,14 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PropertyConst = void 0;
+class PropertyConst {
+}
+exports.PropertyConst = PropertyConst;
+PropertyConst.NODE_JS_DIR = 'nodejs.dir';
+PropertyConst.NPM_DIR = 'npm.dir';
+PropertyConst.SDK_DIR = 'sdk.dir';
+//# sourceMappingURL=property-const.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/const/sdk-const.js b/node_modules/@ohos/hvigor-ohos-plugin/src/const/sdk-const.js
new file mode 100644
index 0000000..c3781b4
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/const/sdk-const.js
@@ -0,0 +1,22 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ToolChainsConst = void 0;
+/**
+ * Sdk中的工具的常用变量
+ *
+ * @since 2021/12/29
+ */
+class ToolChainsConst {
+}
+exports.ToolChainsConst = ToolChainsConst;
+ToolChainsConst.SIGN_TOOL = "hapsigntoolv2.jar";
+ToolChainsConst.NEW_SIGN_TOOL = "hap-sign-tool.jar";
+ToolChainsConst.APP_PACKING_TOOL_JAR = "app_packing_tool.jar";
+ToolChainsConst.HMOS_APP_PACKING_TOOL_JAR = "hmos_app_packing_tool.jar";
+ToolChainsConst.SHELL_MIN_SDK_VERSION = 26;
+ToolChainsConst.SHELL_TARGET_SDK_VERSION = 29;
+//# sourceMappingURL=sdk-const.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/enum/ability-type-enum.js b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/ability-type-enum.js
new file mode 100644
index 0000000..fa932e6
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/ability-type-enum.js
@@ -0,0 +1,30 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AbilityTypeEnum = void 0;
+var AbilityTypeEnum;
+(function (AbilityTypeEnum) {
+ AbilityTypeEnum["PAGE"] = "page";
+ AbilityTypeEnum["DATA"] = "data";
+ AbilityTypeEnum["SERVICE"] = "service";
+ AbilityTypeEnum["FORM"] = "form";
+})(AbilityTypeEnum = exports.AbilityTypeEnum || (exports.AbilityTypeEnum = {}));
+(function (AbilityTypeEnum) {
+ function valueOf(abilityObj) {
+ if (abilityObj.type === 'page') {
+ return AbilityTypeEnum.PAGE;
+ }
+ if (abilityObj.type === 'data') {
+ return AbilityTypeEnum.DATA;
+ }
+ if (abilityObj.formsEnabled) {
+ return AbilityTypeEnum.FORM;
+ }
+ return AbilityTypeEnum.SERVICE;
+ }
+ AbilityTypeEnum.valueOf = valueOf;
+})(AbilityTypeEnum = exports.AbilityTypeEnum || (exports.AbilityTypeEnum = {}));
+//# sourceMappingURL=ability-type-enum.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/enum/build-compiler-type-enum.js b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/build-compiler-type-enum.js
new file mode 100644
index 0000000..31f9674
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/build-compiler-type-enum.js
@@ -0,0 +1,18 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BuildCompilerType = void 0;
+/**
+ * 编译的类型
+ *
+ * @since 2022/1/20
+ */
+var BuildCompilerType;
+(function (BuildCompilerType) {
+ BuildCompilerType["NORMAL"] = "normal";
+ BuildCompilerType["ARK"] = "ark";
+})(BuildCompilerType = exports.BuildCompilerType || (exports.BuildCompilerType = {}));
+//# sourceMappingURL=build-compiler-type-enum.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/enum/code-type-enum.js b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/code-type-enum.js
new file mode 100644
index 0000000..605461c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/code-type-enum.js
@@ -0,0 +1,45 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CodeType = void 0;
+/**
+ * 支持的源码类型
+ *
+ * @since 2022/2/25
+ */
+const sdkmanager_common_1 = require("@ohos/sdkmanager-common");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const _log = ohos_logger_js_1.OhosLogger.getLogger("CodeType");
+var CodeType;
+(function (CodeType) {
+ CodeType["JS"] = "js";
+ CodeType["ETS"] = "ets";
+ CodeType["CPP"] = "cpp";
+})(CodeType = exports.CodeType || (exports.CodeType = {}));
+/**
+ * 为枚举类附加特定方法
+ *
+ * @since 2022/1/26
+ */
+(function (CodeType) {
+ function getSDKComponentName(codeType) {
+ switch (codeType) {
+ case CodeType.CPP.toLowerCase():
+ return sdkmanager_common_1.ComponentPath.NATIVE;
+ case CodeType.ETS.toLowerCase():
+ return sdkmanager_common_1.ComponentPath.ETS;
+ case CodeType.JS.toLowerCase():
+ return sdkmanager_common_1.ComponentPath.JS;
+ default:
+ _log._buildError(`This type ${codeType} of source code is not supported!`)
+ ._solution(`Value should be one of: "js", "ets", "cpp"`)
+ ._printErrorAndExit();
+ return "";
+ }
+ }
+ CodeType.getSDKComponentName = getSDKComponentName;
+})(CodeType = exports.CodeType || (exports.CodeType = {}));
+//# sourceMappingURL=code-type-enum.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/enum/cpu-abi-enum.js b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/cpu-abi-enum.js
new file mode 100644
index 0000000..1e72530
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/cpu-abi-enum.js
@@ -0,0 +1,43 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CpuAbiEnum = void 0;
+/**
+ * 定义c++支持的cpu架构
+ *
+ * @since 2022/2/25
+ */
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const _log = ohos_logger_js_1.OhosLogger.getLogger("CpuAbiEnum");
+var CpuAbiEnum;
+(function (CpuAbiEnum) {
+ CpuAbiEnum["ARM64_V8A"] = "aarch64-linux-ohos";
+ CpuAbiEnum["ARMEABI_V7A"] = "arm-linux-ohos";
+ CpuAbiEnum["X86_64"] = "x86_64-linux-ohos";
+})(CpuAbiEnum = exports.CpuAbiEnum || (exports.CpuAbiEnum = {}));
+/**
+ * 为CpuAbiEnum枚举类型附加方法
+ *
+ * @since 2022/2/25
+ */
+(function (CpuAbiEnum) {
+ CpuAbiEnum.getCpuType = (type) => {
+ switch (type) {
+ case 'arm64-v8a':
+ return CpuAbiEnum.ARM64_V8A;
+ case 'armeabi-v7a':
+ return CpuAbiEnum.ARMEABI_V7A;
+ case 'x86_64':
+ return CpuAbiEnum.X86_64;
+ default:
+ _log._buildError(`Unknown abiFilter ${type}`)
+ ._solution(`Value should be one of: 'arm64-v8a', 'armeabi-v7a', 'x86_64'`)
+ ._printErrorAndExit();
+ return CpuAbiEnum.ARM64_V8A;
+ }
+ };
+})(CpuAbiEnum = exports.CpuAbiEnum || (exports.CpuAbiEnum = {}));
+//# sourceMappingURL=cpu-abi-enum.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/enum/device-type-enum.js b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/device-type-enum.js
new file mode 100644
index 0000000..10114d2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/device-type-enum.js
@@ -0,0 +1,47 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DeviceType = void 0;
+/**
+ * config.json中设备类型的枚举
+ *
+ * @since 2022/2/25
+ */
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const _log = ohos_logger_js_1.OhosLogger.getLogger("DeviceType");
+var DeviceType;
+(function (DeviceType) {
+ DeviceType[DeviceType["PHONE"] = 0] = "PHONE";
+ DeviceType[DeviceType["TV"] = 1] = "TV";
+ DeviceType[DeviceType["TABLET"] = 2] = "TABLET";
+ DeviceType[DeviceType["CAR"] = 3] = "CAR";
+})(DeviceType = exports.DeviceType || (exports.DeviceType = {}));
+/**
+ * 为枚举类型DeviceType附加方法
+ *
+ * @since 2022/2/25
+ */
+(function (DeviceType) {
+ function valueOf(deviceTypeStr) {
+ switch (deviceTypeStr) {
+ case "phone":
+ return DeviceType.PHONE;
+ case "tv":
+ return DeviceType.TV;
+ case "tablet":
+ return DeviceType.TABLET;
+ case "car":
+ return DeviceType.CAR;
+ default:
+ _log._buildError(`DeviceType: ${deviceTypeStr} is an invalid value. Please check it.`)
+ ._solution(`Value should be one of: "phone", "tv", "tablet", "car"`)
+ ._printErrorAndExit();
+ return DeviceType.PHONE;
+ }
+ }
+ DeviceType.valueOf = valueOf;
+})(DeviceType = exports.DeviceType || (exports.DeviceType = {}));
+//# sourceMappingURL=device-type-enum.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/enum/merge-type-rule.js b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/merge-type-rule.js
new file mode 100644
index 0000000..eaf8be0
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/merge-type-rule.js
@@ -0,0 +1,108 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.IsNeedMergeRule = exports.UniqueKeyEqualsName = exports.IsMapFields = exports.HasPlaceholderOptions = exports.NeedDisposePlaceholder = exports.KeepOneOfThem = exports.KeepAbilityMergeList = exports.KeepModuleAttr = exports.KeepHapOptions = void 0;
+/**
+ * 只保留hap中配置的options
+ */
+var KeepHapOptions;
+(function (KeepHapOptions) {
+ KeepHapOptions["APP_OPTIONS"] = "app";
+ KeepHapOptions["ARK_OPTIONS"] = "ark";
+ KeepHapOptions["NETWORK_OPTIONS"] = "network";
+ KeepHapOptions["DISTRO_OPTIONS"] = "distro";
+})(KeepHapOptions = exports.KeepHapOptions || (exports.KeepHapOptions = {}));
+/**
+ * 只保留hap中配置的module中的属性
+ */
+var KeepModuleAttr;
+(function (KeepModuleAttr) {
+ KeepModuleAttr["PACKAGE"] = "package";
+ KeepModuleAttr["NAME"] = "name";
+ KeepModuleAttr["DESCRIPTION"] = "description";
+ KeepModuleAttr["DEVICE_TYPE"] = "deviceType";
+ KeepModuleAttr["SUPPORTED_MODES"] = "supportModes";
+ KeepModuleAttr["SHORTCUTS"] = "shortcuts";
+ KeepModuleAttr["DISTRO"] = "distro";
+})(KeepModuleAttr = exports.KeepModuleAttr || (exports.KeepModuleAttr = {}));
+/**
+ * ability中需要合并取合集的List属性
+ */
+var KeepAbilityMergeList;
+(function (KeepAbilityMergeList) {
+ KeepAbilityMergeList["PERMISSION"] = "permissions";
+ KeepAbilityMergeList["BACKGROUND_MODES"] = "backgroundModes";
+ KeepAbilityMergeList["CONFIG_CHANGES"] = "configChanges";
+ KeepAbilityMergeList["META_DATA"] = "metaData";
+})(KeepAbilityMergeList = exports.KeepAbilityMergeList || (exports.KeepAbilityMergeList = {}));
+/**
+ * 当hap和har同时有该属性时,使用hap的属性
+ * 当hap和har只有一个有该属性时,使用非空的属性
+ */
+var KeepOneOfThem;
+(function (KeepOneOfThem) {
+ KeepOneOfThem["ALLOW_COMPONENTS_PROXY"] = "allowComponentsProxy";
+ KeepOneOfThem["ALLOW_CLASS_MAP"] = "allowClassMap";
+})(KeepOneOfThem = exports.KeepOneOfThem || (exports.KeepOneOfThem = {}));
+/**
+ * 需要处理${bundleName}占位符的标签
+ */
+var NeedDisposePlaceholder;
+(function (NeedDisposePlaceholder) {
+ NeedDisposePlaceholder["PERMISSIONS"] = "permissions";
+ NeedDisposePlaceholder["READ_PERMISSIONS"] = "readPermission";
+ NeedDisposePlaceholder["WRITE_PERMISSIONS"] = "writePermission";
+ NeedDisposePlaceholder["NAME"] = "name";
+ NeedDisposePlaceholder["URI"] = "uri";
+})(NeedDisposePlaceholder = exports.NeedDisposePlaceholder || (exports.NeedDisposePlaceholder = {}));
+/**
+ * 需要处理${bundleName}占位符的标签
+ */
+var HasPlaceholderOptions;
+(function (HasPlaceholderOptions) {
+ HasPlaceholderOptions["ABILITIES"] = "abilities";
+ HasPlaceholderOptions["DEF_PERMISSIONS"] = "defPermissions";
+ HasPlaceholderOptions["DEF_PERMISSION_GROUPS"] = "defPermissionGroups";
+})(HasPlaceholderOptions = exports.HasPlaceholderOptions || (exports.HasPlaceholderOptions = {}));
+/**
+ * 遵循map类合并规则的标签
+ */
+var IsMapFields;
+(function (IsMapFields) {
+ IsMapFields["MERGE_RULE"] = "mergeRule";
+ IsMapFields["DEVICE_CONFIG"] = "deviceConfig";
+})(IsMapFields = exports.IsMapFields || (exports.IsMapFields = {}));
+/**
+ * uniqueKey为name的options list
+ */
+var UniqueKeyEqualsName;
+(function (UniqueKeyEqualsName) {
+ UniqueKeyEqualsName["DOMAINS"] = "domains";
+ UniqueKeyEqualsName["PARAMETERS"] = "parameters";
+ UniqueKeyEqualsName["RESULTS"] = "results";
+ UniqueKeyEqualsName["CUSTOMIZE_DATA"] = "customizeData";
+ UniqueKeyEqualsName["COMMON_EVENTS"] = "commonEvents";
+ UniqueKeyEqualsName["JS"] = "js";
+ UniqueKeyEqualsName["REQ_PERMISSIONS"] = "reqPermissions";
+ UniqueKeyEqualsName["DEF_PERMISSIONS"] = "defPermissions";
+ UniqueKeyEqualsName["DEF_PERMISSION_GROUPS"] = "defPermissionGroups";
+})(UniqueKeyEqualsName = exports.UniqueKeyEqualsName || (exports.UniqueKeyEqualsName = {}));
+/**
+ * 需要mergeRule的标签
+ */
+var IsNeedMergeRule;
+(function (IsNeedMergeRule) {
+ IsNeedMergeRule["ABILITIES"] = "abilities";
+ IsNeedMergeRule["COMMON_EVENTS"] = "commonEvents";
+ IsNeedMergeRule["DEF_PERMISSIONS"] = "defPermissions";
+ IsNeedMergeRule["DEF_PERMISSION_GROUPS"] = "defPermissionGroups";
+ IsNeedMergeRule["JS"] = "js";
+ IsNeedMergeRule["REQ_PERMISSIONS"] = "reqPermissions";
+ IsNeedMergeRule["CUSTOMIZE_DATA"] = "customizeData";
+ IsNeedMergeRule["PARAMETERS"] = "parameters";
+ IsNeedMergeRule["RESULTS"] = "results";
+})(IsNeedMergeRule = exports.IsNeedMergeRule || (exports.IsNeedMergeRule = {}));
+//# sourceMappingURL=merge-type-rule.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/enum/module-type-enum.js b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/module-type-enum.js
new file mode 100644
index 0000000..d36c240
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/enum/module-type-enum.js
@@ -0,0 +1,45 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ModuleType = void 0;
+/**
+ * config.json中module type
+ *
+ * @since 2022/2/25
+ */
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const _log = ohos_logger_js_1.OhosLogger.getLogger('ModuleType');
+var ModuleType;
+(function (ModuleType) {
+ ModuleType["Entry"] = "entry";
+ ModuleType["Feature"] = "feature";
+ ModuleType["Har"] = "har";
+})(ModuleType = exports.ModuleType || (exports.ModuleType = {}));
+/**
+ * 为枚举类型ModuleType附加方法
+ *
+ * @since 2022/2/25
+ */
+(function (ModuleType) {
+ function valueOf(moduleTypeStr) {
+ switch (moduleTypeStr) {
+ case "entry":
+ return ModuleType.Entry;
+ case "feature":
+ return ModuleType.Feature;
+ case "har":
+ return ModuleType.Har;
+ default:
+ _log._buildError(`moduleType: ${moduleTypeStr} is an invalid value.`)
+ ._solution(`Value should be one of: "entry", "feature", "har"`)
+ ._printErrorAndExit();
+ // avoid ts-ignore
+ return ModuleType.Entry;
+ }
+ }
+ ModuleType.valueOf = valueOf;
+})(ModuleType = exports.ModuleType || (exports.ModuleType = {}));
+//# sourceMappingURL=module-type-enum.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-ability-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-ability-model-impl.js
new file mode 100644
index 0000000..4821243
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-ability-model-impl.js
@@ -0,0 +1,72 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyAbilityModelImpl = void 0;
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+const ability_type_enum_js_1 = require("../../enum/ability-type-enum.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * Fa模型中的ability数据模型
+ *
+ * @since 2022/1/19
+ */
+class LegacyAbilityModelImpl {
+ constructor(configJson, abilityName) {
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(LegacyAbilityModelImpl.name);
+ this._configObj = project_file_reader_js_1.ProjectFileReader.getJson5Obj(configJson);
+ this._configFile = configJson;
+ this._abilityName = abilityName;
+ this._abilityObj = this.findAbilityByName();
+ this._jsObj = this.findJsByName();
+ }
+ findJsByName() {
+ if (!this._abilityObj || !this.hasJsObj()) {
+ return undefined;
+ }
+ const jsObjs = this._configObj.module.js;
+ for (let i = 0; i < jsObjs.length; i++) {
+ if (jsObjs[i].name !== this._abilityName) {
+ continue;
+ }
+ return jsObjs[i];
+ }
+ this._log._buildError(`Missing js tag for ability: ${this._abilityName}`)
+ ._file(this._configFile)
+ ._printErrorAndExit();
+ return undefined;
+ }
+ hasJsObj() {
+ // page需要有对应js页面
+ return this.getType() === ability_type_enum_js_1.AbilityTypeEnum.PAGE;
+ }
+ findAbilityByName() {
+ const abilityObjs = this._configObj.module.abilities;
+ for (let i = 0; i < abilityObjs.length; i++) {
+ if (abilityObjs[i].name !== this._abilityName) {
+ continue;
+ }
+ return abilityObjs[i];
+ }
+ throw new Error(`在config.json module-ability中找不到${this._abilityName}`);
+ }
+ getRelateSrcPath() {
+ return this._abilityObj.srcPath;
+ }
+ getName() {
+ return this._abilityName;
+ }
+ getSrcLanguage() {
+ return this._abilityObj.srcLanguage;
+ }
+ getType() {
+ return ability_type_enum_js_1.AbilityTypeEnum.valueOf(this._abilityObj);
+ }
+ getConfigJsonJsObj() {
+ return this._jsObj;
+ }
+}
+exports.LegacyAbilityModelImpl = LegacyAbilityModelImpl;
+//# sourceMappingURL=legacy-ability-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-ability-model.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-ability-model.js
new file mode 100644
index 0000000..6c1983d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-ability-model.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=legacy-ability-model.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-form-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-form-model-impl.js
new file mode 100644
index 0000000..c76b870
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/ability/legacy-form-model-impl.js
@@ -0,0 +1,40 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyFormModelImpl = void 0;
+const code_type_enum_js_1 = require("../../enum/code-type-enum.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+const ability_type_enum_js_1 = require("../../enum/ability-type-enum.js");
+/**
+ * Fa模型中的form数据模型
+ *
+ * @since 2022/3/08
+ */
+class LegacyFormModelImpl {
+ constructor(configJson, jsObj) {
+ this._configObj = project_file_reader_js_1.ProjectFileReader.getJson5Obj(configJson);
+ this._jsObj = jsObj;
+ this._jsName = jsObj.name;
+ }
+ getRelateSrcPath() {
+ return this.getName();
+ }
+ getName() {
+ return this._jsName;
+ }
+ getSrcLanguage() {
+ return code_type_enum_js_1.CodeType.JS;
+ }
+ getType() {
+ // require page
+ return ability_type_enum_js_1.AbilityTypeEnum.PAGE;
+ }
+ getConfigJsonJsObj() {
+ return this._jsObj;
+ }
+}
+exports.LegacyFormModelImpl = LegacyFormModelImpl;
+//# sourceMappingURL=legacy-form-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/code-source/code-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/code-source/code-model-impl.js
new file mode 100644
index 0000000..e64d5e1
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/code-source/code-model-impl.js
@@ -0,0 +1,26 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CodeModelImpl = void 0;
+/**
+ * 源码集合模型
+ *
+ * @since 2022/2/23
+ */
+class CodeModelImpl {
+ constructor(srcPath, codeType) {
+ this._codeType = codeType;
+ this._srcPath = srcPath;
+ }
+ getSrcPath() {
+ return this._srcPath;
+ }
+ getCodeType() {
+ return this._codeType;
+ }
+}
+exports.CodeModelImpl = CodeModelImpl;
+//# sourceMappingURL=code-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/code-source/code-model.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/code-source/code-model.js
new file mode 100644
index 0000000..d6b9aea
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/code-source/code-model.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=code-model.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/model.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/model.js
new file mode 100644
index 0000000..6b7e1a6
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/model.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=model.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/core-module-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/core-module-model-impl.js
new file mode 100644
index 0000000..e5d64e9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/core-module-model-impl.js
@@ -0,0 +1,114 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CoreModuleModelImpl = void 0;
+const common_const_js_1 = require("../../const/common-const.js");
+const path_1 = __importDefault(require("path"));
+const module_type_enum_js_1 = require("../../enum/module-type-enum.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+const fs = __importStar(require("fs-extra"));
+const validate_util_js_1 = require("../../utils/validate-util.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * hvigor 工程的module模块的数据管理对象
+ *
+ * @since 2022/2/23
+ */
+class CoreModuleModelImpl {
+ constructor(modulePath, moduleName, parentProject) {
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(CoreModuleModelImpl.name);
+ this.targetSourceSetMap = new Map();
+ this.name = moduleName;
+ this.modulePath = path_1.default.resolve(modulePath);
+ this.parentProject = parentProject;
+ this.buildProfilePath = path_1.default.resolve(this.modulePath, this.getBuildProfileName());
+ // module build-profile.json5 schema check
+ const moduleBuildProfilePath = path_1.default.resolve(this.modulePath, common_const_js_1.CommonConst.PROFILE_JSON5);
+ this.moduleBuildProfileCheck(moduleBuildProfilePath);
+ this._sourceRootDir = path_1.default.resolve(modulePath, "src");
+ }
+ getSourceRootByTargetName(targetName = common_const_js_1.DefaultTargetConst.DEFAULT_TARGET) {
+ if (this.targetSourceSetMap.has(targetName)) {
+ return this.targetSourceSetMap.get(targetName).getSourceSetRoot();
+ }
+ return this.targetSourceSetMap.get(common_const_js_1.DefaultTargetConst.DEFAULT_TARGET).getSourceSetRoot();
+ }
+ getBuildProfileName() {
+ return common_const_js_1.CommonConst.BUILD_FILE_NAME;
+ }
+ getName() {
+ return this.name;
+ }
+ getProjectDir() {
+ return this.modulePath;
+ }
+ getParentProject() {
+ return this.parentProject;
+ }
+ getPackageJsonPath() {
+ return path_1.default.resolve(this.modulePath, common_const_js_1.CommonConst.PACKAGE_JSON);
+ }
+ getProfilePath() {
+ return path_1.default.resolve(this.modulePath, common_const_js_1.CommonConst.PROFILE_JSON5);
+ }
+ getProfileOpt() {
+ return project_file_reader_js_1.ProjectFileReader.getJson5Obj(this.getProfilePath());
+ }
+ isArkModule() {
+ var _a;
+ const arkEnable = (_a = this.getProfileOpt().buildOption) === null || _a === void 0 ? void 0 : _a.arkEnable;
+ return arkEnable === undefined ? true : arkEnable;
+ }
+ isHapModule() {
+ return this.getModuleType() !== module_type_enum_js_1.ModuleType.Har;
+ }
+ isHarModule() {
+ return this.getModuleType() === module_type_enum_js_1.ModuleType.Har;
+ }
+ getCompileApiVersion() {
+ return this.getParentProject().getProfileOpt().app.compileSdkVersion;
+ }
+ getCompatibleApiVersion() {
+ return this.getParentProject().getProfileOpt().app.compatibleSdkVersion;
+ }
+ moduleBuildProfileCheck(moduleProfilePath) {
+ const moduleSchema = require('../../../res/schemas/ohos-module-build-profile-schema.json');
+ if (!fs.existsSync(moduleProfilePath)) {
+ this._log._buildError(`Can not find build config file build-profile.json5.`)
+ ._file(moduleProfilePath)
+ ._printErrorAndExit(this.name);
+ }
+ validate_util_js_1.ValidateUtil.doSchemaCheck(this.name, moduleProfilePath, moduleSchema);
+ }
+}
+exports.CoreModuleModelImpl = CoreModuleModelImpl;
+//# sourceMappingURL=core-module-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/legacy-module-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/legacy-module-model-impl.js
new file mode 100644
index 0000000..f654bdc
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/legacy-module-model-impl.js
@@ -0,0 +1,111 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyModuleModelImpl = void 0;
+const legacy_target_source_set_impl_js_1 = require("../source-set/legacy-target-source-set-impl.js");
+const legacy_ability_model_impl_js_1 = require("../ability/legacy-ability-model-impl.js");
+const module_type_enum_js_1 = require("../../enum/module-type-enum.js");
+const path_1 = __importDefault(require("path"));
+const core_module_model_impl_js_1 = require("./core-module-model-impl.js");
+const fs_1 = __importDefault(require("fs"));
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+const legacy_form_model_impl_js_1 = require("../ability/legacy-form-model-impl.js");
+const common_const_js_1 = require("../../const/common-const.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const defaultTargetName = common_const_js_1.DefaultTargetConst.DEFAULT_TARGET;
+const ohosTestTargetName = common_const_js_1.DefaultTargetConst.OHOS_TEST_TARGET;
+/**
+ * Fa模型的模块持久化数据模型,包含模块源码数据,配置数据等
+ *
+ * @since 2022/1/20
+ */
+class LegacyModuleModelImpl extends core_module_model_impl_js_1.CoreModuleModelImpl {
+ constructor(modulePath, moduleName, parentProject) {
+ super(modulePath, moduleName, parentProject);
+ this._legacyAbilitiesMap = new Map();
+ this.initDefaultTargetSourceSet();
+ }
+ static validateSameNameAbility(abilityModels) {
+ const abilityNameSet = new Set();
+ const _log = ohos_logger_js_1.OhosLogger.getLogger('Ability');
+ let isError = false;
+ for (let i = 0; i < abilityModels.length; i++) {
+ const abilityModelName = abilityModels[i].getName();
+ if (abilityNameSet.has(abilityModelName)) {
+ _log.error(`The duplicate ability name: ${abilityModelName}`);
+ isError = true;
+ }
+ else {
+ abilityNameSet.add(abilityModelName);
+ }
+ }
+ if (isError) {
+ _log.errorMessageExit('The ability name must be different.');
+ }
+ }
+ initDefaultTargetSourceSet() {
+ // 初始化创建default的target sourceSet
+ const defaultTargetSourceSet = new legacy_target_source_set_impl_js_1.LegacyTargetSourceSetImpl(path_1.default.resolve(this._sourceRootDir, "main"));
+ this.targetSourceSetMap.set(defaultTargetName, defaultTargetSourceSet);
+ this.initAbilityInfo(defaultTargetName, defaultTargetSourceSet);
+ const ohosTestTargetSourceSet = new legacy_target_source_set_impl_js_1.LegacyTargetSourceSetImpl(path_1.default.resolve(this._sourceRootDir, "ohosTest"));
+ this.targetSourceSetMap.set(ohosTestTargetName, ohosTestTargetSourceSet);
+ this.initAbilityInfo(ohosTestTargetName, ohosTestTargetSourceSet);
+ }
+ /**
+ * 获取需要进行编译的ability信息
+ */
+ getLegacyAbilities(targetName = defaultTargetName) {
+ const abilities = this._legacyAbilitiesMap.get(targetName);
+ return abilities === undefined ? this._legacyAbilitiesMap.get("default") : abilities;
+ }
+ getModuleType() {
+ const legacySourceSet = this.getSourceSetByTargetName();
+ const moduleTypeStr = legacySourceSet.getLegacyModuleTargetRes()
+ .getConfigJsonOpt()
+ .module
+ .distro
+ .moduleType;
+ return module_type_enum_js_1.ModuleType.valueOf(moduleTypeStr);
+ }
+ getSourceSetByTargetName(targetName = defaultTargetName) {
+ if (this.targetSourceSetMap.has(targetName)) {
+ return this.targetSourceSetMap.get(targetName);
+ }
+ return this.targetSourceSetMap.get(defaultTargetName);
+ }
+ getJsonObjByTargetName(targetName) {
+ return this.getSourceSetByTargetName(targetName).getLegacyModuleTargetRes().getConfigJsonOpt();
+ }
+ initAbilityInfo(targetName, targetSourceSet) {
+ const configJsonPath = targetSourceSet.getLegacyModuleTargetRes().getJsonPath();
+ if (!fs_1.default.existsSync(configJsonPath)) {
+ return;
+ }
+ const configJsonObj = project_file_reader_js_1.ProjectFileReader.getJson5Obj(configJsonPath);
+ const abilityObjs = configJsonObj.module.abilities ?
+ configJsonObj.module.abilities : [];
+ const legacyAbilities = [];
+ for (let i = 0; i < abilityObjs.length; i++) {
+ legacyAbilities.push(new legacy_ability_model_impl_js_1.LegacyAbilityModelImpl(configJsonPath, abilityObjs[i].name));
+ }
+ LegacyModuleModelImpl.validateSameNameAbility(legacyAbilities);
+ // api 8 form
+ const jsObjs = configJsonObj.module.js ? configJsonObj.module.js : [];
+ for (let i = 0; i < jsObjs.length; i++) {
+ if ('form' !== jsObjs[i].type) {
+ continue;
+ }
+ legacyAbilities.push(new legacy_form_model_impl_js_1.LegacyFormModelImpl(configJsonPath, jsObjs[i]));
+ }
+ this._legacyAbilitiesMap.set(targetName, legacyAbilities);
+ }
+}
+exports.LegacyModuleModelImpl = LegacyModuleModelImpl;
+//# sourceMappingURL=legacy-module-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/module-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/module-model-impl.js
new file mode 100644
index 0000000..b7ce905
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/module-model-impl.js
@@ -0,0 +1,50 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ModuleModelImpl = void 0;
+const target_source_set_impl_js_1 = require("../source-set/target-source-set-impl.js");
+const path_1 = __importDefault(require("path"));
+const module_type_enum_js_1 = require("../../enum/module-type-enum.js");
+const core_module_model_impl_js_1 = require("./core-module-model-impl.js");
+const common_const_js_1 = require("../../const/common-const.js");
+const defaultTargetName = common_const_js_1.DefaultTargetConst.DEFAULT_TARGET;
+/**
+ * hvigor 工程的module模块的数据管理对象
+ *
+ * @since 2022/2/23
+ */
+class ModuleModelImpl extends core_module_model_impl_js_1.CoreModuleModelImpl {
+ constructor(modulePath, moduleName, parentProject) {
+ super(modulePath, moduleName, parentProject);
+ this.initDefaultTargetSourceSet();
+ }
+ initDefaultTargetSourceSet() {
+ // 初始化创建default的target sourceSet
+ const defaultTargetSourceSet = new target_source_set_impl_js_1.TargetSourceSetImpl(path_1.default.resolve(this._sourceRootDir, "main"));
+ this.targetSourceSetMap.set(defaultTargetName, defaultTargetSourceSet);
+ const ohosTestTargetSourceSet = new target_source_set_impl_js_1.TargetSourceSetImpl(path_1.default.resolve(this._sourceRootDir, "ohosTest"));
+ this.targetSourceSetMap.set(common_const_js_1.DefaultTargetConst.OHOS_TEST_TARGET, ohosTestTargetSourceSet);
+ }
+ getModuleType() {
+ const targetSourceSetImpl = this.getSourceSetByTargetName();
+ const moduleTypeStr = targetSourceSetImpl.getModuleTargetRes().getModuleJsonOpt().module.type;
+ return module_type_enum_js_1.ModuleType.valueOf(moduleTypeStr);
+ }
+ getSourceSetByTargetName(targetName = defaultTargetName) {
+ if (this.targetSourceSetMap.has(targetName)) {
+ return this.targetSourceSetMap.get(targetName);
+ }
+ return this.targetSourceSetMap.get(defaultTargetName);
+ }
+ getJsonObjByTargetName(targetName) {
+ return this.getSourceSetByTargetName(targetName).getModuleTargetRes().getModuleJsonOpt();
+ }
+}
+exports.ModuleModelImpl = ModuleModelImpl;
+//# sourceMappingURL=module-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/module-model.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/module-model.js
new file mode 100644
index 0000000..9393456
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/module/module-model.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=module-model.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/core-project-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/core-project-model-impl.js
new file mode 100644
index 0000000..5eb0c4f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/core-project-model-impl.js
@@ -0,0 +1,150 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CoreProjectModelImpl = void 0;
+const common_const_js_1 = require("../../const/common-const.js");
+const path_1 = __importDefault(require("path"));
+const module_model_impl_js_1 = require("../module/module-model-impl.js");
+const array_util_js_1 = require("../../utils/array-util.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+const fs = __importStar(require("fs-extra"));
+const validate_util_js_1 = require("../../utils/validate-util.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * Stage模型的工程持久化数据模型,包含工程源码数据,配置数据等
+ *
+ * @since 2022/1/20
+ */
+class CoreProjectModelImpl {
+ constructor(projectPath, name) {
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(CoreProjectModelImpl.name);
+ this.subModels = new Map();
+ this.projectPath = projectPath;
+ this.name = name;
+ this._profilePath = path_1.default.resolve(this.projectPath, common_const_js_1.CommonConst.PROFILE_JSON5);
+ // project build-profile.json5 schema check
+ this.projectBuildProfileCheck(this._profilePath);
+ this._profileOptions = project_file_reader_js_1.ProjectFileReader.getJson5Obj(this.getProfilePath());
+ this.projectStatusCheck();
+ this.initSubProject();
+ }
+ projectStatusCheck() {
+ const compileApiVersion = this.getCompileApiVersion();
+ const compatibleApiVersion = this.getCompatibleApiVersion();
+ if (compileApiVersion < 8) {
+ this._log._buildError("Only api8 and later are supported for hvigor!")
+ ._solution(`Please change compileApiVersion:'${compileApiVersion}'.`)
+ ._file(this.projectPath)
+ ._printErrorAndExit(this.name);
+ }
+ if (compatibleApiVersion > compileApiVersion) {
+ this._log._buildError("CompatibleApiVersion can not be larger than compileApiVersion!")
+ ._solution(`Please change compileApiVersion:'${compileApiVersion}'.`)
+ ._file(this.projectPath)
+ ._printErrorAndExit(this.name);
+ }
+ }
+ initSubProject() {
+ const modules = this.getProfileOpt().modules;
+ for (let i = 0; i < modules.length; i++) {
+ const modelPath = path_1.default.resolve(this.projectPath, modules[i].srcPath);
+ const newModel = new module_model_impl_js_1.ModuleModelImpl(modelPath, modules[i].name, this);
+ this.subModels.set(modules[i].name, newModel);
+ }
+ }
+ getBuildProfileName() {
+ return common_const_js_1.CommonConst.BUILD_FILE_NAME;
+ }
+ getName() {
+ return this.name;
+ }
+ getPackageJsonPath() {
+ return path_1.default.resolve(this.projectPath, common_const_js_1.CommonConst.PACKAGE_JSON);
+ }
+ getProfilePath() {
+ return this._profilePath;
+ }
+ getProjectDir() {
+ return this.projectPath;
+ }
+ getProfileOpt() {
+ return this._profileOptions;
+ }
+ getSubProjects() {
+ return this.subModels;
+ }
+ getModuleModelByName(moduleName) {
+ return this.subModels.get(moduleName);
+ }
+ getCompileApiVersion() {
+ return this.getProfileOpt().app.compileSdkVersion;
+ }
+ getCompatibleApiVersion() {
+ return this.getProfileOpt().app.compatibleSdkVersion;
+ }
+ /**
+ * 获取根项目下build-profile.json5中的applyToProduct配置
+ *
+ * @param moduleName
+ * @param targetName
+ */
+ getTargetApplyProducts(moduleName, targetName) {
+ const module = (0, array_util_js_1.getElementFromArr)(this._profileOptions.modules, moduleName);
+ if (module === undefined) {
+ return undefined;
+ }
+ const target = (0, array_util_js_1.getElementFromArr)(module.targets, targetName);
+ if (target === undefined) {
+ return undefined;
+ }
+ return target.applyToProducts;
+ }
+ /**
+ * 根据moduleName获取build-profile.json5中的module配置
+ *
+ * @param moduleName
+ */
+ getModuleProfileOpt(moduleName) {
+ return (0, array_util_js_1.getElementFromArr)(this._profileOptions.modules, moduleName);
+ }
+ projectBuildProfileCheck(projectBuildProfilePath) {
+ const projectSchema = require('../../../res/schemas/ohos-project-build-profile-schema.json');
+ if (!fs.existsSync(projectBuildProfilePath)) {
+ this._log._buildError(`Can not find build config file build-profile.json5.`)
+ ._file(projectBuildProfilePath)
+ ._printErrorAndExit(this.name);
+ }
+ validate_util_js_1.ValidateUtil.doSchemaCheck(this.name, projectBuildProfilePath, projectSchema);
+ }
+}
+exports.CoreProjectModelImpl = CoreProjectModelImpl;
+//# sourceMappingURL=core-project-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/legacy-project-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/legacy-project-model-impl.js
new file mode 100644
index 0000000..df45aa1
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/legacy-project-model-impl.js
@@ -0,0 +1,50 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyProjectModelImpl = void 0;
+const module_type_enum_js_1 = require("../../enum/module-type-enum.js");
+const core_project_model_impl_js_1 = require("./core-project-model-impl.js");
+class LegacyProjectModelImpl extends core_project_model_impl_js_1.CoreProjectModelImpl {
+ constructor(projectPath, name) {
+ super(projectPath, name);
+ }
+ static getInstance(projectPath, name) {
+ if (!LegacyProjectModelImpl.instance) {
+ if (projectPath === null || projectPath === undefined) {
+ throw new Error("工程模型还未初始化,请正确传递工程路径");
+ }
+ if (name === null || name === undefined) {
+ throw new Error("工程模型还未初始化,请正确传递工程名称");
+ }
+ LegacyProjectModelImpl.instance = new LegacyProjectModelImpl(projectPath, name);
+ }
+ return LegacyProjectModelImpl.instance;
+ }
+ getDefaultBundleName() {
+ let defaultBundleName = "";
+ try {
+ this.subModels.forEach((value, key, map) => {
+ if (value.isHapModule() && value.getModuleType() === module_type_enum_js_1.ModuleType.Entry) {
+ const legacyModuleModel = value;
+ defaultBundleName = legacyModuleModel
+ .getSourceSetByTargetName()
+ .getLegacyModuleTargetRes()
+ .getConfigJsonOpt()
+ .app
+ .bundleName;
+ // end for each loop
+ throw new Error("End loop.");
+ }
+ });
+ }
+ catch (e) {
+ // do nothing
+ }
+ return defaultBundleName;
+ }
+}
+exports.LegacyProjectModelImpl = LegacyProjectModelImpl;
+//# sourceMappingURL=legacy-project-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/project-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/project-model-impl.js
new file mode 100644
index 0000000..bf38fb9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/project-model-impl.js
@@ -0,0 +1,47 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProjectModelImpl = void 0;
+const app_res_model_impl_js_1 = require("../res/app-res-model-impl.js");
+const path_1 = __importDefault(require("path"));
+const core_project_model_impl_js_1 = require("./core-project-model-impl.js");
+/**
+ * Stage模型的工程持久化数据模型,包含工程源码数据,配置数据等
+ *
+ * @since 2022/1/20
+ */
+class ProjectModelImpl extends core_project_model_impl_js_1.CoreProjectModelImpl {
+ constructor(projectPath, name) {
+ super(projectPath, name);
+ this.appRes = new app_res_model_impl_js_1.AppResModelImpl(path_1.default.resolve(projectPath, "AppScope"));
+ }
+ static getInstance(projectPath, name) {
+ if (!ProjectModelImpl.instance) {
+ if (projectPath === null || projectPath === undefined) {
+ throw new Error("工程模型还未初始化,请正确传递工程路径");
+ }
+ if (name === null || name === undefined) {
+ throw new Error("工程模型还未初始化,请正确传递工程名称");
+ }
+ ProjectModelImpl.instance = new ProjectModelImpl(projectPath, name);
+ }
+ return ProjectModelImpl.instance;
+ }
+ /**
+ * 获取该工程默认的bundleName值,即AppScope中配置的值
+ */
+ getDefaultBundleName() {
+ return this.appRes.getAppResOpt().app.bundleName;
+ }
+ getAppRes() {
+ return this.appRes;
+ }
+}
+exports.ProjectModelImpl = ProjectModelImpl;
+//# sourceMappingURL=project-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/project-model.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/project-model.js
new file mode 100644
index 0000000..0bc7781
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/project/project-model.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=project-model.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/app-res-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/app-res-model-impl.js
new file mode 100644
index 0000000..0699e64
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/app-res-model-impl.js
@@ -0,0 +1,29 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AppResModelImpl = void 0;
+const path_1 = __importDefault(require("path"));
+const common_const_js_1 = require("../../const/common-const.js");
+const core_res_model_impl_js_1 = require("./core-res-model-impl.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+/**
+ * Stage模型的App级别的资源
+ *
+ * @since 2022/2/23
+ */
+class AppResModelImpl extends core_res_model_impl_js_1.CoreResModelImpl {
+ constructor(sourceSetRoot) {
+ super(path_1.default.resolve(sourceSetRoot, common_const_js_1.CommonConst.APP_CONFIG), path_1.default.resolve(sourceSetRoot, "resources"));
+ }
+ getAppResOpt() {
+ return project_file_reader_js_1.ProjectFileReader.getJson5Obj(this.getJsonPath(), 'utf-8');
+ }
+}
+exports.AppResModelImpl = AppResModelImpl;
+//# sourceMappingURL=app-res-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/core-res-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/core-res-model-impl.js
new file mode 100644
index 0000000..607a500
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/core-res-model-impl.js
@@ -0,0 +1,33 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CoreResModelImpl = void 0;
+const fs_1 = __importDefault(require("fs"));
+/**
+ * 不同target对应的资源集合模型
+ *
+ * @since 2022/2/23
+ */
+class CoreResModelImpl {
+ constructor(jsonPath, resourcePath) {
+ this.jsonPath = jsonPath;
+ this.resourcePath = resourcePath;
+ }
+ getJsonContent() {
+ return fs_1.default.readFileSync(this.jsonPath, 'utf-8');
+ }
+ getResourcePath() {
+ return this.resourcePath;
+ }
+ getJsonPath() {
+ return this.jsonPath;
+ }
+}
+exports.CoreResModelImpl = CoreResModelImpl;
+//# sourceMappingURL=core-res-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/legacy-target-res-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/legacy-target-res-model-impl.js
new file mode 100644
index 0000000..4471740
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/legacy-target-res-model-impl.js
@@ -0,0 +1,29 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyModuleTargetResImpl = void 0;
+const path_1 = __importDefault(require("path"));
+const common_const_js_1 = require("../../const/common-const.js");
+const core_res_model_impl_js_1 = require("./core-res-model-impl.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+/**
+ * Fa Module 的不同target对应的资源集合
+ *
+ * @since 2022/2/23
+ */
+class LegacyModuleTargetResImpl extends core_res_model_impl_js_1.CoreResModelImpl {
+ constructor(sourceSetRoot) {
+ super(path_1.default.resolve(sourceSetRoot, common_const_js_1.CommonConst.CONFIG_JSON), path_1.default.resolve(sourceSetRoot, "resources"));
+ }
+ getConfigJsonOpt() {
+ return project_file_reader_js_1.ProjectFileReader.getJson5Obj(this.getJsonPath(), 'utf-8');
+ }
+}
+exports.LegacyModuleTargetResImpl = LegacyModuleTargetResImpl;
+//# sourceMappingURL=legacy-target-res-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/res-model.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/res-model.js
new file mode 100644
index 0000000..5aaf55e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/res-model.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=res-model.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/target-res-model-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/target-res-model-impl.js
new file mode 100644
index 0000000..2c86e91
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/res/target-res-model-impl.js
@@ -0,0 +1,29 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ModuleTargetResImpl = void 0;
+const path_1 = __importDefault(require("path"));
+const common_const_js_1 = require("../../const/common-const.js");
+const core_res_model_impl_js_1 = require("./core-res-model-impl.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+/**
+ * Stage Module 的不同target对应的资源集合
+ *
+ * @since 2022/2/23
+ */
+class ModuleTargetResImpl extends core_res_model_impl_js_1.CoreResModelImpl {
+ constructor(sourceSetRoot) {
+ super(path_1.default.resolve(sourceSetRoot, common_const_js_1.CommonConst.MODULE_JSON5), path_1.default.resolve(sourceSetRoot, "resources"));
+ }
+ getModuleJsonOpt() {
+ return project_file_reader_js_1.ProjectFileReader.getJson5Obj(this.getJsonPath(), 'utf-8');
+ }
+}
+exports.ModuleTargetResImpl = ModuleTargetResImpl;
+//# sourceMappingURL=target-res-model-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/core-source-set-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/core-source-set-impl.js
new file mode 100644
index 0000000..1a6b7be
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/core-source-set-impl.js
@@ -0,0 +1,51 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CoreSourceSetImpl = void 0;
+const path_1 = __importDefault(require("path"));
+const code_type_enum_js_1 = require("../../enum/code-type-enum.js");
+const code_model_impl_js_1 = require("../code-source/code-model-impl.js");
+const fs_1 = __importDefault(require("fs"));
+/**
+ * module中每个target对应的一个sourceSet对象
+ *
+ * @since 2022/2/24
+ */
+class CoreSourceSetImpl {
+ constructor(sourceSetRoot, targetResModel) {
+ this.sourceSetRoot = sourceSetRoot;
+ this.codeMap = this.initCodeMap();
+ this.targetResModel = targetResModel;
+ }
+ getSourceSetRoot() {
+ return this.sourceSetRoot;
+ }
+ getCodeMap() {
+ return this.codeMap;
+ }
+ getTargetResPath() {
+ return this.targetResModel.getResourcePath();
+ }
+ initCodeMap() {
+ const map = new Map();
+ for (const code of Object.values(code_type_enum_js_1.CodeType)) {
+ if (typeof code !== "string") {
+ continue;
+ }
+ const codeDir = code.toString().toLowerCase();
+ const codePath = path_1.default.resolve(this.sourceSetRoot, codeDir);
+ if (fs_1.default.existsSync(codePath)) {
+ map.set(code, new code_model_impl_js_1.CodeModelImpl(codePath, code));
+ }
+ }
+ return map;
+ }
+}
+exports.CoreSourceSetImpl = CoreSourceSetImpl;
+//# sourceMappingURL=core-source-set-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/legacy-target-source-set-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/legacy-target-source-set-impl.js
new file mode 100644
index 0000000..08357c2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/legacy-target-source-set-impl.js
@@ -0,0 +1,19 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyTargetSourceSetImpl = void 0;
+const legacy_target_res_model_impl_js_1 = require("../res/legacy-target-res-model-impl.js");
+const core_source_set_impl_js_1 = require("./core-source-set-impl.js");
+class LegacyTargetSourceSetImpl extends core_source_set_impl_js_1.CoreSourceSetImpl {
+ constructor(sourceSetRoot) {
+ super(sourceSetRoot, new legacy_target_res_model_impl_js_1.LegacyModuleTargetResImpl(sourceSetRoot));
+ }
+ getLegacyModuleTargetRes() {
+ return this.targetResModel;
+ }
+}
+exports.LegacyTargetSourceSetImpl = LegacyTargetSourceSetImpl;
+//# sourceMappingURL=legacy-target-source-set-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/source-set-model.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/source-set-model.js
new file mode 100644
index 0000000..6e95937
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/source-set-model.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=source-set-model.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/target-source-set-impl.js b/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/target-source-set-impl.js
new file mode 100644
index 0000000..02922ba
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/model/source-set/target-source-set-impl.js
@@ -0,0 +1,23 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TargetSourceSetImpl = void 0;
+const target_res_model_impl_js_1 = require("../res/target-res-model-impl.js");
+const core_source_set_impl_js_1 = require("./core-source-set-impl.js");
+/**
+ * module中每个target对应的一个sourceSet对象
+ *
+ */
+class TargetSourceSetImpl extends core_source_set_impl_js_1.CoreSourceSetImpl {
+ constructor(sourceSetRoot) {
+ super(sourceSetRoot, new target_res_model_impl_js_1.ModuleTargetResImpl(sourceSetRoot));
+ }
+ getModuleTargetRes() {
+ return this.targetResModel;
+ }
+}
+exports.TargetSourceSetImpl = TargetSourceSetImpl;
+//# sourceMappingURL=target-source-set-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/options/build/module-build-profile.js b/node_modules/@ohos/hvigor-ohos-plugin/src/options/build/module-build-profile.js
new file mode 100644
index 0000000..41ce884
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/options/build/module-build-profile.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=module-build-profile.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/options/build/project-build-profile.js b/node_modules/@ohos/hvigor-ohos-plugin/src/options/build/project-build-profile.js
new file mode 100644
index 0000000..d8a357e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/options/build/project-build-profile.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=project-build-profile.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/app-json-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/app-json-options.js
new file mode 100644
index 0000000..a72077e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/app-json-options.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=app-json-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/config-json-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/config-json-options.js
new file mode 100644
index 0000000..ca9ab46
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/config-json-options.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=config-json-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/legacy/legacy-pack-info-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/legacy/legacy-pack-info-options.js
new file mode 100644
index 0000000..0355903
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/legacy/legacy-pack-info-options.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=legacy-pack-info-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/module-json-options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/module-json-options.js
new file mode 100644
index 0000000..4f32140
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/options/configure/module-json-options.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=module-json-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/options/options.js b/node_modules/@ohos/hvigor-ohos-plugin/src/options/options.js
new file mode 100644
index 0000000..9336696
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/options/options.js
@@ -0,0 +1,7 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/app-plugin.js b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/app-plugin.js
new file mode 100644
index 0000000..1e61dfd
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/app-plugin.js
@@ -0,0 +1,36 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AppPlugin = void 0;
+const project_task_service_js_1 = require("../tasks/service/project-task-service.js");
+const assemble_app_js_1 = require("../tasks/assemble/assemble-app.js");
+const project_model_impl_js_1 = require("../model/project/project-model-impl.js");
+const clean_js_1 = require("../tasks/common/clean.js");
+const sync_project_js_1 = require("../tasks/sync/sync-project.js");
+const legacy_project_model_impl_js_1 = require("../model/project/legacy-project-model-impl.js");
+/**
+ * 对外暴露app级别的接口和任务的plugin
+ *
+ * @since 2021/12/16
+ */
+class AppPlugin {
+ constructor(project, isFaMode) {
+ this._module = project;
+ this._moduleName = project.getName();
+ this._projectModel = isFaMode ?
+ legacy_project_model_impl_js_1.LegacyProjectModelImpl.getInstance(project.getModuleDir(), project.getName()) :
+ project_model_impl_js_1.ProjectModelImpl.getInstance(project.getModuleDir(), project.getName());
+ this._taskService = new project_task_service_js_1.ProjectTaskService(project, this._projectModel);
+ this.assembleApp = new assemble_app_js_1.AssembleApp(this._taskService, isFaMode);
+ this.clean = new clean_js_1.Clean(this._taskService);
+ this.sync = new sync_project_js_1.SyncProject(project);
+ }
+ getTaskService() {
+ return this._taskService;
+ }
+}
+exports.AppPlugin = AppPlugin;
+//# sourceMappingURL=app-plugin.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/common/abstract-module-plugin.js b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/common/abstract-module-plugin.js
new file mode 100644
index 0000000..c9f973f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/common/abstract-module-plugin.js
@@ -0,0 +1,55 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AbstractModulePlugin = void 0;
+const module_task_service_js_1 = require("../../tasks/service/module-task-service.js");
+const legacy_project_model_impl_js_1 = require("../../model/project/legacy-project-model-impl.js");
+const legacy_module_model_impl_js_1 = require("../../model/module/legacy-module-model-impl.js");
+const module_model_impl_js_1 = require("../../model/module/module-model-impl.js");
+const project_model_impl_js_1 = require("../../model/project/project-model-impl.js");
+const hap_extra_info_js_1 = require("../../project/data/hap-extra-info.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * hap模块的抽象接口
+ *
+ * @since 2022/1/20
+ */
+class AbstractModulePlugin {
+ constructor(module, isFaMode) {
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(AbstractModulePlugin.name);
+ this._module = module;
+ const project = module.getProject();
+ this.isFaMode = isFaMode;
+ if (this.isFaMode) {
+ this._projectModel = legacy_project_model_impl_js_1.LegacyProjectModelImpl.getInstance(project.getModuleDir(), project.getName());
+ this._moduleModel = new legacy_module_model_impl_js_1.LegacyModuleModelImpl(module.getModuleDir(), module.getName(), this._projectModel);
+ this.checkModuleStatus(hap_extra_info_js_1.ApiType.FA);
+ }
+ else {
+ this._projectModel = project_model_impl_js_1.ProjectModelImpl.getInstance(project.getModuleDir(), project.getName());
+ this._moduleModel = new module_model_impl_js_1.ModuleModelImpl(module.getModuleDir(), module.getName(), this._projectModel);
+ this.checkModuleStatus(hap_extra_info_js_1.ApiType.STAGE);
+ }
+ this._taskService = new module_task_service_js_1.ModuleTaskService(this._projectModel, this._moduleModel);
+ this.initTasks();
+ }
+ checkModuleStatus(apiType) {
+ const curApiType = this._moduleModel.getProfileOpt().apiType === undefined ?
+ hap_extra_info_js_1.ApiType.STAGE :
+ this._moduleModel.getProfileOpt().apiType;
+ if (curApiType !== apiType) {
+ this._log._buildError("The 'hvigorfile.js' import is not match the apiType!")
+ ._solution(`Change the apiType to '${apiType}'.`)
+ ._file(this._moduleModel.getProfilePath())
+ ._printErrorAndExit(this._moduleModel.getName());
+ }
+ }
+ getTaskService() {
+ return this._taskService;
+ }
+}
+exports.AbstractModulePlugin = AbstractModulePlugin;
+//# sourceMappingURL=abstract-module-plugin.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/factory/plugin-factory.js b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/factory/plugin-factory.js
new file mode 100644
index 0000000..7d0a72c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/factory/plugin-factory.js
@@ -0,0 +1,28 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PluginFactory = void 0;
+const app_plugin_js_1 = require("../app-plugin.js");
+const hap_plugin_js_1 = require("../hap-plugin.js");
+const har_plugin_js_1 = require("../har-plugin.js");
+/**
+ * 创建不同模型Plugin的简单工厂类
+ *
+ * @since 2022/2/23
+ */
+class PluginFactory {
+ static getAppPlugin(project, isFaMode = false) {
+ return new app_plugin_js_1.AppPlugin(project, isFaMode);
+ }
+ static getHapPlugin(module, isFaMode = false) {
+ return new hap_plugin_js_1.HapPlugin(module, isFaMode);
+ }
+ static getHarPlugin(module, isFaMode = false) {
+ return new har_plugin_js_1.HarPlugin(module, isFaMode);
+ }
+}
+exports.PluginFactory = PluginFactory;
+//# sourceMappingURL=plugin-factory.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/hap-plugin.js b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/hap-plugin.js
new file mode 100644
index 0000000..cdf47ca
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/hap-plugin.js
@@ -0,0 +1,32 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.HapPlugin = void 0;
+const build_previewer_res_js_1 = require("../tasks/previewer/build-previewer-res.js");
+const assemble_hap_js_1 = require("../tasks/assemble/assemble-hap.js");
+const sync_module_js_1 = require("../tasks/sync/sync-module.js");
+const compile_native_js_1 = require("../tasks/compile-native.js");
+const clean_js_1 = require("../tasks/common/clean.js");
+const abstract_module_plugin_js_1 = require("./common/abstract-module-plugin.js");
+/**
+ * 对外暴露hap级别的接口和任务的plugin
+ *
+ * @since 2021/12/16
+ */
+class HapPlugin extends abstract_module_plugin_js_1.AbstractModulePlugin {
+ constructor(module, isFaMode) {
+ super(module, isFaMode);
+ }
+ initTasks() {
+ this.assembleHap = new assemble_hap_js_1.AssembleHap(this._taskService, this.isFaMode);
+ this.clean = new clean_js_1.Clean(this._taskService);
+ this.compileNative = new compile_native_js_1.CompileNative(this._taskService);
+ this.sync = new sync_module_js_1.SyncModule(this._module);
+ this.buildPreviewerRes = new build_previewer_res_js_1.BuildPreviewerRes(this._taskService, this.isFaMode);
+ }
+}
+exports.HapPlugin = HapPlugin;
+//# sourceMappingURL=hap-plugin.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/har-plugin.js b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/har-plugin.js
new file mode 100644
index 0000000..b86f3b8
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/har-plugin.js
@@ -0,0 +1,30 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.HarPlugin = void 0;
+const assemble_har_js_1 = require("../tasks/assemble/assemble-har.js");
+const assemble_sub_har_js_1 = require("../tasks/assemble/assemble-sub-har.js");
+const clean_js_1 = require("../tasks/common/clean.js");
+const abstract_module_plugin_js_1 = require("./common/abstract-module-plugin.js");
+const build_har_previewer_res_js_1 = require("../tasks/previewer/build-har-previewer-res.js");
+/**
+ * 对外暴露har级别的接口和任务的plugin
+ *
+ * @since 2021/12/16
+ */
+class HarPlugin extends abstract_module_plugin_js_1.AbstractModulePlugin {
+ constructor(module, isFaMode) {
+ super(module, isFaMode);
+ }
+ initTasks() {
+ this.assembleHar = new assemble_har_js_1.AssembleHar(this._taskService, this.isFaMode);
+ this.assembleSubHar = new assemble_sub_har_js_1.AssembleSubHar(this._taskService, this.isFaMode);
+ this.clean = new clean_js_1.Clean(this._taskService);
+ this.buildHarPreviewerRes = new build_har_previewer_res_js_1.BuildHarPreviewerRes(this._taskService, this.isFaMode);
+ }
+}
+exports.HarPlugin = HarPlugin;
+//# sourceMappingURL=har-plugin.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/project/data/app-extra-info.js b/node_modules/@ohos/hvigor-ohos-plugin/src/project/data/app-extra-info.js
new file mode 100644
index 0000000..7cad086
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/project/data/app-extra-info.js
@@ -0,0 +1,29 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AppExtraInfo = void 0;
+/**
+ * App级别项目的标识信息
+ *
+ * @since 2022/1/18
+ */
+class AppExtraInfo {
+ constructor(projectModel) {
+ this._isSupportHos = true;
+ const compileSdkVersion = projectModel.getCompileApiVersion();
+ if (compileSdkVersion === 8) {
+ this._isSupportHos = projectModel.getProfileOpt().app.supportHos;
+ }
+ }
+ isSupportHos() {
+ return this._isSupportHos;
+ }
+ isStageMode() {
+ return true;
+ }
+}
+exports.AppExtraInfo = AppExtraInfo;
+//# sourceMappingURL=app-extra-info.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/project/data/hap-extra-info.js b/node_modules/@ohos/hvigor-ohos-plugin/src/project/data/hap-extra-info.js
new file mode 100644
index 0000000..7d70095
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/project/data/hap-extra-info.js
@@ -0,0 +1,43 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.HapExtraInfo = exports.ApiType = void 0;
+const project_extra_info_service_js_1 = require("../project-extra-info-service.js");
+/**
+ * 支持的不同工程模型状态
+ *
+ * @since 2022/1/18
+ */
+var ApiType;
+(function (ApiType) {
+ ApiType["FA"] = "faMode";
+ ApiType["STAGE"] = "stageMode";
+})(ApiType = exports.ApiType || (exports.ApiType = {}));
+/**
+ * 标记模块级别的额外的状态信息
+ *
+ * @since 2022/1/18
+ */
+class HapExtraInfo {
+ constructor(moduleModel) {
+ this._isSupportHos = true;
+ this._isStageMode = true;
+ const configApiType = moduleModel.getProfileOpt().apiType;
+ this._isStageMode = configApiType === undefined || configApiType === ApiType.STAGE;
+ const appProjectExtraInfo = project_extra_info_service_js_1.ProjectExtraInfoService.getProjectExtraInfoByPath(moduleModel.getParentProject());
+ if (appProjectExtraInfo !== undefined) {
+ this._isSupportHos = appProjectExtraInfo.isSupportHos();
+ }
+ }
+ isStageMode() {
+ return this._isStageMode;
+ }
+ isSupportHos() {
+ return this._isSupportHos;
+ }
+}
+exports.HapExtraInfo = HapExtraInfo;
+//# sourceMappingURL=hap-extra-info.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/project/project-extra-info-service.js b/node_modules/@ohos/hvigor-ohos-plugin/src/project/project-extra-info-service.js
new file mode 100644
index 0000000..b5f71fe
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/project/project-extra-info-service.js
@@ -0,0 +1,36 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProjectExtraInfoService = void 0;
+const app_extra_info_js_1 = require("./data/app-extra-info.js");
+const hap_extra_info_js_1 = require("./data/hap-extra-info.js");
+const project_model_impl_js_1 = require("../model/project/project-model-impl.js");
+const legacy_project_model_impl_js_1 = require("../model/project/legacy-project-model-impl.js");
+/**
+ * 提供一个单例对象,来初始化工程的所有模块的额外的状态信息,并在执行任务时获取
+ *
+ * @since 2022/1/18
+ */
+class ProjectExtraInfoService {
+ static getProjectExtraInfoByPath(vigorProject) {
+ const modulePath = vigorProject.getProjectDir();
+ if (this.projectExtraInfoMap.has(modulePath)) {
+ return this.projectExtraInfoMap.get(modulePath);
+ }
+ let projectExtraInfo;
+ if (vigorProject instanceof project_model_impl_js_1.ProjectModelImpl || vigorProject instanceof legacy_project_model_impl_js_1.LegacyProjectModelImpl) {
+ projectExtraInfo = new app_extra_info_js_1.AppExtraInfo(vigorProject);
+ }
+ else {
+ projectExtraInfo = new hap_extra_info_js_1.HapExtraInfo(vigorProject);
+ }
+ this.projectExtraInfoMap.set(vigorProject.getProjectDir(), projectExtraInfo);
+ return projectExtraInfo;
+ }
+}
+exports.ProjectExtraInfoService = ProjectExtraInfoService;
+ProjectExtraInfoService.projectExtraInfoMap = new Map();
+//# sourceMappingURL=project-extra-info-service.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/ets-ark-component.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/ets-ark-component.js
new file mode 100644
index 0000000..8e3daa9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/ets-ark-component.js
@@ -0,0 +1,45 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.EtsArkComponent = void 0;
+const node_command_builder_js_1 = require("../../builder/node-command-builder.js");
+const property_get_js_1 = require("../lib/property-get.js");
+const process_utils_js_1 = require("../../utils/process-utils.js");
+const path_1 = __importDefault(require("path"));
+const fs_extra_1 = __importDefault(require("fs-extra"));
+const ohos_logger_1 = require("../../utils/log/ohos-logger");
+const node_util_js_1 = require("../../utils/node-util.js");
+/**
+ * js ark实例
+ *
+ * @since 2021-12-16
+ */
+class EtsArkComponent {
+ constructor(etsLoaderPath) {
+ this._log = ohos_logger_1.OhosLogger.getLogger(EtsArkComponent.name);
+ this.ets2abcVersion = '';
+ this._ets2abcToolPath = path_1.default.resolve(etsLoaderPath, 'bin', 'ark', 'ts2abc.js');
+ }
+ getArkVersion() {
+ if (this.ets2abcVersion !== '') {
+ return this.ets2abcVersion;
+ }
+ if (!this._ets2abcToolPath || !fs_extra_1.default.existsSync(this._ets2abcToolPath)) {
+ this._log.warn('No ark tools found. Can not get ark version.');
+ return '';
+ }
+ const nodeCommandBuilder = new node_command_builder_js_1.NodeCommandBuilder((0, node_util_js_1.findValidNodeDir)(property_get_js_1.Property.getInstance().getNodeJsDir()))
+ .addJsPath(this._ets2abcToolPath)
+ .getTsVersion();
+ this._log.debug(nodeCommandBuilder.build());
+ this.ets2abcVersion = new process_utils_js_1.ProcessUtils().executeSync(nodeCommandBuilder.build(), { stdout: 'pipe' }).stdout.toString();
+ return this.ets2abcVersion;
+ }
+}
+exports.EtsArkComponent = EtsArkComponent;
+//# sourceMappingURL=ets-ark-component.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/js-ark-component.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/js-ark-component.js
new file mode 100644
index 0000000..f68bfb7
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/js-ark-component.js
@@ -0,0 +1,46 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.JsArkComponent = void 0;
+const node_command_builder_js_1 = require("../../builder/node-command-builder.js");
+const property_get_js_1 = require("../lib/property-get.js");
+const process_utils_js_1 = require("../../utils/process-utils.js");
+const path_1 = __importDefault(require("path"));
+const fs_extra_1 = __importDefault(require("fs-extra"));
+const ohos_logger_1 = require("../../utils/log/ohos-logger");
+const node_util_js_1 = require("../../utils/node-util.js");
+/**
+ * js ark实例
+ */
+class JsArkComponent {
+ constructor(jsLoaderPath) {
+ this._log = ohos_logger_1.OhosLogger.getLogger(JsArkComponent.name);
+ this.ts2abcVersion = '';
+ this.ts2abcToolPath = path_1.default.resolve(jsLoaderPath, 'bin', 'ark', 'ts2abc.js');
+ }
+ getArkVersion() {
+ return this.initArkVersion();
+ }
+ initArkVersion() {
+ if (this.ts2abcVersion !== '') {
+ return this.ts2abcVersion;
+ }
+ if (!this.ts2abcToolPath || !fs_extra_1.default.existsSync(this.ts2abcToolPath)) {
+ this._log.warn('No ark tools found. Can not get ark version.');
+ return '';
+ }
+ const nodeCommandBuilder = new node_command_builder_js_1.NodeCommandBuilder((0, node_util_js_1.findValidNodeDir)(property_get_js_1.Property.getInstance().getNodeJsDir()))
+ .addJsPath(this.ts2abcToolPath)
+ .getTsVersion();
+ this._log.debug(nodeCommandBuilder.build());
+ this.ts2abcVersion = new process_utils_js_1.ProcessUtils().executeSync(nodeCommandBuilder.build(), { stdout: 'pipe' }).stdout.toString();
+ return this.ts2abcVersion;
+ }
+}
+exports.JsArkComponent = JsArkComponent;
+//# sourceMappingURL=js-ark-component.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-ets-component.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-ets-component.js
new file mode 100644
index 0000000..612d2df
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-ets-component.js
@@ -0,0 +1,36 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SdkEtsComponent = void 0;
+const sdk_component_js_1 = require("../superior/sdk-component.js");
+const ets_ark_component_js_1 = require("./ets-ark-component.js");
+const path_1 = __importDefault(require("path"));
+/**
+ * sdk ets实例
+ *
+ * @since 2021-12-16
+ */
+class SdkEtsComponent extends sdk_component_js_1.SdkComponent {
+ constructor(component, baseDir) {
+ super(component, baseDir);
+ this._etsLoaderPath = path_1.default.resolve(baseDir, 'build-tools', 'ets-loader');
+ this._arkComponent = new ets_ark_component_js_1.EtsArkComponent(this._etsLoaderPath);
+ this._sysCapFilePath = path_1.default.resolve(baseDir, 'api', 'device-define');
+ }
+ getEtsLoaderPath() {
+ return this._etsLoaderPath;
+ }
+ getArkVersion() {
+ return this._arkComponent.getArkVersion();
+ }
+ getSysCapFilePath() {
+ return this._sysCapFilePath;
+ }
+}
+exports.SdkEtsComponent = SdkEtsComponent;
+//# sourceMappingURL=sdk-ets-component.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-js-component.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-js-component.js
new file mode 100644
index 0000000..7afe1ab
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-js-component.js
@@ -0,0 +1,37 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SdkJsComponent = void 0;
+const sdk_component_js_1 = require("../superior/sdk-component.js");
+const js_ark_component_js_1 = require("./js-ark-component.js");
+const path_1 = __importDefault(require("path"));
+/**
+ * sdk js实例
+ *
+ * @since 2021-12-16
+ */
+class SdkJsComponent extends sdk_component_js_1.SdkComponent {
+ constructor(component, baseDir) {
+ super(component, baseDir);
+ this._jsLoaderPath = path_1.default.resolve(baseDir, 'build-tools', 'ace-loader');
+ this._jsBinaryToolPath = path_1.default.resolve(baseDir, 'build-tools', 'binary-tools', 'hmos_haptobin_tool.jar');
+ this._sysCapFilePath = path_1.default.resolve(baseDir, 'api', 'device-define');
+ this.arkComponent = new js_ark_component_js_1.JsArkComponent(this._jsLoaderPath);
+ }
+ getJsLoaderPath() {
+ return this._jsLoaderPath;
+ }
+ getArkVersion() {
+ return this.arkComponent.getArkVersion();
+ }
+ getSysCapFilePath() {
+ return this._sysCapFilePath;
+ }
+}
+exports.SdkJsComponent = SdkJsComponent;
+//# sourceMappingURL=sdk-js-component.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-native-component.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-native-component.js
new file mode 100644
index 0000000..24249a3
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-native-component.js
@@ -0,0 +1,39 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SdkNativeComponent = void 0;
+const sdk_component_js_1 = require("../superior/sdk-component.js");
+const path_1 = __importDefault(require("path"));
+const system_util_js_1 = require("../../utils/system-util.js");
+/**
+ * ohos sdk native实例类
+ *
+ * @since 2021/1/21
+ */
+class SdkNativeComponent extends sdk_component_js_1.SdkComponent {
+ constructor(component, baseDir) {
+ super(component, baseDir);
+ const cmakeApp = (0, system_util_js_1.isWindows)() ? 'cmake.exe' : 'cmake';
+ const ninjaApp = (0, system_util_js_1.isWindows)() ? 'ninja.exe' : 'ninja';
+ this._ninjaTool = path_1.default.resolve(baseDir, 'build-tools', 'cmake', 'bin', ninjaApp);
+ this._cmakeTool = path_1.default.resolve(baseDir, 'build-tools', 'cmake', 'bin', cmakeApp);
+ this._nativeToolchain = path_1.default.resolve(baseDir, 'build', 'cmake', 'ohos.toolchain.cmake');
+ }
+ getCmakeTool() {
+ return this._cmakeTool;
+ }
+ getNinjaTool() {
+ return this._ninjaTool;
+ }
+ getNativeToolchain() {
+ return this._nativeToolchain;
+ }
+}
+exports.SdkNativeComponent = SdkNativeComponent;
+//# sourceMappingURL=sdk-native-component.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-toolchains-component.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-toolchains-component.js
new file mode 100644
index 0000000..2759722
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/impl/sdk-toolchains-component.js
@@ -0,0 +1,73 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SdkToolchainsComponent = void 0;
+const sdk_component_js_1 = require("../superior/sdk-component.js");
+const common_const_js_1 = require("../../const/common-const.js");
+const path_1 = __importDefault(require("path"));
+const system_util_js_1 = require("../../utils/system-util.js");
+const sdk_version_enum_js_1 = require("../../version/sdk-version-enum.js");
+const sdk_const_js_1 = require("../../const/sdk-const.js");
+/**
+ * sdk toolchains实例
+ */
+class SdkToolchainsComponent extends sdk_component_js_1.SdkComponent {
+ constructor(component, baseDir) {
+ super(component, baseDir);
+ const resTool = (0, system_util_js_1.isWindows)() ? 'restool.exe' : 'restool';
+ const sysCapTool = (0, system_util_js_1.isWindows)() ? 'syscap_tool.exe' : 'syscap_tool';
+ this._restoolPath = path_1.default.resolve(baseDir, resTool);
+ this._sysCapToolPath = path_1.default.resolve(baseDir, sysCapTool);
+ this._sysCapFilePath = path_1.default.resolve(baseDir, 'devices');
+ this._verifySignConfigPath = path_1.default.resolve(baseDir, SdkToolchainsComponent.LIB, 'hap-sign-tool.jar');
+ const aaptTool = (0, system_util_js_1.isWindows)() ? 'aapt2.exe' : 'aapt';
+ this._aapt2ToolPath = path_1.default.resolve(baseDir, SdkToolchainsComponent.INSTALL_ASSISTANT, aaptTool);
+ this._signDir = path_1.default.resolve(baseDir, SdkToolchainsComponent.LIB);
+ this._richSchema = path_1.default.resolve(baseDir, SdkToolchainsComponent.CONFIG_CHECK, SdkToolchainsComponent.RICH_SCHEMA);
+ this._liteSchema = path_1.default.resolve(baseDir, SdkToolchainsComponent.CONFIG_CHECK, SdkToolchainsComponent.LITE_SCHEMA);
+ this._moduleSchema = path_1.default.resolve(baseDir, SdkToolchainsComponent.MODULE_CHECK, common_const_js_1.CommonConst.MODULE_JSON);
+ this._appSchema = path_1.default.resolve(baseDir, SdkToolchainsComponent.MODULE_CHECK, common_const_js_1.CommonConst.APP_SCHEMA_JSON);
+ }
+ getRestoolPath() {
+ return this._restoolPath;
+ }
+ getSysCapToolPath() {
+ return this._sysCapToolPath;
+ }
+ getVerifySignConfigToolPath() {
+ return this._verifySignConfigPath;
+ }
+ getRichSchema() {
+ return this._richSchema;
+ }
+ getPackageToolPath() {
+ const packTool = this.getComponentVersion().isHigherThan(sdk_version_enum_js_1.SdkVersionEnum.NEW_PACK_TOOL) ?
+ sdk_const_js_1.ToolChainsConst.APP_PACKING_TOOL_JAR : sdk_const_js_1.ToolChainsConst.HMOS_APP_PACKING_TOOL_JAR;
+ return path_1.default.resolve(this.getBaseDir(), SdkToolchainsComponent.LIB, packTool);
+ }
+ getSignDir() {
+ return this._signDir;
+ }
+ getModuleSchema() {
+ return this._moduleSchema;
+ }
+ getAppSchema() {
+ return this._appSchema;
+ }
+ getAapt2ToolPath() {
+ return this._aapt2ToolPath;
+ }
+}
+exports.SdkToolchainsComponent = SdkToolchainsComponent;
+SdkToolchainsComponent.MODULE_CHECK = 'modulecheck';
+SdkToolchainsComponent.CONFIG_CHECK = 'configcheck';
+SdkToolchainsComponent.LIB = 'lib';
+SdkToolchainsComponent.INSTALL_ASSISTANT = 'install-assistant';
+SdkToolchainsComponent.LITE_SCHEMA = 'configSchema_lite.json';
+SdkToolchainsComponent.RICH_SCHEMA = 'configSchema_rich.json';
+//# sourceMappingURL=sdk-toolchains-component.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/lib/property-get.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/lib/property-get.js
new file mode 100644
index 0000000..a37ab09
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/lib/property-get.js
@@ -0,0 +1,119 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Property = void 0;
+const path_1 = __importDefault(require("path"));
+const fs_extra_1 = __importDefault(require("fs-extra"));
+const common_const_js_1 = require("../../const/common-const.js");
+const property_const_js_1 = require("../../const/property-const.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const localPropertiesPath = path_1.default.resolve(process.cwd(), common_const_js_1.CommonConst.LOCAL_PROPERTIES);
+/**
+ * 读取项目目录下local.properties文件
+ *
+ * @since 2021-12-16
+ */
+class Property {
+ constructor() {
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(Property.name);
+ this._properties = new Map();
+ // read local.properties first and path next
+ Property._readFile().split(/\r?\n/).forEach(this._setProperty, this);
+ this._readPath();
+ this._validate();
+ }
+ static getInstance() {
+ if (this.instance) {
+ return this.instance;
+ }
+ this.instance = new Property();
+ return this.instance;
+ }
+ /**
+ * 读取当前命令行执行的路径下的local.properties的内容
+ *
+ * @returns {string} local.properties的内容
+ */
+ static _readFile() {
+ if (!fs_extra_1.default.existsSync(localPropertiesPath)) {
+ return "";
+ }
+ return fs_extra_1.default.readFileSync(localPropertiesPath, { encoding: "utf-8" });
+ }
+ /**
+ * 读取路径时将分隔符转为正斜杆
+ * eg: a\\b\\c -> a/b/c
+ *
+ * @param {string} oriString 原始字符串
+ * @returns {string} 转化后的字符串
+ */
+ static normalizePathSeparator(oriString) {
+ return oriString.replace(/\\\\/g, "/")
+ .replace(/\\/g, '/')
+ .replace(/\/:/g, ':');
+ }
+ getProperty(key) {
+ if (this._properties.has(key)) {
+ const value = this._properties.get(key);
+ return value ? value : '';
+ }
+ return '';
+ }
+ getNodeJsDir() {
+ return this.getProperty(property_const_js_1.PropertyConst.NODE_JS_DIR);
+ }
+ getNpmDir() {
+ return this.getProperty(property_const_js_1.PropertyConst.NPM_DIR);
+ }
+ getSdkDir() {
+ return this.getProperty(property_const_js_1.PropertyConst.SDK_DIR);
+ }
+ _validate() {
+ // validate sdk and node js
+ this.validatePath(property_const_js_1.PropertyConst.SDK_DIR, "OHOS_SDK_HOME");
+ this.validatePath(property_const_js_1.PropertyConst.NODE_JS_DIR, "NODE_HOME");
+ }
+ validatePath(propertyKey, pathKey) {
+ if (!this._properties.has(propertyKey)) {
+ this._log._buildError(`Can not find ${propertyKey} or ${pathKey} in System Environment Path`)
+ ._file(localPropertiesPath)
+ ._printErrorAndExit();
+ this._log.errorMessageExit(`Can not find ${propertyKey}. Configure it in local.properties or PATH.`);
+ }
+ const requiredPath = this._properties.get(propertyKey);
+ if (!fs_extra_1.default.existsSync(requiredPath)) {
+ this._log._buildError(`${propertyKey} configured in 'local.properties' or ${pathKey} in System Environment Path is invalid,Please check`)
+ ._file(requiredPath)
+ ._printErrorAndExit();
+ }
+ }
+ _readPath() {
+ // require sdk and node
+ this._setPathIfNotExist(property_const_js_1.PropertyConst.SDK_DIR, process.env.OHOS_SDK_HOME);
+ this._setPathIfNotExist(property_const_js_1.PropertyConst.NODE_JS_DIR, process.env.NODE_HOME);
+ this._setPathIfNotExist(property_const_js_1.PropertyConst.NPM_DIR, process.env.NODE_HOME);
+ }
+ _setPathIfNotExist(mapKey, envValue) {
+ if (this._properties.has(mapKey) || !envValue) {
+ return;
+ }
+ this._properties.set(mapKey, Property.normalizePathSeparator(envValue));
+ }
+ _setProperty(text) {
+ const trimText = text.trim();
+ if (!trimText) {
+ return;
+ }
+ const property = /^([^#=]+)(={0,1})(.*)$/.exec(trimText);
+ if (property) {
+ this._properties.set(property[1].trim(), Property.normalizePathSeparator(property[3].trim()));
+ }
+ }
+}
+exports.Property = Property;
+//# sourceMappingURL=property-get.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/sdk-info.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/sdk-info.js
new file mode 100644
index 0000000..3d0edc1
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/sdk-info.js
@@ -0,0 +1,190 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SdkInfo = void 0;
+const sdkmanager_common_1 = require("@ohos/sdkmanager-common");
+const sdk_ets_component_js_1 = require("./impl/sdk-ets-component.js");
+const sdk_js_component_js_1 = require("./impl/sdk-js-component.js");
+const sdk_toolchains_component_js_1 = require("./impl/sdk-toolchains-component.js");
+const sdk_native_component_js_1 = require("./impl/sdk-native-component.js");
+const path_1 = __importDefault(require("path"));
+const property_get_js_1 = require("./lib/property-get.js");
+const ohos_logger_1 = require("../utils/log/ohos-logger");
+const pretty_hrtime_1 = __importDefault(require("pretty-hrtime"));
+/**
+ * sdk信息实例 main class
+ *
+ * @since 2021-12-16
+ */
+class SdkInfo {
+ /**
+ * 传入编译版本和需要的实例 ['Js', 'Ets', 'Toolchains']
+ *
+ * @param compileVersion
+ * @param requireComponents
+ */
+ constructor(compileVersion, requireComponents) {
+ this._log = ohos_logger_1.OhosLogger.getLogger(SdkInfo.name);
+ this._log.debug("Sdk init...");
+ const taskBeginTime = process.hrtime();
+ this._baseDir = property_get_js_1.Property.getInstance().getSdkDir();
+ this._sdkVersion = compileVersion;
+ this._components = requireComponents;
+ const sdkInfoConfig = sdkmanager_common_1.SdkInfoConfig.create(this._baseDir);
+ const ohSdkInfoHandler = new sdkmanager_common_1.OhSdkInfoHandler(sdkInfoConfig);
+ try {
+ this._localSdkComponents = ohSdkInfoHandler.getLocalSdks();
+ this._log.debug(`Find sdk tools: ${Array.from(this._localSdkComponents.values())}`);
+ }
+ catch (e) {
+ if (e instanceof sdkmanager_common_1.SdkException) {
+ const sdkException = e;
+ const errTip = sdkException.getErrorTip();
+ this._log._buildError(errTip.reason)
+ ._solution(`${errTip.fixSuggestion}.Open SDK Manager`)
+ ._file(this._baseDir)
+ ._printErrorAndExit();
+ }
+ }
+ this._components.forEach(this.initComponents, this);
+ const taskEndTime = process.hrtime(taskBeginTime);
+ const realTime = (0, pretty_hrtime_1.default)(taskEndTime);
+ this._log.debug(`Sdk handle finished...${realTime}`);
+ }
+ getBaseDir() {
+ return path_1.default.resolve(this._baseDir);
+ }
+ getModuleSchema() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getModuleSchema() : '';
+ }
+ getAppSchema() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getAppSchema() : '';
+ }
+ getSdkJsDir() {
+ if (this.jsComponent) {
+ return this.jsComponent.getBaseDir();
+ }
+ return '';
+ }
+ getSdkEtsDir() {
+ return this.etsComponent ? this.etsComponent.getBaseDir() : '';
+ }
+ getSdkVersion() {
+ return this._sdkVersion;
+ }
+ getReleaseType() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getReleaseType() : 'release';
+ }
+ getNodeJsDir() {
+ const nodeJsPath = property_get_js_1.Property.getInstance().getNodeJsDir();
+ if (nodeJsPath === "") {
+ return undefined;
+ }
+ else {
+ return path_1.default.resolve(nodeJsPath);
+ }
+ }
+ getSdkNativeDir() {
+ return this.nativeComponent.getBaseDir();
+ }
+ getCmakeTool() {
+ return this.nativeComponent.getCmakeTool();
+ }
+ getNativeNinjaTool() {
+ return this.nativeComponent.getNinjaTool();
+ }
+ getNativeToolchain() {
+ return this.nativeComponent.getNativeToolchain();
+ }
+ getSdkToolchainsDir() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getBaseDir() : '';
+ }
+ getRestool() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getRestoolPath() : '';
+ }
+ getSysCapTool() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getSysCapToolPath() : '';
+ }
+ getSysCapFileInEts() {
+ return this.etsComponent ? this.etsComponent.getSysCapFilePath() : '';
+ }
+ getSysCapFileInJs() {
+ return this.jsComponent ? this.jsComponent.getSysCapFilePath() : '';
+ }
+ getVerifySignConfigTool() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getVerifySignConfigToolPath() : '';
+ }
+ getJsArkVersion() {
+ return this.jsComponent ? this.jsComponent.getArkVersion() : '';
+ }
+ getRichSchema() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getRichSchema() : '';
+ }
+ getEtsArkVersion() {
+ return this.etsComponent ? this.etsComponent.getArkVersion() : '';
+ }
+ getPackageTool() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getPackageToolPath() : '';
+ }
+ getSignDir() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getSignDir() : '';
+ }
+ getJsLoader() {
+ return this.jsComponent ? this.jsComponent.getJsLoaderPath() : '';
+ }
+ getEtsLoader() {
+ return this.etsComponent ? this.etsComponent.getEtsLoaderPath() : '';
+ }
+ getAapt2Tool() {
+ return this.toolchainsComponent ? this.toolchainsComponent.getAapt2ToolPath() : '';
+ }
+ /**
+ * 根据获取到的sdk-component名称创建不同的component实例
+ *
+ * @param {string} componentName
+ */
+ initComponents(componentName) {
+ const component = this.findLocalComponent(componentName);
+ const componentPath = path_1.default.resolve(this._baseDir, componentName, component.getVersion());
+ switch (componentName) {
+ case sdkmanager_common_1.ComponentPath.JS:
+ this.jsComponent = new sdk_js_component_js_1.SdkJsComponent(component, componentPath);
+ break;
+ case sdkmanager_common_1.ComponentPath.ETS:
+ this.etsComponent = new sdk_ets_component_js_1.SdkEtsComponent(component, componentPath);
+ break;
+ case sdkmanager_common_1.ComponentPath.TOOLCHAINS:
+ this.toolchainsComponent = new sdk_toolchains_component_js_1.SdkToolchainsComponent(component, componentPath);
+ break;
+ case sdkmanager_common_1.ComponentPath.NATIVE:
+ this.nativeComponent = new sdk_native_component_js_1.SdkNativeComponent(component, componentPath);
+ break;
+ default:
+ break;
+ }
+ }
+ /**
+ * 根据传入的需要的实例类型查找本地sdk是否有对应sdk
+ *
+ * @param type 需要的实例类型
+ * @private
+ */
+ findLocalComponent(type) {
+ const result = this._localSdkComponents.get(new sdkmanager_common_1.PathAndApiVersion(type, this._sdkVersion));
+ if (result === undefined) {
+ this._log
+ ._buildError(`Can not find the sdk type ${type} of API${this._sdkVersion}, Please download first.`)
+ ._solution(`Check the sdk.dir,or install API${this._sdkVersion} ${type}. Please Open SDK Manager`)
+ ._file(this._baseDir)
+ ._printErrorAndExit();
+ }
+ return result;
+ }
+}
+exports.SdkInfo = SdkInfo;
+//# sourceMappingURL=sdk-info.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/superior/ark-component.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/superior/ark-component.js
new file mode 100644
index 0000000..e427fcf
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/superior/ark-component.js
@@ -0,0 +1,6 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=ark-component.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/superior/sdk-component.js b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/superior/sdk-component.js
new file mode 100644
index 0000000..c4587c5
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/superior/sdk-component.js
@@ -0,0 +1,34 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SdkComponent = void 0;
+const sdk_version_js_1 = require("../../version/sdk-version.js");
+/**
+ * sdk公共实例
+ *
+ * @since 2021-12-16
+ */
+class SdkComponent {
+ constructor(component, baseDir) {
+ this._baseDir = baseDir;
+ this._componentApiVersion = component.getApiVersion();
+ this._componentVersion = new sdk_version_js_1.SdkVersion(component.getVersion());
+ this._releaseType = component.getReleaseType();
+ }
+ getBaseDir() {
+ return this._baseDir;
+ }
+ getComponentApiVersion() {
+ return this._componentApiVersion;
+ }
+ getComponentVersion() {
+ return this._componentVersion;
+ }
+ getReleaseType() {
+ return this._releaseType;
+ }
+}
+exports.SdkComponent = SdkComponent;
+//# sourceMappingURL=sdk-component.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-app.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-app.js
new file mode 100644
index 0000000..e9b89d6
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-app.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AssembleApp = void 0;
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const package_app_js_1 = require("../package-app.js");
+const package_sub_hap_js_1 = require("../package-sub-hap.js");
+const legacy_make_project_pack_info_js_1 = require("../legacy-tasks/legacy-make-project-pack-info.js");
+const sign_app_js_1 = require("../sign-app.js");
+/**
+ * 组装打包app的任务流
+ *
+ * @since 2022/1/20
+ */
+class AssembleApp extends hvigor_base_1.Task {
+ constructor(taskService, isFaMode) {
+ super();
+ this.registry = () => {
+ const hvigor = new hvigor_base_1.Hvigor();
+ return hvigor.series(new package_sub_hap_js_1.PackageSubHaps(this._taskService).registry(), new legacy_make_project_pack_info_js_1.LegacyMakeProjectPackInfo(this._taskService, this._isFaMode).registry(), new package_app_js_1.PackageApp(this._taskService).registry(), new sign_app_js_1.SignApp(this._taskService).registry());
+ };
+ this._taskService = taskService;
+ this._isFaMode = isFaMode;
+ }
+}
+exports.AssembleApp = AssembleApp;
+//# sourceMappingURL=assemble-app.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-hap.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-hap.js
new file mode 100644
index 0000000..29f612e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-hap.js
@@ -0,0 +1,51 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AssembleHap = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const pre_build_js_1 = require("../pre-build.js");
+const collect_har_dependency_js_1 = require("../collect-har-dependency.js");
+const merge_profile_js_1 = require("../merge-profile.js");
+const process_profile_js_1 = require("../process-profile.js");
+const merge_resource_js_1 = require("../merge-resource.js");
+const compile_resource_js_1 = require("../compile-resource.js");
+const compile_node_js_1 = require("../compile-node.js");
+const code_type_enum_js_1 = require("../../enum/code-type-enum.js");
+const package_hap_js_1 = require("../package-hap.js");
+const sign_hap_js_1 = require("../sign-hap.js");
+const legacy_package_hap_js_1 = require("../legacy-tasks/legacy-package-hap.js");
+const legacy_merge_profile_js_1 = require("../legacy-tasks/legacy-merge-profile.js");
+const legacy_process_profile_js_1 = require("../legacy-tasks/legacy-process-profile.js");
+const legacy_compile_resource_js_1 = require("../legacy-tasks/legacy-compile-resource.js");
+const legacy_generate_js_manifest_js_1 = require("../legacy-tasks/legacy-generate-js-manifest.js");
+const legacy_make_pack_info_js_1 = require("../legacy-tasks/legacy-make-pack-info.js");
+const legacy_compile_node_js_1 = require("../legacy-tasks/legacy-compile-node.js");
+const compile_native_js_1 = require("../compile-native.js");
+const build_native_js_1 = require("../build-native.js");
+const process_libs_js_1 = require("../process-libs.js");
+const syscap_transform_js_1 = require("../syscap-transform.js");
+const generate_loader_json_js_1 = require("../generate-loader-json.js");
+/**
+ * 组装Hap打包的任务流
+ *
+ * @since 2022/1/20
+ */
+class AssembleHap extends hvigor_base_1.Task {
+ constructor(taskService, isFaMode) {
+ super();
+ this.registry = () => {
+ const hvigor = new hvigor_base_1.Hvigor();
+ if (this._isFaMode) {
+ return hvigor.series(new pre_build_js_1.PreBuild(this._taskService).registry(), new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new legacy_merge_profile_js_1.LegacyMergeProfile(this._taskService).registry(), new legacy_process_profile_js_1.LegacyProcessProfile(this._taskService).registry(), new legacy_compile_resource_js_1.LegacyCompileResource(this._taskService).registry(), new legacy_generate_js_manifest_js_1.LegacyGenerateJsManifest(this._taskService).registry(), new generate_loader_json_js_1.GenerateLoaderJson(this._taskService).registry(), new legacy_compile_node_js_1.LegacyCompileNode(this._taskService, code_type_enum_js_1.CodeType.ETS).registry(), new legacy_compile_node_js_1.LegacyCompileNode(this._taskService, code_type_enum_js_1.CodeType.JS).registry(), new compile_native_js_1.CompileNative(this._taskService).registry(), new build_native_js_1.BuildNative(this._taskService).registry(), new process_libs_js_1.ProcessLibs(this._taskService).registry(), new syscap_transform_js_1.SyscapTransform(this._taskService).registry(), new legacy_make_pack_info_js_1.LegacyMakePackInfo(this._taskService).registry(), new legacy_package_hap_js_1.LegacyPackageHap(this._taskService).registry(), new sign_hap_js_1.SignHap(this._taskService).registry());
+ }
+ return hvigor.series(new pre_build_js_1.PreBuild(this._taskService).registry(), new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new merge_profile_js_1.MergeProfile(this._taskService).registry(), new process_profile_js_1.ProcessProfile(this._taskService).registry(), new merge_resource_js_1.MergeResource(this._taskService).registry(), new compile_resource_js_1.CompileResource(this._taskService).registry(), new generate_loader_json_js_1.GenerateLoaderJson(this._taskService).registry(), hvigor.parallel(new compile_node_js_1.CompileNode(this._taskService, code_type_enum_js_1.CodeType.ETS).registry(), new compile_node_js_1.CompileNode(this._taskService, code_type_enum_js_1.CodeType.JS).registry(), new compile_native_js_1.CompileNative(this._taskService).registry()), new build_native_js_1.BuildNative(this._taskService).registry(), new process_libs_js_1.ProcessLibs(this._taskService).registry(), new syscap_transform_js_1.SyscapTransform(this._taskService).registry(), new package_hap_js_1.PackageHap(this._taskService).registry(), new sign_hap_js_1.SignHap(this._taskService).registry());
+ };
+ this._taskService = taskService;
+ this._isFaMode = isFaMode;
+ }
+}
+exports.AssembleHap = AssembleHap;
+//# sourceMappingURL=assemble-hap.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-har.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-har.js
new file mode 100644
index 0000000..11b1efe
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-har.js
@@ -0,0 +1,43 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AssembleHar = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const pre_build_js_1 = require("../pre-build.js");
+const collect_har_dependency_js_1 = require("../collect-har-dependency.js");
+const merge_profile_js_1 = require("../merge-profile.js");
+const process_profile_js_1 = require("../process-profile.js");
+const merge_resource_js_1 = require("../merge-resource.js");
+const compile_resource_js_1 = require("../compile-resource.js");
+const package_har_js_1 = require("../package-har.js");
+const legacy_merge_profile_js_1 = require("../legacy-tasks/legacy-merge-profile.js");
+const legacy_process_profile_js_1 = require("../legacy-tasks/legacy-process-profile.js");
+const legacy_compile_resource_js_1 = require("../legacy-tasks/legacy-compile-resource.js");
+const compile_native_js_1 = require("../compile-native.js");
+const process_libs_js_1 = require("../process-libs.js");
+const build_native_js_1 = require("../build-native.js");
+/**
+ * 组装Hap打包的任务流
+ *
+ * @since 2022/1/20
+ */
+class AssembleHar extends hvigor_base_1.Task {
+ constructor(taskService, isFaMode) {
+ super();
+ this.registry = () => {
+ const hvigor = new hvigor_base_1.Hvigor();
+ // 新老模型的任务流不一致
+ if (this._isFaMode) {
+ return hvigor.series(new pre_build_js_1.PreBuild(this._taskService).registry(), new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new legacy_merge_profile_js_1.LegacyMergeProfile(this._taskService).registry(), new legacy_process_profile_js_1.LegacyProcessProfile(this._taskService).registry(), new legacy_compile_resource_js_1.LegacyCompileResource(this._taskService).registry(), new compile_native_js_1.CompileNative(this._taskService).registry(), new build_native_js_1.BuildNative(this._taskService).registry(), new process_libs_js_1.ProcessLibs(this._taskService).registry(), new package_har_js_1.PackageHar(this._taskService).registry());
+ }
+ return hvigor.series(new pre_build_js_1.PreBuild(this._taskService).registry(), new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new merge_profile_js_1.MergeProfile(this._taskService).registry(), new process_profile_js_1.ProcessProfile(this._taskService).registry(), new merge_resource_js_1.MergeResource(this._taskService).registry(), new compile_resource_js_1.CompileResource(this._taskService).registry(), new compile_native_js_1.CompileNative(this._taskService).registry(), new build_native_js_1.BuildNative(this._taskService).registry(), new process_libs_js_1.ProcessLibs(this._taskService).registry(), new package_har_js_1.PackageHar(this._taskService).registry());
+ };
+ this._taskService = taskService;
+ this._isFaMode = isFaMode;
+ }
+}
+exports.AssembleHar = AssembleHar;
+//# sourceMappingURL=assemble-har.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-sub-har.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-sub-har.js
new file mode 100644
index 0000000..20648fe
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/assemble/assemble-sub-har.js
@@ -0,0 +1,42 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AssembleSubHar = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const pre_build_js_1 = require("../pre-build.js");
+const collect_har_dependency_js_1 = require("../collect-har-dependency.js");
+const merge_profile_js_1 = require("../merge-profile.js");
+const process_profile_js_1 = require("../process-profile.js");
+const merge_resource_js_1 = require("../merge-resource.js");
+const compile_resource_js_1 = require("../compile-resource.js");
+const legacy_merge_profile_js_1 = require("../legacy-tasks/legacy-merge-profile.js");
+const legacy_process_profile_js_1 = require("../legacy-tasks/legacy-process-profile.js");
+const legacy_compile_resource_js_1 = require("../legacy-tasks/legacy-compile-resource.js");
+const compile_native_js_1 = require("../compile-native.js");
+const process_libs_js_1 = require("../process-libs.js");
+const build_native_js_1 = require("../build-native.js");
+/**
+ * 组装Hap打包的任务流
+ *
+ * @since 2022/1/20
+ */
+class AssembleSubHar extends hvigor_base_1.Task {
+ constructor(taskService, isFaMode) {
+ super();
+ this.registry = () => {
+ const hvigor = new hvigor_base_1.Hvigor();
+ // 新老模型的任务流不一致
+ if (this._isFaMode) {
+ return hvigor.series(new pre_build_js_1.PreBuild(this._taskService).registry(), new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new legacy_merge_profile_js_1.LegacyMergeProfile(this._taskService).registry(), new legacy_process_profile_js_1.LegacyProcessProfile(this._taskService).registry(), new legacy_compile_resource_js_1.LegacyCompileResource(this._taskService).registry(), new compile_native_js_1.CompileNative(this._taskService).registry(), new build_native_js_1.BuildNative(this._taskService).registry(), new process_libs_js_1.ProcessLibs(this._taskService).registry());
+ }
+ return hvigor.series(new pre_build_js_1.PreBuild(this._taskService).registry(), new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new merge_profile_js_1.MergeProfile(this._taskService).registry(), new process_profile_js_1.ProcessProfile(this._taskService).registry(), new merge_resource_js_1.MergeResource(this._taskService).registry(), new compile_resource_js_1.CompileResource(this._taskService).registry(), new compile_native_js_1.CompileNative(this._taskService).registry(), new build_native_js_1.BuildNative(this._taskService).registry(), new process_libs_js_1.ProcessLibs(this._taskService).registry());
+ };
+ this._taskService = taskService;
+ this._isFaMode = isFaMode;
+ }
+}
+exports.AssembleSubHar = AssembleSubHar;
+//# sourceMappingURL=assemble-sub-har.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/build-native.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/build-native.js
new file mode 100644
index 0000000..f2833c6
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/build-native.js
@@ -0,0 +1,108 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BuildNative = void 0;
+const path_1 = __importDefault(require("path"));
+const fs_extra_1 = __importDefault(require("fs-extra"));
+const native_command_builder_js_1 = require("../builder/native-command-builder.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const code_type_enum_js_1 = require("../enum/code-type-enum.js");
+const cpu_abi_enum_js_1 = require("../enum/cpu-abi-enum.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+/**
+ * ohos native代码编译so任务
+ *
+ * @since 2021/1/21
+ */
+class BuildNative extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "BuildNative");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(BuildNative.name);
+ this._moduleModel = taskService.getModuleModel();
+ const profileOption = this._moduleModel.getProfileOpt();
+ this._nativeOption = profileOption.buildOption.externalNativeOptions;
+ this._sdkInfo = this.service.getSdkInfo();
+ }
+ buildCommand(abiFilter, target) {
+ const builder = new native_command_builder_js_1.NativeCommandBuilder(this._ninjaPath)
+ .changeToDir(path_1.default.resolve(this._moduleModel.getProjectDir(), '.cxx', 'default', 'default', abiFilter));
+ const commands = builder.build();
+ this._log._printDebugCommand("Cmake", commands);
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(commands);
+ }
+ doTaskAction(targetData, target) {
+ const moduleModel = this.service.getModuleModel();
+ const codeMap = moduleModel.getSourceSetByTargetName().getCodeMap();
+ const pathInfo = targetData.getPathInfo();
+ const outputDir = path_1.default.resolve(pathInfo.getModuleBuildIntermediates(), 'cmake', target, 'obj');
+ if (fs_extra_1.default.existsSync(outputDir)) {
+ fs_extra_1.default.emptyDirSync(outputDir);
+ }
+ if (!codeMap.has(code_type_enum_js_1.CodeType.CPP) || !this._nativeOption) {
+ return;
+ }
+ this._ninjaPath = this._sdkInfo.getNativeNinjaTool();
+ const profileOption = this._moduleModel.getProfileOpt();
+ const abiFilters = profileOption.buildOption.externalNativeOptions.abiFilters;
+ if (!abiFilters || 0 === abiFilters.length) {
+ return;
+ }
+ abiFilters.forEach(abiFilter => {
+ this.buildCommand(abiFilter, target);
+ // TODO 暂时方案, 确定目录结构后修改
+ const outputFilterDir = path_1.default.resolve(outputDir, abiFilter);
+ this.copyLibSo(abiFilter, outputFilterDir, pathInfo);
+ });
+ }
+ /**
+ * 临时拷贝libc++.so
+ *
+ * 设置了 -DOHOS_STL=c++_static 或者 -DOHOS_STL=none 时,不拷贝 libc++.so,且删除临时目录下的libc++.so
+ * 设置了 –DOHOS_STL=c++_shared时 拷贝llvm/lib/{arch}-linux-ohos/c++/libc++_shared.so 到临时目录
+ * 最终打包到hap的lib目录下
+ *
+ * @param abiFilter abiFilter
+ * @param outputDir 临时目录
+ * @param pathInfo pathInfo
+ * @private copyLibSo
+ */
+ copyLibSo(abiFilter, outputDir, pathInfo) {
+ const args = this.getArguments();
+ const delCpp = args.some(value => '-DOHOS_STL=c++_static' === value) ||
+ args.some(value => '-DOHOS_STL=none' === value);
+ const libSo = path_1.default.resolve(outputDir, 'libc++.so');
+ const sharedSo = path_1.default.resolve(outputDir, 'libc++_shared.so');
+ const libsSo = path_1.default.resolve(pathInfo.getModuleBuildIntermediates(), 'libs', abiFilter);
+ if (delCpp) {
+ fs_extra_1.default.removeSync(libSo);
+ fs_extra_1.default.removeSync(sharedSo);
+ fs_extra_1.default.removeSync(libsSo);
+ return;
+ }
+ const soLibPath = path_1.default.resolve(this._sdkInfo.getSdkNativeDir(), 'llvm', 'lib', cpu_abi_enum_js_1.CpuAbiEnum.getCpuType(abiFilter), 'c++');
+ const cppLibSo = path_1.default.resolve(soLibPath, 'libc++.so');
+ const sharedLibSo = path_1.default.resolve(soLibPath, 'libc++_shared.so');
+ if (args.some(value => '-DOHOS_STL=c++_shared' === value) && fs_extra_1.default.existsSync(sharedLibSo)) {
+ fs_extra_1.default.copySync(sharedLibSo, sharedSo);
+ }
+ if (fs_extra_1.default.existsSync(cppLibSo)) {
+ fs_extra_1.default.copySync(cppLibSo, libSo);
+ }
+ }
+ getArguments() {
+ const argument = this._nativeOption.arguments;
+ if (argument && '' !== argument) {
+ return argument.split(' ');
+ }
+ return [];
+ }
+}
+exports.BuildNative = BuildNative;
+//# sourceMappingURL=build-native.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/collect-har-dependency.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/collect-har-dependency.js
new file mode 100644
index 0000000..7b65da2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/collect-har-dependency.js
@@ -0,0 +1,189 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CollectHarDependency = void 0;
+const node_util_js_1 = require("../utils/node-util.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const fs_extra_1 = __importDefault(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+const resolve_package_path_1 = __importDefault(require("resolve-package-path"));
+const build_directory_const_js_1 = require("../const/build-directory-const.js");
+const common_const_js_1 = require("../const/common-const.js");
+const module_type_enum_1 = require("../enum/module-type-enum");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const project_file_reader_js_1 = require("../utils/project-file-reader.js");
+/**
+ * 收集node_modules中的npm har包依赖
+ *
+ * @since 2022/1/20
+ */
+class CollectHarDependency extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "CollectHarDependency");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(CollectHarDependency.name);
+ this.npmHarCollection = [];
+ this.localHarCollection = [];
+ this.localHarNames = [];
+ this.allDependencySet = new Set();
+ this.projectProfile = taskService.getProjectModel().getProfileOpt();
+ this.isStageMode = taskService.getHapExtraInfo().isStageMode();
+ }
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ doTaskAction(targetData, target) {
+ var _a, _b, _c;
+ /*
+ * 尝试读取module和project中的package.json的dependencies字段,通过require.resolve来获取每个依赖,存入中间目录
+ * 并递归地读取依赖模块的package.json,等于利用require.resolve来弥补npm list的问题
+ */
+ const modulePkgJson = path_1.default.resolve((_a = this.service.getModuleModel()) === null || _a === void 0 ? void 0 : _a.getProjectDir(), common_const_js_1.CommonConst.PACKAGE_JSON);
+ const projectPkgJson = path_1.default.resolve((_b = this.service.getProjectModel()) === null || _b === void 0 ? void 0 : _b.getProjectDir(), common_const_js_1.CommonConst.PACKAGE_JSON);
+ const mergedNpmResFile = path_1.default.resolve(targetData.getPathInfo().getIntermediatesMergeRes(), build_directory_const_js_1.BuildArtifactConst.MERGE_NPM_FILE_JSON);
+ this.npmHarCollection = [];
+ this.allDependencySet = new Set();
+ fs_extra_1.default.outputFileSync(mergedNpmResFile, "");
+ if ((_c = this.service.getModuleModel()) === null || _c === void 0 ? void 0 : _c.isHapModule()) {
+ this.collectNpmHarPaths([modulePkgJson, projectPkgJson]);
+ for (const npmHarPath of this.npmHarCollection) {
+ this._log.debug(`[HarNpm] Collect a har npm dependency: ${npmHarPath}`);
+ }
+ }
+ fs_extra_1.default.outputJsonSync(mergedNpmResFile, {
+ dependencies: this.npmHarCollection,
+ local: {
+ path: this.localHarCollection,
+ name: this.localHarNames
+ }
+ });
+ // 执行依赖的本地模块的构建任务
+ this._log.debug(`LocalDependencies: %s`, this.localHarNames.join(', '));
+ const nodeJsPath = (0, node_util_js_1.findValidNodeExePath)(this.service.getSdkInfo().getNodeJsDir());
+ if (this.localHarNames.length > 0) {
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(this.initExecuteCommand(this.localHarNames, nodeJsPath), {
+ stdout: process.stdout,
+ stderr: process.stderr
+ });
+ }
+ }
+ collectNpmHarPaths(pkgJsons) {
+ var _a, _b;
+ const pkgQueue = pkgJsons;
+ while (pkgQueue.length > 0) {
+ // queue中存放依赖中package.json的路径
+ const curPkgJson = pkgQueue.shift();
+ const curPkgPath = path_1.default.dirname(curPkgJson);
+ const pkgObj = fs_extra_1.default.readJsonSync(curPkgJson, { throws: false });
+ for (const pkgName in pkgObj === null || pkgObj === void 0 ? void 0 : pkgObj.dependencies) {
+ // 该npm包的package.json路径和根路径
+ const pkgJsonPath = (0, resolve_package_path_1.default)(pkgName, curPkgPath);
+ if (pkgJsonPath === null) {
+ continue;
+ }
+ const packageJson = fs_extra_1.default.readJsonSync(pkgJsonPath, {
+ throws: false
+ });
+ const pkgPath = path_1.default.dirname(pkgJsonPath);
+ if (!this.isValidHar(pkgPath)) {
+ continue;
+ }
+ // har包识别位,package.json中的name以@ohos/开头
+ if (!((_a = packageJson.name) === null || _a === void 0 ? void 0 : _a.startsWith('@ohos/'))) {
+ continue;
+ }
+ // 考虑循环依赖,用set过滤重复项,向queue中添加package.json路径
+ if (this.allDependencySet.has(packageJson.name)) {
+ continue;
+ }
+ this.allDependencySet.add(packageJson.name);
+ // 收集项目中所有模块的srcPath,跟pkgPath进行比对,识别出开发态/发布态的区别
+ (_b = this.projectProfile.modules) === null || _b === void 0 ? void 0 : _b.forEach(obj => {
+ if (path_1.default.resolve(process.cwd(), obj.srcPath) === pkgPath) {
+ this.localHarCollection.push(pkgPath);
+ this.localHarNames.push(obj.name);
+ }
+ return obj.srcPath;
+ });
+ this.npmHarCollection.push(pkgPath);
+ pkgQueue.push(pkgJsonPath);
+ }
+ }
+ }
+ isValidHar(pkgPath) {
+ var _a, _b, _c, _d;
+ const module5File = path_1.default.resolve(pkgPath, "src", "main", common_const_js_1.CommonConst.MODULE_JSON5);
+ const moduleFile = path_1.default.resolve(pkgPath, "src", "main", common_const_js_1.CommonConst.MODULE_JSON);
+ const configFile = path_1.default.resolve(pkgPath, "src", "main", common_const_js_1.CommonConst.CONFIG_JSON);
+ const solution = "Using OpenHarmony npm packages or modules that are compatible with current module. " +
+ "Check the OpenHarmony npm package or module below:";
+ if (fs_extra_1.default.existsSync(moduleFile) || fs_extra_1.default.existsSync(module5File) || fs_extra_1.default.existsSync(configFile)) {
+ let isHar = false;
+ if (fs_extra_1.default.existsSync(moduleFile)) {
+ const moduleJson = project_file_reader_js_1.ProjectFileReader.getJson5Obj(moduleFile);
+ isHar = ((_a = moduleJson.module) === null || _a === void 0 ? void 0 : _a.type) === module_type_enum_1.ModuleType.Har;
+ if (isHar && !this.isStageMode) {
+ this._log._buildError(`FA model module ${this.moduleName} does not support including ` +
+ "OpenHarmony npm packages or modules in Stage model. OpenHarmony build tasks will not be " +
+ "executed, and OpenHarmony resources will not be packed.")
+ ._solution(solution)
+ ._file(pkgPath)
+ ._printErrorAndExit(this.moduleName);
+ }
+ }
+ if (fs_extra_1.default.existsSync(module5File)) {
+ const module5Json = project_file_reader_js_1.ProjectFileReader.getJson5Obj(module5File);
+ isHar = ((_b = module5Json.module) === null || _b === void 0 ? void 0 : _b.type) === module_type_enum_1.ModuleType.Har;
+ if (isHar && !this.isStageMode) {
+ this._log._buildError(`FA model module ${this.moduleName} does not support including ` +
+ "OpenHarmony npm packages or modules in Stage model. OpenHarmony build tasks will not be " +
+ "executed, and OpenHarmony resources will not be packed.")
+ ._solution(solution)
+ ._file(pkgPath)
+ ._printErrorAndExit(this.moduleName);
+ }
+ }
+ if (fs_extra_1.default.existsSync(configFile)) {
+ const configJson = fs_extra_1.default.readJsonSync(configFile);
+ isHar = ((_d = (_c = configJson.module) === null || _c === void 0 ? void 0 : _c.distro) === null || _d === void 0 ? void 0 : _d.moduleType) === module_type_enum_1.ModuleType.Har;
+ if (isHar && this.isStageMode) {
+ this._log._buildError(`Stage model module ${this.moduleName} does not support including ` +
+ "OpenHarmony npm packages or modules in FA model. OpenHarmony build tasks will not be " +
+ "executed, and OpenHarmony resources will not be packed.")
+ ._solution(solution)
+ ._file(pkgPath)
+ ._printErrorAndExit(this.moduleName);
+ }
+ }
+ if (!isHar) {
+ this._log._buildError(`Dependency in ${pkgPath} is not a valid OpenHarmony npm package or module.`)
+ ._solution("Check the config file of OpenHarmony npm package or module, and use a correct" +
+ "OpenHarmony npm package or module.")
+ ._file(pkgPath)
+ ._printErrorAndExit(this.moduleName);
+ }
+ return isHar;
+ }
+ return false;
+ }
+ initExecuteCommand(localHarNames, nodeJsPath) {
+ const targets = localHarNames.map(name => {
+ return `${name}@default`;
+ });
+ const command = [nodeJsPath, require.resolve("@ohos/hvigor/bin/hvigor"), "-m", "module"];
+ command.push("-p");
+ command.push(`product=default`);
+ command.push("-p");
+ command.push(`module=${targets.join(",")}`);
+ command.push("assembleSubHar");
+ command.push(this._log._getCliLevel());
+ this._log._printDebugCommand("AssembleSubHar", command);
+ return command;
+ }
+}
+exports.CollectHarDependency = CollectHarDependency;
+//# sourceMappingURL=collect-har-dependency.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/common/clean.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/common/clean.js
new file mode 100644
index 0000000..8f660f4
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/common/clean.js
@@ -0,0 +1,120 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Clean = void 0;
+const fs = __importStar(require("fs"));
+const path_1 = __importDefault(require("path"));
+const module_task_service_js_1 = require("../service/module-task-service.js");
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const pretty_hrtime_1 = __importDefault(require("pretty-hrtime"));
+/**
+ * module级别的clean
+ *
+ * @since 2022/1/10
+ */
+class Clean extends hvigor_base_1.Task {
+ constructor(taskService) {
+ super();
+ this._logger = ohos_logger_js_1.OhosLogger.getLogger(Clean.name);
+ this.registry = () => {
+ return this.clean;
+ };
+ this.clean = (cb) => {
+ let buildDir;
+ const taskBeginTime = process.hrtime();
+ let moduleName;
+ if (this._taskService instanceof module_task_service_js_1.ModuleTaskService) {
+ const moduleModel = this._taskService.getModuleModel();
+ moduleName = moduleModel.getName();
+ if (!moduleModel) {
+ return;
+ }
+ buildDir = path_1.default.resolve(moduleModel.getProjectDir(), "build");
+ }
+ else {
+ moduleName = this._taskService.getProjectModel().getName();
+ buildDir = path_1.default.resolve(this._taskService.getProjectModel().getProjectDir(), "build");
+ }
+ let hasError = false;
+ if (fs.existsSync(buildDir)) {
+ hasError = this.rmdirSync(buildDir, false);
+ }
+ const taskEndTime = process.hrtime(taskBeginTime);
+ const realTime = (0, pretty_hrtime_1.default)(taskEndTime);
+ this._logger._printTaskInfo(moduleName, "Clean", realTime);
+ cb();
+ if (hasError) {
+ process.exit(-1);
+ }
+ };
+ this.rmdirSync = (dirPath, hasError) => {
+ fs.readdirSync(dirPath).forEach(name => {
+ const filePath = path_1.default.resolve(dirPath, name);
+ const fileStats = fs.statSync(filePath);
+ if (fileStats.isFile()) {
+ try {
+ fs.unlinkSync(filePath);
+ }
+ catch (e) {
+ this._logger.warn(e.message);
+ hasError = true;
+ }
+ }
+ else if (fileStats.isDirectory()) {
+ hasError = this.rmdirSync(filePath, hasError);
+ }
+ });
+ try {
+ let canRm = true;
+ const files = fs.readdirSync(dirPath);
+ files.forEach(name => {
+ const filePath = path_1.default.resolve(dirPath, name);
+ if (fs.existsSync(filePath)) {
+ canRm = false;
+ }
+ });
+ if (canRm) {
+ fs.rmdirSync(dirPath);
+ }
+ }
+ catch (e) {
+ this._logger.warn(e.message);
+ hasError = true;
+ }
+ return hasError;
+ };
+ this._taskService = taskService;
+ }
+}
+exports.Clean = Clean;
+//# sourceMappingURL=clean.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-native.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-native.js
new file mode 100644
index 0000000..a06abd2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-native.js
@@ -0,0 +1,106 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CompileNative = void 0;
+const fs_extra_1 = __importDefault(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+const native_command_builder_js_1 = require("../builder/native-command-builder.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const code_type_enum_js_1 = require("../enum/code-type-enum.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+/**
+ * ohos native代码编译任务
+ *
+ * @since 2021/1/21
+ */
+class CompileNative extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "CompileNative");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(CompileNative.name);
+ this._moduleDir = this.moduleModel.getProjectDir();
+ const profileOption = this.moduleModel.getProfileOpt();
+ this._nativeOption = profileOption.buildOption.externalNativeOptions;
+ }
+ taskShouldDo(targetData) {
+ return this.moduleModel
+ .getSourceSetByTargetName(targetData.getTargetName())
+ .getCodeMap()
+ .has(code_type_enum_js_1.CodeType.CPP)
+ && this._nativeOption !== undefined;
+ }
+ doTaskAction(targetData, target) {
+ var _a;
+ const pathInfo = targetData.getPathInfo();
+ (_a = this._nativeOption.abiFilters) === null || _a === void 0 ? void 0 : _a.forEach(abiFilter => {
+ this.buildCommand(abiFilter, target, pathInfo);
+ });
+ }
+ buildCommand(abiFilter, target, pathInfo) {
+ const builder = new native_command_builder_js_1.NativeCommandBuilder(this.sdkInfo.getCmakeTool());
+ const args = this.getArguments();
+ if (0 !== args.length) {
+ builder.addAllParams(args);
+ }
+ // TODO 暂时方案, 确定目录结构后修改
+ const outputDir = path_1.default.resolve(pathInfo.getModuleBuildIntermediates(), 'cmake', target, 'obj', abiFilter);
+ const tempDir = path_1.default.resolve(pathInfo.getCppOutputDir(), 'default', 'default', abiFilter);
+ this.checkDir(outputDir);
+ this.cleanCache(tempDir);
+ builder.addCmakeList(this.getCmakeListDir())
+ .addTempFilePath(tempDir)
+ .addOhosArch(abiFilter)
+ .addOutputDir(outputDir)
+ .addBuildType('normal')
+ .addNativeSdk(this.sdkInfo.getSdkNativeDir())
+ .addSystemName('OHOS')
+ .addOhosArchAbi(abiFilter)
+ .exportCompileCommands('ON')
+ .addToolChain(this.sdkInfo.getNativeToolchain())
+ .addGenerator('Ninja')
+ .addMakeProgramPath(this.sdkInfo.getNativeNinjaTool());
+ if (this._nativeOption.cFlags) {
+ builder.addCFlags(this._nativeOption.cFlags);
+ }
+ if (this._nativeOption.cppFlags && '' !== this._nativeOption.cppFlags) {
+ builder.addCxxFlags(this._nativeOption.cppFlags);
+ }
+ const commands = builder.build();
+ this._log._printDebugCommand("Ninja", commands);
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(commands);
+ }
+ getCmakeListDir() {
+ return path_1.default.resolve(this._moduleDir, this._nativeOption.path, '..');
+ }
+ getArguments() {
+ const argument = this._nativeOption.arguments;
+ if (argument && '' !== argument) {
+ return argument.split(' ');
+ }
+ return [];
+ }
+ checkDir(dir) {
+ try {
+ const stat = fs_extra_1.default.statSync(path_1.default.resolve(dir));
+ if (stat && stat.isDirectory()) {
+ fs_extra_1.default.removeSync(path_1.default.resolve(dir));
+ }
+ fs_extra_1.default.mkdirSync(path_1.default.resolve(dir), { recursive: true });
+ }
+ catch (e) {
+ fs_extra_1.default.mkdirSync(path_1.default.resolve(dir), { recursive: true });
+ }
+ }
+ cleanCache(tempDir) {
+ const cacheFile = path_1.default.resolve(tempDir, 'CMakeCache.txt');
+ fs_extra_1.default.removeSync(cacheFile);
+ }
+}
+exports.CompileNative = CompileNative;
+//# sourceMappingURL=compile-native.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-node.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-node.js
new file mode 100644
index 0000000..d2cd08b
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-node.js
@@ -0,0 +1,114 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CompileNode = void 0;
+const code_type_enum_js_1 = require("../enum/code-type-enum.js");
+const path_1 = __importDefault(require("path"));
+const fse = __importStar(require("fs-extra"));
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const node_command_builder_js_1 = require("../builder/node-command-builder.js");
+const common_const_js_1 = require("../const/common-const.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const build_directory_const_js_1 = require("../const/build-directory-const.js");
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const node_util_js_1 = require("../utils/node-util.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+/**
+ * 调用loader编译新模型的js/ets源码
+ *
+ * @since 2022/1/10
+ */
+class CompileNode extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService, codeType) {
+ super(taskService, `Compile${codeType.toUpperCase()}`);
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(CompileNode.name);
+ this.commonOption = {
+ 'path': (0, node_util_js_1.findValidNodeDir)(this.sdkInfo.getNodeJsDir()),
+ 'watchMode': 'false',
+ };
+ this.codeType = codeType;
+ }
+ doTaskAction(targetData, target) {
+ this.doRealLoaderCompile((0, node_util_js_1.findValidNodeDir)(this.sdkInfo.getNodeJsDir()), this.codeType === code_type_enum_js_1.CodeType.ETS ? this.sdkInfo.getEtsLoader() : this.sdkInfo.getJsLoader(), this.generateLoaderEnv(targetData));
+ this.moveReleaseMap(targetData);
+ }
+ taskShouldDo(targetData) {
+ this.codeModel = this.moduleModel
+ .getSourceSetByTargetName(targetData.getTargetName())
+ .getCodeMap().get(this.codeType);
+ return this.codeModel !== undefined;
+ }
+ /**
+ * 移动_releaseMap到临时目录
+ *
+ * @param {ModuleTargetData} targetData
+ * @param {string} abilityPath 老模型的_releaseMap需要会拷贝一级目录到abilityPath
+ * @protected
+ */
+ moveReleaseMap(targetData, abilityPath = '.') {
+ const reMapDir = path_1.default.resolve(targetData.getPathInfo().getIntermediatesAssetsPath(), this.codeType, abilityPath, build_directory_const_js_1.BuildArtifactConst.RELEASE_MAP);
+ if (!fse.existsSync(reMapDir)) {
+ return;
+ }
+ const tempDir = path_1.default.resolve(this.getTaskTempDir(targetData), abilityPath, build_directory_const_js_1.BuildArtifactConst.RELEASE_MAP);
+ if (fse.existsSync(tempDir)) {
+ fse.removeSync(tempDir);
+ }
+ fse.moveSync(reMapDir, tempDir);
+ this._log.debug(`move ${reMapDir} to ${tempDir}`);
+ }
+ doRealLoaderCompile(nodeJsDir, workDir, cmdEnv) {
+ const debuggable = hvigor_base_1.vigorConfigInst.getExtraConfig().get(common_const_js_1.CommonConst.DEBUGGABLE);
+ const nodeCommandBuilder = new node_command_builder_js_1.NodeCommandBuilder(nodeJsDir, true)
+ .addWebpackPath('./node_modules/webpack/bin/webpack.js')
+ .addWebpackConfig(this.codeType === code_type_enum_js_1.CodeType.ETS ? common_const_js_1.CommonConst.ETS_WEBPACK_FILE : common_const_js_1.CommonConst.ACE_RICH_WEBPACK_FILE)
+ .addBuildMode(debuggable === undefined || debuggable !== "false");
+ if (this.moduleModel.isArkModule()) {
+ nodeCommandBuilder.addCompilerType('ark');
+ }
+ this._log._printDebugCommand("NodeEnv", cmdEnv);
+ this._log._printDebugCommand(`${this.codeType.toUpperCase()}-loader`, nodeCommandBuilder.build());
+ const options = {
+ cwd: workDir,
+ env: cmdEnv
+ };
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(nodeCommandBuilder.build(), options);
+ }
+ generateLoaderEnv(targetData) {
+ const pathInfo = targetData.getPathInfo();
+ const cmdEnv = Object.assign(Object.assign({}, this.commonOption), { 'appResource': path_1.default.resolve(pathInfo.getIntermediatesRes(), build_directory_const_js_1.BuildArtifactConst.RESOURCE_TABLE_TXT), 'aceModuleBuild': path_1.default.resolve(pathInfo.getIntermediatesAssetsPath(), this.codeType), 'aceModuleRoot': this.codeModel.getSrcPath(), 'cachePath': this.getTaskTempDir(targetData), 'aceProfilePath': pathInfo.getIntermediatesResProfilePath(), 'aceModuleJsonPath': path_1.default.resolve(pathInfo.getIntermediatesRes(), common_const_js_1.CommonConst.MODULE_JSON), 'aceSuperVisualPath': path_1.default.resolve(this.moduleModel.getSourceRootByTargetName(targetData.getTargetName()), 'supervisual') });
+ const aceLoaderJson = path_1.default.resolve(pathInfo.getIntermediatesLoaderPath(), build_directory_const_js_1.BuildArtifactConst.LOADER_JSON);
+ return fse.existsSync(aceLoaderJson) ? Object.assign(Object.assign({}, cmdEnv), { aceBuildJson: aceLoaderJson }) : cmdEnv;
+ }
+}
+exports.CompileNode = CompileNode;
+//# sourceMappingURL=compile-node.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-resource.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-resource.js
new file mode 100644
index 0000000..f851b41
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/compile-resource.js
@@ -0,0 +1,67 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CompileResource = void 0;
+const restool_command_builder_js_1 = require("../builder/restool-command-builder.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const path_1 = __importDefault(require("path"));
+const file_util_js_1 = require("../utils/file-util.js");
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const build_directory_const_js_1 = require("../const/build-directory-const.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const project_file_reader_js_1 = require("../utils/project-file-reader.js");
+/**
+ * 编译资源
+ *
+ * @since 2022/1/10
+ */
+class CompileResource extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "CompileResource");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(CompileResource.name);
+ }
+ taskShouldDo(targetData) {
+ return this.moduleModel.getModuleType() !== undefined;
+ }
+ doTaskAction(targetData, target) {
+ const pathInfo = targetData.getPathInfo();
+ const projectModel = this.moduleModel.getParentProject();
+ // 处理后最终传给restool的module.json,
+ const processJson = pathInfo.getIntermediatesProcessProfile();
+ // 处理后的module.json中的app属性
+ const appOpt = project_file_reader_js_1.ProjectFileReader.getJson5Obj(processJson);
+ const outputDir = pathInfo.getIntermediatesRes();
+ file_util_js_1.FileUtil.checkDirWithoutDelete(outputDir);
+ file_util_js_1.FileUtil.checkDirWithoutDelete(pathInfo.getGenerateSourceR());
+ const restoolBuilder = new restool_command_builder_js_1.RestoolCommandBuilder(this.sdkInfo.getRestool());
+ // 加入har依赖中的resources
+ const harList = project_file_reader_js_1.ProjectFileReader.getJson5Obj(path_1.default.resolve(targetData.getPathInfo().getIntermediatesMergeRes(), build_directory_const_js_1.BuildArtifactConst.MERGE_NPM_FILE_JSON)).dependencies;
+ harList.forEach(harPath => {
+ restoolBuilder.addInputDir(path_1.default.resolve(harPath, "src", "main"));
+ });
+ restoolBuilder.addInputDir(this.moduleModel.getSourceSetByTargetName(target).getSourceSetRoot()); // 公共模块的资源
+ if (this.service.getModuleModel().isHapModule()) {
+ restoolBuilder.addInputDir(path_1.default.resolve(projectModel.getAppRes().getResourcePath(), "..")); // app级别的资源
+ }
+ restoolBuilder.addJsonFile(processJson)
+ .addModulePackName(appOpt.app.bundleName)
+ .addOutputDir(outputDir)
+ .addResTable(path_1.default.resolve(pathInfo.getGenerateSourceR(), build_directory_const_js_1.BuildArtifactConst.RESOURCE_TABLE_H))
+ .forceDelete()
+ .addModules([...new Set([
+ this.moduleModel.getName(),
+ this.moduleModel.getSourceSetByTargetName(target)
+ .getModuleTargetRes().getModuleJsonOpt().module.name
+ ])].join(','));
+ const commands = restoolBuilder.build();
+ this._log._printDebugCommand("Restool", commands);
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(commands);
+ }
+}
+exports.CompileResource = CompileResource;
+//# sourceMappingURL=compile-resource.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/data/hap-task-target-data.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/data/hap-task-target-data.js
new file mode 100644
index 0000000..26c5f7f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/data/hap-task-target-data.js
@@ -0,0 +1,40 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ModuleTargetData = void 0;
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+/**
+ * 针对每一个Module中的target初始化的一个数据对象
+ *
+ * @since 2021/12/24
+ */
+class ModuleTargetData {
+ constructor(moduleModel, targetName, pathInfo, product) {
+ this._moduleModel = moduleModel;
+ this._targetName = targetName;
+ this._pathInfo = pathInfo;
+ this._product = product;
+ }
+ getTargetName() {
+ return this._targetName;
+ }
+ getPathInfo() {
+ return this._pathInfo;
+ }
+ getModuleTargetOutputFileName(isSigned = false) {
+ const signedSuffix = isSigned ? "signed" : "unsigned";
+ const moduleName = this._moduleModel.getName();
+ return `${moduleName}-${this._targetName}-${signedSuffix}${build_directory_const_js_1.BuildArtifactExtension.DOT_HAP}`;
+ }
+ getSignConfigName() {
+ return this._product.signingConfig;
+ }
+ getProduct() {
+ return this._product;
+ }
+}
+exports.ModuleTargetData = ModuleTargetData;
+//# sourceMappingURL=hap-task-target-data.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/generate-loader-json.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/generate-loader-json.js
new file mode 100644
index 0000000..1e6328b
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/generate-loader-json.js
@@ -0,0 +1,81 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GenerateLoaderJson = void 0;
+const path_1 = __importDefault(require("path"));
+const fse = __importStar(require("fs-extra"));
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const property_get_js_1 = require("../sdk/lib/property-get.js");
+/**
+ * 生成loader需要的json文件
+ *
+ * @since 2022/3/3
+ */
+class GenerateLoaderJson extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, 'GenerateLoaderJson');
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(GenerateLoaderJson.name);
+ }
+ doTaskAction(targetData, target) {
+ var _a, _b, _c;
+ const aceLoaderJson = path_1.default.resolve(targetData.getPathInfo().getIntermediatesLoaderPath(), 'loader.json');
+ const workers = [];
+ const moduleModel = this.service.getModuleModel();
+ (_c = (_b = (_a = moduleModel.getProfileOpt().buildOption) === null || _a === void 0 ? void 0 : _a.sourceOption) === null || _b === void 0 ? void 0 : _b.workers) === null || _c === void 0 ? void 0 : _c.forEach((workerPath) => {
+ const workerAbsolutePath = path_1.default.isAbsolute(workerPath) ?
+ workerPath : path_1.default.resolve(moduleModel.getProjectDir(), workerPath);
+ if (property_get_js_1.Property.normalizePathSeparator(workerAbsolutePath).startsWith(property_get_js_1.Property.normalizePathSeparator(this.moduleModel.getProjectDir()))) {
+ workers.push(workerAbsolutePath);
+ }
+ else {
+ this._log._buildError(`${workerPath} is not under ${this.moduleModel.getProjectDir()}`)
+ ._solution(`modify ${workerPath} in build-profile.json5`)
+ ._file(this.moduleModel.getProfilePath())
+ ._printErrorAndExit();
+ }
+ });
+ if (workers.length === 0) {
+ return;
+ }
+ fse.outputJSONSync(aceLoaderJson, {
+ workers: workers
+ });
+ }
+ beforeTask(targetData) {
+ // clean output
+ const aceLoaderPath = targetData.getPathInfo().getIntermediatesLoaderPath();
+ fse.removeSync(aceLoaderPath);
+ }
+}
+exports.GenerateLoaderJson = GenerateLoaderJson;
+//# sourceMappingURL=generate-loader-json.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-compile-node.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-compile-node.js
new file mode 100644
index 0000000..2197dc9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-compile-node.js
@@ -0,0 +1,86 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyCompileNode = void 0;
+const code_type_enum_js_1 = require("../../enum/code-type-enum.js");
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const compile_node_js_1 = require("../compile-node.js");
+const path_1 = __importDefault(require("path"));
+const node_util_js_1 = require("../../utils/node-util.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const fse = __importStar(require("fs-extra"));
+/**
+ * 调用loader编译老模型的js/ets源码
+ *
+ * @since 2022/1/20
+ */
+class LegacyCompileNode extends compile_node_js_1.CompileNode {
+ constructor(taskService, codeType) {
+ super(taskService, codeType);
+ this._logger = ohos_logger_js_1.OhosLogger.getLogger(LegacyCompileNode.name);
+ }
+ doTaskAction(targetData, target) {
+ const moduleModel = this.service.getModuleModel();
+ const codeModel = moduleModel.getSourceSetByTargetName(target).getCodeMap().get(this.codeType);
+ if (codeModel === undefined) {
+ this._logger.debug(`Cannot find '${this.codeType}' source.`);
+ return;
+ }
+ // input
+ const aceModuleRoot = codeModel.getSrcPath();
+ const pathInfo = targetData.getPathInfo();
+ // 依赖资源编译
+ const resourceTxt = path_1.default.resolve(pathInfo.getIntermediatesRes(), build_directory_const_js_1.BuildArtifactConst.RESOURCE_TABLE_TXT);
+ // 依赖manifest.json的生成
+ const aceManifestPath = path_1.default.resolve(pathInfo.getIntermediatesLegacyManifestJson());
+ // output 老模型中, 不管源码是ets还是js, 都输出到js目录下
+ const aceModuleBuild = path_1.default.resolve(targetData.getPathInfo().getIntermediatesAssetsPath(), code_type_enum_js_1.CodeType.JS);
+ // nodejs path
+ const nodeJsDir = (0, node_util_js_1.findValidNodeDir)(this.sdkInfo.getNodeJsDir());
+ const loader = this.codeType === code_type_enum_js_1.CodeType.ETS ?
+ this.sdkInfo.getEtsLoader() : this.sdkInfo.getJsLoader();
+ const abilityObjs = moduleModel.getLegacyAbilities(target);
+ for (let i = 0; i < abilityObjs.length; i++) {
+ const abilityInfo = abilityObjs[i];
+ if (abilityInfo.getSrcLanguage() !== this.codeType) {
+ continue;
+ }
+ let cmdEnv = Object.assign(Object.assign({}, this.commonOption), { 'abilityType': abilityInfo.getType(), 'aceManifestPath': path_1.default.resolve(aceManifestPath, abilityInfo.getRelateSrcPath(), build_directory_const_js_1.BuildArtifactConst.LEGACY_MANIFEST_JSON), 'appResource': resourceTxt, 'aceModuleRoot': path_1.default.resolve(aceModuleRoot, abilityInfo.getRelateSrcPath()), 'aceModuleBuild': path_1.default.resolve(aceModuleBuild, abilityInfo.getRelateSrcPath()), 'cachePath': this.getTaskTempDir(targetData), 'aceSuperVisualPath': path_1.default.resolve(moduleModel.getSourceRootByTargetName(target), 'supervisual', abilityInfo.getRelateSrcPath()) });
+ const aceLoaderJson = path_1.default.resolve(pathInfo.getIntermediatesLoaderPath(), 'loader.json');
+ cmdEnv = fse.existsSync(aceLoaderJson) ? Object.assign(Object.assign({}, cmdEnv), { aceBuildJson: aceLoaderJson }) : cmdEnv;
+ this.doRealLoaderCompile(nodeJsDir, loader, cmdEnv);
+ this.moveReleaseMap(targetData, abilityInfo.getRelateSrcPath());
+ }
+ }
+}
+exports.LegacyCompileNode = LegacyCompileNode;
+//# sourceMappingURL=legacy-compile-node.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-compile-resource.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-compile-resource.js
new file mode 100644
index 0000000..50dba1b
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-compile-resource.js
@@ -0,0 +1,70 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyCompileResource = void 0;
+const restool_command_builder_js_1 = require("../../builder/restool-command-builder.js");
+const process_utils_js_1 = require("../../utils/process-utils.js");
+const file_util_js_1 = require("../../utils/file-util.js");
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const path_1 = __importDefault(require("path"));
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+/**
+ * 老模型的资源编译任务
+ *
+ * @since 2022/1/20
+ */
+class LegacyCompileResource extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, 'CompileResource');
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(LegacyCompileResource.name);
+ }
+ doTaskAction(targetData, target) {
+ const sdkInfo = this.service.getSdkInfo();
+ const moduleModel = this.service.getModuleModel();
+ const pathInfo = targetData.getPathInfo();
+ // 处理后最终传给restool的config.json
+ const processJson = pathInfo.getIntermediatesProcessLegacyProfile();
+ const configInfo = project_file_reader_js_1.ProjectFileReader.getJson5Obj(processJson);
+ const outputDir = pathInfo.getIntermediatesRes();
+ file_util_js_1.FileUtil.checkDirWithoutDelete(outputDir);
+ const restoolBuilder = new restool_command_builder_js_1.RestoolCommandBuilder(sdkInfo.getRestool());
+ // 加入har依赖中的resources
+ const harList = project_file_reader_js_1.ProjectFileReader.getJson5Obj(path_1.default.resolve(targetData.getPathInfo().getIntermediatesMergeRes(), build_directory_const_js_1.BuildArtifactConst.MERGE_NPM_FILE_JSON)).dependencies;
+ harList.forEach(harPath => {
+ restoolBuilder.addInputDir(path_1.default.resolve(harPath, "src", "main"));
+ });
+ restoolBuilder.addInputDir(moduleModel.getSourceSetByTargetName(target).getSourceSetRoot()) // 公共模块的资源
+ .addJsonFile(processJson) // config.json
+ .addModulePackName(configInfo.app.bundleName) // bundleName
+ .addOutputDir(outputDir) // 输出目录
+ .forceDelete()
+ .addModules([...new Set([
+ this.moduleModel.getName(),
+ this.moduleModel.getSourceSetByTargetName(target)
+ .getLegacyModuleTargetRes().getConfigJsonOpt().module.distro.moduleName
+ ])].join(','));
+ const isShellMode = false;
+ if (isShellMode) {
+ // 生成的ResourceTable.txt路径
+ restoolBuilder
+ .addResTable(path_1.default.resolve(this.getTaskTempDir(targetData), build_directory_const_js_1.BuildArtifactConst.RESOURCE_TABLE_JAVA))
+ .addOutputBak(this.getTaskTempDir(targetData));
+ }
+ else {
+ restoolBuilder.addResTable(path_1.default.resolve(outputDir, build_directory_const_js_1.BuildArtifactConst.RESOURCE_TABLE_TXT));
+ }
+ const commands = restoolBuilder.build();
+ this._log._printDebugCommand("restool", commands);
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(commands);
+ }
+}
+exports.LegacyCompileResource = LegacyCompileResource;
+//# sourceMappingURL=legacy-compile-resource.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-generate-har-js-manifest.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-generate-har-js-manifest.js
new file mode 100644
index 0000000..4789b3d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-generate-har-js-manifest.js
@@ -0,0 +1,85 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyGenerateHarJsManifest = void 0;
+const path = __importStar(require("path"));
+const fse = __importStar(require("fs-extra"));
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const inject_const_js_1 = require("../../const/inject-const.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const PAGE = inject_const_js_1.InjectConst.PREVIEWER_REPLACE_PAGE;
+/**
+ * 为har生成一个假的manifest
+ *
+ * @since 2022/3/1
+ */
+class LegacyGenerateHarJsManifest extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "LegacyGenerateHarJsManifest");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(LegacyGenerateHarJsManifest.name);
+ this.previewPage = hvigor_base_1.vigorConfigInst.getExtraConfig().get(PAGE);
+ }
+ static getWindowObj() {
+ return {
+ autoDesignWidth: false,
+ designWidth: 454
+ };
+ }
+ doTaskAction(targetData, target) {
+ const moduleModel = this.service.getModuleModel();
+ this.generateJsonInfo(moduleModel.getJsonObjByTargetName(target), targetData.getPathInfo());
+ }
+ getManifestPages() {
+ if (!this.previewPage) {
+ return [];
+ }
+ this._log.debug(`generate ${this.previewPage} for manifest.`);
+ return [this.previewPage];
+ }
+ generateJsonInfo(configJsonObj, targetPathInfo) {
+ const parentProject = this.service.getModuleModel().getParentProject();
+ const manifestObj = {
+ appID: configJsonObj.app.bundleName,
+ versionName: configJsonObj.app.version.name,
+ versionCode: configJsonObj.app.version.code,
+ minPlatformVersion: parentProject.getProfileOpt().app.compatibleSdkVersion,
+ appName: "",
+ deviceType: configJsonObj.module.deviceType,
+ window: LegacyGenerateHarJsManifest.getWindowObj(),
+ pages: this.getManifestPages()
+ };
+ this._log._printDebugCommand("JsManifest", manifestObj);
+ const manifestFile = path.resolve(targetPathInfo.getIntermediatesLegacyManifestJson(), build_directory_const_js_1.BuildArtifactConst.LEGACY_MANIFEST_JSON);
+ fse.outputJSONSync(manifestFile, manifestObj);
+ }
+}
+exports.LegacyGenerateHarJsManifest = LegacyGenerateHarJsManifest;
+//# sourceMappingURL=legacy-generate-har-js-manifest.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-generate-js-manifest.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-generate-js-manifest.js
new file mode 100644
index 0000000..562bd6f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-generate-js-manifest.js
@@ -0,0 +1,130 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyGenerateJsManifest = void 0;
+const path = __importStar(require("path"));
+const fse = __importStar(require("fs-extra"));
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const inject_const_js_1 = require("../../const/inject-const.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const ability_type_enum_js_1 = require("../../enum/ability-type-enum.js");
+const SRC_PATH = inject_const_js_1.InjectConst.PREVIEWER_REPLACE_SRC_PATH;
+const PAGE = inject_const_js_1.InjectConst.PREVIEWER_REPLACE_PAGE;
+/**
+ * 遍历project的module信息并生成JsManifest.json文件
+ *
+ * @since 2022/1/19
+ */
+class LegacyGenerateJsManifest extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "GenerateJsManifest");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(LegacyGenerateJsManifest.name);
+ this.previewSrcPath = hvigor_base_1.vigorConfigInst.getExtraConfig().get(SRC_PATH);
+ this.previewPage = hvigor_base_1.vigorConfigInst.getExtraConfig().get(PAGE);
+ }
+ doTaskAction(targetData, target) {
+ const moduleModel = this.service.getModuleModel();
+ const abilityObjs = moduleModel.getLegacyAbilities(target);
+ for (let i = 0; i < abilityObjs.length; i++) {
+ const abilityInfo = abilityObjs[i];
+ if (abilityInfo.getType() !== ability_type_enum_js_1.AbilityTypeEnum.PAGE &&
+ abilityInfo.getType() !== ability_type_enum_js_1.AbilityTypeEnum.FORM) {
+ continue;
+ }
+ this.generateJsonInfo(abilityObjs[i], moduleModel.getJsonObjByTargetName(target), targetData.getPathInfo());
+ }
+ }
+ getManifestPages(legacyAbilityInfo) {
+ var _a;
+ if (!this.previewSrcPath || !this.previewPage || this.previewSrcPath !== legacyAbilityInfo.getRelateSrcPath()) {
+ const pages = (_a = legacyAbilityInfo.getConfigJsonJsObj()) === null || _a === void 0 ? void 0 : _a.pages;
+ return pages ? pages : [];
+ }
+ this._log.debug(`replace ${this.previewPage} for ${this.previewSrcPath} manifest.`);
+ return [this.previewPage];
+ }
+ generateJsonInfo(legacyAbilityInfo, configJsonObj, targetPathInfo) {
+ var _a, _b;
+ const parentProject = this.service.getModuleModel().getParentProject();
+ let manifestObj = {
+ appID: configJsonObj.app.bundleName,
+ versionName: configJsonObj.app.version.name,
+ versionCode: configJsonObj.app.version.code,
+ minPlatformVersion: parentProject.getProfileOpt().app.compatibleSdkVersion,
+ appName: LegacyGenerateJsManifest.findAppName(configJsonObj),
+ deviceType: configJsonObj.module.deviceType,
+ window: LegacyGenerateJsManifest.getWindowObj(legacyAbilityInfo),
+ pages: this.getManifestPages(legacyAbilityInfo)
+ };
+ const mode = (_a = legacyAbilityInfo.getConfigJsonJsObj()) === null || _a === void 0 ? void 0 : _a.mode;
+ const type = legacyAbilityInfo.getType() === ability_type_enum_js_1.AbilityTypeEnum.FORM ?
+ ability_type_enum_js_1.AbilityTypeEnum.FORM : (_b = legacyAbilityInfo.getConfigJsonJsObj()) === null || _b === void 0 ? void 0 : _b.type;
+ if (mode) {
+ manifestObj = Object.assign(Object.assign({}, manifestObj), { mode: mode });
+ }
+ else if (type) {
+ manifestObj = Object.assign(Object.assign({}, manifestObj), { type: type });
+ }
+ this._log._printDebugCommand("JsManifest", manifestObj);
+ const manifestFile = path.resolve(targetPathInfo.getIntermediatesLegacyManifestJson(), legacyAbilityInfo.getRelateSrcPath(), build_directory_const_js_1.BuildArtifactConst.LEGACY_MANIFEST_JSON);
+ fse.outputJSONSync(manifestFile, manifestObj);
+ }
+ static findAppName(configJsonObj) {
+ var _a;
+ // find main ability
+ const abilities = configJsonObj.module.abilities;
+ for (let i = 0; i < abilities.length; i++) {
+ const ability = abilities[i];
+ if (!(ability === null || ability === void 0 ? void 0 : ability.skills)) {
+ continue;
+ }
+ if (((_a = ability === null || ability === void 0 ? void 0 : ability.skills[0]) === null || _a === void 0 ? void 0 : _a.actions[0]) === 'action.system.home') {
+ return ability.name;
+ }
+ }
+ if (abilities[0].label) {
+ return abilities[0].label;
+ }
+ return abilities[0].name;
+ }
+ static getWindowObj(legacyAbilityInfo) {
+ var _a;
+ const window = (_a = legacyAbilityInfo.getConfigJsonJsObj()) === null || _a === void 0 ? void 0 : _a.window;
+ return window ?
+ window :
+ {
+ autoDesignWidth: false,
+ designWidth: 454
+ };
+ }
+}
+exports.LegacyGenerateJsManifest = LegacyGenerateJsManifest;
+//# sourceMappingURL=legacy-generate-js-manifest.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-make-pack-info.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-make-pack-info.js
new file mode 100644
index 0000000..95d2f2b
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-make-pack-info.js
@@ -0,0 +1,94 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyMakePackInfo = void 0;
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const fse = __importStar(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * 生成老模型hap级别的pack.info
+ */
+class LegacyMakePackInfo extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "MakePackInfo");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(LegacyMakePackInfo.name);
+ }
+ doTaskAction(targetData, target) {
+ const moduleModel = this.service.getModuleModel();
+ const configObj = moduleModel.getJsonObjByTargetName(target);
+ const appObj = {
+ bundleName: configObj.app.bundleName,
+ version: configObj.app.version
+ };
+ const moduleObj = {
+ mainAbility: configObj.module.mainAbility,
+ deviceType: configObj.module.deviceType,
+ abilities: LegacyMakePackInfo.processAbilities(configObj.module.abilities),
+ distro: configObj.module.distro,
+ apiVersion: configObj.app.apiVersion
+ };
+ const fullHapName = targetData.getModuleTargetOutputFileName();
+ const noSuffixHapName = fullHapName.substring(0, fullHapName.lastIndexOf(".hap"));
+ const packageObj = {
+ deviceType: configObj.module.deviceType,
+ moduleType: configObj.module.distro.moduleType,
+ deliveryWithInstall: configObj.module.distro.deliveryWithInstall,
+ name: noSuffixHapName
+ };
+ const packInfo = {
+ summary: {
+ app: appObj,
+ modules: [moduleObj]
+ },
+ packages: [packageObj] // 因为是hap级别的pack.info,所以数组只有一个对象
+ };
+ this._log.debug("Module Pack Info: ", packInfo);
+ fse.outputJSONSync(path_1.default.resolve(targetData.getPathInfo().getModuleBuildOutputPath(), build_directory_const_js_1.BuildArtifactConst.PACK_INFO), packInfo);
+ }
+ static processAbilities(abilitiesObj) {
+ const processedAbilities = [];
+ for (let i = 0; i < abilitiesObj.length; i++) {
+ const orgAbilityObj = abilitiesObj[i];
+ const abilityObj = {
+ name: orgAbilityObj.name,
+ label: orgAbilityObj.label,
+ visible: orgAbilityObj.visible
+ };
+ processedAbilities.push(abilityObj);
+ }
+ return processedAbilities;
+ }
+}
+exports.LegacyMakePackInfo = LegacyMakePackInfo;
+//# sourceMappingURL=legacy-make-pack-info.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-make-project-pack-info.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-make-project-pack-info.js
new file mode 100644
index 0000000..1d2a96e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-make-project-pack-info.js
@@ -0,0 +1,85 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyMakeProjectPackInfo = void 0;
+const ohos_app_task_js_1 = require("../task/ohos-app-task.js");
+const path_1 = __importDefault(require("path"));
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const fs = __importStar(require("fs-extra"));
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * 生成老模型hap级别的pack.info
+ */
+class LegacyMakeProjectPackInfo extends ohos_app_task_js_1.OhosAppTask {
+ constructor(taskService, isFaMode) {
+ super(taskService, "MakeProjectPackInfo");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(LegacyMakeProjectPackInfo.name);
+ // default value
+ this._projectPackInfoObj = {
+ summary: {
+ app: {
+ bundleName: "bundleName",
+ version: {
+ name: "name",
+ code: 0
+ }
+ },
+ modules: []
+ },
+ packages: []
+ };
+ this._isFaMode = isFaMode;
+ }
+ doTaskAction() {
+ if (!this._isFaMode) {
+ fs.outputJSONSync(path_1.default.resolve(this.service.getPathInfo().getProjectOutputPath(), build_directory_const_js_1.BuildArtifactConst.PACK_INFO), {});
+ return;
+ }
+ this.service.getProductDataMap().forEach((value) => {
+ for (const moduleTargetData of value) {
+ const hapPackInfo = path_1.default.resolve(moduleTargetData.getPathInfo().getModuleBuildOutputPath(), build_directory_const_js_1.BuildArtifactConst.PACK_INFO);
+ if (!fs.existsSync(hapPackInfo)) {
+ continue;
+ }
+ const hapPackInfoObj = project_file_reader_js_1.ProjectFileReader.getJson5Obj(hapPackInfo);
+ this._projectPackInfoObj.summary.app = hapPackInfoObj.summary.app; // 此处直接赋值 因为同一个app中该属性都是相同的.
+ this._projectPackInfoObj.summary.modules.push(hapPackInfoObj.summary.modules[0]);
+ this._projectPackInfoObj.packages.push(hapPackInfoObj.packages[0]);
+ }
+ });
+ this._log.debug("Project Pack Info:", this._projectPackInfoObj);
+ fs.outputJSONSync(path_1.default.resolve(this.service.getPathInfo().getProjectOutputPath(), build_directory_const_js_1.BuildArtifactConst.PACK_INFO), this._projectPackInfoObj);
+ }
+}
+exports.LegacyMakeProjectPackInfo = LegacyMakeProjectPackInfo;
+//# sourceMappingURL=legacy-make-project-pack-info.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-merge-profile.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-merge-profile.js
new file mode 100644
index 0000000..8a9f070
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-merge-profile.js
@@ -0,0 +1,426 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyMergeProfile = void 0;
+const fs = __importStar(require("fs-extra"));
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const path_1 = __importDefault(require("path"));
+const common_const_js_1 = require("../../const/common-const.js");
+const lodash_1 = require("lodash");
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const merge_type_rule_js_1 = require("../../enum/merge-type-rule.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+/**
+ * 合并config.json
+ *
+ * @since 2022/1/19
+ */
+class LegacyMergeProfile extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "LegacyMergeProfile");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(LegacyMergeProfile.name);
+ }
+ mergeDslConfig(configOpt) {
+ var _a, _b, _c;
+ // 从product处获取bundleName
+ const bundleName = (_a = this._moduleTargetData) === null || _a === void 0 ? void 0 : _a.getProduct().bundleName;
+ const targetSdkVersion = (_b = this.service.getProjectModel()) === null || _b === void 0 ? void 0 : _b.getCompileApiVersion();
+ const compatibleSdkVersion = (_c = this.service.getProjectModel()) === null || _c === void 0 ? void 0 : _c.getCompatibleApiVersion();
+ const releaseType = this.service.getSdkInfo().getReleaseType();
+ if (bundleName) {
+ configOpt.app.bundleName = bundleName;
+ this._appBundleName = bundleName;
+ this._log.debug(`Change app bundleName with '${bundleName}'.`);
+ }
+ this._log.debug(`Change app target API version with '${targetSdkVersion}'`);
+ this._log.debug(`Change app minimum API version with '${compatibleSdkVersion}'`);
+ this._log.debug(`Change app releaseType with '${releaseType}'`);
+ configOpt.app.apiVersion = {
+ target: targetSdkVersion,
+ compatible: compatibleSdkVersion,
+ releaseType: releaseType
+ };
+ }
+ doTaskAction(moduleTargetData, target) {
+ var _a;
+ this._moduleTargetData = moduleTargetData;
+ const targetSourceSetModel = this.service.getModuleModel()
+ .getSourceSetByTargetName(target);
+ const configOpt = targetSourceSetModel.getLegacyModuleTargetRes().getConfigJsonOpt();
+ this._appBundleName = (_a = configOpt.app) === null || _a === void 0 ? void 0 : _a.bundleName;
+ const deviceType = configOpt.module.deviceType;
+ if (this.service.getModuleModel().isHarModule() && deviceType.length === 0) {
+ const cause = "The value of 'deviceType' in the config.json is empty.";
+ const solution = "Please check the deviceType field in the config.json file is correctly configured.";
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(targetSourceSetModel.getLegacyModuleTargetRes().getJsonPath())
+ ._printErrorAndExit();
+ }
+ // 三方依赖的config.json
+ const mergedNpmResFile = path_1.default.resolve(moduleTargetData.getPathInfo().getIntermediatesMergeRes(), build_directory_const_js_1.BuildArtifactConst.MERGE_NPM_FILE_JSON);
+ const harList = fs.readJsonSync(mergedNpmResFile, { throws: false }).dependencies;
+ const localModuleList = fs.readJsonSync(mergedNpmResFile, { throws: false }).local.path;
+ const harLibs = [...(0, lodash_1.difference)(harList, localModuleList).map(harPath => {
+ return path_1.default.resolve(harPath, "src", "main", common_const_js_1.CommonConst.CONFIG_JSON);
+ }), ...localModuleList.map(harPath => {
+ return path_1.default.resolve(harPath, build_directory_const_js_1.BuildDirConst.BUILD_ROOT, "default", build_directory_const_js_1.BuildDirConst.INTERMEDIATES, build_directory_const_js_1.BuildDirConst.INTERMEDIATES_MERGE_PROFILE, "default", common_const_js_1.CommonConst.CONFIG_JSON);
+ })];
+ const harConfigOpts = harLibs.map(harConfigJson => {
+ if (fs.pathExistsSync(harConfigJson)) {
+ return project_file_reader_js_1.ProjectFileReader.getJson5Obj(harConfigJson);
+ }
+ else {
+ this._log.warn(`${harConfigJson} does not exist. This library will not be
+ merged. Please confirm the correctness of this module.`);
+ }
+ });
+ // 合并hapConfig和所有harConfig
+ const mergedConfigOpt = this.mergeAllConfig(configOpt, harConfigOpts);
+ // 用项目配置覆盖模块的bundleName和api版本信息
+ this.mergeDslConfig(mergedConfigOpt);
+ // debug模式添加debug: true
+ const debuggable = hvigor_base_1.vigorConfigInst.getExtraConfig().get(common_const_js_1.CommonConst.DEBUGGABLE);
+ if (debuggable === undefined || debuggable) {
+ const deviceConfigObj = mergedConfigOpt.deviceConfig;
+ if (deviceConfigObj.default === undefined) {
+ mergedConfigOpt.deviceConfig.default = {};
+ }
+ mergedConfigOpt.deviceConfig.default.debug = true;
+ }
+ // 将merged json写入文件
+ const pathInfo = moduleTargetData.getPathInfo();
+ const mergedModuleJson = pathInfo.getIntermediatesMergeLegacyProfile();
+ fs.outputJSONSync(mergedModuleJson, mergedConfigOpt, { spaces: "\t" });
+ }
+ mergeAllConfig(mainConfig, harConfigOpts) {
+ var _a, _b;
+ for (const harModuleOpt of harConfigOpts) {
+ // api版本兼容,hap的compatible要大于等于三方包的compatible
+ if (((_a = harModuleOpt.app.apiVersion) === null || _a === void 0 ? void 0 : _a.compatible) > ((_b = mainConfig.app.apiVersion) === null || _b === void 0 ? void 0 : _b.compatible)) {
+ this._log._buildError(`The compatible version of har module
+ ${harModuleOpt.module.name} is lower than hap module.`)
+ ._printErrorAndExit(this.moduleModel.getName());
+ }
+ mainConfig = this.mergeModel(mainConfig, harModuleOpt, "config");
+ }
+ return mainConfig;
+ }
+ /**
+ * 合并对象
+ *
+ * @param mainModel 主模型对象
+ * @param subModel 副模型对象
+ * @param {string} clazz 当前合并对象的标签字段
+ * @returns {any} 合并后的模型
+ * @private
+ */
+ mergeModel(mainModel, subModel, clazz) {
+ if (Object.values(merge_type_rule_js_1.KeepHapOptions).includes(clazz)) {
+ return mainModel;
+ }
+ if (!mainModel) {
+ return subModel;
+ }
+ if (!subModel) {
+ return mainModel;
+ }
+ const keys = (0, lodash_1.union)(Object.keys(mainModel), Object.keys(subModel));
+ keys.forEach(key => {
+ const mainValue = mainModel[key];
+ const subValue = subModel[key];
+ let realValue;
+ if (mainValue && subValue && typeof mainValue !== typeof subValue) {
+ this._log._buildError(`Type of attribute ${key} in config.json/module.json5 of har
+ is different from the one in hap. Please check the correctness of config.json/module.json5.`)
+ ._printErrorAndExit(this.moduleModel.getName());
+ }
+ this.checkFieldRule(mainModel, subModel, key, clazz);
+ const curType = mainValue === undefined ? typeof subValue : typeof mainValue;
+ switch (curType) {
+ // 布尔类型的字段,除了har存在而hap不存在的场景,用hap覆盖har配置
+ case "boolean":
+ if (Object.values(merge_type_rule_js_1.KeepOneOfThem).includes(key)) {
+ realValue = mainValue === undefined && subValue !== undefined ? subValue : mainValue;
+ mainModel[key] = realValue;
+ }
+ break;
+ /*
+ * 字符串和整数类型的字段,如果是module或者deviceConfig字段中的内容,即便hap没有配置,也使用hapValue;
+ * 否则har存在而hap不存在的场景,用hap覆盖har配置
+ */
+ case "string":
+ case "number":
+ realValue = mainValue === undefined && subValue !== undefined ? subValue : mainValue;
+ if (clazz === "deviceConfig" || clazz === "module") {
+ realValue = mainValue;
+ }
+ break;
+ case "object":
+ if (Array.isArray(mainValue) || Array.isArray(subValue)) {
+ const mainList = Array.isArray(mainValue) ? mainValue : [];
+ const subList = Array.isArray(subValue) ? subValue : [];
+ let curFieldList = [];
+ if (clazz === "module" && Object.values(merge_type_rule_js_1.KeepModuleAttr).includes(key)) {
+ curFieldList = [...mainList];
+ }
+ else {
+ curFieldList = this.mergeList(mainList, subList, key);
+ }
+ if (curFieldList.length !== 0) {
+ mainModel[key] = curFieldList;
+ }
+ }
+ else if (Object.values(merge_type_rule_js_1.IsMapFields).includes(key)) {
+ let flag = true;
+ let curFieldMap = {};
+ if (clazz === "config") {
+ flag = false;
+ if (mainValue["default"] === undefined && subValue["default"] !== undefined) {
+ if (subValue["default"]["allowComponentsProxy"] === undefined) {
+ subValue["default"] = undefined;
+ }
+ else {
+ mainValue["default"] = {};
+ }
+ }
+ }
+ curFieldMap = this.mergeMap(mainValue, subValue, flag, key);
+ mainModel[key] = curFieldMap;
+ }
+ else {
+ mainModel[key] = this.mergeModel(mainValue, subValue, key);
+ }
+ break;
+ default:
+ this._log.error("An unrecognized type!");
+ break;
+ }
+ });
+ return mainModel;
+ }
+ mergeList(mainValue, subValue, field) {
+ let mergedList = [];
+ if (field === "skills") {
+ return mainValue;
+ }
+ const curType = mainValue.length === 0 ? typeof subValue[0] : typeof mainValue[0];
+ switch (curType) {
+ case "string":
+ mergedList = (0, lodash_1.union)(mainValue, subValue);
+ break;
+ case "object":
+ if (Object.values(merge_type_rule_js_1.HasPlaceholderOptions).includes(field)) {
+ mainValue.forEach(value => {
+ this.disposePlaceHolder(value, field);
+ });
+ subValue.forEach(value => {
+ this.disposePlaceHolder(value, field);
+ });
+ }
+ mainValue.forEach(mainElement => {
+ const subElement = this.findObjectByUniqueKey(subValue, mainElement, field);
+ if (subElement === null) {
+ mergedList.push(mainElement);
+ }
+ });
+ subValue.forEach(subElement => {
+ const mainElement = this.findObjectByUniqueKey(mainValue, subElement, field);
+ if (mainElement === null) {
+ mergedList.push(subElement);
+ }
+ else {
+ const mergeElement = this.mergeModel(mainElement, subElement, field);
+ mergedList.push(this.mergeRule(mergeElement, mainElement));
+ }
+ });
+ break;
+ default:
+ this._log.error(`Other Type! ${field}`);
+ }
+ for (const value of mergedList) {
+ if (Object.keys(value).includes("mergeRule")) {
+ value["mergeRule"] = undefined;
+ }
+ }
+ return mergedList;
+ }
+ findObjectByUniqueKey(list, model, field) {
+ const uniqueKey = this.getUniqueKey(model, field);
+ for (const subModel of list) {
+ const compareKey = this.getUniqueKey(subModel, field);
+ if (field === "abilities") {
+ const mainTargetAbilityName = model["targetAbility"];
+ const subTargetAbilityName = subModel["targetAbility"];
+ if (mainTargetAbilityName !== undefined &&
+ subTargetAbilityName === undefined &&
+ mainTargetAbilityName === uniqueKey) {
+ this._log._buildError(`The target function was incorrectly configured. '${mainTargetAbilityName}'
+ conflict occurred when merging the config.json files in HAP and HAR packages.`)
+ ._printErrorAndExit(this.moduleModel.getName());
+ }
+ }
+ if (uniqueKey === compareKey) {
+ return subModel;
+ }
+ }
+ return null;
+ }
+ getUniqueKey(model, clazz) {
+ if (Object.values(merge_type_rule_js_1.UniqueKeyEqualsName).includes(clazz)) {
+ return model["name"];
+ }
+ else if (clazz === "shortcuts") {
+ return model["shortcutId"];
+ }
+ else if (clazz === "abilities") {
+ if (model["targetAbility"] === undefined) {
+ return model["name"];
+ }
+ else {
+ return model["targetAbility"];
+ }
+ }
+ else {
+ return null;
+ }
+ }
+ mergeRule(mergeValue, mainValue) {
+ if (mainValue === null || mainValue.mergeRule === undefined) {
+ return mergeValue;
+ }
+ const mergeRule = mainValue.mergeRule;
+ if (mergeRule.replace) {
+ const replaceLabel = mergeRule.replace;
+ replaceLabel.forEach(fieldItem => {
+ if (mergeValue[fieldItem]) {
+ mergeValue[fieldItem] = mainValue[fieldItem];
+ }
+ });
+ }
+ if (mergeRule.remove) {
+ const removeLabel = mergeRule.remove;
+ removeLabel.forEach(fieldItem => {
+ if (mergeValue[fieldItem]) {
+ mergeValue[fieldItem] = undefined;
+ }
+ });
+ }
+ return mergeValue;
+ }
+ mergeMap(mainValue, subValue, flag, key) {
+ if (mainValue === undefined) {
+ return mainValue;
+ }
+ if (subValue === undefined) {
+ return subValue;
+ }
+ const mergedMap = (0, lodash_1.cloneDeep)(mainValue);
+ const mainKeys = Object.keys(mainValue);
+ const subKeys = Object.keys(subValue);
+ const addKeys = (0, lodash_1.difference)(subKeys, mainKeys);
+ if (flag) {
+ addKeys.forEach(addKey => {
+ mergedMap[addKey] = subValue[addKey];
+ });
+ }
+ const sameKeys = (0, lodash_1.intersection)(subKeys, mainKeys);
+ sameKeys.forEach(sameKey => {
+ if (mainValue[sameKey] instanceof Array) {
+ mergedMap[sameKey] = (0, lodash_1.union)(mainValue[sameKey], subValue[sameKey]);
+ }
+ else if (typeof mainValue[sameKey] === "object") {
+ mergedMap[sameKey] = this.mergeModel(mainValue[sameKey], subValue[sameKey], key);
+ }
+ });
+ return mergedMap;
+ }
+ checkFieldRule(mainModel, subModel, key, clazz) {
+ if (!Object.values(merge_type_rule_js_1.IsNeedMergeRule).includes(clazz)
+ || Object.values(merge_type_rule_js_1.KeepAbilityMergeList).includes(clazz)
+ || key === "skills") {
+ return;
+ }
+ const mainValue = mainModel[key];
+ const subValue = subModel[key];
+ if (mainValue === undefined || subValue === undefined) {
+ return;
+ }
+ if (!(0, lodash_1.isEqual)(mainValue, subValue)) {
+ const mergeRule = mainModel["mergeRule"];
+ const mergeRuleList = (0, lodash_1.union)(mergeRule["replace"], mergeRule["remove"]);
+ if (!mergeRuleList.includes(key)) {
+ const uniqueKey = this.getUniqueKey(mainValue, clazz);
+ const err = `Unable to merge Config.json files.
+ The value '${clazz}'${uniqueKey}' conflicts with
+ the value ':${key}' of a subtag in the HAR file.
+ Please verify and then add 'mergeRule' in the HAP.`;
+ this._log._buildError(err)
+ ._printErrorAndExit(this.moduleModel.getName());
+ throw new Error(err);
+ }
+ }
+ }
+ disposePlaceHolder(config, clazz) {
+ const keys = Object.keys(config);
+ keys.forEach(key => {
+ if (Object.values(merge_type_rule_js_1.NeedDisposePlaceholder).includes(key)
+ && !(clazz === "abilities" && key === "name")) {
+ const keyObj = config[key];
+ if (typeof keyObj === "string") {
+ config[key] = keyObj.replace("{bundleName}", this._appBundleName);
+ }
+ else if (keyObj instanceof Array && keyObj.length !== 0) {
+ if (typeof keyObj[0] === "string") {
+ const newArray = [];
+ for (const value of config[key]) {
+ newArray.push(value.replace("{bundleName}", this._appBundleName));
+ }
+ config[key] = newArray;
+ }
+ else {
+ const newArray = [];
+ for (const value of config[key]) {
+ newArray.push(value.name.replace("{bundleName}", this._appBundleName));
+ }
+ config[key] = newArray;
+ }
+ }
+ }
+ });
+ return config;
+ }
+}
+exports.LegacyMergeProfile = LegacyMergeProfile;
+//# sourceMappingURL=legacy-merge-profile.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-package-hap.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-package-hap.js
new file mode 100644
index 0000000..ea747d2
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-package-hap.js
@@ -0,0 +1,76 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyPackageHap = void 0;
+const path_1 = __importDefault(require("path"));
+const packing_tool_options_js_1 = require("../../builder/inner-java-command-builder/packing-tool-options.js");
+const common_const_js_1 = require("../../const/common-const.js");
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const process_utils_js_1 = require("../../utils/process-utils.js");
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const fse = __importStar(require("fs-extra"));
+/**
+ * 老模型的打包Hap包任务
+ *
+ * @since 2022/1/10
+ */
+class LegacyPackageHap extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "PackageHap");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(LegacyPackageHap.name);
+ }
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ doTaskAction(targetData, target) {
+ const pathInfo = targetData.getPathInfo();
+ const packageOptions = new packing_tool_options_js_1.PackingToolOptions();
+ const packageToolPath = this.service.getSdkInfo().getPackageTool();
+ packageOptions.addCalledJarFile(packageToolPath);
+ packageOptions.addMode("hap")
+ .force(true)
+ .addLibPath(path_1.default.resolve(pathInfo.getIntermediatesProcessLibs()))
+ .addJsonPath(path_1.default.resolve(pathInfo.getIntermediatesRes(), common_const_js_1.CommonConst.CONFIG_JSON))
+ .addResourcesPath(path_1.default.resolve(pathInfo.getIntermediatesRes(), build_directory_const_js_1.BuildDirConst.RESTOOL_BUILD_RESOURCES))
+ .addAssetsPath(path_1.default.resolve(pathInfo.getIntermediatesAssetsPath()))
+ .addIndexPath(path_1.default.resolve(pathInfo.getIntermediatesRes(), build_directory_const_js_1.BuildArtifactConst.RESOURCE_INDEX))
+ .addPackInfoPath(path_1.default.resolve(pathInfo.getModuleBuildOutputPath(), build_directory_const_js_1.BuildArtifactConst.PACK_INFO))
+ .addOutPath(path_1.default.resolve(pathInfo.getModuleBuildOutputPath(), targetData.getModuleTargetOutputFileName()));
+ const rpcidSc = path_1.default.resolve(pathInfo.getIntermediatesSysCap(), common_const_js_1.CommonConst.RPCID_SC);
+ if (fse.existsSync(rpcidSc)) {
+ packageOptions.addSysCapPath(rpcidSc);
+ }
+ this._log._printDebugCommand("PackageHap", packageOptions.commandList);
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(packageOptions.commandList);
+ }
+}
+exports.LegacyPackageHap = LegacyPackageHap;
+//# sourceMappingURL=legacy-package-hap.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-process-profile.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-process-profile.js
new file mode 100644
index 0000000..6c3b80a
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/legacy-tasks/legacy-process-profile.js
@@ -0,0 +1,61 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyProcessProfile = void 0;
+const fs = __importStar(require("fs-extra"));
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+/**
+ * 处理config.json
+ *
+ * @since 2022/1/10
+ */
+class LegacyProcessProfile extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "LegacyProcessProfile");
+ }
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ doTaskAction(moduleTargetData, target) {
+ const pathInfo = moduleTargetData.getPathInfo();
+ const mergedConfigOpt = project_file_reader_js_1.ProjectFileReader.getJson5Obj(pathInfo.getIntermediatesMergeLegacyProfile());
+ const processedModuleJson = pathInfo.getIntermediatesProcessLegacyProfile();
+ if (this.service.isArkModule()) {
+ const distroObj = mergedConfigOpt.module.distro;
+ if (distroObj != undefined) {
+ mergedConfigOpt.module.distro.virtualMachine = `ark${this.service.getSdkInfo().getJsArkVersion()}`;
+ }
+ fs.outputJSONSync(processedModuleJson, mergedConfigOpt);
+ }
+ else {
+ fs.outputJSONSync(processedModuleJson, mergedConfigOpt);
+ }
+ }
+}
+exports.LegacyProcessProfile = LegacyProcessProfile;
+//# sourceMappingURL=legacy-process-profile.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/merge-profile.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/merge-profile.js
new file mode 100644
index 0000000..03cf2ee
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/merge-profile.js
@@ -0,0 +1,135 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MergeProfile = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const fs = __importStar(require("fs-extra"));
+const lodash_1 = require("lodash");
+const path_1 = __importDefault(require("path"));
+const build_directory_const_js_1 = require("../const/build-directory-const.js");
+const common_const_js_1 = require("../const/common-const.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const project_file_reader_js_1 = require("../utils/project-file-reader.js");
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+/**
+ * 合并module.json
+ *
+ * @since 2022/1/10
+ */
+class MergeProfile extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "MergeProfile");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(MergeProfile.name);
+ }
+ doTaskAction(moduleTargetData, target) {
+ this._moduleTargetData = moduleTargetData;
+ const projectModel = this.service.getProjectModel();
+ const appJson = projectModel.getAppRes().getAppResOpt();
+ // har的app部分剔除与资源相关的字段,暂时也不需要
+ if (this.service.getModuleModel().isHarModule()) {
+ delete appJson.app.icon;
+ delete appJson.app.label;
+ }
+ const targetSourceSetModel = this.service.getModuleModel()
+ .getSourceSetByTargetName(target);
+ const moduleOpt = targetSourceSetModel
+ .getModuleTargetRes()
+ .getModuleJsonOpt();
+ const deviceTypes = moduleOpt.module.deviceTypes;
+ if (this.service.getModuleModel().isHarModule() && deviceTypes.length === 0) {
+ const cause = "The value of 'deviceType' in the module.json5 is empty.";
+ const solution = "Please check the deviceType field in the module.json5 file is correctly configured.";
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(targetSourceSetModel.getModuleTargetRes().getJsonPath())
+ ._printErrorAndExit();
+ }
+ // 三方依赖的module.json
+ const mergedNpmResFile = path_1.default.resolve(moduleTargetData.getPathInfo().getIntermediatesMergeRes(), build_directory_const_js_1.BuildArtifactConst.MERGE_NPM_FILE_JSON);
+ const harList = fs.readJsonSync(mergedNpmResFile, { throws: false }).dependencies;
+ const localModuleList = fs.readJsonSync(mergedNpmResFile, { throws: false }).local.path;
+ const harLibs = [...(0, lodash_1.difference)(harList, localModuleList).map(harPath => {
+ return path_1.default.resolve(harPath, "src", "main", common_const_js_1.CommonConst.MODULE_JSON);
+ }), ...localModuleList.map(harPath => {
+ return path_1.default.resolve(harPath, build_directory_const_js_1.BuildDirConst.BUILD_ROOT, "default", build_directory_const_js_1.BuildDirConst.INTERMEDIATES, build_directory_const_js_1.BuildDirConst.INTERMEDIATES_MERGE_PROFILE, "default", common_const_js_1.CommonConst.MODULE_JSON);
+ })];
+ harLibs.map(harModuleJson => {
+ if (fs.pathExistsSync(harModuleJson)) {
+ return project_file_reader_js_1.ProjectFileReader.getJson5Obj(harModuleJson);
+ }
+ else {
+ this._log.warn(`${harModuleJson} does not exist. This library will not be
+ merged. Please confirm the correctness of this module.`);
+ }
+ });
+ const mergedConfigOpt = Object.assign(Object.assign({}, appJson), (moduleOpt));
+ // 用项目配置覆盖模块的bundleName和api版本信息
+ this.mergeDslConfig(mergedConfigOpt);
+ // debug模式添加debug: true
+ const debuggable = hvigor_base_1.vigorConfigInst.getExtraConfig().get(common_const_js_1.CommonConst.DEBUGGABLE);
+ if (debuggable === undefined || debuggable !== "false") {
+ mergedConfigOpt.app.debug = true;
+ }
+ // 将merged json写入文件
+ const pathInfo = moduleTargetData.getPathInfo();
+ const mergedModuleJson = pathInfo.getIntermediatesMergeProfile();
+ fs.outputJSONSync(mergedModuleJson, mergedConfigOpt, { spaces: "\t" });
+ }
+ mergeDslConfig(mergeConfigOpt) {
+ var _a, _b, _c;
+ // 从product处获取bundleName
+ const bundleName = (_a = this._moduleTargetData) === null || _a === void 0 ? void 0 : _a.getProduct().bundleName;
+ const targetSdkVersion = (_b = this.service.getProjectModel()) === null || _b === void 0 ? void 0 : _b.getCompileApiVersion();
+ const compatibleSdkVersion = (_c = this.service.getProjectModel()) === null || _c === void 0 ? void 0 : _c.getCompatibleApiVersion();
+ const releaseType = this.sdkInfo.getReleaseType();
+ if (bundleName) {
+ mergeConfigOpt.app.bundleName = bundleName;
+ }
+ this._log.debug(`Change app bundleName with '${bundleName}'.`);
+ mergeConfigOpt.app.targetAPIVersion = targetSdkVersion;
+ this._log.debug(`Change app target API version with '${targetSdkVersion}'`);
+ mergeConfigOpt.app.minAPIVersion = compatibleSdkVersion;
+ this._log.debug(`Change app minimum API version with '${compatibleSdkVersion}'`);
+ mergeConfigOpt.app.apiReleaseType = releaseType;
+ this._log.debug(`Change app api release type with '${releaseType}'`);
+ }
+ mergeAllModule(mainModule, harModuleOpts) {
+ var _a, _b;
+ // 暂时只需要合并deviceTypes
+ for (const harModuleOpt of harModuleOpts) {
+ mainModule.module.deviceTypes = (0, lodash_1.intersection)((_a = mainModule.module) === null || _a === void 0 ? void 0 : _a.deviceTypes, (_b = harModuleOpt.module) === null || _b === void 0 ? void 0 : _b.deviceTypes);
+ }
+ return mainModule;
+ }
+}
+exports.MergeProfile = MergeProfile;
+//# sourceMappingURL=merge-profile.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/merge-resource.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/merge-resource.js
new file mode 100644
index 0000000..10a15ce
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/merge-resource.js
@@ -0,0 +1,38 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MergeResource = void 0;
+const fs_1 = __importDefault(require("fs"));
+const os_1 = __importDefault(require("os"));
+const file_util_js_1 = require("../utils/file-util.js");
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+/**
+ * 合并资源到一个index文件中
+ *
+ * @since 2022/1/10
+ */
+class MergeResource extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "MergeResource");
+ }
+ doTaskAction(targetData, target) {
+ const moduleModel = this.service.getModuleModel();
+ const moduleType = moduleModel.getModuleType();
+ if (!moduleType) {
+ return;
+ }
+ const pathInfo = targetData.getPathInfo();
+ const mergeResDir = pathInfo.getIntermediatesMergeRes();
+ const mergeFile = pathInfo.getIntermediatesMergeFile();
+ file_util_js_1.FileUtil.checkDirWithoutDelete(mergeResDir);
+ file_util_js_1.FileUtil.checkFile(mergeFile);
+ fs_1.default.writeFileSync(mergeFile, `"${moduleModel.getSourceSetByTargetName(target).getSourceSetRoot()}"${os_1.default.EOL}`);
+ }
+}
+exports.MergeResource = MergeResource;
+//# sourceMappingURL=merge-resource.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-app.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-app.js
new file mode 100644
index 0000000..32ad589
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-app.js
@@ -0,0 +1,71 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PackageApp = void 0;
+const packing_tool_options_js_1 = require("../builder/inner-java-command-builder/packing-tool-options.js");
+const path_1 = __importDefault(require("path"));
+const ohos_app_task_js_1 = require("./task/ohos-app-task.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const build_directory_const_js_1 = require("../const/build-directory-const.js");
+const fs_1 = __importDefault(require("fs"));
+const file_util_js_1 = require("../utils/file-util.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const project_file_reader_js_1 = require("../utils/project-file-reader.js");
+/**
+ * 调用打包工具生成.app
+ *
+ * @since 2022/1/10
+ */
+class PackageApp extends ohos_app_task_js_1.OhosAppTask {
+ constructor(taskService) {
+ super(taskService, "PackageApp");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(PackageApp.name);
+ this.executePackageApp = () => {
+ const packageOptions = new packing_tool_options_js_1.PackingToolOptions();
+ const sdkInfo = this.service.getSdkInfo();
+ const pathInfo = this.service.getPathInfo();
+ packageOptions.addCalledJarFile(sdkInfo.getPackageTool());
+ const allHapPath = [];
+ this.service.getProductDataMap().forEach((value) => {
+ for (const moduleTargetData of value) {
+ const outputHapFileName = moduleTargetData.getModuleTargetOutputFileName();
+ const hapPath = path_1.default.resolve(moduleTargetData.getPathInfo().getModuleBuildOutputPath(), outputHapFileName);
+ const destDir = path_1.default.resolve(moduleTargetData.getPathInfo().getModuleBuildOutputPath(), "app");
+ file_util_js_1.FileUtil.checkDirWithoutDelete(destDir);
+ const destFile = path_1.default.resolve(destDir, outputHapFileName.replace("-unsigned", ""));
+ file_util_js_1.FileUtil.checkFile(destFile);
+ fs_1.default.writeFileSync(destFile, fs_1.default.readFileSync(hapPath));
+ allHapPath.push(destFile);
+ }
+ });
+ // 修改packInfo里面的name字段
+ const packInfoPath = path_1.default.resolve(pathInfo.getProjectOutputPath(), build_directory_const_js_1.BuildArtifactConst.PACK_INFO);
+ const packInfoObj = project_file_reader_js_1.ProjectFileReader.getJson5Obj(packInfoPath);
+ const packages = packInfoObj.packages;
+ for (let i = 0; i < (packages === null || packages === void 0 ? void 0 : packages.length); i++) {
+ packages[i].name = packages[i].name.replace("-unsigned", "");
+ }
+ file_util_js_1.FileUtil.checkDirWithoutDelete(packInfoPath);
+ fs_1.default.writeFileSync(packInfoPath, JSON.stringify(packInfoObj));
+ packageOptions.addMode("app")
+ .addPackInfoPath(packInfoPath)
+ .addHapPath(allHapPath.join(","))
+ .force(true);
+ const appOutputFileName = this.service.getAppOutputFileName();
+ packageOptions.addOutPath(path_1.default.resolve(pathInfo.getProjectOutputPath(), appOutputFileName));
+ this._log._printDebugCommand("PackageApp", packageOptions.commandList);
+ return packageOptions.commandList;
+ };
+ }
+ doTaskAction() {
+ new process_utils_js_1.ProcessUtils().executeSync(this.executePackageApp());
+ }
+}
+exports.PackageApp = PackageApp;
+//# sourceMappingURL=package-app.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-hap.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-hap.js
new file mode 100644
index 0000000..bb4d900
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-hap.js
@@ -0,0 +1,81 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PackageHap = void 0;
+const path_1 = __importDefault(require("path"));
+const common_const_js_1 = require("../const/common-const.js");
+const packing_tool_options_js_1 = require("../builder/inner-java-command-builder/packing-tool-options.js");
+const build_directory_const_js_1 = require("../const/build-directory-const.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const fse = __importStar(require("fs-extra"));
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+/**
+ * 打包Hap包
+ *
+ * @since 2022/1/10
+ */
+class PackageHap extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "PackageHap");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(PackageHap.name);
+ }
+ doTaskAction(targetData, target) {
+ const pathInfo = targetData.getPathInfo();
+ const packageOptions = new packing_tool_options_js_1.PackingToolOptions();
+ const packageToolPath = this.service.getSdkInfo().getPackageTool();
+ packageOptions.addCalledJarFile(packageToolPath);
+ packageOptions.addMode("hap")
+ .force(true)
+ .addLibPath(path_1.default.resolve(pathInfo.getIntermediatesProcessLibs()))
+ .addJsonPath(path_1.default.resolve(pathInfo.getIntermediatesRes(), common_const_js_1.CommonConst.MODULE_JSON))
+ .addResourcesPath(path_1.default.resolve(pathInfo.getIntermediatesRes(), build_directory_const_js_1.BuildDirConst.RESTOOL_BUILD_RESOURCES))
+ .addIndexPath(path_1.default.resolve(pathInfo.getIntermediatesRes(), build_directory_const_js_1.BuildArtifactConst.RESOURCE_INDEX))
+ .addOutPath(path_1.default.resolve(pathInfo.getModuleBuildOutputPath(), targetData.getModuleTargetOutputFileName()));
+ const rpcidSc = path_1.default.resolve(pathInfo.getIntermediatesSysCap(), common_const_js_1.CommonConst.RPCID_SC);
+ if (fse.existsSync(rpcidSc)) {
+ packageOptions.addSysCapPath(rpcidSc);
+ }
+ const jsAssetsPath = path_1.default.resolve(pathInfo.getIntermediatesAssetsPath(), "js");
+ if (fse.existsSync(jsAssetsPath)) {
+ packageOptions.addJsPath(jsAssetsPath);
+ }
+ const etsAssetsPath = path_1.default.resolve(pathInfo.getIntermediatesAssetsPath(), "ets");
+ if (fse.existsSync(etsAssetsPath)) {
+ packageOptions.addEtsPath(etsAssetsPath);
+ }
+ this._log._printDebugCommand("PackageHap", packageOptions.commandList);
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(packageOptions.commandList);
+ }
+}
+exports.PackageHap = PackageHap;
+//# sourceMappingURL=package-hap.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-har.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-har.js
new file mode 100644
index 0000000..e5f981e
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-har.js
@@ -0,0 +1,122 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PackageHar = void 0;
+const node_util_js_1 = require("../utils/node-util.js");
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const path_1 = __importDefault(require("path"));
+const fs = __importStar(require("fs-extra"));
+const process_utils_js_1 = require("../utils/process-utils.js");
+const build_directory_const_js_1 = require("../const/build-directory-const.js");
+const common_const_js_1 = require("../const/common-const.js");
+const npm_command_builder_js_1 = require("../builder/npm-command-builder.js");
+/**
+ * 打包Har包
+ *
+ * @param cb
+ */
+class PackageHar extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "PackageHar");
+ this._moduleDir = taskService.getModuleModel().getProjectDir();
+ const profileOption = taskService.getModuleModel().getProfileOpt();
+ this._nativeOption = profileOption.buildOption.externalNativeOptions;
+ this._sdkInfo = this.service.getSdkInfo();
+ }
+ doTaskAction(targetData, target) {
+ var _a;
+ const pathInfo = targetData.getPathInfo();
+ const moduleDir = (_a = this.service.getModuleModel()) === null || _a === void 0 ? void 0 : _a.getProjectDir();
+ const processedLibs = pathInfo.getIntermediatesProcessLibs();
+ const resourceDir = pathInfo.getIntermediatesRes();
+ // 复制模块中所有内容到build文件夹中
+ fs.emptyDirSync(pathInfo.getModuleBuildOutputPath());
+ fs.emptyDirSync(this.getTaskTempDir(targetData));
+ // c++编译产物
+ if (fs.pathExistsSync(processedLibs)) {
+ fs.copySync(pathInfo.getIntermediatesProcessLibs(), path_1.default.resolve(this.getTaskTempDir(targetData), build_directory_const_js_1.BuildDirConst.LIBS));
+ }
+ // ResourceTable.txt
+ if (fs.pathExistsSync(resourceDir)) {
+ fs.copySync(path_1.default.resolve(resourceDir, build_directory_const_js_1.BuildArtifactConst.RESOURCE_TABLE_TXT), path_1.default.resolve(this.getTaskTempDir(targetData), build_directory_const_js_1.BuildArtifactConst.RESOURCE_TABLE_TXT));
+ }
+ // 打包过滤目录
+ let filter = [build_directory_const_js_1.BuildDirConst.LIBS, build_directory_const_js_1.BuildDirConst.BUILD_ROOT, common_const_js_1.CommonNodeConst.NODE_MODULES, ".cxx", ".preview"];
+ if (!filter.includes(pathInfo.getBuildRoot())) {
+ filter.push(pathInfo.getBuildRoot());
+ }
+ filter = filter.map(baseName => {
+ return path_1.default.resolve(moduleDir, baseName);
+ });
+ fs.readdirSync(moduleDir).forEach(srcPath => {
+ const src = path_1.default.resolve(moduleDir, srcPath);
+ if (filter.includes(src)) {
+ return;
+ }
+ fs.copySync(path_1.default.resolve(moduleDir, srcPath), path_1.default.resolve(this.getTaskTempDir(targetData), srcPath), {
+ filter: (src, dest) => {
+ return !(this._nativeOption && src === this.getCmakeListDir());
+ }
+ });
+ });
+ // 拷贝cpp/types
+ if (this._nativeOption) {
+ const cppTypes = path_1.default.resolve(this.getCmakeListDir(), "types");
+ fs.copySync(cppTypes, path_1.default.resolve(this.getTaskTempDir(targetData), "src", "main", "cpp", "types"));
+ }
+ // 将合并后的module.json5/config.json复制到对应位置
+ const harProfile = pathInfo.getIntermediatesMergeProfileDir();
+ fs.copySync(harProfile, path_1.default.resolve(this.getTaskTempDir(targetData), "src", "main"));
+ const harModuleJson = path_1.default.resolve(this.getTaskTempDir(targetData), "src", "main", common_const_js_1.CommonConst.MODULE_JSON5);
+ if (fs.pathExistsSync(harModuleJson)) {
+ fs.removeSync(harModuleJson);
+ }
+ // npm pack
+ const npmPath = path_1.default.resolve((0, node_util_js_1.findValidNodeExePath)(this.service.getSdkInfo().getNodeJsDir()), "..");
+ const npmBuilder = new npm_command_builder_js_1.NpmCommandBuilder(npmPath);
+ npmBuilder.addAllParams(["pack"]);
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(npmBuilder.build(), {
+ cwd: this.getTaskTempDir(targetData)
+ }, true);
+ fs.copySync(this.getTaskTempDir(targetData), pathInfo.getModuleBuildOutputPath(), {
+ filter: (src, dest) => {
+ return (!fs.lstatSync(src).isDirectory() && src.endsWith(".tgz"))
+ || src === this.getTaskTempDir(targetData);
+ }
+ });
+ }
+ getCmakeListDir() {
+ return path_1.default.resolve(this._moduleDir, this._nativeOption.path, '..');
+ }
+}
+exports.PackageHar = PackageHar;
+//# sourceMappingURL=package-har.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-sub-hap.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-sub-hap.js
new file mode 100644
index 0000000..c730e07
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/package-sub-hap.js
@@ -0,0 +1,42 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PackageSubHaps = void 0;
+const ohos_app_task_js_1 = require("./task/ohos-app-task.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const common_const_js_1 = require("../const/common-const.js");
+const node_util_js_1 = require("../utils/node-util.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+/**
+ * 调用打hap包的task
+ *
+ * @since 2022/1/22
+ */
+class PackageSubHaps extends ohos_app_task_js_1.OhosAppTask {
+ constructor(taskService) {
+ super(taskService, "PackageSubHaps");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(PackageSubHaps.name);
+ }
+ doTaskAction() {
+ const targetProductName = this.service.getTargetProduct().name;
+ const nodeJsPath = (0, node_util_js_1.findValidNodeExePath)(this.service.getSdkInfo().getNodeJsDir());
+ const commands = this.initExecuteCommand(targetProductName, nodeJsPath);
+ this._log.debug("PackageSubHap", commands.join(' '));
+ new process_utils_js_1.ProcessUtils().executeSync(commands, { stdout: process.stdout, stderr: process.stderr });
+ this._log.debug('All hap package finished ======================================================');
+ }
+ initExecuteCommand(product, nodeJsPath) {
+ const command = [nodeJsPath, require.resolve("@ohos/hvigor/bin/hvigor"), "-m", "module", "-p"];
+ command.push(`product=${product}`);
+ command.push("-p");
+ command.push(`${common_const_js_1.CommonConst.DEBUGGABLE}=false`);
+ command.push("assembleHap");
+ command.push(this._log._getCliLevel());
+ return command;
+ }
+}
+exports.PackageSubHaps = PackageSubHaps;
+//# sourceMappingURL=package-sub-hap.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/pre-build.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/pre-build.js
new file mode 100644
index 0000000..1a2d5c0
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/pre-build.js
@@ -0,0 +1,150 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PreBuild = void 0;
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const validate_util_js_1 = require("../utils/validate-util.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const hap_extra_info_js_1 = require("../project/data/hap-extra-info.js");
+const common_const_js_1 = require("../const/common-const.js");
+const path_1 = __importDefault(require("path"));
+const project_file_reader_1 = require("../utils/project-file-reader");
+/**
+ * preBuild Task
+ *
+ * @since 2022/1/10
+ */
+class PreBuild extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "PreBuild");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(PreBuild.name);
+ }
+ doTaskAction(targetData, target) {
+ var _a;
+ this.versionCheck();
+ if (this.service.getHapExtraInfo().isStageMode()) {
+ // app.json5 module.json5文件校验
+ this.appJson5Validate(target);
+ this.moduleJson5Validate(target);
+ this.validateHMServiceBundleName(target);
+ if ((_a = this.service.getModuleModel()) === null || _a === void 0 ? void 0 : _a.isHapModule()) {
+ this.validateMainElementAndAbilities(target);
+ }
+ }
+ else {
+ // 老模型,校验config.json
+ this.configJsonValidate(target);
+ }
+ }
+ appJson5Validate(target) {
+ const appJson5SchemaPath = this.service.getSdkInfo().getAppSchema();
+ const appJson5Schema = require(appJson5SchemaPath);
+ const projectModel = this.service.getProjectModel();
+ const appJsonPath = projectModel.getAppRes().getJsonPath();
+ validate_util_js_1.ValidateUtil.doSchemaCheck(projectModel.getName(), appJsonPath, appJson5Schema);
+ }
+ moduleJson5Validate(target) {
+ const moduleJson5SchemaPath = this.service.getSdkInfo().getModuleSchema();
+ const moduleJson5Schema = require(moduleJson5SchemaPath);
+ const instance = this.service.getModuleModel();
+ const moduleName = instance.getName();
+ const moduleTargetRes = instance.getSourceSetByTargetName(target)
+ .getModuleTargetRes();
+ const moduleJson5Path = moduleTargetRes.getJsonPath();
+ validate_util_js_1.ValidateUtil.doSchemaCheck(moduleName, moduleJson5Path, moduleJson5Schema);
+ if (target !== common_const_js_1.DefaultTargetConst.OHOS_TEST_TARGET) {
+ this.validateModuleName(moduleName, moduleTargetRes.getModuleJsonOpt().module.name, common_const_js_1.CommonConst.MODULE_JSON5);
+ }
+ }
+ configJsonValidate(target) {
+ const configJsonSchemaPath = this.service.getSdkInfo().getRichSchema();
+ const configJsonSchema = require(configJsonSchemaPath);
+ const instance = this.service.getModuleModel();
+ const moduleName = instance.getName();
+ const legacyModuleTargetRes = instance.getSourceSetByTargetName(target).getLegacyModuleTargetRes();
+ const configJsonPath = legacyModuleTargetRes.getJsonPath();
+ validate_util_js_1.ValidateUtil.doSchemaCheck(moduleName, configJsonPath, configJsonSchema);
+ if (target !== common_const_js_1.DefaultTargetConst.OHOS_TEST_TARGET) {
+ this.validateModuleName(moduleName, legacyModuleTargetRes.getConfigJsonOpt().module.distro.moduleName, common_const_js_1.CommonConst.CONFIG_JSON);
+ }
+ }
+ versionCheck() {
+ const projectModel = this.service.getProjectModel();
+ const apiType = this.moduleModel.getProfileOpt().apiType;
+ const compileApiVersion = projectModel.getCompileApiVersion();
+ if (apiType === hap_extra_info_js_1.ApiType.STAGE && 9 > compileApiVersion) {
+ this._log._buildError(`API${compileApiVersion} do not support StageMode.`)
+ ._file(projectModel.getProfilePath())
+ ._printErrorAndExit();
+ }
+ }
+ validateModuleName(profileModuleName, moduleName, sourceConfigName) {
+ if (profileModuleName !== moduleName) {
+ const buildProfilePath = this.service.getProjectModel().getProfilePath();
+ this._log._buildError(`The name of ${profileModuleName} module in build-profile.json5 ` +
+ `must be same as moduleName in ${sourceConfigName}`)
+ ._solution(`Change '${profileModuleName}' to '${moduleName}'`)
+ ._file(buildProfilePath)
+ ._printErrorAndExit(moduleName);
+ }
+ }
+ validateHMServiceBundleName(target) {
+ var _a;
+ const sourceRoot = (_a = this.service.getModuleModel()) === null || _a === void 0 ? void 0 : _a.getSourceRootByTargetName(target);
+ const moduleJsonPath = path_1.default.resolve(sourceRoot, common_const_js_1.CommonConst.MODULE_JSON5);
+ const moduleJson = project_file_reader_1.ProjectFileReader.getJson5Obj(moduleJsonPath);
+ const regExp = /\.hmservice$/;
+ if (moduleJson.module.installationFree) {
+ const projectModel = this.service.getProjectModel();
+ const appResOpt = projectModel.getAppRes().getAppResOpt();
+ const appJsonPath = projectModel.getAppRes().getJsonPath();
+ if (!regExp.test(appResOpt.app.bundleName)) {
+ const cause = "The value of 'bundleName' in app.json5 is incorrect.";
+ const solution = "If the current OpenHarmony project is an atomized service, " +
+ "the 'bundleName' field in the app.json5 file must end with '.hmservice'.";
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(appJsonPath)
+ ._printErrorAndExit();
+ }
+ }
+ }
+ validateMainElementAndAbilities(target) {
+ var _a;
+ const sourceRoot = (_a = this.service.getModuleModel()) === null || _a === void 0 ? void 0 : _a.getSourceRootByTargetName(target);
+ const moduleJsonPath = path_1.default.resolve(sourceRoot, common_const_js_1.CommonConst.MODULE_JSON5);
+ const moduleJson = project_file_reader_1.ProjectFileReader.getJson5Obj(moduleJsonPath);
+ const mainElement = moduleJson.module.mainElement;
+ if (moduleJson.module.installationFree && mainElement === undefined) {
+ const cause = "The 'mainElement' field in the module.json5 file does not exist.";
+ const solution = "If the current OpenHarmony project is an atomized service, " +
+ "the 'mainElement' tag must exist.";
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(moduleJsonPath)
+ ._printErrorAndExit();
+ }
+ const abilityList = moduleJson.module.abilities;
+ abilityList === null || abilityList === void 0 ? void 0 : abilityList.forEach(ability => {
+ if (mainElement !== undefined && ability.name === mainElement) {
+ if (ability.label === undefined || ability.icon === undefined) {
+ const cause = "When the 'mainElement' field is the same as the 'name' field, " +
+ "the 'icon' and 'label' in the 'ability' field cannot be missing.";
+ const solution = "Configuring the 'icon' and 'label' labels in the 'ability' field correctly";
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(moduleJsonPath)
+ ._printErrorAndExit();
+ }
+ }
+ });
+ }
+}
+exports.PreBuild = PreBuild;
+//# sourceMappingURL=pre-build.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/build-har-previewer-res.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/build-har-previewer-res.js
new file mode 100644
index 0000000..b113079
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/build-har-previewer-res.js
@@ -0,0 +1,37 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BuildHarPreviewerRes = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const pre_build_js_1 = require("../pre-build.js");
+const merge_profile_js_1 = require("../merge-profile.js");
+const process_profile_js_1 = require("../process-profile.js");
+const merge_resource_js_1 = require("../merge-resource.js");
+const compile_resource_js_1 = require("../compile-resource.js");
+const legacy_merge_profile_1 = require("../legacy-tasks/legacy-merge-profile");
+const legacy_process_profile_1 = require("../legacy-tasks/legacy-process-profile");
+const legacy_compile_resource_1 = require("../legacy-tasks/legacy-compile-resource");
+const collect_har_dependency_js_1 = require("../collect-har-dependency.js");
+const legacy_generate_har_js_manifest_js_1 = require("../legacy-tasks/legacy-generate-har-js-manifest.js");
+/**
+ * for preview hook only
+ */
+class BuildHarPreviewerRes extends hvigor_base_1.Task {
+ constructor(taskService, isFaMode) {
+ super();
+ this.registry = () => {
+ const hvigor = new hvigor_base_1.Hvigor();
+ if (this._isFaMode) {
+ return hvigor.series(new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new pre_build_js_1.PreBuild(this._taskService).registry(), new legacy_merge_profile_1.LegacyMergeProfile(this._taskService).registry(), new legacy_process_profile_1.LegacyProcessProfile(this._taskService).registry(), new legacy_compile_resource_1.LegacyCompileResource(this._taskService).registry(), new legacy_generate_har_js_manifest_js_1.LegacyGenerateHarJsManifest(this._taskService).registry());
+ }
+ return hvigor.series(new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new pre_build_js_1.PreBuild(this._taskService).registry(), new merge_profile_js_1.MergeProfile(this._taskService).registry(), new process_profile_js_1.ProcessProfile(this._taskService).registry(), new merge_resource_js_1.MergeResource(this._taskService).registry(), new compile_resource_js_1.CompileResource(this._taskService).registry());
+ };
+ this._taskService = taskService;
+ this._isFaMode = isFaMode;
+ }
+}
+exports.BuildHarPreviewerRes = BuildHarPreviewerRes;
+//# sourceMappingURL=build-har-previewer-res.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/build-previewer-res.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/build-previewer-res.js
new file mode 100644
index 0000000..cbe8667
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/build-previewer-res.js
@@ -0,0 +1,38 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BuildPreviewerRes = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const pre_build_js_1 = require("../pre-build.js");
+const merge_profile_js_1 = require("../merge-profile.js");
+const process_profile_js_1 = require("../process-profile.js");
+const merge_resource_js_1 = require("../merge-resource.js");
+const compile_resource_js_1 = require("../compile-resource.js");
+const replace_previewer_page_1 = require("./replace-previewer-page");
+const legacy_merge_profile_1 = require("../legacy-tasks/legacy-merge-profile");
+const legacy_process_profile_1 = require("../legacy-tasks/legacy-process-profile");
+const legacy_compile_resource_1 = require("../legacy-tasks/legacy-compile-resource");
+const legacy_generate_js_manifest_1 = require("../legacy-tasks/legacy-generate-js-manifest");
+const collect_har_dependency_js_1 = require("../collect-har-dependency.js");
+const generate_loader_json_js_1 = require("../generate-loader-json.js");
+const syscap_transform_1 = require("../syscap-transform");
+/**
+ * for preview hook only
+ */
+class BuildPreviewerRes extends hvigor_base_1.Task {
+ constructor(taskService, isFaMode) {
+ super();
+ this.registry = () => {
+ return this._isFaMode ?
+ new hvigor_base_1.Hvigor().series(new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new pre_build_js_1.PreBuild(this._taskService).registry(), new legacy_merge_profile_1.LegacyMergeProfile(this._taskService).registry(), new legacy_process_profile_1.LegacyProcessProfile(this._taskService).registry(), new legacy_compile_resource_1.LegacyCompileResource(this._taskService).registry(), new syscap_transform_1.SyscapTransform(this._taskService).registry(), new legacy_generate_js_manifest_1.LegacyGenerateJsManifest(this._taskService).registry(), new generate_loader_json_js_1.GenerateLoaderJson(this._taskService).registry()) :
+ new hvigor_base_1.Hvigor().series(new collect_har_dependency_js_1.CollectHarDependency(this._taskService).registry(), new pre_build_js_1.PreBuild(this._taskService).registry(), new merge_profile_js_1.MergeProfile(this._taskService).registry(), new process_profile_js_1.ProcessProfile(this._taskService).registry(), new merge_resource_js_1.MergeResource(this._taskService).registry(), new compile_resource_js_1.CompileResource(this._taskService).registry(), new syscap_transform_1.SyscapTransform(this._taskService).registry(), new generate_loader_json_js_1.GenerateLoaderJson(this._taskService).registry(), new replace_previewer_page_1.ReplacePreviewerPage(this._taskService).registry());
+ };
+ this._taskService = taskService;
+ this._isFaMode = isFaMode;
+ }
+}
+exports.BuildPreviewerRes = BuildPreviewerRes;
+//# sourceMappingURL=build-previewer-res.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/replace-previewer-page.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/replace-previewer-page.js
new file mode 100644
index 0000000..4cd0e7a
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/previewer/replace-previewer-page.js
@@ -0,0 +1,77 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ReplacePreviewerPage = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const ohos_hap_task_1 = require("../task/ohos-hap-task");
+const path_1 = __importDefault(require("path"));
+const common_const_1 = require("../../const/common-const");
+const fse = __importStar(require("fs-extra"));
+const inject_const_1 = require("../../const/inject-const");
+const project_file_reader_js_1 = require("../../utils/project-file-reader.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * accept preview args then replace into page file
+ */
+class ReplacePreviewerPage extends ohos_hap_task_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, 'ReplacePreviewerPage');
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(ReplacePreviewerPage.name);
+ }
+ doTaskAction(targetData, target) {
+ const previewPage = hvigor_base_1.vigorConfigInst.getExtraConfig().get(inject_const_1.InjectConst.PREVIEWER_REPLACE_PAGE);
+ if (!previewPage) {
+ return;
+ }
+ const pathInfo = targetData.getPathInfo();
+ const moduleJsonPath = path_1.default.resolve(pathInfo.getIntermediatesRes(), common_const_1.CommonConst.MODULE_JSON);
+ const moduleJsonObj = project_file_reader_js_1.ProjectFileReader.getJson5Obj(moduleJsonPath);
+ // $profile:xxxxxx
+ const pagesStr = moduleJsonObj.module.pages;
+ if (!pagesStr) {
+ this._log._buildError("Unabled to replace. Cannot find moduleJsonObj.module.pages.")
+ ._printErrorAndExit(this.moduleModel.getName());
+ return;
+ }
+ const pageModel = {
+ src: [previewPage]
+ };
+ const pageJsonFileName = `${pagesStr.replace(/\$profile:/, '')}.json`;
+ // todo 该路径可以封装一下 后续做page替换时会常用到
+ const pageJsonFilePath = path_1.default.resolve(pathInfo.getIntermediatesResProfilePath(), pageJsonFileName);
+ this._log.debug(`Resolved file ${pageJsonFilePath}.`);
+ this._log.debug(`Replace page to ${previewPage}`);
+ fse.outputJSONSync(pageJsonFilePath, pageModel);
+ }
+}
+exports.ReplacePreviewerPage = ReplacePreviewerPage;
+//# sourceMappingURL=replace-previewer-page.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/process-libs.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/process-libs.js
new file mode 100644
index 0000000..aa92cba
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/process-libs.js
@@ -0,0 +1,115 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProcessLibs = void 0;
+const glob_1 = require("glob");
+const os_1 = __importDefault(require("os"));
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const path_1 = __importDefault(require("path"));
+const lodash_1 = require("lodash");
+const fs = __importStar(require("fs-extra"));
+const build_directory_const_js_1 = require("../const/build-directory-const.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+const project_file_reader_js_1 = require("../utils/project-file-reader.js");
+/**
+ * 收集hap和har依赖中的.so文件
+ *
+ * @since 2022/1/20
+ */
+class ProcessLibs extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "ProcessLibs");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(ProcessLibs.name);
+ this._moduleModel = taskService.getModuleModel();
+ this._moduleDir = this._moduleModel.getProjectDir();
+ }
+ doTaskAction(targetData, target) {
+ const pathInfo = targetData.getPathInfo();
+ // hap native构建产物
+ const hapBuildLibs = path_1.default.resolve(pathInfo.getIntermediatesCppOutPut());
+ // hap本地native依赖
+ const hapLocalLibs = path_1.default.resolve(this._moduleDir, build_directory_const_js_1.BuildDirConst.LIBS);
+ // har携带native依赖
+ const harList = project_file_reader_js_1.ProjectFileReader.getJson5Obj(path_1.default.resolve(pathInfo.getIntermediatesMergeRes(), build_directory_const_js_1.BuildArtifactConst.MERGE_NPM_FILE_JSON)).dependencies;
+ const localModuleList = project_file_reader_js_1.ProjectFileReader.getJson5Obj(path_1.default.resolve(pathInfo.getIntermediatesMergeRes(), build_directory_const_js_1.BuildArtifactConst.MERGE_NPM_FILE_JSON)).local.path;
+ const harLibs = [...(0, lodash_1.difference)(harList, localModuleList).map(harPath => {
+ return path_1.default.resolve(harPath, build_directory_const_js_1.BuildDirConst.LIBS);
+ }), ...localModuleList.map(harPath => {
+ return path_1.default.resolve(harPath, build_directory_const_js_1.BuildDirConst.BUILD_ROOT, "default", build_directory_const_js_1.BuildDirConst.INTERMEDIATES, build_directory_const_js_1.BuildDirConst.LIBS, "default");
+ })];
+ const libsCollections = [...harLibs, hapBuildLibs, hapLocalLibs];
+ this._log.debug(`Libs: ${libsCollections.join(os_1.default.EOL)}`);
+ // output路径
+ const libsOutputDir = pathInfo.getIntermediatesProcessLibs();
+ fs.emptyDirSync(libsOutputDir);
+ // 先收集所有的目标.so文件,存进set内
+ const fullSet = {};
+ libsCollections.forEach(libsPath => {
+ const paths = glob_1.glob.sync("**/*.so", {
+ cwd: libsPath
+ });
+ this._log.debug(`Collect files: ${paths}`);
+ paths.forEach(soPath => {
+ if (!fullSet[soPath]) {
+ fullSet[soPath] = [];
+ }
+ fullSet[soPath].push(path_1.default.resolve(libsPath, soPath));
+ });
+ });
+ let flag = false;
+ const errorLog = [];
+ for (const key in fullSet) {
+ const fileName = path_1.default.basename(key);
+ const len = fullSet[key].length;
+ if (len > 1 && !(fileName === "libc++.so" || fileName === "libc++_shared.so")) {
+ flag = true;
+ errorLog.push(`${len} files found for path 'lib/${key}'. This can cause unexpected errors at runtime.`);
+ fullSet[key].forEach(value => {
+ errorLog.push(`- ${value}`);
+ });
+ }
+ }
+ if (flag) {
+ this._log._buildError(errorLog.join(`${os_1.default.EOL}\t `))
+ ._solution("Try to rename native compilation products of modules.")
+ ._printErrorAndExit(this.moduleName);
+ }
+ // 复制libs内文件到打包路径
+ libsCollections.forEach(libsPath => {
+ if (fs.pathExistsSync(libsPath)) {
+ fs.copySync(libsPath, libsOutputDir);
+ }
+ });
+ }
+}
+exports.ProcessLibs = ProcessLibs;
+//# sourceMappingURL=process-libs.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/process-profile.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/process-profile.js
new file mode 100644
index 0000000..0091e55
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/process-profile.js
@@ -0,0 +1,53 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProcessProfile = void 0;
+const fs = __importStar(require("fs-extra"));
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const project_file_reader_js_1 = require("../utils/project-file-reader.js");
+/**
+ * 处理module.json
+ *
+ * @since 2022/1/10
+ */
+class ProcessProfile extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "ProcessProfile");
+ }
+ doTaskAction(moduleTargetData, target) {
+ const arkEnable = this.service.isArkModule();
+ const pathInfo = moduleTargetData.getPathInfo();
+ const mergedModuleOpt = project_file_reader_js_1.ProjectFileReader.getJson5Obj(pathInfo.getIntermediatesMergeProfile());
+ mergedModuleOpt.module.virtualMachine = arkEnable ? "ark" : "default";
+ const processedModuleJson = pathInfo.getIntermediatesProcessProfile();
+ fs.outputJSONSync(processedModuleJson, mergedModuleOpt, { spaces: "\t" });
+ }
+}
+exports.ProcessProfile = ProcessProfile;
+//# sourceMappingURL=process-profile.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/module-task-service.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/module-task-service.js
new file mode 100644
index 0000000..461db58
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/module-task-service.js
@@ -0,0 +1,181 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ModuleTaskService = void 0;
+const build_directory_const_js_1 = require("../../const/build-directory-const.js");
+const hap_task_target_data_1 = require("../data/hap-task-target-data");
+const find_target_product_1 = require("../../common/find-target-product");
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const task_service_1 = require("./task-service");
+const sdk_info_1 = require("../../sdk/sdk-info");
+const module_path_info_iml_1 = require("../../common/iml/module-path-info-iml");
+const code_type_enum_1 = require("../../enum/code-type-enum");
+const project_extra_info_service_js_1 = require("../../project/project-extra-info-service.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const util = __importStar(require("util"));
+const sdkmanager_common_1 = require("@ohos/sdkmanager-common");
+const common_const_js_1 = require("../../const/common-const.js");
+/**
+ * 基于持久化module的模型层提供的数据,经过处理后,提供给打包hap任务流需要使用的服务和数据
+ *
+ * @since 2022/1/20
+ */
+class ModuleTaskService extends task_service_1.TaskService {
+ constructor(projectModel, moduleModel) {
+ super(projectModel);
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(ModuleTaskService.name);
+ this.computeTargets = () => {
+ // 默认不配置target时,执行所有的target,考虑是否用这个关键字
+ const targets = ["all"];
+ const configModules = hvigor_base_1.vigorConfigInst.getExtraConfig().get("module");
+ if (configModules === undefined) {
+ return targets;
+ }
+ const modules = configModules.split(",");
+ for (let i = 0; i < modules.length; i++) {
+ const module = modules[i];
+ const values = module.split("@");
+ if (this._moduleModel.getName() !== values[0]) {
+ continue;
+ }
+ for (let j = 1; j < values.length; j++) {
+ targets[j - 1] = values[j];
+ }
+ }
+ return targets;
+ };
+ this.checkNeedPack = (targetProduct, targetName, curModuleConfigTargets) => {
+ let needPack = false;
+ if (curModuleConfigTargets.indexOf(targetName) > -1) {
+ needPack = true;
+ }
+ if ((curModuleConfigTargets.indexOf("all") > -1)) {
+ // 默认不配置target时,不打包ohosTest的包
+ needPack = targetName !== "ohosTest";
+ }
+ const checkApplyProduct = (targetProduct) => {
+ var _a;
+ let products = (_a = this._projectModel) === null || _a === void 0 ? void 0 : _a.getTargetApplyProducts(this._moduleModel.getName(), targetName);
+ // 如果没有配置applyToProducts则默认是default
+ if (products === undefined) {
+ products = ["default"];
+ }
+ return products.includes(targetProduct);
+ };
+ return checkApplyProduct(targetProduct.name) && needPack;
+ };
+ /**
+ * 初始化hap模块打包流的target数据集合
+ */
+ this.initTargetData = () => {
+ const curModuleConfigTargets = this.computeTargets();
+ let buildRoot = hvigor_base_1.vigorConfigInst.getExtraConfig().get("buildRoot");
+ if (!buildRoot) {
+ buildRoot = build_directory_const_js_1.BuildDirConst.BUILD_ROOT;
+ }
+ let targets = this._moduleModel.getProfileOpt().targets;
+ if (targets === undefined) {
+ targets = [{
+ name: "default",
+ }, {
+ name: "ohosTest"
+ }];
+ }
+ else {
+ const targetNames = targets.map(target => {
+ return target.name;
+ });
+ if (!targetNames.includes("default")) {
+ targets.push({
+ name: "default",
+ });
+ }
+ if (!targetNames.includes("ohosTest")) {
+ targets.push({
+ name: "ohosTest"
+ });
+ }
+ }
+ const targetProduct = (0, find_target_product_1.findTargetProduct)(this._projectModel);
+ let hasTargetNeedPack = false;
+ targets.forEach((target) => {
+ const targetName = target.name;
+ const needPack = this.checkNeedPack(targetProduct, targetName, curModuleConfigTargets);
+ if (needPack) {
+ hasTargetNeedPack = true;
+ }
+ const pathInfo = new module_path_info_iml_1.ModulePathInfoIml(this._moduleModel, targetName, targetProduct.name, buildRoot);
+ this._targetDataMap.set(targetName, [new hap_task_target_data_1.ModuleTargetData(this._moduleModel, targetName, pathInfo, targetProduct), needPack]);
+ });
+ if (!hasTargetNeedPack) {
+ this._log._buildError(`Current product is ${targetProduct.name},There is no executable target!`)
+ ._solution(`Please check the module targets ${util.format(targets)} applyToProducts field`)
+ ._file(this._projectModel.getProfilePath())
+ ._printErrorAndExit(this._moduleModel.getName());
+ }
+ };
+ this._moduleModel = moduleModel;
+ this._targetDataMap = new Map();
+ this._hapExtraInfo = project_extra_info_service_js_1.ProjectExtraInfoService.getProjectExtraInfoByPath(this._moduleModel);
+ this._compileSdkVersion = this._projectModel.getProfileOpt().app.compileSdkVersion;
+ this._sdkInfo = new sdk_info_1.SdkInfo(this._compileSdkVersion, this.getModuleRequiredSDKs());
+ this.initTargetData();
+ }
+ getModuleRequiredSDKs() {
+ // always require Toolchains
+ const sdkComponents = [sdkmanager_common_1.ComponentPath.TOOLCHAINS];
+ for (const key of this._moduleModel.getSourceSetByTargetName(common_const_js_1.DefaultTargetConst.DEFAULT_TARGET).getCodeMap().keys()) {
+ // 当前先按照目录存在就加载
+ if (code_type_enum_1.CodeType.CPP === key) {
+ if (this._moduleModel.getProfileOpt().buildOption.externalNativeOptions) {
+ sdkComponents.push(code_type_enum_1.CodeType.getSDKComponentName(key));
+ }
+ }
+ else {
+ sdkComponents.push(code_type_enum_1.CodeType.getSDKComponentName(key));
+ }
+ }
+ this._log.debug(`${this._moduleModel.getName()} require SDK: ${sdkComponents.join(" ").toLowerCase()}`);
+ return sdkComponents;
+ }
+ getModuleModel() {
+ return this._moduleModel;
+ }
+ getTargetDataMap() {
+ return this._targetDataMap;
+ }
+ getHapExtraInfo() {
+ return this._hapExtraInfo;
+ }
+ isArkModule() {
+ return this._moduleModel.isArkModule();
+ }
+}
+exports.ModuleTaskService = ModuleTaskService;
+//# sourceMappingURL=module-task-service.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/project-task-service.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/project-task-service.js
new file mode 100644
index 0000000..fdb427c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/project-task-service.js
@@ -0,0 +1,75 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProjectTaskService = void 0;
+const task_service_1 = require("./task-service");
+const hap_plugin_1 = require("../../plugin/hap-plugin");
+const array_util_1 = require("../../utils/array-util");
+const find_target_product_1 = require("../../common/find-target-product");
+const build_directory_const_1 = require("../../const/build-directory-const");
+const project_path_info_iml_1 = require("../../common/iml/project-path-info-iml");
+const sdk_info_js_1 = require("../../sdk/sdk-info.js");
+const sdkmanager_common_1 = require("@ohos/sdkmanager-common");
+/**
+ * 基于持久化project的模型层提供的数据,经过处理后,提供给打包app任务流需要使用的服务和数据
+ *
+ * @since 2022/1/20
+ */
+class ProjectTaskService extends task_service_1.TaskService {
+ constructor(project, projectModel) {
+ super(projectModel);
+ /**
+ * 初始化app模块打包流的product数据集合
+ */
+ this.initProductData = () => {
+ var _a;
+ (_a = this._project) === null || _a === void 0 ? void 0 : _a.getSubProjects().forEach((value) => {
+ var _a;
+ const moduleName = value.getName();
+ const plugin = value.getPlugin();
+ if (plugin === undefined) {
+ throw new Error(`Cannot find build file 'hvigorfile.js' in module ${moduleName}`);
+ }
+ const moduleTargetDataArr = [];
+ if (plugin instanceof hap_plugin_1.HapPlugin) {
+ // 需要获取在根项目下的build-profile里配了哪些target,没配置的就不需要打包
+ const appModuleOpt = (_a = this._projectModel) === null || _a === void 0 ? void 0 : _a.getModuleProfileOpt(moduleName);
+ const appModuleConfigTargets = appModuleOpt === null || appModuleOpt === void 0 ? void 0 : appModuleOpt.targets;
+ const targetDataMap = plugin.getTaskService().getTargetDataMap();
+ targetDataMap.forEach((targetData, targetName, targetMap) => {
+ // 该target需要打包,并且在根项目下的build-profile中配置了
+ if (targetData[1] && (0, array_util_1.getElementFromArr)(appModuleConfigTargets, targetName) !== undefined) {
+ moduleTargetDataArr.push(targetData[0]);
+ }
+ });
+ this._productDataMap.set(moduleName, moduleTargetDataArr);
+ }
+ });
+ };
+ this._project = project;
+ this._targetProduct = (0, find_target_product_1.findTargetProduct)(projectModel);
+ this._sdkInfo = new sdk_info_js_1.SdkInfo(projectModel.getCompileApiVersion(), [sdkmanager_common_1.ComponentPath.TOOLCHAINS]);
+ this._pathInfo = new project_path_info_iml_1.ProjectPathInfoIml(projectModel, this._targetProduct.name);
+ this._productDataMap = new Map();
+ this.initProductData();
+ }
+ getProductDataMap() {
+ return this._productDataMap;
+ }
+ getPathInfo() {
+ return this._pathInfo;
+ }
+ getTargetProduct() {
+ return this._targetProduct;
+ }
+ getAppOutputFileName(isSigned = false) {
+ const signedSuffix = isSigned ? "signed" : "unsigned";
+ const projectName = this._projectModel.getName();
+ return `${projectName}-${this._targetProduct.name}-${signedSuffix}${build_directory_const_1.BuildArtifactExtension.DOT_APP}`;
+ }
+}
+exports.ProjectTaskService = ProjectTaskService;
+//# sourceMappingURL=project-task-service.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/task-service.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/task-service.js
new file mode 100644
index 0000000..d71016a
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/task-service.js
@@ -0,0 +1,25 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TaskService = void 0;
+/**
+ * 任务流服务的基础类
+ *
+ * @since 2022/1/20
+ */
+class TaskService {
+ constructor(projectModel) {
+ this._projectModel = projectModel;
+ }
+ getProjectModel() {
+ return this._projectModel;
+ }
+ getSdkInfo() {
+ return this._sdkInfo;
+ }
+}
+exports.TaskService = TaskService;
+//# sourceMappingURL=task-service.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/generate-java-files.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/generate-java-files.js
new file mode 100644
index 0000000..7ab8417
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/generate-java-files.js
@@ -0,0 +1,75 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GenerateJavaFiles = void 0;
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const fse = __importStar(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+/**
+ * 根据config.json生成java文件
+ */
+class GenerateJavaFiles extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "GenerateJavaFiles");
+ }
+ doTaskAction(targetData, target) {
+ const moduleModel = this.service.getModuleModel();
+ const configOpt = moduleModel.getJsonObjByTargetName(target);
+ // 为每个ability生成一个java文件
+ const abilityObjs = moduleModel.getLegacyAbilities();
+ for (let i = 0; i < abilityObjs.length; i++) {
+ this.createJavaFile(abilityObjs[i], targetData, configOpt);
+ }
+ }
+ createJavaFile(abilityInfo, targetData, configOpt) {
+ const abilityType = abilityInfo.getType();
+ // 读取模板文件
+ const tempFilePath = path_1.default.resolve(__dirname, `../../../res/template/${abilityType}.temp`);
+ const templateJavaBuffer = fse.readFileSync(tempFilePath);
+ // 替换ability对应字符串,生成java字符串
+ let templateJavaFileStr = templateJavaBuffer.toString();
+ // 如果name是点开头, 则ability的name是点后面的字符串
+ const abilityName = abilityInfo.getName().charAt(0) === '.' ?
+ abilityInfo.getName().substring(1) : abilityInfo.getName();
+ templateJavaFileStr = templateJavaFileStr.replace('ABILITY_NAME', abilityName);
+ const packageName = configOpt.module.package;
+ templateJavaFileStr = templateJavaFileStr.replace('PACKAGE_NAME', packageName);
+ const srcPath = abilityInfo.getRelateSrcPath();
+ templateJavaFileStr = templateJavaFileStr.replace('ABILITY_SRC_PATH', srcPath);
+ // 将string写到java文件中
+ const packagePath = packageName.replace(new RegExp('\\.', 'g'), '/');
+ const generatedJavaFilePath = path_1.default.resolve(this.getTaskTempDir(targetData), packagePath, `${abilityName}.java`);
+ fse.outputFileSync(generatedJavaFilePath, templateJavaFileStr);
+ }
+}
+exports.GenerateJavaFiles = GenerateJavaFiles;
+//# sourceMappingURL=generate-java-files.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/generate-resources-shell.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/generate-resources-shell.js
new file mode 100644
index 0000000..df37a46
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/generate-resources-shell.js
@@ -0,0 +1,45 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GenerateResourcesShell = void 0;
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const file_util_js_1 = require("../../utils/file-util.js");
+const aapt2_command_builder_js_1 = require("../../builder/aapt2-command-builder.js");
+const process_utils_js_1 = require("../../utils/process-utils.js");
+const path_1 = __importDefault(require("path"));
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * aapt编译资源shell
+ *
+ * @since 2022/02/19
+ */
+class GenerateResourcesShell extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, 'GenerateResourceShell');
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(GenerateResourcesShell.name);
+ const sdkInfo = taskService.getSdkInfo();
+ this.aaptTool = sdkInfo.getAapt2Tool();
+ }
+ doTaskAction(targetData, target) {
+ const pathInfo = targetData.getPathInfo();
+ const shellResourceDir = pathInfo.getShellResourceDir();
+ const shellBuildResourceDir = pathInfo.getShellBuildResourceDir();
+ file_util_js_1.FileUtil.checkDirWithoutDelete(shellResourceDir);
+ file_util_js_1.FileUtil.checkDirWithoutDelete(shellBuildResourceDir);
+ const builder = new aapt2_command_builder_js_1.Aapt2CommandBuilder(this.aaptTool)
+ .compile()
+ .addDirectory(shellResourceDir)
+ .addOutputPath(path_1.default.resolve(shellBuildResourceDir, 'res.zip'));
+ const commands = builder.build();
+ this._log._printDebugCommand("Aapt", commands);
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync(commands);
+ }
+}
+exports.GenerateResourcesShell = GenerateResourcesShell;
+//# sourceMappingURL=generate-resources-shell.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/pack-shell.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/pack-shell.js
new file mode 100644
index 0000000..865bfe3
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/pack-shell.js
@@ -0,0 +1,64 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PackShell = void 0;
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const fse = __importStar(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+const archiver_1 = __importDefault(require("archiver"));
+/**
+ * pack dex and res into shell
+ */
+class PackShell extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "PackShell");
+ }
+ doTaskAction(targetData, target) {
+ const allResFile = path_1.default.resolve(this.getTaskTempDir(targetData), "resFile");
+ fse.outputFileSync(path_1.default.resolve(allResFile, "res", "drawable", "fakeres"), "fake res");
+ fse.outputFileSync(path_1.default.resolve(allResFile, "res.arsc"), "fake arsc");
+ fse.outputFileSync(path_1.default.resolve(allResFile, "AndroidManifest.xml"), "fake manifest");
+ const dalvikDir = path_1.default.resolve(this.getTaskTempDir(targetData), "dalvik");
+ fse.outputFileSync(path_1.default.resolve(dalvikDir, "classes.dex"), "fake dex");
+ fse.outputFileSync(path_1.default.resolve(dalvikDir, "classes.dex2"), "fake dex2");
+ const output = fse.createWriteStream(path_1.default.resolve(this.getTaskTempDir(targetData), "xx.apk"));
+ const archive = (0, archiver_1.default)('zip', {
+ zlib: { level: 9 },
+ store: true
+ });
+ archive.pipe(output);
+ archive.directory(allResFile, false).directory(dalvikDir, false);
+ archive.finalize();
+ }
+}
+exports.PackShell = PackShell;
+//# sourceMappingURL=pack-shell.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/transform-class.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/transform-class.js
new file mode 100644
index 0000000..cb55fb4
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/shell/transform-class.js
@@ -0,0 +1,108 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TransformClass = void 0;
+const ohos_hap_task_js_1 = require("../task/ohos-hap-task.js");
+const fse = __importStar(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+const os_1 = __importDefault(require("os"));
+const d8_options_js_1 = require("../../builder/inner-java-command-builder/d8-options.js");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * transform class
+ */
+class TransformClass extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "TransformClass");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(TransformClass.name);
+ }
+ doTaskAction(targetData, target) {
+ /*
+ * collect all class files
+ *
+ */
+ const classDir = path_1.default.resolve(this.getTaskTempDir(targetData), 'classes');
+ const classFiles = path_1.default.resolve(this.getTaskTempDir(targetData), 'classesFile');
+ this.generateClassesFiles(classDir, classFiles);
+ const d8Builder = new d8_options_js_1.D8Options();
+ d8Builder.addJvmOption("-Xmx1024M")
+ .addJvmOption("-Xss1m")
+ // .addClassPath(sdkInfo.getD8())
+ .addMainClass('com.android.tools.r8.D8');
+ // construct command builder
+ d8Builder.addInputDir(classFiles)
+ .addOutputDir(this.getTaskTempDir(targetData));
+ this._log.debug(d8Builder.build());
+ }
+ /**
+ * 遍历classDir目录, 并在指定位置生成所有字节码文件
+ *
+ * @param classDir 起始遍历的目录
+ * @param classFilePath 生成的文件路径
+ */
+ generateClassesFiles(classDir, classFilePath) {
+ const classFilesArray = this.listFile(classDir, [], new RegExp(/\.class$/));
+ const fileStr = classFilesArray.join(os_1.default.EOL);
+ this._log.debug("==========class files==========");
+ this._log.debug(fileStr);
+ fse.outputFileSync(classFilePath, fileStr);
+ }
+ /**
+ * 按照正则规则遍历目录, 保存符合规则的文件路径到list中
+ *
+ * @param dir 开始遍历的目录
+ * @param list 保存的list
+ * @param regex 正则规则
+ */
+ listFile(dir, list, regex = undefined) {
+ if (!fse.existsSync(dir) || !fse.statSync(dir).isDirectory()) {
+ return [];
+ }
+ const files = fse.readdirSync(dir);
+ files.forEach((subFileName) => {
+ const fullPath = path_1.default.join(dir, subFileName);
+ const stats = fse.statSync(fullPath);
+ if (stats.isDirectory()) {
+ this.listFile(fullPath, list, regex);
+ }
+ else {
+ if (regex && !regex.test(subFileName)) {
+ return;
+ }
+ list.push(fullPath);
+ }
+ });
+ return list;
+ }
+}
+exports.TransformClass = TransformClass;
+//# sourceMappingURL=transform-class.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign-app.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign-app.js
new file mode 100644
index 0000000..a4a50f8
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign-app.js
@@ -0,0 +1,33 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SignApp = void 0;
+const ohos_app_task_js_1 = require("./task/ohos-app-task.js");
+const sign_util_js_1 = require("./sign/sign-util.js");
+const path_1 = __importDefault(require("path"));
+/**
+ * 对app包进行签名
+ *
+ * @since 2022/1/22
+ */
+class SignApp extends ohos_app_task_js_1.OhosAppTask {
+ constructor(taskService) {
+ super(taskService, "SignApp");
+ }
+ doTaskAction() {
+ const pathInfo = this.service.getPathInfo();
+ const outputFileName = this.service.getAppOutputFileName();
+ // 入参和出参的包名规则需要变更
+ const inputFile = path_1.default.resolve(pathInfo.getProjectOutputPath(), outputFileName);
+ const outputFile = path_1.default.resolve(pathInfo.getProjectOutputPath(), this.service.getAppOutputFileName(true));
+ new sign_util_js_1.SignUtil(this.service, "app", this.service.getTargetProduct()).sign(inputFile, outputFile);
+ }
+}
+exports.SignApp = SignApp;
+//# sourceMappingURL=sign-app.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign-hap.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign-hap.js
new file mode 100644
index 0000000..681d4a6
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign-hap.js
@@ -0,0 +1,33 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SignHap = void 0;
+const path_1 = __importDefault(require("path"));
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const sign_util_js_1 = require("./sign/sign-util.js");
+/**
+ * Sign hap
+ *
+ * @since 2022/1/10
+ */
+class SignHap extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "SignHap");
+ }
+ doTaskAction(targetData, target) {
+ const pathInfo = targetData.getPathInfo();
+ const outputFileName = targetData.getModuleTargetOutputFileName();
+ // 入参和出参的包名规则需要变更。
+ const inputFile = path_1.default.resolve(pathInfo.getModuleBuildOutputPath(), outputFileName);
+ const outputFile = path_1.default.resolve(pathInfo.getModuleBuildOutputPath(), targetData.getModuleTargetOutputFileName(true));
+ new sign_util_js_1.SignUtil(this.service, "hap", targetData.getProduct()).sign(inputFile, outputFile);
+ }
+}
+exports.SignHap = SignHap;
+//# sourceMappingURL=sign-hap.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/common-sign-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/common-sign-command-builder.js
new file mode 100644
index 0000000..f52d4f9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/common-sign-command-builder.js
@@ -0,0 +1,98 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CommonSignCommandBuilder = void 0;
+const fs_1 = __importDefault(require("fs"));
+const ohos_logger_js_1 = require("../../../utils/log/ohos-logger.js");
+const decipher_util_js_1 = require("../../../utils/decipher-util.js");
+const path_1 = __importDefault(require("path"));
+/**
+ * 签名的公共处理参数的Builder类
+ *
+ * @since 2022/1/21
+ */
+class CommonSignCommandBuilder {
+ constructor(projectModel, signingConfig, sdkInfo, signModel, signingOptions) {
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(CommonSignCommandBuilder.name);
+ this._projectModel = projectModel;
+ this._signingConfig = signingConfig;
+ this._sdkInfo = sdkInfo;
+ this._signModel = signModel;
+ this._signingOptions = signingOptions;
+ }
+ /**
+ * 通过初始化signOptions的配置,并添加公共的签名工具路径
+ *
+ * @return signCommand
+ */
+ getSignCommand() {
+ this.initCommandParams();
+ const signTool = this.getSignTool();
+ this._signingOptions.addCalledJarFile(signTool);
+ return this._signingOptions.build();
+ }
+ getWorkDir() {
+ return this._sdkInfo.getSignDir();
+ }
+ getKeyStorePwd() {
+ const rootDir = path_1.default.resolve(this._signingConfig.material.storeFile, '..');
+ return decipher_util_js_1.DecipherUtil.decryptPwd(rootDir, this._signingConfig.material.storePassword);
+ }
+ getKeyPwd() {
+ const rootDir = path_1.default.resolve(this._signingConfig.material.storeFile, '..');
+ return decipher_util_js_1.DecipherUtil.decryptPwd(rootDir, this._signingConfig.material.keyPassword);
+ }
+ /**
+ * 将相对路径转化为绝对路径, 并校验签名材料是否存在
+ *
+ * @param {ProjectBuildProfile.MaterialBuildOpt | undefined} material
+ * @protected
+ */
+ checkValidMaterial(material) {
+ const solution = "Please check signingConfigs in root project build-profile.json5";
+ if (material === undefined) {
+ this._log._buildError("The material is not configured in signingConfigs.")
+ ._solution(solution)
+ ._file(this._projectModel.getProfilePath())
+ ._printErrorAndExit(this._projectModel.getName());
+ }
+ this.validateMaterial(material.storeFile, solution, 'storeFile');
+ this.validateMaterial(material.profile, solution, 'profile');
+ this.validateMaterial(material.certpath, solution, 'certPath');
+ material.storeFile = this.normalizePath(material.storeFile);
+ material.profile = this.normalizePath(material.profile);
+ material.certpath = this.normalizePath(material.certpath);
+ }
+ /**
+ * 转化签名材料的相对路径为绝对路径.
+ * 1 若是绝对路径, 直接返回
+ * 2 若是相对路径, 则加上build-profile.json5的目录拼成绝对路径
+ *
+ * @param {string} materialFilePath 配置签名材料的路径
+ * @returns {string} 签名材料的绝对路径
+ * @private
+ */
+ normalizePath(materialFilePath) {
+ if (path_1.default.isAbsolute(materialFilePath)) {
+ return materialFilePath;
+ }
+ return path_1.default.resolve(this._projectModel.getProjectDir(), materialFilePath);
+ }
+ validateMaterial(materialFilePath, solution, materialFileName) {
+ if (materialFilePath !== undefined && fs_1.default.existsSync(this.normalizePath(materialFilePath))) {
+ return;
+ }
+ this._log._buildError(`Check if '${materialFileName}' is configured correctly, it can't be null or empty.` +
+ `file must exist at '${materialFilePath}'`)
+ ._solution(solution)
+ ._file(this._projectModel.getProfilePath())
+ ._printErrorAndExit(this._projectModel.getName());
+ }
+}
+exports.CommonSignCommandBuilder = CommonSignCommandBuilder;
+//# sourceMappingURL=common-sign-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/hap-sign-command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/hap-sign-command-builder.js
new file mode 100644
index 0000000..86767c5
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/hap-sign-command-builder.js
@@ -0,0 +1,46 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.HapSignCommandBuilder = void 0;
+const common_sign_command_builder_1 = require("./common-sign-command-builder");
+const sdk_const_1 = require("../../../const/sdk-const");
+const path_1 = __importDefault(require("path"));
+/**
+ * sdk 新签名工具hap-sign-tool的命令行生成器
+ *
+ * @since 2022/03/01
+ */
+class HapSignCommandBuilder extends common_sign_command_builder_1.CommonSignCommandBuilder {
+ constructor(projectModel, signingConfig, sdkInfo, signModel, signingOptions) {
+ super(projectModel, signingConfig, sdkInfo, signModel, signingOptions);
+ }
+ getSignTool() {
+ return path_1.default.resolve(this._sdkInfo.getSignDir(), sdk_const_1.ToolChainsConst.NEW_SIGN_TOOL);
+ }
+ /**
+ * 获取build-profile中的签名配置,加载到signOptions中
+ */
+ initCommandParams() {
+ const material = this._signingConfig.material;
+ this.checkValidMaterial(material);
+ this._signingOptions.sign()
+ .addMode(HapSignCommandBuilder.SIGN_MODE)
+ .addKeyStoreFile(material.storeFile)
+ .addKeyStorePwd(this.getKeyStorePwd())
+ .addKeyAlias(material.keyAlias)
+ .addKeyPwd(this.getKeyPwd())
+ .addSignAlg(material.signAlg)
+ .addProfileFile(material.profile)
+ .addAppCertFile(material.certpath)
+ .addInputFile(this._signModel.getInputFilePath())
+ .addOutputFile(this._signModel.getOutPutFilePath());
+ }
+}
+exports.HapSignCommandBuilder = HapSignCommandBuilder;
+HapSignCommandBuilder.SIGN_MODE = "localSign";
+//# sourceMappingURL=hap-sign-command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/hapv2-sign-command-build.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/hapv2-sign-command-build.js
new file mode 100644
index 0000000..4b0bcae
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/hapv2-sign-command-build.js
@@ -0,0 +1,46 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.HapV2SignCommandBuild = void 0;
+const common_sign_command_builder_1 = require("./common-sign-command-builder");
+const sdk_const_1 = require("../../../const/sdk-const");
+const path_1 = __importDefault(require("path"));
+/**
+ * sdk 老签名工具hapsigntoolv2的命令行生成器
+ *
+ * @since 2022/03/01
+ */
+class HapV2SignCommandBuild extends common_sign_command_builder_1.CommonSignCommandBuilder {
+ constructor(projectModel, signingConfig, sdkInfo, signModel, signingOptions) {
+ super(projectModel, signingConfig, sdkInfo, signModel, signingOptions);
+ }
+ getSignTool() {
+ return path_1.default.resolve(this._sdkInfo.getSignDir(), sdk_const_1.ToolChainsConst.SIGN_TOOL);
+ }
+ /**
+ * 获取build-profile中的签名配置,加载到signOptions中
+ */
+ initCommandParams() {
+ const material = this._signingConfig.material;
+ this.checkValidMaterial(material);
+ this._signingOptions.sign()
+ .addMode(HapV2SignCommandBuild.SIGN_MODE)
+ .addKeyStore(material.storeFile)
+ .addKeyStorePwd(this.getKeyStorePwd())
+ .addPrivateKey(material.keyAlias)
+ .addKeyAliasPwd(material.keyPassword)
+ .addSignAlg(material.signAlg)
+ .addProfile(material.profile)
+ .addCertPath(material.certpath)
+ .addInputFile(this._signModel.getInputFilePath())
+ .addOutputFile(this._signModel.getOutPutFilePath());
+ }
+}
+exports.HapV2SignCommandBuild = HapV2SignCommandBuild;
+HapV2SignCommandBuild.SIGN_MODE = "localjks";
+//# sourceMappingURL=hapv2-sign-command-build.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/sign-command-factory.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/sign-command-factory.js
new file mode 100644
index 0000000..0f4746d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/sign-command-factory.js
@@ -0,0 +1,28 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SignCommandFactory = void 0;
+const hapv2_sign_command_build_1 = require("./hapv2-sign-command-build");
+const signing_options_1 = require("../../../builder/inner-java-command-builder/signing-options");
+const new_signing_options_1 = require("../../../builder/inner-java-command-builder/new-signing-options");
+const hap_sign_command_builder_1 = require("./hap-sign-command-builder");
+/**
+ * 根据工程api 状态创建不同的签名配置
+ *
+ * @since 2022/03/01
+ */
+class SignCommandFactory {
+ constructor(compileSdkVersion) {
+ this._compileSdkVersion = compileSdkVersion;
+ }
+ createCommandBuilder(projectModel, signingConfig, sdkInfo, signModel) {
+ if (this._compileSdkVersion < 8) {
+ return new hapv2_sign_command_build_1.HapV2SignCommandBuild(projectModel, signingConfig, sdkInfo, signModel, new signing_options_1.SigningOptions());
+ }
+ return new hap_sign_command_builder_1.HapSignCommandBuilder(projectModel, signingConfig, sdkInfo, signModel, new new_signing_options_1.NewSigningOptions());
+ }
+}
+exports.SignCommandFactory = SignCommandFactory;
+//# sourceMappingURL=sign-command-factory.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/sign-model.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/sign-model.js
new file mode 100644
index 0000000..c290e99
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder-impl/sign-model.js
@@ -0,0 +1,29 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SignModel = void 0;
+/**
+ * 定义签名工具的输入输出和类型
+ *
+ * @since 2022/1/20
+ */
+class SignModel {
+ constructor(moduleType, inputFilePath, outputFilePath) {
+ this._moduleType = moduleType;
+ this._inputFilePath = inputFilePath;
+ this._outputFilePath = outputFilePath;
+ }
+ getModuleType() {
+ return this._moduleType;
+ }
+ getInputFilePath() {
+ return this._inputFilePath;
+ }
+ getOutPutFilePath() {
+ return this._outputFilePath;
+ }
+}
+exports.SignModel = SignModel;
+//# sourceMappingURL=sign-model.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder.js
new file mode 100644
index 0000000..117a191
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/command-builder.js
@@ -0,0 +1,5 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+//# sourceMappingURL=command-builder.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/sign-util.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/sign-util.js
new file mode 100644
index 0000000..f0bcf71
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sign/sign-util.js
@@ -0,0 +1,64 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SignUtil = void 0;
+const sign_model_1 = require("./command-builder-impl/sign-model");
+const process_utils_1 = require("../../utils/process-utils");
+const array_util_1 = require("../../utils/array-util");
+const sign_command_factory_1 = require("./command-builder-impl/sign-command-factory");
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+const module_task_service_1 = require("../service/module-task-service");
+const validate_util_1 = require("../../utils/validate-util");
+/**
+ * 执行签名的工具类
+ *
+ * @since 2022/1/21
+ */
+class SignUtil {
+ constructor(taskService, moduleType, targetProduct) {
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(SignUtil.name);
+ this._taskService = taskService;
+ this._moduleType = moduleType;
+ this._targetProduct = targetProduct;
+ this._signCommandFactory = new sign_command_factory_1.SignCommandFactory(this._taskService.getProjectModel().getCompileApiVersion());
+ }
+ sign(inputFilePath, outputFilePath) {
+ this.executeSign(new sign_model_1.SignModel(this._moduleType, inputFilePath, outputFilePath));
+ }
+ executeSign(signModel) {
+ const app = this._taskService.getProjectModel().getProfileOpt().app;
+ const productSignConfigName = this._targetProduct.signingConfig;
+ const signingConfig = (0, array_util_1.getElementFromArr)(app === null || app === void 0 ? void 0 : app.signingConfigs, productSignConfigName === null || productSignConfigName === void 0 ? void 0 : productSignConfigName.substring(productSignConfigName.lastIndexOf(".") + 1));
+ if (signingConfig === undefined) {
+ this._log.warn(`Will skip sign '${this._moduleType}',
+ because no valid signingConfig is configured for '${this._targetProduct.name}' product`);
+ return;
+ }
+ const sdkInfo = this._taskService.getSdkInfo();
+ const commandBuilder = this._signCommandFactory.createCommandBuilder(this._taskService.getProjectModel(), signingConfig, sdkInfo, signModel);
+ const signCommand = commandBuilder.getSignCommand();
+ if (this._moduleType === "hap") {
+ const bundleNameFromP7b = validate_util_1.ValidateUtil.getBundleNameFromP7b(this._taskService, signingConfig);
+ const bundleNameFromHap = validate_util_1.ValidateUtil.getBundleNameFromHap(this._taskService);
+ if (bundleNameFromHap !== bundleNameFromP7b) {
+ this._log._buildError('The bundle name verification result does not match.')
+ ._solution('Please check the current hap bundleName or the signature ' +
+ 'configuration of the signingConfigs field in build-profile.json5 file is correct.')
+ ._file(this._taskService.getProjectModel().getProfilePath())
+ ._printErrorAndExit();
+ }
+ }
+ if (this._taskService instanceof module_task_service_1.ModuleTaskService) {
+ new process_utils_1.ProcessUtils(this._taskService.getModuleModel().getName(), `Sign${this._moduleType}`)
+ .executeSync(signCommand);
+ }
+ else {
+ new process_utils_1.ProcessUtils(this._taskService.getProjectModel().getName(), `Sign${this._moduleType}`)
+ .executeSync(signCommand);
+ }
+ }
+}
+exports.SignUtil = SignUtil;
+//# sourceMappingURL=sign-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/ide/ohos-module-model-bean.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/ide/ohos-module-model-bean.js
new file mode 100644
index 0000000..24584e9
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/ide/ohos-module-model-bean.js
@@ -0,0 +1,68 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OhosModuleModelBean = void 0;
+const map_util_js_1 = require("../../../utils/map-util.js");
+const build_directory_const_js_1 = require("../../../const/build-directory-const.js");
+const path_1 = __importDefault(require("path"));
+const common_const_js_1 = require("../../../const/common-const.js");
+/**
+ * OhosProject中的Module模块的toolModel数据模型
+ *
+ * @since 2022/2/19
+ */
+class OhosModuleModelBean {
+ constructor(module) {
+ this.modelId = "ohos-module";
+ this._module = module;
+ this.modelId = this.modelId.concat("-").concat(module.getName());
+ const plugin = module.getPlugin();
+ this._moduleTaskService = plugin.getTaskService();
+ this._targetDataMap = this._moduleTaskService.getTargetDataMap();
+ }
+ computeCommonInfo(info) {
+ info.set("SELECT_TARGET", common_const_js_1.DefaultTargetConst.DEFAULT_TARGET);
+ info.set("MODULE_BUILD_DIR", path_1.default.resolve(this._module.getModuleDir(), build_directory_const_js_1.BuildDirConst.BUILD_ROOT));
+ }
+ computePathInfo(info) {
+ const targets = new Map();
+ this._targetDataMap.forEach((value, key) => {
+ const targetInfoMap = new Map();
+ const modulePathInfo = value[0].getPathInfo();
+ const moduleModel = this._moduleTaskService.getModuleModel();
+ // 当前低代码的生成路径是固定的,只支持ETS
+ const superVisualPath = path_1.default.resolve(modulePathInfo.getModuleBuildCachePath(), "CompileETS");
+ const workerLoader = path_1.default.resolve(modulePathInfo.getIntermediatesLoaderPath(), build_directory_const_js_1.BuildArtifactConst.LOADER_JSON);
+ const buildPath = {
+ "OUTPUT_PATH": modulePathInfo.getModuleBuildOutputPath(),
+ "JS_ASSETS_PATH": modulePathInfo.getIntermediatesAssetsPath(),
+ "RES_PATH": modulePathInfo.getIntermediatesRes(),
+ "RES_PROFILE_PATH": modulePathInfo.getIntermediatesResProfilePath(),
+ "ETS_SUPER_VISUAL_PATH": superVisualPath,
+ "WORKER_LOADER": workerLoader,
+ "MANIFEST_JSON": modulePathInfo.getIntermediatesLegacyManifestJson()
+ };
+ // todo当前设置为默认的
+ targetInfoMap.set("SOURCE_ROOT", moduleModel === null || moduleModel === void 0 ? void 0 : moduleModel.getSourceRootByTargetName(key));
+ const resArr = [];
+ resArr.push(moduleModel === null || moduleModel === void 0 ? void 0 : moduleModel.getSourceSetByTargetName(key).getTargetResPath());
+ targetInfoMap.set("RESOURCES_PATH", resArr);
+ targetInfoMap.set("BUILD_PATH", buildPath);
+ targets.set(key, targetInfoMap);
+ });
+ info.set("TARGETS", targets);
+ }
+ buildModel() {
+ const info = new Map();
+ this.computeCommonInfo(info);
+ this.computePathInfo(info);
+ return (0, map_util_js_1.strMapToObj)(info);
+ }
+}
+exports.OhosModuleModelBean = OhosModuleModelBean;
+//# sourceMappingURL=ohos-module-model-bean.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/ide/ohos-project-model-bean.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/ide/ohos-project-model-bean.js
new file mode 100644
index 0000000..b41b6aa
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/ide/ohos-project-model-bean.js
@@ -0,0 +1,46 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OhosProjectModelBean = void 0;
+const map_util_js_1 = require("../../../utils/map-util.js");
+/**
+ * OhosProject中的Project模块的toolModel数据模型
+ *
+ * @since 2022/2/19
+ */
+class OhosProjectModelBean {
+ constructor(project) {
+ this.modelId = "ohos-project";
+ this._project = project;
+ const plugin = project.getPlugin();
+ this._projectTaskService = plugin.getTaskService();
+ }
+ computeCommonInfo(info) {
+ const targetProduct = this._projectTaskService.getTargetProduct();
+ const pathInfo = this._projectTaskService.getPathInfo();
+ info.set("SELECT_PRODUCT_NAME", targetProduct.name);
+ info.set("MODULE_BUILD_DIR", pathInfo.getProjectBuildPath());
+ let bundleName = targetProduct.bundleName;
+ if (bundleName === undefined) {
+ bundleName = this._projectTaskService.getProjectModel().getDefaultBundleName();
+ }
+ info.set("BUNDLE_NAME", bundleName);
+ }
+ computePathInfo(info) {
+ const pathInfo = this._projectTaskService.getPathInfo();
+ const buildPath = {
+ "OUTPUT_PATH": pathInfo.getProjectOutputPath()
+ };
+ info.set("BUILD_PATH", buildPath);
+ }
+ buildModel() {
+ const info = new Map();
+ this.computeCommonInfo(info);
+ this.computePathInfo(info);
+ return (0, map_util_js_1.strMapToObj)(info);
+ }
+}
+exports.OhosProjectModelBean = OhosProjectModelBean;
+//# sourceMappingURL=ohos-project-model-bean.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/sync-module.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/sync-module.js
new file mode 100644
index 0000000..68ff493
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/sync-module.js
@@ -0,0 +1,25 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SyncModule = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const default_tooling_model_bean_registry_js_1 = require("@ohos/hvigor-base/src/external/default-tooling-model-bean-registry.js");
+const ohos_module_model_bean_js_1 = require("./ide/ohos-module-model-bean.js");
+/**
+ * Module级别的Sync任务
+ *
+ * @since 2022/2/19
+ */
+class SyncModule extends hvigor_base_1.DefaultSyncTask {
+ constructor(module) {
+ super(module);
+ }
+ doTaskAction(module) {
+ const ohosModuleModelBean = new ohos_module_model_bean_js_1.OhosModuleModelBean(module);
+ default_tooling_model_bean_registry_js_1.defaultModelRegistry.registry(ohosModuleModelBean);
+ }
+}
+exports.SyncModule = SyncModule;
+//# sourceMappingURL=sync-module.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/sync-project.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/sync-project.js
new file mode 100644
index 0000000..4a92e56
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/sync/sync-project.js
@@ -0,0 +1,25 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SyncProject = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const default_tooling_model_bean_registry_js_1 = require("@ohos/hvigor-base/src/external/default-tooling-model-bean-registry.js");
+const ohos_project_model_bean_js_1 = require("./ide/ohos-project-model-bean.js");
+/**
+ * Project级别的Sync任务
+ *
+ * @since 2022/2/19
+ */
+class SyncProject extends hvigor_base_1.DefaultSyncTask {
+ constructor(project) {
+ super(project);
+ }
+ doTaskAction(project) {
+ const ohosProjectModelBean = new ohos_project_model_bean_js_1.OhosProjectModelBean(project);
+ default_tooling_model_bean_registry_js_1.defaultModelRegistry.registry(ohosProjectModelBean);
+ }
+}
+exports.SyncProject = SyncProject;
+//# sourceMappingURL=sync-project.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/syscap-transform.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/syscap-transform.js
new file mode 100644
index 0000000..2150d4c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/syscap-transform.js
@@ -0,0 +1,242 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SyscapTransform = void 0;
+const ohos_hap_task_js_1 = require("./task/ohos-hap-task.js");
+const process_utils_js_1 = require("../utils/process-utils.js");
+const common_const_js_1 = require("../const/common-const.js");
+const path_1 = __importDefault(require("path"));
+const file_util_js_1 = require("../utils/file-util.js");
+const fs = __importStar(require("fs"));
+const array_util_js_1 = require("../utils/array-util.js");
+const fse = __importStar(require("fs-extra"));
+const lodash_1 = require("lodash");
+const project_file_reader_js_1 = require("../utils/project-file-reader.js");
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+/**
+ * Syscap Transform Task
+ *
+ * @since 2022/02/22
+ */
+class SyscapTransform extends ohos_hap_task_js_1.OhosHapTask {
+ constructor(taskService) {
+ super(taskService, "SyscapTransform");
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(SyscapTransform.name);
+ this.hapExtraInfo = taskService.getHapExtraInfo();
+ }
+ doTaskAction(targetData, target) {
+ var _a, _b;
+ const sourceRoot = (_a = this.service.getModuleModel()) === null || _a === void 0 ? void 0 : _a.getSourceRootByTargetName(target);
+ const pathInfo = targetData.getPathInfo();
+ const sdkInfo = this.service.getSdkInfo();
+ const etsDir = sdkInfo.getSdkEtsDir();
+ const jsDir = sdkInfo.getSdkJsDir();
+ const etsRequireSysCapPath = sdkInfo.getSysCapFileInEts();
+ const jsRequireSysCapPath = sdkInfo.getSysCapFileInJs();
+ const regExp = /^SystemCapability(\.[a-zA-Z0-9]+){2,3}$/;
+ let jsonFile;
+ let deviceTypes;
+ if (this.hapExtraInfo.isStageMode()) {
+ const moduleJsonPath = path_1.default.resolve(sourceRoot, common_const_js_1.CommonConst.MODULE_JSON5);
+ const moduleJson = project_file_reader_js_1.ProjectFileReader.getJson5Obj(moduleJsonPath);
+ deviceTypes = moduleJson.module.deviceTypes;
+ jsonFile = moduleJsonPath;
+ }
+ else {
+ const configJsonPath = path_1.default.resolve(sourceRoot, common_const_js_1.CommonConst.CONFIG_JSON);
+ const configJson = project_file_reader_js_1.ProjectFileReader.getJson5Obj(configJsonPath);
+ deviceTypes = configJson.module.deviceType;
+ jsonFile = configJsonPath;
+ }
+ // 判断是否存在syscap.json,如果不存在syscap.json,那么不启动rpcid的处理逻辑
+ const sysCapJsonPath = path_1.default.resolve(sourceRoot, common_const_js_1.CommonConst.SYSCAP_JSON);
+ if (fs.existsSync(sysCapJsonPath)) {
+ const sysCapJson = project_file_reader_js_1.ProjectFileReader.getJson5Obj(sysCapJsonPath);
+ const sysCapDevice = sysCapJson['devices'];
+ const sysCapGeneral = sysCapDevice['general'];
+ const sysCapCustom = sysCapDevice['custom'];
+ const requireSysCapList = [];
+ const nDeviceSysCapList = [];
+ let intersectionSysCapList = [];
+ // 纯N设备
+ if (deviceTypes.length === 0) {
+ if (sysCapGeneral !== undefined && sysCapGeneral.length !== 0) {
+ const cause = "The value of 'general' in the syscap.json file must be " +
+ "the same as that of 'deviceType' in the module.json5/config.json file.";
+ const solution = "Please check whether the general field in the syscap.json file " +
+ "and the deviceType field in the module.json5 or config.json file are correctly configured.";
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(sysCapJsonPath)
+ ._printErrorAndExit();
+ }
+ // 纯N设备之间SysCap取交集
+ intersectionSysCapList = this.intersectNDeviceSysCap(sysCapCustom, nDeviceSysCapList, regExp, sysCapJsonPath);
+ }
+ else {
+ if (sysCapGeneral === undefined
+ || !(0, array_util_js_1.checkArrayElementIsSame)(sysCapGeneral, deviceTypes)) {
+ const cause = "The 'general' field in the syscap.json file must exist, " +
+ "and its value must be the same as " +
+ "the value of 'devicesType' in the module.json5 or config.json file.";
+ const solution = "Please check whether the syscap.json, module.json5, " +
+ "or config.json files are correctly configured.";
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(sysCapJsonPath)
+ ._printErrorAndExit();
+ }
+ // 按照deviceType从sdk取出对应的syscap集合
+ sysCapGeneral.forEach((deviceInSysCap) => {
+ if (fs.existsSync(jsDir) && !fs.existsSync(etsDir)) {
+ this.getRequireSysCapList(jsRequireSysCapPath, deviceInSysCap, requireSysCapList);
+ }
+ else {
+ this.getRequireSysCapList(etsRequireSysCapPath, deviceInSysCap, requireSysCapList);
+ }
+ });
+ // 通过SDK获得的SysCap与N设备SysCap取交集
+ if (sysCapCustom !== undefined) {
+ const newNDeviceSysCapList = this.intersectNDeviceSysCap(sysCapCustom, nDeviceSysCapList, regExp, sysCapJsonPath);
+ intersectionSysCapList = newNDeviceSysCapList.filter(v => requireSysCapList.includes(v));
+ }
+ }
+ // 根据production配置做增删
+ const production = sysCapJson['production'];
+ if (production !== undefined) {
+ if (production['addedSysCaps'] !== undefined && production['addedSysCaps'].length !== 0) {
+ production['addedSysCaps'].forEach(((addedSysCap) => {
+ this.fieldRegExpCheck(addedSysCap, "addedSysCaps", regExp, sysCapJsonPath);
+ if (!intersectionSysCapList.includes(addedSysCap)) {
+ intersectionSysCapList.push(addedSysCap);
+ }
+ }));
+ }
+ if (production['removedSysCaps'] !== undefined && production['removedSysCaps'].length !== 0) {
+ production['removedSysCaps'].forEach((removedSysCap) => {
+ this.fieldRegExpCheck(removedSysCap, "removedSysCaps", regExp, sysCapJsonPath);
+ if (intersectionSysCapList.includes(removedSysCap)) {
+ intersectionSysCapList.splice(intersectionSysCapList.indexOf(removedSysCap), 1);
+ }
+ });
+ }
+ }
+ if (intersectionSysCapList.length === 0) {
+ return;
+ }
+ const newSysCapMap = new Map();
+ const apiVersion = (_b = this.service.getModuleModel()) === null || _b === void 0 ? void 0 : _b.getCompileApiVersion();
+ newSysCapMap.set("api_version", apiVersion);
+ newSysCapMap.set("syscap", intersectionSysCapList);
+ const sysCapIntermediatePath = pathInfo.getIntermediatesSysCap();
+ file_util_js_1.FileUtil.checkDirWithoutDelete(sysCapIntermediatePath);
+ const rpcidJsonPath = path_1.default.resolve(sysCapIntermediatePath, common_const_js_1.CommonConst.RPCID_JSON);
+ fse.outputJsonSync(rpcidJsonPath, Object.fromEntries(newSysCapMap));
+ // syscap转换:rpcid.json -----> rpcid.sc
+ const sysCapTool = this.service.getSdkInfo().getSysCapTool();
+ new process_utils_js_1.ProcessUtils(this.moduleName, this.taskName).executeSync([sysCapTool, "-R", "-e", "-i", rpcidJsonPath, "-o", sysCapIntermediatePath]);
+ }
+ else if (deviceTypes.length === 0) {
+ const cause = "The 'deviceTypes' field in the module.json5 or config.json file " +
+ "may be empty or does not exist.";
+ const solution = "If the 'deviceTypes' field in the module.json5 or config.json file is empty " +
+ "or does not exist, import and correctly configure the syscap.json file.";
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(jsonFile)
+ ._printErrorAndExit();
+ }
+ }
+ /**
+ * 根据Syscap.json中deviceType获取sdk提供的对应deviceType的Syscap全集
+ *
+ * @param requireSysCapPath sdk/(etsPath/jsPath)
+ * @param deviceInSysCap Syscap.json中deviceType
+ * @param requireSysCapList 对应Syscap全集
+ */
+ getRequireSysCapList(requireSysCapPath, deviceInSysCap, requireSysCapList) {
+ fs.readdirSync(requireSysCapPath).forEach(deviceRequireSysCap => {
+ if (deviceRequireSysCap.toString().slice(0, deviceRequireSysCap.toString().indexOf('.'))
+ === deviceInSysCap) {
+ const requireSysCapJson = project_file_reader_js_1.ProjectFileReader.getJson5Obj(path_1.default.resolve(requireSysCapPath, deviceRequireSysCap.toString()));
+ requireSysCapJson['SysCaps'].forEach((sysCap) => {
+ if (!requireSysCapList.some(element => element === sysCap)) {
+ requireSysCapList.push(sysCap);
+ }
+ });
+ }
+ });
+ }
+ /**
+ * 求NDeviceType交集
+ *
+ * @param sysCapJson NDeviceType中SysCap
+ * @param list NDeviceType交集
+ * @param regExp regExp
+ * @param sysCapJsonPath sysCapJsonPath
+ */
+ intersectNDeviceSysCap(sysCapJson, list, regExp, sysCapJsonPath) {
+ if (sysCapJson !== undefined) {
+ sysCapJson.forEach((key) => {
+ Object.keys(key).forEach(value => {
+ list.push(key[value]);
+ });
+ });
+ for (let customIdx = 0; customIdx < list.length; customIdx++) {
+ for (let customSysCapIdx = 0; customSysCapIdx < list[customIdx].length; customSysCapIdx++) {
+ this.fieldRegExpCheck(list[customIdx][customSysCapIdx], "custom", regExp, sysCapJsonPath);
+ }
+ }
+ }
+ return (0, lodash_1.intersection)(...list);
+ }
+ /**
+ * custom,production字段syscap配置正则校验
+ *
+ * @param sysCap syscap能力集字段
+ * @param sysCapField custom/production(addedSysCaps,removedSysCaps)
+ * @param regExp regExp
+ * @param sysCapJsonPath sysCapJsonPath
+ */
+ fieldRegExpCheck(sysCap, sysCapField, regExp, sysCapJsonPath) {
+ if (!regExp.test(sysCap)) {
+ const cause = `Please check whether the value of '${sysCapField}' in the syscap.json is correct.`;
+ const solution = `Configure correct sysCaps in '${sysCapField}' according to the pattern:'${regExp}'.`;
+ this._log._buildError(cause)
+ ._solution(solution)
+ ._file(sysCapJsonPath)
+ ._printErrorAndExit();
+ }
+ }
+}
+exports.SyscapTransform = SyscapTransform;
+//# sourceMappingURL=syscap-transform.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-app-task.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-app-task.js
new file mode 100644
index 0000000..ca6f7cd
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-app-task.js
@@ -0,0 +1,37 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OhosAppTask = void 0;
+const ohos_task_js_1 = require("./ohos-task.js");
+const pretty_hrtime_1 = __importDefault(require("pretty-hrtime"));
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * openHarmony基础app task
+ *
+ * @since 2022/1/10
+ */
+class OhosAppTask extends ohos_task_js_1.DefaultOhosTask {
+ constructor(taskService, taskName) {
+ super(taskService, taskName);
+ this._logApp = ohos_logger_js_1.OhosLogger.getLogger('AppTask');
+ this.service = taskService;
+ }
+ registry() {
+ return (cb) => {
+ const taskBeginTime = process.hrtime();
+ this.doTaskAction();
+ const taskEndTime = process.hrtime(taskBeginTime);
+ const realTime = (0, pretty_hrtime_1.default)(taskEndTime);
+ this._logApp._printTaskInfo(this.service.getProjectModel().getName(), this.taskName, realTime);
+ cb();
+ };
+ }
+}
+exports.OhosAppTask = OhosAppTask;
+//# sourceMappingURL=ohos-app-task.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-hap-task.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-hap-task.js
new file mode 100644
index 0000000..78e12db
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-hap-task.js
@@ -0,0 +1,104 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OhosHapTask = void 0;
+const ohos_task_js_1 = require("./ohos-task.js");
+const fse = __importStar(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+const pretty_hrtime_1 = __importDefault(require("pretty-hrtime"));
+const ohos_logger_js_1 = require("../../utils/log/ohos-logger.js");
+/**
+ * openHarmony基础hap 的task
+ *
+ * @since 2022/1/5
+ */
+class OhosHapTask extends ohos_task_js_1.DefaultOhosTask {
+ constructor(taskService, taskName) {
+ super(taskService, taskName);
+ this._logHap = ohos_logger_js_1.OhosLogger.getLogger('HapTask');
+ this.registry = () => {
+ return (cb) => {
+ const taskBeginTime = process.hrtime();
+ this.targetDataMap.forEach((value, targetName) => {
+ const targetData = value[0];
+ const taskShouldDo = value[1] && this.taskShouldDo(targetData);
+ if (!taskShouldDo) {
+ return;
+ }
+ this.beforeTask(targetData);
+ this.doTaskAction(targetData, targetName);
+ });
+ const taskEndTime = process.hrtime(taskBeginTime);
+ const realTime = (0, pretty_hrtime_1.default)(taskEndTime);
+ this._logHap._printTaskInfo(this.moduleModel.getName(), this.taskName, realTime);
+ cb();
+ };
+ };
+ this.service = taskService;
+ this.targetDataMap = this.service.getTargetDataMap();
+ this.moduleModel = this.service.getModuleModel();
+ this.sdkInfo = this.service.getSdkInfo();
+ this.moduleName = this.moduleModel.getName();
+ }
+ /**
+ * 在task执行之前做hook, 通常用于clean上次构建的输出
+ *
+ * @param targetData target数据模型
+ */
+ // eslint-disable-next-line @typescript-eslint/no-empty-function,@typescript-eslint/no-unused-vars
+ beforeTask(targetData) {
+ }
+ /**
+ * 根据targetData状态判断是否跳过该task
+ *
+ * @param targetData target数据模型
+ */
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ taskShouldDo(targetData) {
+ return true;
+ }
+ /**
+ * 获取每个target的临时目录(缓存目录)
+ * 调该方法时如果该目录不存在,则创建新目录
+ *
+ * @param targetData
+ */
+ getTaskTempDir(targetData) {
+ const tempDir = path_1.default.resolve(targetData.getPathInfo().getModuleBuildCachePath(), this.taskName);
+ if (!fse.existsSync(tempDir)) {
+ fse.mkdirsSync(tempDir);
+ }
+ return tempDir;
+ }
+}
+exports.OhosHapTask = OhosHapTask;
+//# sourceMappingURL=ohos-hap-task.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-task.js b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-task.js
new file mode 100644
index 0000000..6731cff
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/task/ohos-task.js
@@ -0,0 +1,24 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DefaultOhosTask = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+/**
+ * openHarmony基础task
+ *
+ * @since 2022/1/10
+ */
+class DefaultOhosTask extends hvigor_base_1.Task {
+ constructor(service, taskName) {
+ super();
+ this.taskName = "default";
+ if (taskName) {
+ this.taskName = taskName;
+ }
+ }
+}
+exports.DefaultOhosTask = DefaultOhosTask;
+//# sourceMappingURL=ohos-task.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/array-util.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/array-util.js
new file mode 100644
index 0000000..bdc8d8f
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/array-util.js
@@ -0,0 +1,89 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.checkArrayElementIsSame = exports.checkArrayIsSame = exports.findDuplicateElement = exports.getElementFromArr = exports.getIntersection = void 0;
+/**
+ * 获取两个集合的交集
+ *
+ * @param arr1 集合1
+ * @param arr2 集合2
+ */
+function getIntersection(arr1, arr2) {
+ return arr1.filter(function (val) {
+ return arr2.indexOf(val) > -1;
+ });
+}
+exports.getIntersection = getIntersection;
+/**
+ * 根据name获取一个Name的集合中的元素
+ *
+ * @param arr1 数组
+ * @param elementName 元素name
+ */
+function getElementFromArr(arr1, elementName) {
+ if (arr1 == undefined) {
+ return undefined;
+ }
+ for (const value of arr1) {
+ if (value.name === elementName) {
+ return value;
+ }
+ }
+ return undefined;
+}
+exports.getElementFromArr = getElementFromArr;
+/**
+ * 找出数组内重复元素
+ *
+ * @param list list
+ * @return list 交集list
+ */
+function findDuplicateElement(list) {
+ const arr = [];
+ for (let i = 0; i < list.length; i++) {
+ for (let j = i + 1; j < list.length; j++) {
+ if (list[i] === list[j]) {
+ arr.push(list[i]);
+ }
+ }
+ }
+ return arr;
+}
+exports.findDuplicateElement = findDuplicateElement;
+/**
+ * 判断集合是否一致(有序)
+ *
+ * @param list1 list1
+ * @param list2 list2
+ */
+function checkArrayIsSame(list1, list2) {
+ if (list1.length === list2.length) {
+ for (let i = 0; i < list1.length; i++) {
+ if (list1[i] !== list2[i]) {
+ return false;
+ }
+ }
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+exports.checkArrayIsSame = checkArrayIsSame;
+/**
+ * 判断两个集合元素是否一致(无序)
+ *
+ * @param list1 list1
+ * @param list2 list2
+ */
+function checkArrayElementIsSame(list1, list2) {
+ if (list1.length === list2.length) {
+ return JSON.stringify(list1.sort()) === JSON.stringify(list2.sort());
+ }
+ return false;
+}
+exports.checkArrayElementIsSame = checkArrayElementIsSame;
+//# sourceMappingURL=array-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/decipher-util.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/decipher-util.js
new file mode 100644
index 0000000..b3d2612
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/decipher-util.js
@@ -0,0 +1,203 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DecipherUtil = void 0;
+const crypto_1 = __importDefault(require("crypto"));
+const path_1 = __importDefault(require("path"));
+const fs_1 = __importDefault(require("fs"));
+const buffer_1 = __importDefault(require("buffer"));
+const ohos_logger_js_1 = require("./log/ohos-logger.js");
+/**
+ * 密钥解码器
+ * 主要方法是#getKey(),用于读取工作密钥。
+ * 工作密钥采用AES-GCM方式进行解密,填充参数是NoPadding,密钥长度16 byte(128 bit),iv长度12 byte(96bit),iv每次都是采用SecureRandom生成,
+ * tag参数长度128 bit。
+ * 根密钥由存储在文件中的组件以及硬编码在代码中的组件做异或操作得到一个组件,然后将该组件使用PBKDF2WithHmacSHA256迭代10000次生成
+ * 根据密钥管理规范,存储组件的文件名以及目录已采用一般化名称存储,未体现其是密钥等信息
+ * 主要参考文档《密钥管理安全规范 V1.3.docx》、《密码算法应用规范 V1.4.docx》、《对称加密算法应用方案.docx》
+ *
+ * @since 2022/03/07
+ */
+class DecipherUtil {
+ /**
+ * 使用aes-gcm算法解密消息
+ * AesGcmKit,其实现符合《密码算法应用规范 V1.4.docx》中针对于AES-GCM的使用要求
+ * 填充参数是NoPadding,密钥长度16 byte(128 bit),iv长度12 byte(96bit),iv每次都是采用SecureRandom生成,tag参数长度16 byte(128 bit)。
+ *
+ * @param materialDir 签名材料地址
+ * @param encryptedPwd 加密密码
+ * @return string
+ */
+ static decryptPwd(materialDir, encryptedPwd) {
+ if (32 > encryptedPwd.length) {
+ this._logger._buildError('Illegal data, less than 32 characters.')
+ ._solution('Please check the storePassword or keyPassword in build-profile.json5')
+ ._file(path_1.default.resolve(process.cwd(), 'build-profile.json5'))
+ ._printErrorAndExit();
+ }
+ let result = buffer_1.default.Buffer.from('');
+ try {
+ const key = DecipherUtil.getKey(materialDir);
+ const msgBytes = new Int8Array(buffer_1.default.Buffer.from(encryptedPwd, 'hex'));
+ result = DecipherUtil.decrypt(key, msgBytes);
+ }
+ catch (e) {
+ this._logger
+ ._buildError(e.message)
+ ._solution('Signing failed. Please check the signing config.')
+ ._file(path_1.default.resolve(process.cwd(), 'build-profile.json5'))
+ ._callstack(e)
+ ._printErrorAndExit();
+ }
+ return result.toString('utf-8');
+ }
+ /**
+ * 获取解密密钥
+ * @param materialDir 签名材料地址
+ * @private Int8Array
+ */
+ static getKey(materialDir) {
+ const material = path_1.default.resolve(materialDir, 'material');
+ if (!fs_1.default.statSync(material).isDirectory()) {
+ this._logger._buildError('No signing materials.')._printErrorAndExit();
+ }
+ const files = fs_1.default.readdirSync(material);
+ if (0 === files.length) {
+ this._logger._buildError('No signing materials.')._printErrorAndExit();
+ }
+ this.dirs.forEach(dirName => {
+ if (!files.includes(dirName)) {
+ this._logger._buildError(`Can not find signing material ${dirName}`)._printErrorAndExit();
+ }
+ });
+ const components = this.readFd(path_1.default.resolve(material, this.dirs[0]));
+ const salt = this.readSalt(path_1.default.resolve(material, this.dirs[1]));
+ const rootKey = this.getRootKey(components, salt);
+ const workMaterial = this.readWorkMaterial(path_1.default.resolve(material, this.dirs[2]));
+ return new Int8Array(DecipherUtil.decrypt(rootKey, workMaterial));
+ }
+ /**
+ * PBKDF2WithHmacSHA256迭代10000次生成rootKey
+ * @param components
+ * @param salt
+ * @private
+ */
+ static getRootKey(components, salt) {
+ const full = components.concat(this.component);
+ const finalComponents = this.xorComponents(full);
+ const buffer = crypto_1.default.pbkdf2Sync(finalComponents.toString(), salt, 10000, 16, 'sha256');
+ return new Int8Array(buffer);
+ }
+ /**
+ * 根据密钥解密, 获取明文密码
+ * 被加密后的数据格式如下
+ * 其中content数据中包含tag数据
+ * -------------------------------------------------------------------------------
+ * | content length (4byte) | iv key (12 byte) | encrypted | auth tag ( 16 byte ) |
+ * ------------------------------------------------------------------------------
+ *
+ * @param key 密钥
+ * @param msg 加密密码
+ * @private Buffer.Buffer
+ */
+ static decrypt(key, msg) {
+ const len = ((msg[0] & 0xFF) << 24) | ((msg[1] & 0xFF) << 16) | ((msg[2] & 0xFF) << 8) | ((msg[3] & 0xFF));
+ const ivLen = msg.length - 4 - len;
+ const ivKey = msg.slice(4, 4 + ivLen);
+ const decipherGCM = crypto_1.default.createDecipheriv('aes-128-gcm', key, ivKey);
+ const authTag = msg.slice(msg.length - 16);
+ decipherGCM.setAuthTag(authTag);
+ const update = decipherGCM.update(msg.subarray(4 + ivLen, msg.length - 16));
+ const final = decipherGCM.final();
+ return buffer_1.default.Buffer.concat([update, final]);
+ }
+ static xorComponents(components) {
+ components.forEach(value => {
+ if (16 !== value.length) {
+ this._logger._buildError('Signing material data error!')._printErrorAndExit();
+ }
+ });
+ let result = this.xor(components[0], components[1]);
+ for (let i = 2; i < components.length; i++) {
+ result = this.xor(result, components[i]);
+ }
+ return buffer_1.default.Buffer.from(result);
+ }
+ /**
+ * 异或
+ * @param b1
+ * @param b2
+ * @private
+ */
+ static xor(b1, b2) {
+ if (b1.byteLength !== b2.byteLength) {
+ this._logger._buildError('Signing material data error!')._printErrorAndExit();
+ }
+ const result = new Int8Array(b1.byteLength);
+ for (let i = 0; i < b1.byteLength; i++) {
+ result[i] = b1[i] ^ b2[i];
+ }
+ return result;
+ }
+ /**
+ * 读取./material/fd
+ *
+ * @param dir
+ * @private
+ */
+ static readFd(dir) {
+ if (!fs_1.default.existsSync(dir)) {
+ this._logger._buildError('Material not found!')._printErrorAndExit();
+ }
+ const names = fs_1.default.readdirSync(dir);
+ if (3 !== names.length) {
+ this._logger._buildError('Signing material is illegal!')._printErrorAndExit();
+ }
+ const result = [];
+ names.forEach(value => result.push(this.readDirBytes(path_1.default.resolve(dir, value))));
+ return result;
+ }
+ /**
+ * 读取盐值./material/ac
+ * @param dir
+ * @private
+ */
+ static readSalt(dir) {
+ return this.readDirBytes(dir);
+ }
+ /**
+ * workMaterial ./material/ce
+ * @param dir
+ * @private
+ */
+ static readWorkMaterial(dir) {
+ return this.readDirBytes(dir);
+ }
+}
+exports.DecipherUtil = DecipherUtil;
+DecipherUtil.component = new Int8Array([0x31, 0xf3, 0x09, 0x73, 0xd6, 0xaf, 0x5b, 0xb8, 0xd3, 0xbe, 0xb1, 0x58, 0x65, 0x83, 0xc0, 0x77]);
+DecipherUtil.dirs = ['fd', 'ac', 'ce'];
+DecipherUtil._logger = ohos_logger_js_1.OhosLogger.getLogger('Decipher');
+/**
+ * 读取目录中文件 默认一个文件
+ * @param dir
+ * @private
+ */
+DecipherUtil.readDirBytes = (dir) => {
+ if (!fs_1.default.existsSync(dir) || !fs_1.default.statSync(dir).isDirectory()) {
+ DecipherUtil._logger._buildError('Can not find the signing material')._printErrorAndExit();
+ }
+ const names = fs_1.default.readdirSync(dir);
+ if (1 !== names.length) {
+ DecipherUtil._logger._buildError('Signing material error')._printErrorAndExit();
+ }
+ const buffer = fs_1.default.readFileSync(path_1.default.resolve(dir, names[0]));
+ return new Int8Array(buffer);
+};
+//# sourceMappingURL=decipher-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/file-util.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/file-util.js
new file mode 100644
index 0000000..755c697
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/file-util.js
@@ -0,0 +1,64 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.FileUtil = void 0;
+const fs = __importStar(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+/**
+ * 处理文件的工具类
+ *
+ * @since 2021/12/29
+ */
+class FileUtil {
+ static isDirectory(...pathSegments) {
+ return fs.statSync(path_1.default.resolve(...pathSegments)).isDirectory();
+ }
+ static checkDirWithoutDelete(...pathSegments) {
+ const dirPath = path_1.default.resolve(...pathSegments);
+ if (!fs.existsSync(dirPath)) {
+ fs.mkdirSync(dirPath, { recursive: true });
+ }
+ }
+ static checkFile(...pathSegments) {
+ const filePath = path_1.default.resolve(...pathSegments);
+ if (!fs.existsSync(filePath)) {
+ FileUtil.makeFile(filePath);
+ }
+ fs.removeSync(filePath);
+ FileUtil.makeFile(filePath);
+ }
+ static makeFile(filePath, data = '') {
+ fs.writeFileSync(filePath, data);
+ }
+}
+exports.FileUtil = FileUtil;
+//# sourceMappingURL=file-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/log/ohos-logger.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/log/ohos-logger.js
new file mode 100644
index 0000000..3f22ccf
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/log/ohos-logger.js
@@ -0,0 +1,116 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OhosLogger = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const os_1 = __importDefault(require("os"));
+/**
+ * Hvigor-Ohos-Plugin的定制logger
+ *
+ * @since 2022/3/3
+ */
+class OhosLogger extends hvigor_base_1.HvigorLogger {
+ constructor(category) {
+ super(category);
+ this.messageMap = new Map();
+ }
+ /**
+ * 获取对应类别的OhosLogger实例
+ *
+ * @param category 默认是default
+ */
+ static getLogger(category) {
+ return new OhosLogger(category);
+ }
+ _buildError(cause, errorCode) {
+ if (errorCode) {
+ this.messageMap.set('code', errorCode);
+ }
+ this.messageMap.set('cause', cause);
+ return this;
+ }
+ _solution(solution) {
+ this.messageMap.set('solution', solution);
+ return this;
+ }
+ _file(file, line = 1, column = 1) {
+ this.messageMap.set('file', `at ${file}:${line}:${column}`);
+ return this;
+ }
+ _help(help) {
+ this.messageMap.set('help', help);
+ return this;
+ }
+ _callstack(callstack) {
+ if (this.getLevel() === hvigor_base_1.levels.DEBUG) {
+ this.messageMap.set('callstack', callstack);
+ }
+ return this;
+ }
+ _printTaskInfo(moduleName, taskName, time) {
+ this.info(`Finished :${moduleName}:${taskName}... after ${time}`);
+ }
+ _printFailedTaskInfo(moduleName, taskName) {
+ if (taskName !== undefined) {
+ this.error(`Failed :${moduleName}:${taskName}... `);
+ }
+ return this;
+ }
+ _printDebugCommand(toolName, command) {
+ this.debug(`[${toolName}]\n`, command);
+ }
+ _printWarn(moduleName) {
+ const values = Array.from(this.messageMap.values());
+ this.warn(this._formatLog(moduleName), ...values);
+ }
+ _printError(moduleName) {
+ const values = Array.from(this.messageMap.values());
+ this.error(this._formatLog(moduleName), ...values);
+ }
+ _printErrorAndExit(moduleName = "root") {
+ const values = Array.from(this.messageMap.values());
+ this.errorMessageExit(this._formatLog(moduleName), ...values);
+ }
+ _formatLog(moduleName) {
+ let format = `A problem occurred in ${moduleName} module:${os_1.default.EOL}`;
+ if (this.messageMap.has('code')) {
+ format += `\t ERROR: Code: %s${os_1.default.EOL}`;
+ }
+ format += `\t ERROR: Cause: %s${os_1.default.EOL}`;
+ if (this.messageMap.has('solution')) {
+ format += `\t ERROR: Solution: %s${os_1.default.EOL}`;
+ }
+ if (this.messageMap.has('file')) {
+ format += `\t %s${os_1.default.EOL}`;
+ }
+ if (this.messageMap.has('help')) {
+ format += `\t ERROR: HelpUrl: %s${os_1.default.EOL}`;
+ }
+ if (this.messageMap.has('callstack')) {
+ format += `${os_1.default.EOL + os_1.default.EOL} %s`;
+ }
+ this.messageMap.clear();
+ return format;
+ }
+ _getCliLevel() {
+ const levelMap = {
+ "debug": "-d",
+ "error": "-q",
+ "warn": "-w",
+ "info": "-i"
+ };
+ let key = this.getLevel();
+ if (typeof key !== "string") {
+ key = key.levelStr.toLowerCase();
+ }
+ return levelMap[key];
+ }
+}
+exports.OhosLogger = OhosLogger;
+//# sourceMappingURL=ohos-logger.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/map-util.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/map-util.js
new file mode 100644
index 0000000..32d6ae5
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/map-util.js
@@ -0,0 +1,35 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.objToStrMap = exports.getMapKeyArr = exports.strMapToObj = void 0;
+function strMapToObj(strMap) {
+ const obj = Object.create(null);
+ for (const [k, v] of strMap) {
+ if (v instanceof Map) {
+ obj[k] = strMapToObj(v);
+ }
+ else {
+ obj[k] = v;
+ }
+ }
+ return obj;
+}
+exports.strMapToObj = strMapToObj;
+function getMapKeyArr(map) {
+ const keyArr = [];
+ keyArr.push(...map.keys());
+ return keyArr;
+}
+exports.getMapKeyArr = getMapKeyArr;
+function objToStrMap(obj) {
+ const strMap = new Map();
+ for (const k of Object.keys(obj)) {
+ strMap.set(k, obj[k]);
+ }
+ return strMap;
+}
+exports.objToStrMap = objToStrMap;
+//# sourceMappingURL=map-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/node-util.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/node-util.js
new file mode 100644
index 0000000..8c3ae9d
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/node-util.js
@@ -0,0 +1,60 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.findValidNodeExePath = exports.findValidNodeDir = exports.isValidNodePath = void 0;
+const path_1 = __importDefault(require("path"));
+const fs_extra_1 = __importDefault(require("fs-extra"));
+const common_const_js_1 = require("../const/common-const.js");
+const system_util_js_1 = require("./system-util.js");
+const ohos_logger_js_1 = require("./log/ohos-logger.js");
+/**
+ * 判断node的路径是否正确有效
+ *
+ * @param nodePath
+ */
+function isValidNodePath(nodePath) {
+ const _log = ohos_logger_js_1.OhosLogger.getLogger();
+ if (!fs_extra_1.default.existsSync(nodePath)) {
+ _log.errorMessageExit(`The node path '${nodePath}' configure in local.properties is error,Please confirm!`);
+ }
+ const nodeExePath = path_1.default.resolve(nodePath, (0, system_util_js_1.isWindows)() ?
+ common_const_js_1.CommonNodeConst.NODE_EXE : common_const_js_1.CommonNodeConst.NODE);
+ if (!fs_extra_1.default.existsSync(nodeExePath)) {
+ _log.errorMessageExit(`Can not find ${nodeExePath}. Please confirm!`);
+ }
+}
+exports.isValidNodePath = isValidNodePath;
+/**
+ * 从执行项目的环境中找到有效的nodeDir目录
+ * local.properties优先级大于env,env中的node环境来源于执行该次构建的Node路径
+ *
+ * @param nodePath node.exe的父目录
+ */
+function findValidNodeDir(nodePath) {
+ if (nodePath === undefined) {
+ return path_1.default.resolve(process.argv0, "..");
+ }
+ else {
+ isValidNodePath(nodePath);
+ return nodePath;
+ }
+}
+exports.findValidNodeDir = findValidNodeDir;
+/**
+ * 从执行项目的环境中找到可执行的node.exe
+ * local.properties优先级大于env,env中的node环境来源于执行该次构建的Node路径
+ *
+ * @param nodePath node.exe的父目录
+ */
+function findValidNodeExePath(nodePath) {
+ return path_1.default.resolve(findValidNodeDir(nodePath), (0, system_util_js_1.isWindows)() ?
+ common_const_js_1.CommonNodeConst.NODE_EXE : common_const_js_1.CommonNodeConst.NODE);
+}
+exports.findValidNodeExePath = findValidNodeExePath;
+//# sourceMappingURL=node-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/process-utils.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/process-utils.js
new file mode 100644
index 0000000..be33639
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/process-utils.js
@@ -0,0 +1,129 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProcessUtils = void 0;
+const execa_1 = __importDefault(require("execa"));
+const ohos_logger_1 = require("./log/ohos-logger");
+const iconv = __importStar(require("iconv-lite"));
+const system_util_js_1 = require("./system-util.js");
+const fs_1 = __importDefault(require("fs"));
+const os = __importStar(require("os"));
+/**
+ * 执行命令的工具类
+ *
+ * @since 2021-12-14
+ */
+class ProcessUtils {
+ constructor(moduleName = "root", taskName = undefined, errLog = 'Tools execution failed.', solution = 'Please check the message from tools.', charset = "utf-8") {
+ this._log = ohos_logger_1.OhosLogger.getLogger(ProcessUtils.name);
+ this._defaultOptions = {
+ encoding: null
+ };
+ this._moduleName = moduleName;
+ this._taskName = taskName;
+ this._errlog = errLog;
+ this._solution = solution;
+ this._ohosCharset = charset;
+ }
+ /**
+ * 同步地执行命令,并打印结果。同步的执行方式必然需要等到执行结束
+ *
+ * @param command 命令
+ * @param options - 传入参数
+ * @param combine
+ */
+ executeSync(command, options, combine = false) {
+ var _a, _b, _c;
+ const mergedOptions = this.processOptionsFactory(options);
+ let result;
+ try {
+ this.validateExecuteFile(command[0]);
+ result = execa_1.default.sync(command[0], command.slice(1), mergedOptions);
+ if (((_a = result.stdout) === null || _a === void 0 ? void 0 : _a.length) > 0) {
+ this._log.debug(iconv.decode(result.stdout, this._ohosCharset));
+ }
+ if (((_b = result.stderr) === null || _b === void 0 ? void 0 : _b.length) > 0) {
+ if (combine) {
+ this._log.debug(iconv.decode(result.stderr, this._ohosCharset));
+ }
+ else {
+ this._log.warn(iconv.decode(result.stderr, this._ohosCharset));
+ }
+ }
+ if (result.exitCode !== 0) {
+ this._log._printFailedTaskInfo(this._moduleName, this._taskName)
+ ._buildError(this._errlog)
+ ._solution(iconv.decode(result.stderr, this._ohosCharset))
+ ._printErrorAndExit(this._moduleName);
+ }
+ }
+ catch (e) {
+ this._log._printFailedTaskInfo(this._moduleName, this._taskName);
+ if (((_c = e.stdout) === null || _c === void 0 ? void 0 : _c.length) > 0) {
+ this._log.error(iconv.decode(e.stdout, this._ohosCharset));
+ }
+ if (e.stderr) {
+ this._log._buildError(`${this._errlog}${os.EOL}${iconv.decode(e.stderr, this._ohosCharset)}`);
+ }
+ else {
+ this._log._buildError(`${this._errlog}${os.EOL}${e.message}`);
+ }
+ this._log._solution(this._solution);
+ this._log._printErrorAndExit(this._moduleName);
+ }
+ return result;
+ }
+ /**
+ * 生成execa需要的options入参
+ *
+ * @param options - 传入参数
+ */
+ processOptionsFactory(options) {
+ var _a;
+ const path = process.env.PATH;
+ if (((_a = options === null || options === void 0 ? void 0 : options.env) === null || _a === void 0 ? void 0 : _a.path) && path) {
+ options.env.path = path + ((0, system_util_js_1.isWindows)() ? ';' : ':') + options.env.path;
+ }
+ return Object.assign(Object.assign({}, this._defaultOptions), options);
+ }
+ validateExecuteFile(file) {
+ if (file === "java") {
+ return;
+ }
+ if (!fs_1.default.existsSync(file)) {
+ this._log._buildError("Not an internal or external command, nor a runnable program Or batch files.")
+ ._file(file)
+ ._printErrorAndExit(this._moduleName);
+ }
+ }
+}
+exports.ProcessUtils = ProcessUtils;
+//# sourceMappingURL=process-utils.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/project-file-reader.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/project-file-reader.js
new file mode 100644
index 0000000..d90b4d4
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/project-file-reader.js
@@ -0,0 +1,54 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProjectFileReader = void 0;
+const json5 = __importStar(require("json5"));
+const path_1 = __importDefault(require("path"));
+const fs_extra_1 = __importDefault(require("fs-extra"));
+const ohos_logger_js_1 = require("./log/ohos-logger.js");
+/**
+ * 解析工程的构建配置文件,IO读取类,获取json5对象
+ */
+class ProjectFileReader {
+ static getJson5Obj(json5path, encodingStr = "utf-8") {
+ const text = fs_extra_1.default.readFileSync(path_1.default.resolve(json5path), { encoding: encodingStr });
+ try {
+ return json5.parse(text);
+ }
+ catch (e) {
+ ProjectFileReader._log.errorMessageExit(`${json5path} is not the correct JSON/JSON5 format.`);
+ }
+ }
+}
+exports.ProjectFileReader = ProjectFileReader;
+ProjectFileReader._log = ohos_logger_js_1.OhosLogger.getLogger(ProjectFileReader.name);
+//# sourceMappingURL=project-file-reader.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/system-util.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/system-util.js
new file mode 100644
index 0000000..11a8351
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/system-util.js
@@ -0,0 +1,27 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isMac = exports.isLinux = exports.isWindows = void 0;
+const os_1 = __importDefault(require("os"));
+const WINDOWS_OS_NAME = "Windows_NT";
+const LINUX_OS_NAME = "Linux";
+const MAC_OS_NAME = "DarWin";
+function isWindows() {
+ return os_1.default.type() === WINDOWS_OS_NAME;
+}
+exports.isWindows = isWindows;
+function isLinux() {
+ return os_1.default.type() === LINUX_OS_NAME;
+}
+exports.isLinux = isLinux;
+function isMac() {
+ return os_1.default.type() === MAC_OS_NAME;
+}
+exports.isMac = isMac;
+//# sourceMappingURL=system-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/utils/validate-util.js b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/validate-util.js
new file mode 100644
index 0000000..100fca7
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/utils/validate-util.js
@@ -0,0 +1,146 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ValidateUtil = void 0;
+const ajv_1 = __importDefault(require("ajv"));
+const project_file_reader_js_1 = require("./project-file-reader.js");
+const ohos_logger_1 = require("./log/ohos-logger");
+const util = __importStar(require("util"));
+const os = __importStar(require("os"));
+const fs = __importStar(require("fs-extra"));
+const path_1 = __importDefault(require("path"));
+const java_command_builder_1 = require("../builder/java-command-builder");
+const process_utils_1 = require("./process-utils");
+const common_const_1 = require("../const/common-const");
+/**
+ * 校验的工具类
+ *
+ * @since 2021/12/29
+ */
+class ValidateUtil {
+ /**
+ * 根据schema规则校验JSON5的内容
+ *
+ * @param moduleName 校验文件所属module
+ * @param filePath 需要校验的JSON5文件路径
+ * @param schema schema文件的json对象
+ * @protected
+ */
+ static doSchemaCheck(moduleName, filePath, schema) {
+ var _a;
+ const ajv = new ajv_1.default({ strict: false, allErrors: true });
+ const validate = ajv.compile(schema);
+ const buildProfile = project_file_reader_js_1.ProjectFileReader.getJson5Obj(filePath);
+ const valid = validate(buildProfile);
+ if (valid) {
+ ValidateUtil._log.debug(`Schema ${filePath} success.`);
+ }
+ else {
+ const errors = validate.errors;
+ if (errors === undefined || errors === null) {
+ return;
+ }
+ const errorsInfo = [];
+ (_a = validate.errors) === null || _a === void 0 ? void 0 : _a.forEach((value) => {
+ const valueInfo = {
+ instancePath: value.instancePath,
+ keyword: value.keyword,
+ params: util.format(value.params),
+ message: value.message
+ };
+ errorsInfo.push(valueInfo);
+ });
+ ValidateUtil._log._buildError("Schema validate failed!")
+ ._solution(`Please check the following fields in the file:${os.EOL}${util.format(errorsInfo)}`)
+ ._file(filePath)
+ ._printErrorAndExit(moduleName);
+ }
+ }
+ /**
+ *根据SignConfig中的p7b文件调用sign-hap-tool获取bundleName
+ *
+ * @param taskService taskService
+ * @param signingConfigObj signingConfigObject
+ */
+ static getBundleNameFromP7b(taskService, signingConfigObj) {
+ if (signingConfigObj !== undefined) {
+ // 获取hap签名工具
+ const verifyTool = taskService.getSdkInfo().getVerifySignConfigTool();
+ if (verifyTool === undefined) {
+ this._log._buildError('The relevant HAP signing tool is not found in the SDK.')
+ ._solution('Please check the toolchains directory of the SDK.')
+ ._file(taskService.getSdkInfo().getSdkToolchainsDir())
+ ._printErrorAndExit();
+ }
+ // 调用hap-sign-tool对p7b文件处理并获取bundleName
+ const signingConfigP7bFile = signingConfigObj.material.profile;
+ const tempDirForSignConfigCheck = fs.mkdtempSync("TempDirForSignConfigCheck");
+ const signConfigCheckJsonFile = path_1.default.resolve(tempDirForSignConfigCheck, 'signConfigCheckJson.json');
+ const builder = new java_command_builder_1.JavaCommandBuilder();
+ const commands = builder
+ .addCalledJarFile(verifyTool)
+ .addJvmOption('verify-profile')
+ .addJvmOption('-inFile')
+ .addJvmOption(signingConfigP7bFile)
+ .addJvmOption('-outFile')
+ .addJvmOption(signConfigCheckJsonFile)
+ .build();
+ new process_utils_1.ProcessUtils().executeSync(commands);
+ const signingConfigP7bJson = project_file_reader_js_1.ProjectFileReader.getJson5Obj(signConfigCheckJsonFile);
+ const bundleNameFromP7b = signingConfigP7bJson['content']['bundle-info']['bundle-name'];
+ if (fs.existsSync(signConfigCheckJsonFile)) {
+ fs.removeSync(signConfigCheckJsonFile.toString());
+ fs.removeSync(tempDirForSignConfigCheck);
+ }
+ return bundleNameFromP7b;
+ }
+ return null;
+ }
+ /**
+ * 获取hap包中的bundleName
+ *
+ * @param taskService ModuleTaskService
+ */
+ static getBundleNameFromHap(taskService) {
+ var _a;
+ const sourceRoot = (_a = taskService.getModuleModel()) === null || _a === void 0 ? void 0 : _a.getSourceRootByTargetName();
+ if (taskService.getHapExtraInfo().isStageMode()) {
+ return taskService.getProjectModel().getDefaultBundleName();
+ }
+ const configJsonPath = path_1.default.resolve(sourceRoot, common_const_1.CommonConst.CONFIG_JSON);
+ const configJson = project_file_reader_js_1.ProjectFileReader.getJson5Obj(configJsonPath);
+ return configJson.app.bundleName;
+ }
+}
+exports.ValidateUtil = ValidateUtil;
+ValidateUtil._log = ohos_logger_1.OhosLogger.getLogger(ValidateUtil.name);
+//# sourceMappingURL=validate-util.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/version/sdk-version-enum.js b/node_modules/@ohos/hvigor-ohos-plugin/src/version/sdk-version-enum.js
new file mode 100644
index 0000000..7fe3d7c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/version/sdk-version-enum.js
@@ -0,0 +1,16 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SdkVersionEnum = void 0;
+const sdk_version_js_1 = require("./sdk-version.js");
+class SdkVersionEnum {
+}
+exports.SdkVersionEnum = SdkVersionEnum;
+/**
+ * toolchains中打包工具在此版本之后更改名字
+ */
+SdkVersionEnum.NEW_PACK_TOOL = new sdk_version_js_1.SdkVersion('3.1.5.4');
+//# sourceMappingURL=sdk-version-enum.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor-ohos-plugin/src/version/sdk-version.js b/node_modules/@ohos/hvigor-ohos-plugin/src/version/sdk-version.js
new file mode 100644
index 0000000..eae9e6c
--- /dev/null
+++ b/node_modules/@ohos/hvigor-ohos-plugin/src/version/sdk-version.js
@@ -0,0 +1,53 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SdkVersion = void 0;
+const ohos_logger_js_1 = require("../utils/log/ohos-logger.js");
+class SdkVersion {
+ constructor(version) {
+ this._log = ohos_logger_js_1.OhosLogger.getLogger(SdkVersion.name);
+ const versionList = version.split('.');
+ if (versionList.length !== 4) {
+ this._log.errorMessageExit('Invalid sdk version.');
+ }
+ this._major = parseInt(versionList[0]);
+ this._minor = parseInt(versionList[1]);
+ this._revision = parseInt(versionList[2]);
+ this._build = parseInt(versionList[3]);
+ }
+ getMajor() {
+ return this._major;
+ }
+ getMinor() {
+ return this._minor;
+ }
+ getRevision() {
+ return this._revision;
+ }
+ getBuild() {
+ return this._build;
+ }
+ /**
+ * 判断当前版本号是否高于传入的版本
+ *
+ * @param {SdkVersion} sdkVersion
+ * @returns {boolean}
+ */
+ isHigherThan(sdkVersion) {
+ if (this._major > sdkVersion.getMajor()) {
+ return true;
+ }
+ if (this._minor > sdkVersion.getMinor()) {
+ return true;
+ }
+ if (this._revision > sdkVersion.getRevision()) {
+ return true;
+ }
+ return this._build > sdkVersion.getBuild();
+ }
+}
+exports.SdkVersion = SdkVersion;
+//# sourceMappingURL=sdk-version.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/LICENSE.txt b/node_modules/@ohos/hvigor/LICENSE.txt
new file mode 100644
index 0000000..b9629b5
Binary files /dev/null and b/node_modules/@ohos/hvigor/LICENSE.txt differ
diff --git a/node_modules/@ohos/hvigor/README.md b/node_modules/@ohos/hvigor/README.md
new file mode 100644
index 0000000..3899924
--- /dev/null
+++ b/node_modules/@ohos/hvigor/README.md
@@ -0,0 +1,65 @@
+Hvigor
+A new automated build tool for OpenHarmonyOS application
+
+## Hvigor是什么?
+***
+- Hvigor是基于任务管理机制实现的一款全新的自动化构建工具,主要提供任务注册编排,编译工程模型管理,编译配置定制,插件扩展等核心能力,当前主要面向OpenHarmonyOS应用JS/eTS开发场景。
+- Hvigor结构化模型:hvigor工程主要以build-profile.json5与hvigorfile.js组成
+```
+rootProject // Hvigor工程根目录
+├── build-profile.json5 // 工程级别Hvigor配置,主要配置工程相关信息,包括子模块名字、路径等。
+├── hvigorfile.js // 工程级别任务脚本,当前暂不支持自定义
+├── moduleA
+│ ├── build-profile.json5 // 模块级别Hvigor配置,主要模块构建相关参数
+│ └── hvigorfile.js // 模块级别任务脚本,当前暂不支持自定义
+└── moduleB
+ ├── build-profile.json5 // 模块级别Hvigor配置,主要模块构建相关参数
+ └── hvigorfile.js // 模块级别任务脚本,当前暂不支持自定义
+```
+
+## 安装使用
+***
+- 安装相应的nodejs与npm
+- 通过npm命令行安装Hvigor
+```shell
+ npm install @ohos/hvigor
+```
+注:当前需要配合hvigor-ohos-plugin使用,所以也需要 npm install @ohos/hvigor-ohos-plugin
+- 在DevEco Studio内使用Hvigor
+ 工程级package.json内配置:
+```json
+ "dependencies": {
+"@ohos/hvigor": "1.0.6",
+"@ohos/hvigor-ohos-plugin": "1.0.6"
+}
+```
+注:
+hvigor-ohos-plugin是基于hvigor插件机制开发的一款插件,服务于OpenHarmonyOS应用构建工作流,完成HAP/APP打包。详细指导:
+DevEco Studio
+
+- hvigor命令行
+
+ 运行命令行的结构
+ ```shell
+ hvigor [taskName...] [--option-name]
+ ```
+ 详细参数:
+ ```shell
+ Usage: hvigor [options]
+ Options:
+ --version, -v Print the global and local vigor versions. [boolean]
+ --cwd Manually set the CWD. The search for the vigorfile, as well as
+ the relativity of all requires will be from here. [string]
+ --require Will require a module before running the vigorfile. This is
+ useful for transpilers but also has other applications.[string]
+ --prop, -p Define extra properties. [string]
+ --mode, -m Specifies the mode in which the command is currently executed.[string]
+ --sync, -s Sync the information in plugin for other platform. [boolean]
+ --error, -e Log errors only. [boolean]
+ --warn, -w Set log level to warn. [boolean]
+ --info, -i Set log level to info. [boolean]
+ --debug,-d Set log level to debug. [boolean]
+ ```
+## 约束
+***
+ node版本要求: v14.18.3以及以上版本
diff --git a/node_modules/@ohos/hvigor/bin/hvigor.d.ts b/node_modules/@ohos/hvigor/bin/hvigor.d.ts
new file mode 100644
index 0000000..b798801
--- /dev/null
+++ b/node_modules/@ohos/hvigor/bin/hvigor.d.ts
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+export {};
diff --git a/node_modules/@ohos/hvigor/bin/hvigor.js b/node_modules/@ohos/hvigor/bin/hvigor.js
new file mode 100644
index 0000000..0f14cc1
--- /dev/null
+++ b/node_modules/@ohos/hvigor/bin/hvigor.js
@@ -0,0 +1,10 @@
+#!/usr/bin/env node
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const index_1 = require("../index");
+(0, index_1.run)();
+//# sourceMappingURL=hvigor.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/index.d.ts b/node_modules/@ohos/hvigor/index.d.ts
new file mode 100644
index 0000000..affc28b
--- /dev/null
+++ b/node_modules/@ohos/hvigor/index.d.ts
@@ -0,0 +1,2 @@
+export declare const hvigorPath: string;
+export declare function run(): void;
diff --git a/node_modules/@ohos/hvigor/index.js b/node_modules/@ohos/hvigor/index.js
new file mode 100644
index 0000000..72d11c7
--- /dev/null
+++ b/node_modules/@ohos/hvigor/index.js
@@ -0,0 +1,146 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.run = exports.hvigorPath = void 0;
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+const process = __importStar(require("process"));
+const LiftOff = require('liftoff');
+const v8flags = require('v8flags');
+const yargs = require('yargs');
+const interpret = require('interpret');
+const cliVersion = require('./package.json').version;
+exports.hvigorPath = require.resolve("@ohos/hvigor-base", { paths: [process.cwd()] });
+const exit_1 = require("./src/exit");
+const make_title_1 = require("./src/make-title");
+const cli_options_1 = require("./src/options/cli-options");
+const process_utils_1 = require("./src/process-utils");
+const init_env_config_props_1 = require("./src/init-env-config-props");
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const pretty_hrtime_1 = __importDefault(require("pretty-hrtime"));
+const profile_js_1 = require("./src/lifecycle/profile.js");
+/**
+ * name:对象名
+ * processTitle: 命令行运行后的进程名,默认取name
+ * moduleName: 命令行需要加载的本地的包名,默认取name
+ * configName: 本地配置的文件名,默认取name+"file"
+ * extensions: key代表本地配置文件的后缀,value代表需要加载的编译脚本,值可以是null 字符串,数组能
+ * process.argv:node hvigor --xxx xxx --xxx xxx
+ * completions:待确定
+ * v8flags:v8
+ * configFiles:支持多配置文件
+ *
+ * @type {LiftOff}
+ */
+const _log = hvigor_base_1.HvigorLogger.getLogger('hvigor-index.js');
+const cli = new LiftOff({
+ name: 'hvigor',
+ processTitle: (0, make_title_1.makeTitle)('hvigor', process.argv.slice(2)),
+ moduleName: exports.hvigorPath,
+ configName: "hvigorFile",
+ v8flags: v8flags,
+ extensions: interpret.jsVariants
+});
+// cli options定义所有的可支持的命令行
+const parser = yargs.usage("Usage", cli_options_1.cliOptions);
+// 解析命令行
+const opts = parser.argv;
+function run() {
+ cli.prepare({
+ cwd: opts.cwd,
+ require: opts.require,
+ completion: opts.completion,
+ }, function (env) {
+ if (opts.help) {
+ yargs.usage('Usage: hvigor [options]')
+ .example('hvigor assembleApp', 'Do assembleApp task')
+ .help('h')
+ .alias('h', 'help')
+ .epilog('copyright 2021')
+ .argv;
+ (0, exit_1.exit)(0);
+ }
+ if (opts.version) {
+ _log.info('CLI version:', cliVersion);
+ _log.info('Local version:', env.modulePackage.version || 'Unknown');
+ (0, exit_1.exit)(0);
+ }
+ evaluateLogLevel();
+ const LOWEST_VERSION = "v14.18.3";
+ if (process.version < LOWEST_VERSION) {
+ _log.warn(`node version: ${process.version}`);
+ _log.warn(`node version cannot be lower than ${LOWEST_VERSION}`);
+ process.exit(-1);
+ }
+ (0, init_env_config_props_1.initEnvConfigProps)(env, opts);
+ cli.execute(env, env.nodeFlags, function () {
+ return __awaiter(this, void 0, void 0, function* () {
+ const taskBeginTime = process.hrtime();
+ yield (0, process_utils_1.processUtils)(opts, env);
+ const taskEndTime = process.hrtime(taskBeginTime);
+ const realTime = (0, pretty_hrtime_1.default)(taskEndTime);
+ if (0 == profile_js_1.profile.executed) {
+ _log.error(`No task found to execute in project!`);
+ }
+ _log.info(`BUILD SUCCESSFUL in ${realTime}`);
+ });
+ });
+ });
+}
+exports.run = run;
+function evaluateLogLevel() {
+ if (opts.debug) {
+ _log.setLevel(hvigor_base_1.levels.DEBUG);
+ return;
+ }
+ if (opts.info) {
+ _log.setLevel(hvigor_base_1.levels.INFO);
+ return;
+ }
+ if (opts.warn) {
+ _log.setLevel(hvigor_base_1.levels.WARN);
+ return;
+ }
+ if (opts.error) {
+ _log.setLevel(hvigor_base_1.levels.ERROR);
+ return;
+ }
+ _log.setLevel(hvigor_base_1.levels.INFO);
+}
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/package.json b/node_modules/@ohos/hvigor/package.json
new file mode 100644
index 0000000..cb22abd
--- /dev/null
+++ b/node_modules/@ohos/hvigor/package.json
@@ -0,0 +1,78 @@
+{
+ "_args": [
+ [
+ "@ohos/hvigor@1.0.6",
+ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1"
+ ]
+ ],
+ "_from": "@ohos/hvigor@1.0.6",
+ "_id": "@ohos/hvigor@1.0.6",
+ "_inBundle": false,
+ "_integrity": "sha512-jjp7vpvUOMW1Nf7TdyhOtonwWHoSyBJLUiZTQqIx/GJV4UJyIqsiURUOqFwncQ4L7PDdeHuWly4uEelknYeWhg==",
+ "_location": "/@ohos/hvigor",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@ohos/hvigor@1.0.6",
+ "name": "@ohos/hvigor",
+ "escapedName": "@ohos%2fhvigor",
+ "scope": "@ohos",
+ "rawSpec": "1.0.6",
+ "saveSpec": null,
+ "fetchSpec": "1.0.6"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor/-/@ohos/hvigor-1.0.6.tgz",
+ "_spec": "1.0.6",
+ "_where": "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1",
+ "author": {
+ "name": "huawei"
+ },
+ "bin": {
+ "hvigor": "bin/hvigor.js"
+ },
+ "dependencies": {
+ "@ohos/hvigor-base": "1.0.6",
+ "interpret": "1.4.0",
+ "liftoff": "4.0.0",
+ "mute-stdout": "1.0.0",
+ "pretty-hrtime": "1.0.0",
+ "v8flags": "3.2.0",
+ "yargs": "7.1.0"
+ },
+ "description": "The ohos build system cli tools.",
+ "devDependencies": {
+ "@types/node": "^16.11.11",
+ "@types/pretty-hrtime": "^1.0.0",
+ "@typescript-eslint/eslint-plugin": "5.10.2",
+ "@typescript-eslint/parser": "5.10.2",
+ "eslint": "^7.32.0"
+ },
+ "files": [
+ "**/*.js",
+ "**/*.d.ts",
+ "!.eslintrc.js"
+ ],
+ "keywords": [
+ "hvigor"
+ ],
+ "license": "SEE LICENSE IN LICENSE.txt",
+ "main": "./index.js",
+ "name": "@ohos/hvigor",
+ "ohos": {
+ "org": "huawei"
+ },
+ "scripts": {
+ "build": "tsc -p .",
+ "clean": "tsc --build --clean",
+ "patch-publish": "npm --no-git-tag-version version prepatch&&npm publish",
+ "prepare": "npm run build",
+ "rebuild": "npm run clean&&npm run build",
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "watch": "tsc --watch"
+ },
+ "version": "1.0.6"
+}
diff --git a/node_modules/@ohos/hvigor/src/exit.d.ts b/node_modules/@ohos/hvigor/src/exit.d.ts
new file mode 100644
index 0000000..822b21f
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/exit.d.ts
@@ -0,0 +1 @@
+export declare function exit(code: number): void;
diff --git a/node_modules/@ohos/hvigor/src/exit.js b/node_modules/@ohos/hvigor/src/exit.js
new file mode 100644
index 0000000..cbc9ee8
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/exit.js
@@ -0,0 +1,18 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.exit = void 0;
+function exit(code) {
+ if (process.platform === 'win32' && process.stdout.writableLength) {
+ process.stdout.once('drain', function () {
+ process.exit(code);
+ });
+ return;
+ }
+ process.exit(code);
+}
+exports.exit = exit;
+//# sourceMappingURL=exit.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/init-env-config-props.d.ts b/node_modules/@ohos/hvigor/src/init-env-config-props.d.ts
new file mode 100644
index 0000000..eecedb8
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/init-env-config-props.d.ts
@@ -0,0 +1,8 @@
+/**
+ * 加载liftOff获取到的configFiles中的具体一个配置文件的路径
+ *
+ * @param env liftoff环境变量
+ * @param opts yargs解析的命令行参数
+ * @return path 返回cwd的路径
+ */
+export declare function initEnvConfigProps(env: any, opts: any): string;
diff --git a/node_modules/@ohos/hvigor/src/init-env-config-props.js b/node_modules/@ohos/hvigor/src/init-env-config-props.js
new file mode 100644
index 0000000..f11115b
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/init-env-config-props.js
@@ -0,0 +1,71 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.initEnvConfigProps = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const cli_options_1 = require("./options/cli-options");
+const fs = __importStar(require("fs"));
+const hvigor_base_2 = require("@ohos/hvigor-base");
+const os = __importStar(require("os"));
+const path = __importStar(require("path"));
+const process = __importStar(require("process"));
+const configFileName = hvigor_base_1.HvigorCommonConst.PROJECT_CONFIG_FILE_NAME;
+const propertiesAlias = cli_options_1.cliOptions.prop.alias;
+const modeAlias = cli_options_1.cliOptions.mode.alias;
+/**
+ * 加载liftOff获取到的configFiles中的具体一个配置文件的路径
+ *
+ * @param env liftoff环境变量
+ * @param opts yargs解析的命令行参数
+ * @return path 返回cwd的路径
+ */
+function initEnvConfigProps(env, opts) {
+ const _log = hvigor_base_2.HvigorLogger.getLogger("initEnvConfigProps");
+ // load 根项目下的build_profile
+ const configFilePath = path.resolve(process.cwd(), hvigor_base_1.HvigorCommonConst.PROJECT_CONFIG_FILE);
+ if (!fs.existsSync(configFilePath)) {
+ _log.errorMessageExit(`Cannot find project build file '${hvigor_base_1.HvigorCommonConst.PROJECT_CONFIG_FILE}'
+ ${os.EOL}\t at ${env.cwd}:1:1`);
+ }
+ const properties = new Map();
+ if (opts.prop !== undefined) {
+ [].concat(opts.prop).forEach((value) => {
+ const arr = value.split('=');
+ properties.set(arr[0], arr[1]);
+ });
+ }
+ env.configProps = new Map([
+ [configFileName, configFilePath],
+ [propertiesAlias, properties],
+ [modeAlias, opts.mode]
+ ]);
+ return configFilePath;
+}
+exports.initEnvConfigProps = initEnvConfigProps;
+//# sourceMappingURL=init-env-config-props.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/configuration.d.ts b/node_modules/@ohos/hvigor/src/lifecycle/configuration.d.ts
new file mode 100644
index 0000000..d964c4d
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/configuration.d.ts
@@ -0,0 +1,6 @@
+/**
+ * Config整个hvigor的项目,进行数据绑定
+ *
+ * @param env
+ */
+export declare function configuration(env: any): any;
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/configuration.js b/node_modules/@ohos/hvigor/src/lifecycle/configuration.js
new file mode 100644
index 0000000..b07f4ca
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/configuration.js
@@ -0,0 +1,37 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.configuration = void 0;
+const path_1 = __importDefault(require("path"));
+const hvigor_base_1 = require("@ohos/hvigor-base");
+/**
+ * Config整个hvigor的项目,进行数据绑定
+ *
+ * @param env
+ */
+function configuration(env) {
+ const vigorConfigInst = require(env.modulePath).vigorConfigInst;
+ const project = vigorConfigInst.getProject();
+ for (const subModule of project.getAllSubProjects()) {
+ const subModuleVigorFileJs = subModule.getBuildFilePath();
+ configModule(subModule, subModuleVigorFileJs);
+ }
+ const projectVigorFileJs = path_1.default.resolve(env.cwd, hvigor_base_1.HvigorCommonConst.BUILD_FILE_NAME);
+ configModule(project, projectVigorFileJs);
+ return project;
+}
+exports.configuration = configuration;
+function configModule(module, hvigorFilePath) {
+ const moduleExported = require(hvigorFilePath);
+ const pluginNTasks = moduleExported(module);
+ module.exported = pluginNTasks;
+ // 绑定创建的plugin对象到project上
+ module.bindPlugin(pluginNTasks.plugin);
+}
+//# sourceMappingURL=configuration.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/execute-task.d.ts b/node_modules/@ohos/hvigor/src/lifecycle/execute-task.d.ts
new file mode 100644
index 0000000..afd03fa
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/execute-task.d.ts
@@ -0,0 +1,16 @@
+import { DefaultModule, Project } from "@ohos/hvigor-base";
+/**
+ * 执行module级别的任务
+ *
+ * @param project
+ * @param opts
+ */
+export declare function executeModuleTask(project: Project, opts: any): Promise;
+/**
+ * 创建hvigor实例,注册任务并执行
+ *
+ * @param model module或者project的Hvigor模型
+ * @param shouldCheckTask 根据用户配置看是否需要检查任务是否存在
+ * @param opts 命令行中的配置
+ */
+export declare function execute(model: DefaultModule, shouldCheckTask: boolean, opts: any): Promise;
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/execute-task.js b/node_modules/@ohos/hvigor/src/lifecycle/execute-task.js
new file mode 100644
index 0000000..140744b
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/execute-task.js
@@ -0,0 +1,98 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.execute = exports.executeModuleTask = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const register_exports_1 = require("../register-exports");
+const index_1 = require("../../index");
+const sync_1 = require("./sync");
+const profile_js_1 = require("./profile.js");
+const _log = hvigor_base_1.HvigorLogger.getLogger("execute-task.js");
+/**
+ * 执行module级别的任务
+ *
+ * @param project
+ * @param opts
+ */
+function executeModuleTask(project, opts) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const modules = hvigor_base_1.vigorConfigInst.getExtraConfig().get("module");
+ // 如果不指定module则默认执行所有module对应的任务
+ if (modules === undefined) {
+ yield Promise.all(project.getAllSubProjects().map((module) => {
+ execute(module, false, opts);
+ })).catch(error => {
+ _log.error(error);
+ });
+ }
+ else {
+ yield Promise.all(modules.split(",").map((value) => {
+ const values = value.split("@");
+ const module = project.findModuleByName(values[0]);
+ if (module === undefined) {
+ _log.errorMessageExit(`Unknown module '${values[0]}' in command lines,Please check!`);
+ }
+ execute(module, true, opts);
+ })).catch(error => {
+ _log.error(error);
+ });
+ }
+ });
+}
+exports.executeModuleTask = executeModuleTask;
+/**
+ * 创建hvigor实例,注册任务并执行
+ *
+ * @param model module或者project的Hvigor模型
+ * @param shouldCheckTask 根据用户配置看是否需要检查任务是否存在
+ * @param opts 命令行中的配置
+ */
+function execute(model, shouldCheckTask, opts) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const tasks = opts._;
+ const toRun = tasks.length ? tasks : ['default'];
+ const needSync = opts.sync;
+ const moduleName = model.getName();
+ const HvigorClass = require(index_1.hvigorPath).Hvigor;
+ const vigorInst = new HvigorClass();
+ const registryTasks = (0, register_exports_1.registerExports)(vigorInst, model.exported);
+ if (needSync) {
+ profile_js_1.profile.executed += 1;
+ yield (0, sync_1.sync)(model, registryTasks, vigorInst);
+ return;
+ }
+ const finallyToRun = toRun.filter((taskName) => {
+ return registryTasks.has(taskName);
+ });
+ // 指定了具体要执行的模块,但是找不到对应的任务
+ if (!needSync && shouldCheckTask && finallyToRun.length === 0) {
+ _log.errorMessageExit(`Task ${toRun} not found in module:${moduleName}.`);
+ }
+ // 未指定具体要执行的模块,没有可执行任务时直接返回
+ if (finallyToRun.length === 0) {
+ _log.debug(`No task found to execute in ${moduleName}!`);
+ return;
+ }
+ profile_js_1.profile.executed += finallyToRun.length;
+ const runMethod = opts.series ? 'series' : 'parallel';
+ vigorInst[runMethod](finallyToRun)(function (err) {
+ if (err) {
+ _log.errorExit(err.message);
+ }
+ });
+ });
+}
+exports.execute = execute;
+//# sourceMappingURL=execute-task.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/init.d.ts b/node_modules/@ohos/hvigor/src/lifecycle/init.d.ts
new file mode 100644
index 0000000..cc9a899
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/init.d.ts
@@ -0,0 +1,6 @@
+/**
+ * 初始化hvigor的数据模型
+ *
+ * @param env liftoff env
+ */
+export declare function init(env: any): void;
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/init.js b/node_modules/@ohos/hvigor/src/lifecycle/init.js
new file mode 100644
index 0000000..c287788
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/init.js
@@ -0,0 +1,26 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.init = void 0;
+const path_1 = __importDefault(require("path"));
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const cli_options_1 = require("../options/cli-options");
+const propertiesAlias = cli_options_1.cliOptions.prop.alias;
+/**
+ * 初始化hvigor的数据模型
+ *
+ * @param env liftoff env
+ */
+function init(env) {
+ const vigorConfigInst = require(env.modulePath).vigorConfigInst;
+ vigorConfigInst.setExtraConfig(env.configProps.get(propertiesAlias));
+ vigorConfigInst.initRootProject(path_1.default.resolve(env.cwd, hvigor_base_1.HvigorCommonConst.PROJECT_CONFIG_FILE), env.cwd);
+}
+exports.init = init;
+//# sourceMappingURL=init.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/profile.d.ts b/node_modules/@ohos/hvigor/src/lifecycle/profile.d.ts
new file mode 100644
index 0000000..1145694
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/profile.d.ts
@@ -0,0 +1,3 @@
+export declare const profile: {
+ executed: number;
+};
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/profile.js b/node_modules/@ohos/hvigor/src/lifecycle/profile.js
new file mode 100644
index 0000000..93b6b23
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/profile.js
@@ -0,0 +1,11 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.profile = void 0;
+exports.profile = {
+ executed: 0
+};
+//# sourceMappingURL=profile.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/sync.d.ts b/node_modules/@ohos/hvigor/src/lifecycle/sync.d.ts
new file mode 100644
index 0000000..cb662d8
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/sync.d.ts
@@ -0,0 +1,9 @@
+import { DefaultModule, Hvigor } from "@ohos/hvigor-base";
+/**
+ * 执行每个module中注册的sync类型的任务,将对应的数据模型注册到registry中
+ *
+ * @param model
+ * @param registryTask
+ * @param vigorInst
+ */
+export declare function sync(model: DefaultModule, registryTask: Map, vigorInst: Hvigor): void;
diff --git a/node_modules/@ohos/hvigor/src/lifecycle/sync.js b/node_modules/@ohos/hvigor/src/lifecycle/sync.js
new file mode 100644
index 0000000..bec1334
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/lifecycle/sync.js
@@ -0,0 +1,28 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.sync = void 0;
+/**
+ * 执行每个module中注册的sync类型的任务,将对应的数据模型注册到registry中
+ *
+ * @param model
+ * @param registryTask
+ * @param vigorInst
+ */
+function sync(model, registryTask, vigorInst) {
+ registryTask.forEach(((value, key) => {
+ // sync类型的任务才需要执行
+ if (value) {
+ vigorInst["series"](key)(function (err) {
+ if (err) {
+ process.exit(1);
+ }
+ });
+ }
+ }));
+}
+exports.sync = sync;
+//# sourceMappingURL=sync.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/make-title.d.ts b/node_modules/@ohos/hvigor/src/make-title.d.ts
new file mode 100644
index 0000000..a6315a4
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/make-title.d.ts
@@ -0,0 +1 @@
+export declare function makeTitle(cmd: string, argv: string[]): string;
diff --git a/node_modules/@ohos/hvigor/src/make-title.js b/node_modules/@ohos/hvigor/src/make-title.js
new file mode 100644
index 0000000..5bc4148
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/make-title.js
@@ -0,0 +1,15 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.makeTitle = void 0;
+function makeTitle(cmd, argv) {
+ if (!argv || argv.length === 0) {
+ return cmd;
+ }
+ return [cmd].concat(argv).join(' ');
+}
+exports.makeTitle = makeTitle;
+//# sourceMappingURL=make-title.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/options/cli-options.d.ts b/node_modules/@ohos/hvigor/src/options/cli-options.d.ts
new file mode 100644
index 0000000..cbfadc3
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/options/cli-options.d.ts
@@ -0,0 +1,62 @@
+/**
+ * 提供Gvigor-cli的命令行options
+ *
+ * @since 2021/12/09
+ */
+export declare const cliOptions: {
+ help: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+ version: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+ cwd: {
+ type: string;
+ requiresArg: boolean;
+ describe: string;
+ };
+ require: {
+ type: string;
+ requiresArg: boolean;
+ describe: string;
+ };
+ prop: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+ mode: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+ sync: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+ error: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+ warn: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+ info: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+ debug: {
+ alias: string;
+ type: string;
+ describe: string;
+ };
+};
diff --git a/node_modules/@ohos/hvigor/src/options/cli-options.js b/node_modules/@ohos/hvigor/src/options/cli-options.js
new file mode 100644
index 0000000..9c7dc6a
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/options/cli-options.js
@@ -0,0 +1,72 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.cliOptions = void 0;
+/**
+ * 提供Gvigor-cli的命令行options
+ *
+ * @since 2021/12/09
+ */
+exports.cliOptions = {
+ help: {
+ alias: 'h',
+ type: 'boolean',
+ describe: 'Show this help.',
+ },
+ version: {
+ alias: 'v',
+ type: 'boolean',
+ describe: 'Print the global and local vigor versions.',
+ },
+ cwd: {
+ type: 'string',
+ requiresArg: true,
+ describe: 'Manually set the CWD. The search for the vigorfile, ' +
+ 'as well as the relativity of all requires will be from here.'
+ },
+ require: {
+ type: 'string',
+ requiresArg: true,
+ describe: 'Will require a module before running the vigorfile. ' +
+ 'This is useful for transpilers but also has other applications.',
+ },
+ prop: {
+ alias: 'p',
+ type: 'string',
+ describe: 'Define extra properties.'
+ },
+ mode: {
+ alias: "m",
+ type: "string",
+ describe: "Specifies the mode in which the command is currently executed."
+ },
+ sync: {
+ alias: "s",
+ type: "boolean",
+ describe: "Sync the information in plugin for other platform."
+ },
+ error: {
+ alias: "e",
+ type: 'boolean',
+ describe: 'Log errors only.'
+ },
+ warn: {
+ alias: "w",
+ type: 'boolean',
+ describe: 'Set log level to warn.'
+ },
+ info: {
+ alias: "i",
+ type: 'boolean',
+ describe: 'Set log level to info.'
+ },
+ debug: {
+ alias: "d",
+ type: 'boolean',
+ describe: 'Set log level to debug.'
+ }
+};
+//# sourceMappingURL=cli-options.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/process-utils.d.ts b/node_modules/@ohos/hvigor/src/process-utils.d.ts
new file mode 100644
index 0000000..14a196f
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/process-utils.d.ts
@@ -0,0 +1,7 @@
+/**
+ * 用于执行具体的Gvigor的任务
+ *
+ * @param opts
+ * @param env
+ */
+export declare function processUtils(opts: any, env: any): void;
diff --git a/node_modules/@ohos/hvigor/src/process-utils.js b/node_modules/@ohos/hvigor/src/process-utils.js
new file mode 100644
index 0000000..2bbf1b5
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/process-utils.js
@@ -0,0 +1,60 @@
+"use strict";
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
+ *
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.processUtils = void 0;
+const hvigor_base_1 = require("@ohos/hvigor-base");
+const cli_options_1 = require("./options/cli-options");
+const init_1 = require("./lifecycle/init");
+const configuration_1 = require("./lifecycle/configuration");
+const execute_task_1 = require("./lifecycle/execute-task");
+const default_tooling_model_bean_registry_1 = require("@ohos/hvigor-base/src/external/default-tooling-model-bean-registry");
+const modeAlias = cli_options_1.cliOptions.mode.alias;
+const muteStdout = require("mute-stdout");
+/**
+ * 用于执行具体的Gvigor的任务
+ *
+ * @param opts
+ * @param env
+ */
+function processUtils(opts, env) {
+ const _log = hvigor_base_1.HvigorLogger.getLogger("process-utils.js");
+ // 如果执行的是sync动作,先关闭日志输出
+ if (opts.sync) {
+ muteStdout.mute();
+ }
+ // init
+ (0, init_1.init)(env);
+ // configure
+ const project = (0, configuration_1.configuration)(env);
+ const executeMode = env.configProps.get(modeAlias);
+ switch (executeMode) {
+ case hvigor_base_1.HvigorBuildConst.PROJECT_MODE:
+ (0, execute_task_1.execute)(project, true, opts).then(outputInfo);
+ break;
+ case hvigor_base_1.HvigorBuildConst.MODULE_MODE:
+ (0, execute_task_1.executeModuleTask)(project, opts).then(outputInfo);
+ break;
+ case undefined:
+ (0, execute_task_1.execute)(project, false, opts);
+ (0, execute_task_1.executeModuleTask)(project, opts).then(outputInfo);
+ break;
+ default:
+ _log.error(`Unknown mode '${executeMode}' specified in command line,Please check!`);
+ }
+ function outputInfo() {
+ // 开启打印sync的同步信息
+ muteStdout.unmute();
+ if (opts.sync) {
+ const output = Object.create(null);
+ default_tooling_model_bean_registry_1.defaultModelRegistry.getModelMap().forEach(((value, key) => {
+ output[key] = value.buildModel();
+ }));
+ console.log(JSON.stringify(output));
+ }
+ }
+}
+exports.processUtils = processUtils;
+//# sourceMappingURL=process-utils.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/hvigor/src/register-exports.d.ts b/node_modules/@ohos/hvigor/src/register-exports.d.ts
new file mode 100644
index 0000000..b5c12ab
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/register-exports.d.ts
@@ -0,0 +1,8 @@
+import { Hvigor } from "@ohos/hvigor-base";
+/**
+ * 注册任务到Gvigor中
+ *
+ * @param vigorInst 任务管理对象
+ * @param hvigorFileObj 任务执行脚本文件
+ */
+export declare function registerExports(vigorInst: Hvigor, hvigorFileObj: any): Map;
diff --git a/node_modules/@ohos/hvigor/src/register-exports.js b/node_modules/@ohos/hvigor/src/register-exports.js
new file mode 100644
index 0000000..03ffd37
--- /dev/null
+++ b/node_modules/@ohos/hvigor/src/register-exports.js
@@ -0,0 +1,28 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.registerExports = void 0;
+const index_1 = require("../index");
+const { Task, DefaultSyncTask } = require(index_1.hvigorPath);
+/**
+ * 注册任务到Gvigor中
+ *
+ * @param vigorInst 任务管理对象
+ * @param hvigorFileObj 任务执行脚本文件
+ */
+function registerExports(vigorInst, hvigorFileObj) {
+ const registryTasks = new Map();
+ const taskNames = Object.keys(hvigorFileObj);
+ if (taskNames.length) {
+ taskNames.forEach((taskName) => {
+ const exportObj = hvigorFileObj[taskName];
+ if (exportObj instanceof Task) {
+ const task = exportObj.registry();
+ vigorInst.task(taskName, task);
+ registryTasks.set(taskName, exportObj instanceof DefaultSyncTask);
+ }
+ });
+ }
+ return registryTasks;
+}
+exports.registerExports = registerExports;
+//# sourceMappingURL=register-exports.js.map
\ No newline at end of file
diff --git a/node_modules/@ohos/sdkmanager-common/LICENSE.txt b/node_modules/@ohos/sdkmanager-common/LICENSE.txt
new file mode 100644
index 0000000..b9629b5
Binary files /dev/null and b/node_modules/@ohos/sdkmanager-common/LICENSE.txt differ
diff --git a/node_modules/@ohos/sdkmanager-common/README.md b/node_modules/@ohos/sdkmanager-common/README.md
new file mode 100644
index 0000000..435cf88
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/README.md
@@ -0,0 +1,30 @@
+# ohos-sdkmanager-js
+
+OpenHarmony SDK Manager的js实现
+## api说明
+```ts
+export interface SdkInfoHandler {
+ /**
+ * 获取本地已安装的SDK
+ *
+ * @return 本地已安装sdk集合
+ */
+ getLocalSdks(): Map;
+}
+```
+## 使用方法
+
+```ts
+const sdkInfoConfig = SdkInfoConfig.create('sdk根路径');
+const ohSdkInfoHandler = new OhSdkInfoHandler(sdkInfoConfig);
+const localSdks = ohSdkInfoHandler.getLocalSdks();
+// 查找api8的toolchains
+const sdk = localSdks.get(new PathAndApiVersion(ComponentPath.TOOLCHAINS, 8));
+```
+
+## 引用方式
+```json
+"dependencies": {
+ "@ohos/sdkmanager-common": "1.1.3"
+},
+```
\ No newline at end of file
diff --git a/node_modules/@ohos/sdkmanager-common/build/index.d.ts b/node_modules/@ohos/sdkmanager-common/build/index.d.ts
new file mode 100644
index 0000000..59b1e6e
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/index.d.ts
@@ -0,0 +1,23 @@
+import ErrorTip from './src/com/huawei/deveco/sdkmanager/core/api/ErrorTip';
+import PathAndApiVersion from './src/com/huawei/deveco/sdkmanager/core/api/PathAndApiVersion';
+import SdkException from './src/com/huawei/deveco/sdkmanager/core/api/SdkException';
+import SdkInfoConfig from './src/com/huawei/deveco/sdkmanager/core/api/SdkInfoConfig';
+import { SdkInfoHandler } from './src/com/huawei/deveco/sdkmanager/core/api/SdkInfoHandler';
+import { SdkSettings } from './src/com/huawei/deveco/sdkmanager/core/domain/SdkSettings';
+import { AbstractLocalComponentLoader } from './src/com/huawei/deveco/sdkmanager/core/loader/AbstractLocalComponentLoader';
+import { Logger } from './src/com/huawei/deveco/sdkmanager/core/log/Logger';
+import OhSdkInfoHandler from './src/com/huawei/deveco/sdkmanager/ohos/api/OhSdkInfoHandler';
+export { CommonSdkInfoHandler } from './src/com/huawei/deveco/sdkmanager/core/api/CommonSdkInfoHandler';
+export * from './src/com/huawei/deveco/sdkmanager/core/api/Component';
+export * from './src/com/huawei/deveco/sdkmanager/core/constants/ComponentContants';
+export * from './src/com/huawei/deveco/sdkmanager/core/loader/ComponentDto';
+export * from './src/com/huawei/deveco/sdkmanager/core/util/Utils';
+export { ErrorTip };
+export { PathAndApiVersion };
+export { SdkException };
+export { SdkInfoConfig };
+export { SdkInfoHandler };
+export { SdkSettings };
+export { AbstractLocalComponentLoader };
+export { Logger };
+export { OhSdkInfoHandler };
diff --git a/node_modules/@ohos/sdkmanager-common/build/index.js b/node_modules/@ohos/sdkmanager-common/build/index.js
new file mode 100644
index 0000000..edca988
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/index.js
@@ -0,0 +1,34 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OhSdkInfoHandler = exports.AbstractLocalComponentLoader = exports.SdkInfoConfig = exports.SdkException = exports.PathAndApiVersion = exports.ErrorTip = exports.CommonSdkInfoHandler = void 0;
+const ErrorTip_1 = __importDefault(require("./src/com/huawei/deveco/sdkmanager/core/api/ErrorTip"));
+exports.ErrorTip = ErrorTip_1.default;
+const PathAndApiVersion_1 = __importDefault(require("./src/com/huawei/deveco/sdkmanager/core/api/PathAndApiVersion"));
+exports.PathAndApiVersion = PathAndApiVersion_1.default;
+const SdkException_1 = __importDefault(require("./src/com/huawei/deveco/sdkmanager/core/api/SdkException"));
+exports.SdkException = SdkException_1.default;
+const SdkInfoConfig_1 = __importDefault(require("./src/com/huawei/deveco/sdkmanager/core/api/SdkInfoConfig"));
+exports.SdkInfoConfig = SdkInfoConfig_1.default;
+const AbstractLocalComponentLoader_1 = require("./src/com/huawei/deveco/sdkmanager/core/loader/AbstractLocalComponentLoader");
+Object.defineProperty(exports, "AbstractLocalComponentLoader", { enumerable: true, get: function () { return AbstractLocalComponentLoader_1.AbstractLocalComponentLoader; } });
+const OhSdkInfoHandler_1 = __importDefault(require("./src/com/huawei/deveco/sdkmanager/ohos/api/OhSdkInfoHandler"));
+exports.OhSdkInfoHandler = OhSdkInfoHandler_1.default;
+var CommonSdkInfoHandler_1 = require("./src/com/huawei/deveco/sdkmanager/core/api/CommonSdkInfoHandler");
+Object.defineProperty(exports, "CommonSdkInfoHandler", { enumerable: true, get: function () { return CommonSdkInfoHandler_1.CommonSdkInfoHandler; } });
+__exportStar(require("./src/com/huawei/deveco/sdkmanager/core/api/Component"), exports);
+__exportStar(require("./src/com/huawei/deveco/sdkmanager/core/constants/ComponentContants"), exports);
+__exportStar(require("./src/com/huawei/deveco/sdkmanager/core/loader/ComponentDto"), exports);
+__exportStar(require("./src/com/huawei/deveco/sdkmanager/core/util/Utils"), exports);
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/CommonSdkInfoHandler.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/CommonSdkInfoHandler.d.ts
new file mode 100644
index 0000000..ed31e9a
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/CommonSdkInfoHandler.d.ts
@@ -0,0 +1,16 @@
+import { SdkInfoHandler } from './SdkInfoHandler';
+import PathAndApiVersion from './PathAndApiVersion';
+import { Component } from './Component';
+import { SdkSettings } from '../domain/SdkSettings';
+export declare abstract class CommonSdkInfoHandler implements SdkInfoHandler {
+ protected sdkSettings: SdkSettings;
+ protected constructor(sdkSettings: SdkSettings);
+ getLocalSdks(): Map;
+ /**
+ * 加载本地的sdk
+ * @protected
+ * @return
+ */
+ protected abstract getLocalComponents(): Component[] | null;
+ private mapComponents;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/CommonSdkInfoHandler.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/CommonSdkInfoHandler.js
new file mode 100644
index 0000000..c0d343c
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/CommonSdkInfoHandler.js
@@ -0,0 +1,31 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CommonSdkInfoHandler = void 0;
+const PathAndApiVersion_1 = __importDefault(require("./PathAndApiVersion"));
+const Utils_1 = require("../util/Utils");
+class CommonSdkInfoHandler {
+ constructor(sdkSettings) {
+ this.sdkSettings = sdkSettings;
+ }
+ getLocalSdks() {
+ const localComponents = this.getLocalComponents();
+ if (localComponents == null) {
+ return new Map();
+ }
+ return this.mapComponents(localComponents);
+ }
+ mapComponents(components) {
+ let map = components.map(value => {
+ let tuple = [
+ new PathAndApiVersion_1.default(value.getPath(), value.getApiVersion()),
+ value,
+ ];
+ return tuple;
+ });
+ return new Utils_1.PathAndApiMap(map);
+ }
+}
+exports.CommonSdkInfoHandler = CommonSdkInfoHandler;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/Component.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/Component.d.ts
new file mode 100644
index 0000000..d4567b6
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/Component.d.ts
@@ -0,0 +1,16 @@
+export interface Component extends Comparable {
+ getPath(): string;
+ getVersion(): string;
+ getApiVersion(): number;
+ getReleaseType(): string;
+ getDisplayName(): string;
+ getLocation(): string | undefined;
+ hasApiVersion(): boolean;
+ getMeta(): Meta | undefined;
+}
+export interface Meta {
+ getMetaVersion(): string;
+}
+export interface Comparable {
+ compareTo(other: T): number;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/Component.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/Component.js
new file mode 100644
index 0000000..c8ad2e5
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/Component.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/ErrorTip.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/ErrorTip.d.ts
new file mode 100644
index 0000000..1c9b251
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/ErrorTip.d.ts
@@ -0,0 +1,9 @@
+export default class ErrorTip {
+ reason: string;
+ fixSuggestion: string;
+ constructor(reason: string, fixSuggestion: string);
+ /**
+ * 获取标准格式的错误信息
+ */
+ getMessage(): string;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/ErrorTip.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/ErrorTip.js
new file mode 100644
index 0000000..462a465
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/ErrorTip.js
@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class ErrorTip {
+ constructor(reason, fixSuggestion) {
+ this.reason = reason;
+ this.fixSuggestion = fixSuggestion;
+ }
+ /**
+ * 获取标准格式的错误信息
+ */
+ getMessage() {
+ return 'Cause: ' + this.reason + '\n' + 'Solution: ' + this.fixSuggestion;
+ }
+}
+exports.default = ErrorTip;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/PathAndApiVersion.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/PathAndApiVersion.d.ts
new file mode 100644
index 0000000..7bea5ea
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/PathAndApiVersion.d.ts
@@ -0,0 +1,6 @@
+export default class PathAndApiVersion {
+ private readonly path;
+ private readonly apiVersion;
+ constructor(path: string, apiVersion: number);
+ equals(other: PathAndApiVersion): boolean;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/PathAndApiVersion.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/PathAndApiVersion.js
new file mode 100644
index 0000000..a8d3d29
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/PathAndApiVersion.js
@@ -0,0 +1,12 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class PathAndApiVersion {
+ constructor(path, apiVersion) {
+ this.path = path;
+ this.apiVersion = apiVersion;
+ }
+ equals(other) {
+ return this.path === other.path && this.apiVersion === other.apiVersion;
+ }
+}
+exports.default = PathAndApiVersion;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkException.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkException.d.ts
new file mode 100644
index 0000000..38f0ca4
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkException.d.ts
@@ -0,0 +1,9 @@
+import ErrorTip from './ErrorTip';
+/**
+ * sdklib库对外抛出的异常
+ */
+export default class SdkException extends Error {
+ private readonly errorTip;
+ constructor(msg: string | undefined, errorTip: ErrorTip);
+ getErrorTip(): ErrorTip;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkException.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkException.js
new file mode 100644
index 0000000..47ca42e
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkException.js
@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * sdklib库对外抛出的异常
+ */
+class SdkException extends Error {
+ constructor(msg = '', errorTip) {
+ super(msg);
+ this.errorTip = errorTip;
+ }
+ getErrorTip() {
+ return this.errorTip;
+ }
+}
+exports.default = SdkException;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoConfig.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoConfig.d.ts
new file mode 100644
index 0000000..18c3fad
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoConfig.d.ts
@@ -0,0 +1,13 @@
+/**
+ * 用法示例
+ * SdkInfoConfig sdkInfoConfig = SdkInfoConfig.create(sdkRoot);
+ */
+export default class SdkInfoConfig {
+ private sdkRoot;
+ /**
+ * 静态方法构造方法
+ * @param sdkRoot
+ */
+ static create(sdkRoot: string): SdkInfoConfig;
+ getSdkRoot(): string;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoConfig.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoConfig.js
new file mode 100644
index 0000000..f217505
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoConfig.js
@@ -0,0 +1,33 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const Utils_1 = require("../util/Utils");
+const SdkException_1 = __importDefault(require("./SdkException"));
+const ErrorTip_1 = __importDefault(require("./ErrorTip"));
+/**
+ * 用法示例
+ * SdkInfoConfig sdkInfoConfig = SdkInfoConfig.create(sdkRoot);
+ */
+class SdkInfoConfig {
+ constructor() {
+ this.sdkRoot = '';
+ }
+ /**
+ * 静态方法构造方法
+ * @param sdkRoot
+ */
+ static create(sdkRoot) {
+ if ((0, Utils_1.isEmpty)(sdkRoot)) {
+ throw new SdkException_1.default('sdkRoot should not be empty', new ErrorTip_1.default('', ''));
+ }
+ const sdkInfoConfig = new SdkInfoConfig();
+ sdkInfoConfig.sdkRoot = sdkRoot;
+ return sdkInfoConfig;
+ }
+ getSdkRoot() {
+ return this.sdkRoot;
+ }
+}
+exports.default = SdkInfoConfig;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoHandler.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoHandler.d.ts
new file mode 100644
index 0000000..9503995
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoHandler.d.ts
@@ -0,0 +1,10 @@
+import { Component } from './Component';
+import PathAndApiVersion from './PathAndApiVersion';
+export interface SdkInfoHandler {
+ /**
+ * 获取本地已安装的SDK
+ *
+ * @return 本地已安装sdk集合
+ */
+ getLocalSdks(): Map;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoHandler.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoHandler.js
new file mode 100644
index 0000000..c8ad2e5
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/api/SdkInfoHandler.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/constants/ComponentContants.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/constants/ComponentContants.d.ts
new file mode 100644
index 0000000..fce764a
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/constants/ComponentContants.d.ts
@@ -0,0 +1,25 @@
+/**
+ * version正则表达式
+ */
+export declare const VERSION_PATTERN: RegExp;
+/**
+ * metaVersion字段的正则表达式
+ */
+export declare const META_VERSION_PATTERN: RegExp;
+/**
+ * sdk元数据中没有meta字段时,默认的meta里面的metaVersion值
+ */
+export declare const VERSION_2_0_0 = "2.0.0";
+/**
+ * sdk的path属性枚举
+ */
+export declare enum ComponentPath {
+ JAVA = "java",
+ JS = "js",
+ NATIVE = "native",
+ PREVIEWER = "previewer",
+ TOOLCHAINS = "toolchains",
+ EMULATOR = "emulator",
+ ETS = "ets",
+ COMMAND_LINE_TOOLS = "command-line-tools"
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/constants/ComponentContants.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/constants/ComponentContants.js
new file mode 100644
index 0000000..32f5b2d
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/constants/ComponentContants.js
@@ -0,0 +1,29 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ComponentPath = exports.VERSION_2_0_0 = exports.META_VERSION_PATTERN = exports.VERSION_PATTERN = void 0;
+/**
+ * version正则表达式
+ */
+exports.VERSION_PATTERN = /^(\d+)(\.\d+){3}$/;
+/**
+ * metaVersion字段的正则表达式
+ */
+exports.META_VERSION_PATTERN = /^(\d+)(\.\d+){2}$/;
+/**
+ * sdk元数据中没有meta字段时,默认的meta里面的metaVersion值
+ */
+exports.VERSION_2_0_0 = '2.0.0';
+/**
+ * sdk的path属性枚举
+ */
+var ComponentPath;
+(function (ComponentPath) {
+ ComponentPath["JAVA"] = "java";
+ ComponentPath["JS"] = "js";
+ ComponentPath["NATIVE"] = "native";
+ ComponentPath["PREVIEWER"] = "previewer";
+ ComponentPath["TOOLCHAINS"] = "toolchains";
+ ComponentPath["EMULATOR"] = "emulator";
+ ComponentPath["ETS"] = "ets";
+ ComponentPath["COMMAND_LINE_TOOLS"] = "command-line-tools";
+})(ComponentPath = exports.ComponentPath || (exports.ComponentPath = {}));
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/domain/SdkSettings.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/domain/SdkSettings.d.ts
new file mode 100644
index 0000000..1cc0dfc
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/domain/SdkSettings.d.ts
@@ -0,0 +1,3 @@
+export interface SdkSettings {
+ getLocation(): string;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/domain/SdkSettings.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/domain/SdkSettings.js
new file mode 100644
index 0000000..c8ad2e5
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/domain/SdkSettings.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/AbstractLocalComponentLoader.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/AbstractLocalComponentLoader.d.ts
new file mode 100644
index 0000000..6ed437e
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/AbstractLocalComponentLoader.d.ts
@@ -0,0 +1,90 @@
+import { ComponentDto } from './ComponentDto';
+import { Logger } from '../log/Logger';
+import SimpleLogger from '../log/SimpleLogger';
+import { Component } from '../api/Component';
+export declare abstract class AbstractLocalComponentLoader {
+ /**
+ * 临时文件夹
+ * @private
+ */
+ private readonly TEMP_PREFIX;
+ /**
+ * 扫描的最大深度
+ * @private
+ */
+ private readonly maxScanDepth;
+ /**
+ * sdk根路径
+ * @private
+ */
+ protected readonly sdkRoot: string;
+ /**
+ * 日志
+ * @protected
+ */
+ protected readonly logger: Logger;
+ protected constructor(maxScanDepth: number, sdkRoot: string, logger?: SimpleLogger);
+ /**
+ * 加载本地的sdk
+ */
+ load(): Component[];
+ /**
+ * 获取元数据文件名称
+ * @protected
+ */
+ protected abstract getUniPackageName(): string;
+ /**
+ * 将扫描到的文件转换为Component
+ * @param potentialUniPackages
+ * @protected
+ */
+ protected parseSdks(potentialUniPackages: string[]): Component[];
+ /**
+ * 将json字符串转换为ComponentDto类
+ * @param jsonObject
+ * @protected
+ */
+ protected convertComponent(jsonObject: any): ComponentDto;
+ /**
+ * 查找json里面的meta字段信息,需要子类重写
+ * @param jsonObject
+ * @param component
+ * @protected
+ */
+ protected abstract configMeta(jsonObject: any, component: ComponentDto): void;
+ /**
+ * 校验sdk的路径
+ *
+ * @param component
+ * @param uniPackage
+ * @protected
+ */
+ protected isComponentInRightPlace(component: ComponentDto, uniPackage: string): boolean;
+ private addToMap;
+ /**
+ * 使用非递归方式扫描指定sdk根路径下潜在的sdk元数据文件
+ * @param root
+ * @protected
+ */
+ protected findPotentialSdks(root: string): string[];
+ private needScan;
+ /**
+ * 校验Component
+ * @param component
+ * @protected
+ */
+ protected isValidComponent(component: Component): boolean;
+ /**
+ * 获取sdk的路径
+ * @param component
+ * @param sdkRoot
+ * @protected
+ */
+ protected getLocation(component: ComponentDto, sdkRoot: string): string | undefined;
+ /**
+ * 将path属性中的逗号替换成文件分隔符
+ * @param componentPath
+ * @protected
+ */
+ protected resolveComponentPath(componentPath: string): string;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/AbstractLocalComponentLoader.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/AbstractLocalComponentLoader.js
new file mode 100644
index 0000000..965b676
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/AbstractLocalComponentLoader.js
@@ -0,0 +1,227 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AbstractLocalComponentLoader = void 0;
+const Utils_1 = require("../util/Utils");
+const OhComponentConstants_1 = require("../../ohos/const/OhComponentConstants");
+const path_1 = __importDefault(require("path"));
+const fs_1 = __importDefault(require("fs"));
+const ComponentDto_1 = require("./ComponentDto");
+const SimpleLogger_1 = __importDefault(require("../log/SimpleLogger"));
+const ComponentContants_1 = require("../constants/ComponentContants");
+class AbstractLocalComponentLoader {
+ constructor(maxScanDepth, sdkRoot, logger = new SimpleLogger_1.default()) {
+ /**
+ * 临时文件夹
+ * @private
+ */
+ this.TEMP_PREFIX = ['.temp', '.delete'];
+ this.maxScanDepth = maxScanDepth;
+ this.sdkRoot = sdkRoot;
+ this.logger = logger;
+ }
+ /**
+ * 加载本地的sdk
+ */
+ load() {
+ const potentialUniPackages = this.findPotentialSdks(this.sdkRoot);
+ return this.parseSdks(potentialUniPackages);
+ }
+ /**
+ * 将扫描到的文件转换为Component
+ * @param potentialUniPackages
+ * @protected
+ */
+ parseSdks(potentialUniPackages) {
+ const sdkMap = new Map();
+ for (const uniPackage of potentialUniPackages) {
+ try {
+ const buffer = fs_1.default.readFileSync(uniPackage, { encoding: 'utf-8' });
+ const parse = JSON.parse(buffer);
+ const component = this.convertComponent(parse);
+ if (!this.isValidComponent(component)) {
+ continue;
+ }
+ if (!this.isComponentInRightPlace(component, uniPackage)) {
+ this.logger.debug('component ' +
+ component.getDisplayName() +
+ ':' +
+ component.getVersion() +
+ ' has been placed in the wrong place, expect ' +
+ component.getLocation() +
+ ', actual ' +
+ path_1.default.resolve(uniPackage, '..'));
+ continue;
+ }
+ this.addToMap(sdkMap, component);
+ }
+ catch (e) {
+ this.logger.warn('Failed to get unipackage Info');
+ }
+ }
+ const sdks = [];
+ sdkMap.forEach(value => sdks.push(value));
+ return sdks;
+ }
+ /**
+ * 将json字符串转换为ComponentDto类
+ * @param jsonObject
+ * @protected
+ */
+ convertComponent(jsonObject) {
+ const componentDto = new ComponentDto_1.ComponentDto();
+ componentDto.path = jsonObject.path;
+ componentDto.version = jsonObject.version;
+ componentDto.releaseType = jsonObject.releaseType;
+ componentDto.displayName = jsonObject.displayName;
+ const apiVersion = Number(jsonObject.apiVersion);
+ if (!Number.isNaN(apiVersion)) {
+ componentDto.apiVersion = apiVersion;
+ }
+ componentDto.location = this.getLocation(componentDto, this.sdkRoot);
+ this.configMeta(jsonObject, componentDto);
+ return componentDto;
+ }
+ /**
+ * 校验sdk的路径
+ *
+ * @param component
+ * @param uniPackage
+ * @protected
+ */
+ isComponentInRightPlace(component, uniPackage) {
+ return component.getLocation() === path_1.default.resolve(uniPackage, '..');
+ }
+ addToMap(sdkMap, component) {
+ let key;
+ if (component.hasApiVersion()) {
+ key = component.getPath() + '#' + component.getApiVersion();
+ }
+ else {
+ key = component.getPath();
+ }
+ const oldComponent = sdkMap.get(key);
+ if (oldComponent === null || oldComponent === undefined || oldComponent.compareTo(component) < 0) {
+ sdkMap.set(key, component);
+ return;
+ }
+ }
+ /**
+ * 使用非递归方式扫描指定sdk根路径下潜在的sdk元数据文件
+ * @param root
+ * @protected
+ */
+ findPotentialSdks(root) {
+ const potentialUniPackage = [];
+ if (root === null || root === undefined) {
+ return potentialUniPackage;
+ }
+ const stats = (0, Utils_1.fsStateSync)(root);
+ if (stats === undefined || !stats.isDirectory()) {
+ return potentialUniPackage;
+ }
+ if (!this.needScan(path_1.default.basename(root))) {
+ return potentialUniPackage;
+ }
+ const depthMap = new Map();
+ const stack = [];
+ stack.push(root);
+ depthMap.set(root, 1);
+ while (stack.length !== 0) {
+ const rootPath = stack.pop();
+ const depth = depthMap.get(rootPath);
+ if (depth > this.maxScanDepth || !this.needScan(path_1.default.basename(rootPath))) {
+ continue;
+ }
+ // fs.readdirSync返回的路径仅仅是文件夹的名称,不是绝对路径
+ for (let childPath of fs_1.default.readdirSync(rootPath)) {
+ childPath = path_1.default.resolve(rootPath, childPath);
+ const uniPackageFile = path_1.default.resolve(childPath, this.getUniPackageName());
+ const uniPackageFileStats = (0, Utils_1.fsStateSync)(uniPackageFile);
+ if (uniPackageFileStats !== undefined && uniPackageFileStats.isFile()) {
+ potentialUniPackage.push(uniPackageFile);
+ continue;
+ }
+ const childPathStates = (0, Utils_1.fsStateSync)(childPath);
+ if (childPathStates === undefined ||
+ !childPathStates.isDirectory() ||
+ !this.needScan(path_1.default.basename(childPath))) {
+ continue;
+ }
+ stack.push(childPath);
+ depthMap.set(childPath, depth + 1);
+ }
+ }
+ return potentialUniPackage;
+ }
+ needScan(dirName) {
+ for (const tempPrefix of this.TEMP_PREFIX) {
+ if (dirName.startsWith(tempPrefix)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * 校验Component
+ * @param component
+ * @protected
+ */
+ isValidComponent(component) {
+ if ((0, Utils_1.isEmpty)(component.getPath())) {
+ this.logger.warn('path is empty');
+ return false;
+ }
+ if ((0, Utils_1.isEmpty)(component.getDisplayName())) {
+ this.logger.warn('displayName is empty');
+ return false;
+ }
+ if ((0, Utils_1.isEmpty)(component.getVersion())) {
+ this.logger.warn('version is empty');
+ return false;
+ }
+ if (!ComponentContants_1.VERSION_PATTERN.test(component.getVersion())) {
+ this.logger.warn('Illegal component ' + component.getDisplayName() + ':' + component.getVersion() + ', version is incorrect');
+ return false;
+ }
+ if (component.getApiVersion() === undefined || component.getApiVersion() < 0) {
+ this.logger.warn(component.getDisplayName() + ':' + component.getVersion() + ' apiVersion should not be less than 0');
+ return false;
+ }
+ if ((0, Utils_1.isEmpty)(component.getLocation())) {
+ this.logger.warn('Illegal component ' + component.getDisplayName() + ':' + component.getVersion() + ', location' + ' is null');
+ return false;
+ }
+ return true;
+ }
+ /**
+ * 获取sdk的路径
+ * @param component
+ * @param sdkRoot
+ * @protected
+ */
+ getLocation(component, sdkRoot) {
+ const componentPath = component.getPath();
+ if ((0, Utils_1.isEmpty)(componentPath)) {
+ return undefined;
+ }
+ if (component.hasApiVersion()) {
+ if (componentPath.startsWith(OhComponentConstants_1.IMAGE_PATH_PREFIX)) {
+ return path_1.default.resolve(sdkRoot, this.resolveComponentPath(componentPath), component.getApiVersion() + '');
+ }
+ return path_1.default.resolve(sdkRoot, this.resolveComponentPath(componentPath), component.getVersion());
+ }
+ return path_1.default.resolve(sdkRoot, this.resolveComponentPath(componentPath));
+ }
+ /**
+ * 将path属性中的逗号替换成文件分隔符
+ * @param componentPath
+ * @protected
+ */
+ resolveComponentPath(componentPath) {
+ return componentPath.replace(',', path_1.default.sep);
+ }
+}
+exports.AbstractLocalComponentLoader = AbstractLocalComponentLoader;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/ComponentDto.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/ComponentDto.d.ts
new file mode 100644
index 0000000..707ff87
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/ComponentDto.d.ts
@@ -0,0 +1,23 @@
+import { Component, Meta } from '../api/Component';
+export declare class ComponentDto implements Component {
+ apiVersion: number;
+ displayName: string;
+ location: string | undefined;
+ meta: Meta | undefined;
+ path: string;
+ releaseType: string;
+ version: string;
+ compareTo(other: Component): number;
+ getApiVersion(): number;
+ getDisplayName(): string;
+ getLocation(): string | undefined;
+ getMeta(): Meta | undefined;
+ getPath(): string;
+ getReleaseType(): string;
+ getVersion(): string;
+ hasApiVersion(): boolean;
+}
+export declare class MetaDto implements Meta {
+ metaVersion: string;
+ getMetaVersion(): string;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/ComponentDto.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/ComponentDto.js
new file mode 100644
index 0000000..89fc301
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/loader/ComponentDto.js
@@ -0,0 +1,58 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MetaDto = exports.ComponentDto = void 0;
+const Utils_1 = require("../util/Utils");
+class ComponentDto {
+ constructor() {
+ this.apiVersion = 0;
+ this.displayName = '';
+ this.path = '';
+ this.releaseType = '';
+ this.version = '';
+ }
+ compareTo(other) {
+ const comparePath = this.path.localeCompare(other.getPath());
+ if (comparePath !== 0) {
+ return comparePath;
+ }
+ const compareApiVersion = this.apiVersion - other.getApiVersion();
+ if (compareApiVersion !== 0) {
+ return compareApiVersion;
+ }
+ return (0, Utils_1.compareVersion)(this.version, other.getVersion());
+ }
+ getApiVersion() {
+ return this.apiVersion;
+ }
+ getDisplayName() {
+ return this.displayName;
+ }
+ getLocation() {
+ return this.location;
+ }
+ getMeta() {
+ return this.meta;
+ }
+ getPath() {
+ return this.path;
+ }
+ getReleaseType() {
+ return this.releaseType;
+ }
+ getVersion() {
+ return this.version;
+ }
+ hasApiVersion() {
+ return this.apiVersion > 0;
+ }
+}
+exports.ComponentDto = ComponentDto;
+class MetaDto {
+ constructor() {
+ this.metaVersion = '';
+ }
+ getMetaVersion() {
+ return this.metaVersion;
+ }
+}
+exports.MetaDto = MetaDto;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/Logger.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/Logger.d.ts
new file mode 100644
index 0000000..26ccb70
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/Logger.d.ts
@@ -0,0 +1,32 @@
+export interface Logger {
+ /**
+ * trace级别
+ * @param log
+ */
+ trace(log: string): void;
+ /**
+ * debug级别
+ * @param log
+ */
+ debug(log: string): void;
+ /**
+ * info级别
+ * @param log
+ */
+ info(log: string): void;
+ /**
+ * warn级别
+ * @param log
+ */
+ warn(log: string): void;
+ /**
+ * error级别
+ * @param log
+ */
+ error(log: string): void;
+ /**
+ * fatal级别
+ * @param log
+ */
+ fatal(log: string): void;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/Logger.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/Logger.js
new file mode 100644
index 0000000..c8ad2e5
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/Logger.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/SimpleLogger.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/SimpleLogger.d.ts
new file mode 100644
index 0000000..77ed765
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/SimpleLogger.d.ts
@@ -0,0 +1,9 @@
+import { Logger } from './Logger';
+export default class SimpleLogger implements Logger {
+ debug(log: string): void;
+ error(log: string): void;
+ fatal(log: string): void;
+ info(log: string): void;
+ trace(log: string): void;
+ warn(log: string): void;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/SimpleLogger.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/SimpleLogger.js
new file mode 100644
index 0000000..4df3873
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/log/SimpleLogger.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class SimpleLogger {
+ debug(log) { }
+ error(log) {
+ console.error(log);
+ }
+ fatal(log) {
+ console.error(log);
+ }
+ info(log) {
+ console.info(log);
+ }
+ trace(log) {
+ console.trace(log);
+ }
+ warn(log) {
+ console.warn(log);
+ }
+}
+exports.default = SimpleLogger;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/util/Utils.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/util/Utils.d.ts
new file mode 100644
index 0000000..8ad15d9
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/util/Utils.d.ts
@@ -0,0 +1,26 @@
+///
+import { Stats } from 'fs';
+import PathAndApiVersion from '../api/PathAndApiVersion';
+import { Component } from '../api/Component';
+/**
+ * 比较版本号的方法,版本号的格式是以[0-9]+\.的形式组成,例如1.0.0.0
+ * 如果字符串不是以上面的规则组成,则直接进行字符串比较
+ * @param first
+ * @param second
+ */
+export declare function compareVersion(first: string, second: string): number;
+/**
+ * 判断值是否为null、undefined、''
+ * @param value
+ */
+export declare function isEmpty(value: string | undefined | null): boolean;
+/**
+ * 当文件不存在时,fs.statSync方法会抛异常,需要catch一下
+ * @param filePath
+ * @private
+ */
+export declare function fsStateSync(filePath: string): Stats | undefined;
+export declare class PathAndApiMap extends Map {
+ constructor(entries?: readonly (readonly [PathAndApiVersion, Component])[] | null);
+ get(key: PathAndApiVersion): Component | undefined;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/util/Utils.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/util/Utils.js
new file mode 100644
index 0000000..b512366
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/core/util/Utils.js
@@ -0,0 +1,88 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PathAndApiMap = exports.fsStateSync = exports.isEmpty = exports.compareVersion = void 0;
+const fs = __importStar(require("fs"));
+/**
+ * 比较版本号的方法,版本号的格式是以[0-9]+\.的形式组成,例如1.0.0.0
+ * 如果字符串不是以上面的规则组成,则直接进行字符串比较
+ * @param first
+ * @param second
+ */
+function compareVersion(first, second) {
+ const version1 = first.split('.');
+ const version2 = second.split('.');
+ for (let i = 0; i < version1.length; i++) {
+ const number1 = Number(version1[i]);
+ const number2 = Number(version2[i]);
+ if (Number.isNaN(number1) || Number.isNaN(number2)) {
+ return first.localeCompare(second);
+ }
+ const result = number1 - number2;
+ if (result === 0) {
+ continue;
+ }
+ else if (result > 0) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
+ }
+ return 0;
+}
+exports.compareVersion = compareVersion;
+/**
+ * 判断值是否为null、undefined、''
+ * @param value
+ */
+function isEmpty(value) {
+ return value === null || value === undefined || value.length === 0;
+}
+exports.isEmpty = isEmpty;
+/**
+ * 当文件不存在时,fs.statSync方法会抛异常,需要catch一下
+ * @param filePath
+ * @private
+ */
+function fsStateSync(filePath) {
+ try {
+ return fs.statSync(filePath);
+ }
+ catch (e) {
+ return undefined;
+ }
+}
+exports.fsStateSync = fsStateSync;
+class PathAndApiMap extends Map {
+ constructor(entries) {
+ super(entries);
+ }
+ get(key) {
+ for (let key1 of this.keys()) {
+ if (key.equals(key1)) {
+ return super.get(key1);
+ }
+ }
+ return undefined;
+ }
+}
+exports.PathAndApiMap = PathAndApiMap;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/api/OhSdkInfoHandler.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/api/OhSdkInfoHandler.d.ts
new file mode 100644
index 0000000..253340c
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/api/OhSdkInfoHandler.d.ts
@@ -0,0 +1,7 @@
+import { CommonSdkInfoHandler } from '../../core/api/CommonSdkInfoHandler';
+import { Component } from '../../core/api/Component';
+import SdkInfoConfig from '../../core/api/SdkInfoConfig';
+export default class OhSdkInfoHandler extends CommonSdkInfoHandler {
+ constructor(sdkInfoConfig: SdkInfoConfig);
+ protected getLocalComponents(): Component[] | null;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/api/OhSdkInfoHandler.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/api/OhSdkInfoHandler.js
new file mode 100644
index 0000000..3548e3a
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/api/OhSdkInfoHandler.js
@@ -0,0 +1,17 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const CommonSdkInfoHandler_1 = require("../../core/api/CommonSdkInfoHandler");
+const OhosLocalComponentLoader_1 = __importDefault(require("../loader/OhosLocalComponentLoader"));
+const OhSdkInfoSettings_1 = __importDefault(require("../domain/OhSdkInfoSettings"));
+class OhSdkInfoHandler extends CommonSdkInfoHandler_1.CommonSdkInfoHandler {
+ constructor(sdkInfoConfig) {
+ super(new OhSdkInfoSettings_1.default(sdkInfoConfig));
+ }
+ getLocalComponents() {
+ return new OhosLocalComponentLoader_1.default(this.sdkSettings.getLocation()).load();
+ }
+}
+exports.default = OhSdkInfoHandler;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/const/OhComponentConstants.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/const/OhComponentConstants.d.ts
new file mode 100644
index 0000000..1caee3c
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/const/OhComponentConstants.d.ts
@@ -0,0 +1,20 @@
+/**
+ * 当前SdkManager可以处理的sdk版本,往往与sdk元数据的meta字段中的metaVersion相对应
+ */
+export declare const SUPPORT_META_VERSION = "3.0.0";
+/**
+ * 模拟器镜像的path的前缀
+ */
+export declare const IMAGE_PATH_PREFIX = "system-image";
+/**
+ * 需要进行迁移的toolchains版本号
+ */
+export declare const MIGRATE_TOOLCHAINS_VERSION: string[];
+/**
+ * 需要卸载的toolchains版本号
+ */
+export declare const NEED_DELETE_TOOLCHAINS_VERSION: string[];
+/**
+ * 识别需要迁移的toolchains时设置的api version
+ */
+export declare const MIGRATE_TOOLCHAINS_API_VERSION = 7;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/const/OhComponentConstants.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/const/OhComponentConstants.js
new file mode 100644
index 0000000..8274951
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/const/OhComponentConstants.js
@@ -0,0 +1,23 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MIGRATE_TOOLCHAINS_API_VERSION = exports.NEED_DELETE_TOOLCHAINS_VERSION = exports.MIGRATE_TOOLCHAINS_VERSION = exports.IMAGE_PATH_PREFIX = exports.SUPPORT_META_VERSION = void 0;
+/**
+ * 当前SdkManager可以处理的sdk版本,往往与sdk元数据的meta字段中的metaVersion相对应
+ */
+exports.SUPPORT_META_VERSION = '3.0.0';
+/**
+ * 模拟器镜像的path的前缀
+ */
+exports.IMAGE_PATH_PREFIX = 'system-image';
+/**
+ * 需要进行迁移的toolchains版本号
+ */
+exports.MIGRATE_TOOLCHAINS_VERSION = ['3.0.0.0'];
+/**
+ * 需要卸载的toolchains版本号
+ */
+exports.NEED_DELETE_TOOLCHAINS_VERSION = ['3.1.0.0'];
+/**
+ * 识别需要迁移的toolchains时设置的api version
+ */
+exports.MIGRATE_TOOLCHAINS_API_VERSION = 7;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/domain/OhSdkInfoSettings.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/domain/OhSdkInfoSettings.d.ts
new file mode 100644
index 0000000..547b363
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/domain/OhSdkInfoSettings.d.ts
@@ -0,0 +1,7 @@
+import { SdkSettings } from '../../core/domain/SdkSettings';
+import SdkInfoConfig from '../../core/api/SdkInfoConfig';
+export default class OhSdkInfoSettings implements SdkSettings {
+ private sdkInfoConfig;
+ constructor(sdkInfoConfig: SdkInfoConfig);
+ getLocation(): string;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/domain/OhSdkInfoSettings.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/domain/OhSdkInfoSettings.js
new file mode 100644
index 0000000..4eae436
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/domain/OhSdkInfoSettings.js
@@ -0,0 +1,11 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class OhSdkInfoSettings {
+ constructor(sdkInfoConfig) {
+ this.sdkInfoConfig = sdkInfoConfig;
+ }
+ getLocation() {
+ return this.sdkInfoConfig.getSdkRoot();
+ }
+}
+exports.default = OhSdkInfoSettings;
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/loader/OhosLocalComponentLoader.d.ts b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/loader/OhosLocalComponentLoader.d.ts
new file mode 100644
index 0000000..757732f
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/loader/OhosLocalComponentLoader.d.ts
@@ -0,0 +1,18 @@
+import { AbstractLocalComponentLoader } from '../../core/loader/AbstractLocalComponentLoader';
+import { Logger } from '../../core/log/Logger';
+import { ComponentDto } from '../../core/loader/ComponentDto';
+import { Component } from '../../core/api/Component';
+export default class OhosLocalComponentLoader extends AbstractLocalComponentLoader {
+ private static MAX_SCAN_DEPTH;
+ private static UNI_PACKAGE_NAME;
+ private legacyComponents;
+ constructor(sdkRoot: string, logger?: Logger);
+ protected configMeta(jsonObject: any, dto: ComponentDto): void;
+ protected isComponentInRightPlace(component: ComponentDto, uniPackage: string): boolean;
+ protected getLocation(component: ComponentDto, sdkRoot: string): string | undefined;
+ protected getUniPackageName(): string;
+ /**
+ * 获取不兼容的sdk
+ */
+ getLegacyComponents(): Array;
+}
diff --git a/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/loader/OhosLocalComponentLoader.js b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/loader/OhosLocalComponentLoader.js
new file mode 100644
index 0000000..8b06c1a
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/build/src/com/huawei/deveco/sdkmanager/ohos/loader/OhosLocalComponentLoader.js
@@ -0,0 +1,74 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const AbstractLocalComponentLoader_1 = require("../../core/loader/AbstractLocalComponentLoader");
+const Utils_1 = require("../../core/util/Utils");
+const ComponentContants_1 = require("../../core/constants/ComponentContants");
+const ComponentDto_1 = require("../../core/loader/ComponentDto");
+const OhComponentConstants_1 = require("../const/OhComponentConstants");
+const path_1 = __importDefault(require("path"));
+class OhosLocalComponentLoader extends AbstractLocalComponentLoader_1.AbstractLocalComponentLoader {
+ constructor(sdkRoot, logger) {
+ super(OhosLocalComponentLoader.MAX_SCAN_DEPTH, sdkRoot, logger);
+ this.legacyComponents = new Array();
+ }
+ configMeta(jsonObject, dto) {
+ const meta = jsonObject.meta;
+ if (meta === null || meta === undefined) {
+ return;
+ }
+ const metaDto = new ComponentDto_1.MetaDto();
+ const metaVersion = meta.metaVersion;
+ if ((0, Utils_1.isEmpty)(metaVersion)) {
+ return;
+ }
+ if (!ComponentContants_1.META_VERSION_PATTERN.test(metaVersion) || (0, Utils_1.compareVersion)(metaVersion, OhComponentConstants_1.SUPPORT_META_VERSION) != 0) {
+ this.logger.warn('Illegal component ' +
+ dto.getDisplayName() +
+ ':' +
+ dto.getVersion() +
+ ', Incorrect meta version ' +
+ metaVersion);
+ return;
+ }
+ metaDto.metaVersion = metaVersion;
+ }
+ isComponentInRightPlace(component, uniPackage) {
+ const isInRightPlace = super.isComponentInRightPlace(component, uniPackage);
+ if (isInRightPlace) {
+ if (ComponentContants_1.ComponentPath.TOOLCHAINS === component.getPath() &&
+ (OhComponentConstants_1.NEED_DELETE_TOOLCHAINS_VERSION.includes(component.getVersion()) || !component.hasApiVersion())) {
+ this.legacyComponents.push(component);
+ return false;
+ }
+ return true;
+ }
+ if (ComponentContants_1.ComponentPath.TOOLCHAINS === component.getPath() &&
+ OhComponentConstants_1.MIGRATE_TOOLCHAINS_VERSION.includes(component.getVersion())) {
+ component.location = path_1.default.resolve(uniPackage, '..');
+ this.legacyComponents.push(component);
+ }
+ return false;
+ }
+ getLocation(component, sdkRoot) {
+ if (ComponentContants_1.ComponentPath.TOOLCHAINS === component.getPath() &&
+ OhComponentConstants_1.MIGRATE_TOOLCHAINS_VERSION.includes(component.getVersion())) {
+ component.apiVersion = OhComponentConstants_1.MIGRATE_TOOLCHAINS_API_VERSION; // 需要迁移的toolchains的apiversion固定设置为7
+ }
+ return super.getLocation(component, sdkRoot);
+ }
+ getUniPackageName() {
+ return OhosLocalComponentLoader.UNI_PACKAGE_NAME;
+ }
+ /**
+ * 获取不兼容的sdk
+ */
+ getLegacyComponents() {
+ return this.legacyComponents;
+ }
+}
+exports.default = OhosLocalComponentLoader;
+OhosLocalComponentLoader.MAX_SCAN_DEPTH = 5;
+OhosLocalComponentLoader.UNI_PACKAGE_NAME = 'oh-uni-package.json';
diff --git a/node_modules/@ohos/sdkmanager-common/package.json b/node_modules/@ohos/sdkmanager-common/package.json
new file mode 100644
index 0000000..e7fa6bb
--- /dev/null
+++ b/node_modules/@ohos/sdkmanager-common/package.json
@@ -0,0 +1,65 @@
+{
+ "_args": [
+ [
+ "@ohos/sdkmanager-common@1.1.3",
+ "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1"
+ ]
+ ],
+ "_from": "@ohos/sdkmanager-common@1.1.3",
+ "_id": "@ohos/sdkmanager-common@1.1.3",
+ "_inBundle": false,
+ "_integrity": "sha512-d2uhVauDDJZIUvyyaWWoavG4N/jLyfF5IH5kEXKV6R8HNf3606H1zDQzA+UZtOfwwJFXhD9djRjnVFNB8xc7aw==",
+ "_location": "/@ohos/sdkmanager-common",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@ohos/sdkmanager-common@1.1.3",
+ "name": "@ohos/sdkmanager-common",
+ "escapedName": "@ohos%2fsdkmanager-common",
+ "scope": "@ohos",
+ "rawSpec": "1.1.3",
+ "saveSpec": null,
+ "fetchSpec": "1.1.3"
+ },
+ "_requiredBy": [
+ "/@ohos/hvigor-ohos-plugin"
+ ],
+ "_resolved": "https://repo.harmonyos.com/npm/@ohos/sdkmanager-common/-/@ohos/sdkmanager-common-1.1.3.tgz",
+ "_spec": "1.1.3",
+ "_where": "D:\\Desktop\\git\\Smart_watch_seven\\smart_watch_seven-1",
+ "author": {
+ "name": "huawei"
+ },
+ "description": "OpenHarmony SDK common lib",
+ "devDependencies": {
+ "@types/node": "^12.19.13",
+ "@typescript-eslint/eslint-plugin": "^4.13.0",
+ "@typescript-eslint/parser": "^4.13.0",
+ "eslint": "^7.17.0",
+ "eslint-config-prettier": "^7.1.0",
+ "eslint-plugin-prettier": "^3.3.1",
+ "prettier": "^2.2.1",
+ "typescript": "^4.1.3"
+ },
+ "files": [
+ "/build/src",
+ "/build/index.js",
+ "/build/index.d.ts"
+ ],
+ "keywords": [
+ "sdkmanager"
+ ],
+ "license": "SEE LICENSE IN LICENSE.txt",
+ "main": "build/index.js",
+ "name": "@ohos/sdkmanager-common",
+ "ohos": {
+ "org": "huawei"
+ },
+ "scripts": {
+ "build": "tsc",
+ "pretty": "prettier --write **/*.{ts,tsx,json,css}",
+ "report": "eslint --ext .js,.ts . -f checkstyle -o eslint.xml || exit 0"
+ },
+ "version": "1.1.3"
+}
diff --git a/node_modules/ajv/.runkit_example.js b/node_modules/ajv/.runkit_example.js
new file mode 100644
index 0000000..0d578d5
--- /dev/null
+++ b/node_modules/ajv/.runkit_example.js
@@ -0,0 +1,23 @@
+const Ajv = require("ajv")
+const ajv = new Ajv({allErrors: true})
+
+const schema = {
+ type: "object",
+ properties: {
+ foo: {type: "string"},
+ bar: {type: "number", maximum: 3},
+ },
+ required: ["foo", "bar"],
+ additionalProperties: false,
+}
+
+const validate = ajv.compile(schema)
+
+test({foo: "abc", bar: 2})
+test({foo: 2, bar: 4})
+
+function test(data) {
+ const valid = validate(data)
+ if (valid) console.log("Valid!")
+ else console.log("Invalid: " + ajv.errorsText(validate.errors))
+}
diff --git a/node_modules/ajv/LICENSE b/node_modules/ajv/LICENSE
new file mode 100644
index 0000000..139162a
--- /dev/null
+++ b/node_modules/ajv/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2021 Evgeny Poberezkin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/node_modules/ajv/README.md b/node_modules/ajv/README.md
new file mode 100644
index 0000000..aa3baaa
--- /dev/null
+++ b/node_modules/ajv/README.md
@@ -0,0 +1,193 @@
+
+
+
+
+# Ajv JSON schema validator
+
+The fastest JSON validator for Node.js and browser.
+
+Supports JSON Schema draft-04/06/07/2019-09/2020-12 ([draft-04 support](https://ajv.js.org/json-schema.html#draft-04) requires ajv-draft-04 package) and JSON Type Definition [RFC8927](https://datatracker.ietf.org/doc/rfc8927/).
+
+[](https://github.com/ajv-validator/ajv/actions?query=workflow%3Abuild)
+[](https://www.npmjs.com/package/ajv)
+[](https://www.npmjs.com/package/ajv)
+[](https://coveralls.io/github/ajv-validator/ajv?branch=master)
+[](https://simplex.chat/contact#/?v=1&smp=smp%3A%2F%2Fu2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU%3D%40smp4.simplex.im%2Fap4lMFzfXF8Hzmh-Vz0WNxp_1jKiOa-h%23MCowBQYDK2VuAyEAcdefddRvDfI8iAuBpztm_J3qFucj8MDZoVs_2EcMTzU%3D)
+[](https://gitter.im/ajv-validator/ajv)
+[](https://github.com/sponsors/epoberezkin)
+
+## Ajv sponsors
+
+[ ](https://www.mozilla.org) [ ](https://opencollective.com/ajv)
+
+[ ](https://opensource.microsoft.com) [ ](https://opencollective.com/ajv) [ ](https://opencollective.com/ajv)
+
+[ ](https://retool.com/?utm_source=sponsor&utm_campaign=ajv) [ ](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=enterprise) [ ](https://github.com/simplex-chat/simplex-chat) [ ](https://opencollective.com/ajv)
+
+## Contributing
+
+More than 100 people contributed to Ajv, and we would love to have you join the development. We welcome implementing new features that will benefit many users and ideas to improve our documentation.
+
+Please review [Contributing guidelines](./CONTRIBUTING.md) and [Code components](https://ajv.js.org/components.html).
+
+## Documentation
+
+All documentation is available on the [Ajv website](https://ajv.js.org).
+
+Some useful site links:
+- [Getting started](https://ajv.js.org/guide/getting-started.html)
+- [JSON Schema vs JSON Type Definition](https://ajv.js.org/guide/schema-language.html)
+- [API reference](https://ajv.js.org/api.html)
+- [Strict mode](https://ajv.js.org/strict-mode.html)
+- [Standalone validation code](https://ajv.js.org/standalone.html)
+- [Security considerations](https://ajv.js.org/security.html)
+- [Command line interface](https://ajv.js.org/packages/ajv-cli.html)
+- [Frequently Asked Questions](https://ajv.js.org/faq.html)
+
+## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
+
+Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
+
+Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
+
+Please sponsor Ajv via:
+
+- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
+- [Ajv Open Collective️](https://opencollective.com/ajv)
+
+Thank you.
+
+#### Open Collective sponsors
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Performance
+
+Ajv generates code to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
+
+Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
+
+- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
+- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
+- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
+- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
+
+Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
+
+[](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
+
+## Features
+
+- Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6):
+ - all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html))
+ - [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions:
+ - NEW: keyword [discriminator](https://ajv.js.org/json-schema.html#discriminator).
+ - keyword [nullable](https://ajv.js.org/json-schema.html#nullable).
+ - full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available)
+ - support of recursive references between schemas
+ - correct string lengths for strings with unicode pairs
+ - JSON Schema [formats](https://ajv.js.org/guide/formats.html) (with [ajv-formats](https://github.com/ajv-validator/ajv-formats) plugin).
+ - [validates schemas against meta-schema](https://ajv.js.org/api.html#api-validateschema)
+- NEW: supports [JSON Type Definition](https://datatracker.ietf.org/doc/rfc8927/):
+ - all keywords (see [JSON Type Definition schema forms](https://ajv.js.org/json-type-definition.html))
+ - meta-schema for JTD schemas
+ - "union" keyword and user-defined keywords (can be used inside "metadata" member of the schema)
+- supports [browsers](https://ajv.js.org/guide/environments.html#browsers) and Node.js 10.x - current
+- [asynchronous loading](https://ajv.js.org/guide/managing-schemas.html#asynchronous-schema-loading) of referenced schemas during compilation
+- "All errors" validation mode with [option allErrors](https://ajv.js.org/options.html#allerrors)
+- [error messages with parameters](https://ajv.js.org/api.html#validation-errors) describing error reasons to allow error message generation
+- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package
+- [removing-additional-properties](https://ajv.js.org/guide/modifying-data.html#removing-additional-properties)
+- [assigning defaults](https://ajv.js.org/guide/modifying-data.html#assigning-defaults) to missing properties and items
+- [coercing data](https://ajv.js.org/guide/modifying-data.html#coercing-data-types) to the types specified in `type` keywords
+- [user-defined keywords](https://ajv.js.org/guide/user-keywords.html)
+- additional extension keywords with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
+- [\$data reference](https://ajv.js.org/guide/combining-schemas.html#data-reference) to use values from the validated data as values for the schema keywords
+- [asynchronous validation](https://ajv.js.org/guide/async-validation.html) of user-defined formats and keywords
+
+## Install
+
+To install version 8:
+
+```
+npm install ajv
+```
+
+## Getting started
+
+Try it in the Node.js REPL: https://runkit.com/npm/ajv
+
+In JavaScript:
+
+```javascript
+// or ESM/TypeScript import
+import Ajv from "ajv"
+// Node.js require:
+const Ajv = require("ajv")
+
+const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
+
+const schema = {
+ type: "object",
+ properties: {
+ foo: {type: "integer"},
+ bar: {type: "string"}
+ },
+ required: ["foo"],
+ additionalProperties: false,
+}
+
+const data = {
+ foo: 1,
+ bar: "abc"
+}
+
+const validate = ajv.compile(schema)
+const valid = validate(data)
+if (!valid) console.log(validate.errors)
+```
+
+Learn how to use Ajv and see more examples in the [Guide: getting started](https://ajv.js.org/guide/getting-started.html)
+
+## Changes history
+
+See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases)
+
+**Please note**: [Changes in version 8.0.0](https://github.com/ajv-validator/ajv/releases/tag/v8.0.0)
+
+[Version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0)
+
+[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
+
+## Code of conduct
+
+Please review and follow the [Code of conduct](./CODE_OF_CONDUCT.md).
+
+Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
+
+## Security contact
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
+
+## Open-source software support
+
+Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
+
+## License
+
+[MIT](./LICENSE)
diff --git a/node_modules/ajv/dist/2019.d.ts b/node_modules/ajv/dist/2019.d.ts
new file mode 100644
index 0000000..5a391dd
--- /dev/null
+++ b/node_modules/ajv/dist/2019.d.ts
@@ -0,0 +1,17 @@
+import type { AnySchemaObject } from "./types";
+import AjvCore, { Options } from "./core";
+declare class Ajv2019 extends AjvCore {
+ constructor(opts?: Options);
+ _addVocabularies(): void;
+ _addDefaultMetaSchema(): void;
+ defaultMeta(): string | AnySchemaObject | undefined;
+}
+export default Ajv2019;
+export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
+export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
+export { SchemaCxt, SchemaObjCxt } from "./compile";
+export { KeywordCxt } from "./compile/validate";
+export { DefinedError } from "./vocabularies/errors";
+export { JSONType } from "./compile/rules";
+export { JSONSchemaType } from "./types/json-schema";
+export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
diff --git a/node_modules/ajv/dist/2019.js b/node_modules/ajv/dist/2019.js
new file mode 100644
index 0000000..89d7853
--- /dev/null
+++ b/node_modules/ajv/dist/2019.js
@@ -0,0 +1,55 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
+const core_1 = require("./core");
+const draft7_1 = require("./vocabularies/draft7");
+const dynamic_1 = require("./vocabularies/dynamic");
+const next_1 = require("./vocabularies/next");
+const unevaluated_1 = require("./vocabularies/unevaluated");
+const discriminator_1 = require("./vocabularies/discriminator");
+const json_schema_2019_09_1 = require("./refs/json-schema-2019-09");
+const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema";
+class Ajv2019 extends core_1.default {
+ constructor(opts = {}) {
+ super({
+ ...opts,
+ dynamicRef: true,
+ next: true,
+ unevaluated: true,
+ });
+ }
+ _addVocabularies() {
+ super._addVocabularies();
+ this.addVocabulary(dynamic_1.default);
+ draft7_1.default.forEach((v) => this.addVocabulary(v));
+ this.addVocabulary(next_1.default);
+ this.addVocabulary(unevaluated_1.default);
+ if (this.opts.discriminator)
+ this.addKeyword(discriminator_1.default);
+ }
+ _addDefaultMetaSchema() {
+ super._addDefaultMetaSchema();
+ const { $data, meta } = this.opts;
+ if (!meta)
+ return;
+ json_schema_2019_09_1.default.call(this, $data);
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
+ }
+ defaultMeta() {
+ return (this.opts.defaultMeta =
+ super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
+ }
+}
+module.exports = exports = Ajv2019;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = Ajv2019;
+var validate_1 = require("./compile/validate");
+Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
+var codegen_1 = require("./compile/codegen");
+Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
+Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
+Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
+Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
+Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
+Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
+//# sourceMappingURL=2019.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/2019.js.map b/node_modules/ajv/dist/2019.js.map
new file mode 100644
index 0000000..8e4e87c
--- /dev/null
+++ b/node_modules/ajv/dist/2019.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"2019.js","sourceRoot":"","sources":["../lib/2019.ts"],"names":[],"mappings":";;;AACA,i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,CAAC,CAAC,CAAA;IACzF,CAAC;CACF;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAClC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,OAAO,CAAA;AAyBtB,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/2020.d.ts b/node_modules/ajv/dist/2020.d.ts
new file mode 100644
index 0000000..21bae8f
--- /dev/null
+++ b/node_modules/ajv/dist/2020.d.ts
@@ -0,0 +1,17 @@
+import type { AnySchemaObject } from "./types";
+import AjvCore, { Options } from "./core";
+declare class Ajv2020 extends AjvCore {
+ constructor(opts?: Options);
+ _addVocabularies(): void;
+ _addDefaultMetaSchema(): void;
+ defaultMeta(): string | AnySchemaObject | undefined;
+}
+export default Ajv2020;
+export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
+export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
+export { SchemaCxt, SchemaObjCxt } from "./compile";
+export { KeywordCxt } from "./compile/validate";
+export { DefinedError } from "./vocabularies/errors";
+export { JSONType } from "./compile/rules";
+export { JSONSchemaType } from "./types/json-schema";
+export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
diff --git a/node_modules/ajv/dist/2020.js b/node_modules/ajv/dist/2020.js
new file mode 100644
index 0000000..bdd1dd6
--- /dev/null
+++ b/node_modules/ajv/dist/2020.js
@@ -0,0 +1,49 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
+const core_1 = require("./core");
+const draft2020_1 = require("./vocabularies/draft2020");
+const discriminator_1 = require("./vocabularies/discriminator");
+const json_schema_2020_12_1 = require("./refs/json-schema-2020-12");
+const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
+class Ajv2020 extends core_1.default {
+ constructor(opts = {}) {
+ super({
+ ...opts,
+ dynamicRef: true,
+ next: true,
+ unevaluated: true,
+ });
+ }
+ _addVocabularies() {
+ super._addVocabularies();
+ draft2020_1.default.forEach((v) => this.addVocabulary(v));
+ if (this.opts.discriminator)
+ this.addKeyword(discriminator_1.default);
+ }
+ _addDefaultMetaSchema() {
+ super._addDefaultMetaSchema();
+ const { $data, meta } = this.opts;
+ if (!meta)
+ return;
+ json_schema_2020_12_1.default.call(this, $data);
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
+ }
+ defaultMeta() {
+ return (this.opts.defaultMeta =
+ super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
+ }
+}
+module.exports = exports = Ajv2020;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = Ajv2020;
+var validate_1 = require("./compile/validate");
+Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
+var codegen_1 = require("./compile/codegen");
+Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
+Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
+Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
+Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
+Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
+Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
+//# sourceMappingURL=2020.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/2020.js.map b/node_modules/ajv/dist/2020.js.map
new file mode 100644
index 0000000..9223935
--- /dev/null
+++ b/node_modules/ajv/dist/2020.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"2020.js","sourceRoot":"","sources":["../lib/2020.ts"],"names":[],"mappings":";;;AACA,iCAAuC;AAEvC,wDAA4D;AAC5D,gEAAwD;AACxD,oEAA0D;AAE1D,MAAM,cAAc,GAAG,8CAA8C,CAAA;AAErE,MAAM,OAAQ,SAAQ,cAAO;IAC3B,YAAY,OAAgB,EAAE;QAC5B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,IAAI;SAClB,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,mBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;QAC3D,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,IAAI,CAAC,UAAU,CAAC,uBAAa,CAAC,CAAA;IAC7D,CAAC;IAED,qBAAqB;QACnB,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC7B,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,IAAI,CAAA;QAC/B,IAAI,CAAC,IAAI;YAAE,OAAM;QACjB,6BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,GAAG,cAAc,CAAA;IAC7D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;YAC3B,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,CAAC;CACF;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAClC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,OAAO,CAAA;AAyBtB,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/ajv.d.ts b/node_modules/ajv/dist/ajv.d.ts
new file mode 100644
index 0000000..ce43bbf
--- /dev/null
+++ b/node_modules/ajv/dist/ajv.d.ts
@@ -0,0 +1,16 @@
+import type { AnySchemaObject } from "./types";
+import AjvCore from "./core";
+declare class Ajv extends AjvCore {
+ _addVocabularies(): void;
+ _addDefaultMetaSchema(): void;
+ defaultMeta(): string | AnySchemaObject | undefined;
+}
+export default Ajv;
+export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, SchemaValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
+export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
+export { SchemaCxt, SchemaObjCxt } from "./compile";
+export { KeywordCxt } from "./compile/validate";
+export { DefinedError } from "./vocabularies/errors";
+export { JSONType } from "./compile/rules";
+export { JSONSchemaType } from "./types/json-schema";
+export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
diff --git a/node_modules/ajv/dist/ajv.js b/node_modules/ajv/dist/ajv.js
new file mode 100644
index 0000000..219bcf0
--- /dev/null
+++ b/node_modules/ajv/dist/ajv.js
@@ -0,0 +1,44 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
+const core_1 = require("./core");
+const draft7_1 = require("./vocabularies/draft7");
+const discriminator_1 = require("./vocabularies/discriminator");
+const draft7MetaSchema = require("./refs/json-schema-draft-07.json");
+const META_SUPPORT_DATA = ["/properties"];
+const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
+class Ajv extends core_1.default {
+ _addVocabularies() {
+ super._addVocabularies();
+ draft7_1.default.forEach((v) => this.addVocabulary(v));
+ if (this.opts.discriminator)
+ this.addKeyword(discriminator_1.default);
+ }
+ _addDefaultMetaSchema() {
+ super._addDefaultMetaSchema();
+ if (!this.opts.meta)
+ return;
+ const metaSchema = this.opts.$data
+ ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)
+ : draft7MetaSchema;
+ this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
+ }
+ defaultMeta() {
+ return (this.opts.defaultMeta =
+ super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
+ }
+}
+module.exports = exports = Ajv;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = Ajv;
+var validate_1 = require("./compile/validate");
+Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
+var codegen_1 = require("./compile/codegen");
+Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
+Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
+Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
+Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
+Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
+Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
+//# sourceMappingURL=ajv.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/ajv.js.map b/node_modules/ajv/dist/ajv.js.map
new file mode 100644
index 0000000..18006d4
--- /dev/null
+++ b/node_modules/ajv/dist/ajv.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ajv.js","sourceRoot":"","sources":["../lib/ajv.ts"],"names":[],"mappings":";;;AACA,iCAA4B;AAC5B,kDAAsD;AACtD,gEAAwD;AACxD,qEAAoE;AAEpE,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC,CAAA;AAEzC,MAAM,cAAc,GAAG,wCAAwC,CAAA;AAE/D,MAAM,GAAI,SAAQ,cAAO;IACvB,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,gBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;QACxD,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,IAAI,CAAC,UAAU,CAAC,uBAAa,CAAC,CAAA;IAC7D,CAAC;IAED,qBAAqB;QACnB,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAM;QAC3B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK;YAChC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;YAC3D,CAAC,CAAC,gBAAgB,CAAA;QACpB,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,CAAC,CAAA;QACrD,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,GAAG,cAAc,CAAA;IAC7D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;YAC3B,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,CAAC;CACF;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,GAAG,CAAA;AAC9B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,GAAG,CAAA;AA0BlB,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/codegen/code.d.ts b/node_modules/ajv/dist/compile/codegen/code.d.ts
new file mode 100644
index 0000000..8023c18
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/code.d.ts
@@ -0,0 +1,40 @@
+export declare abstract class _CodeOrName {
+ abstract readonly str: string;
+ abstract readonly names: UsedNames;
+ abstract toString(): string;
+ abstract emptyStr(): boolean;
+}
+export declare const IDENTIFIER: RegExp;
+export declare class Name extends _CodeOrName {
+ readonly str: string;
+ constructor(s: string);
+ toString(): string;
+ emptyStr(): boolean;
+ get names(): UsedNames;
+}
+export declare class _Code extends _CodeOrName {
+ readonly _items: readonly CodeItem[];
+ private _str?;
+ private _names?;
+ constructor(code: string | readonly CodeItem[]);
+ toString(): string;
+ emptyStr(): boolean;
+ get str(): string;
+ get names(): UsedNames;
+}
+export declare type CodeItem = Name | string | number | boolean | null;
+export declare type UsedNames = Record;
+export declare type Code = _Code | Name;
+export declare type SafeExpr = Code | number | boolean | null;
+export declare const nil: _Code;
+declare type CodeArg = SafeExpr | string | undefined;
+export declare function _(strs: TemplateStringsArray, ...args: CodeArg[]): _Code;
+export declare function str(strs: TemplateStringsArray, ...args: (CodeArg | string[])[]): _Code;
+export declare function addCodeArg(code: CodeItem[], arg: CodeArg | string[]): void;
+export declare function strConcat(c1: Code, c2: Code): Code;
+export declare function stringify(x: unknown): Code;
+export declare function safeStringify(x: unknown): string;
+export declare function getProperty(key: Code | string | number): Code;
+export declare function getEsmExportName(key: Code | string | number): Code;
+export declare function regexpCode(rx: RegExp): Code;
+export {};
diff --git a/node_modules/ajv/dist/compile/codegen/code.js b/node_modules/ajv/dist/compile/codegen/code.js
new file mode 100644
index 0000000..f826883
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/code.js
@@ -0,0 +1,155 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
+class _CodeOrName {
+}
+exports._CodeOrName = _CodeOrName;
+exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+class Name extends _CodeOrName {
+ constructor(s) {
+ super();
+ if (!exports.IDENTIFIER.test(s))
+ throw new Error("CodeGen: name must be a valid identifier");
+ this.str = s;
+ }
+ toString() {
+ return this.str;
+ }
+ emptyStr() {
+ return false;
+ }
+ get names() {
+ return { [this.str]: 1 };
+ }
+}
+exports.Name = Name;
+class _Code extends _CodeOrName {
+ constructor(code) {
+ super();
+ this._items = typeof code === "string" ? [code] : code;
+ }
+ toString() {
+ return this.str;
+ }
+ emptyStr() {
+ if (this._items.length > 1)
+ return false;
+ const item = this._items[0];
+ return item === "" || item === '""';
+ }
+ get str() {
+ var _a;
+ return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, "")));
+ }
+ get names() {
+ var _a;
+ return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {
+ if (c instanceof Name)
+ names[c.str] = (names[c.str] || 0) + 1;
+ return names;
+ }, {})));
+ }
+}
+exports._Code = _Code;
+exports.nil = new _Code("");
+function _(strs, ...args) {
+ const code = [strs[0]];
+ let i = 0;
+ while (i < args.length) {
+ addCodeArg(code, args[i]);
+ code.push(strs[++i]);
+ }
+ return new _Code(code);
+}
+exports._ = _;
+const plus = new _Code("+");
+function str(strs, ...args) {
+ const expr = [safeStringify(strs[0])];
+ let i = 0;
+ while (i < args.length) {
+ expr.push(plus);
+ addCodeArg(expr, args[i]);
+ expr.push(plus, safeStringify(strs[++i]));
+ }
+ optimize(expr);
+ return new _Code(expr);
+}
+exports.str = str;
+function addCodeArg(code, arg) {
+ if (arg instanceof _Code)
+ code.push(...arg._items);
+ else if (arg instanceof Name)
+ code.push(arg);
+ else
+ code.push(interpolate(arg));
+}
+exports.addCodeArg = addCodeArg;
+function optimize(expr) {
+ let i = 1;
+ while (i < expr.length - 1) {
+ if (expr[i] === plus) {
+ const res = mergeExprItems(expr[i - 1], expr[i + 1]);
+ if (res !== undefined) {
+ expr.splice(i - 1, 3, res);
+ continue;
+ }
+ expr[i++] = "+";
+ }
+ i++;
+ }
+}
+function mergeExprItems(a, b) {
+ if (b === '""')
+ return a;
+ if (a === '""')
+ return b;
+ if (typeof a == "string") {
+ if (b instanceof Name || a[a.length - 1] !== '"')
+ return;
+ if (typeof b != "string")
+ return `${a.slice(0, -1)}${b}"`;
+ if (b[0] === '"')
+ return a.slice(0, -1) + b.slice(1);
+ return;
+ }
+ if (typeof b == "string" && b[0] === '"' && !(a instanceof Name))
+ return `"${a}${b.slice(1)}`;
+ return;
+}
+function strConcat(c1, c2) {
+ return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;
+}
+exports.strConcat = strConcat;
+// TODO do not allow arrays here
+function interpolate(x) {
+ return typeof x == "number" || typeof x == "boolean" || x === null
+ ? x
+ : safeStringify(Array.isArray(x) ? x.join(",") : x);
+}
+function stringify(x) {
+ return new _Code(safeStringify(x));
+}
+exports.stringify = stringify;
+function safeStringify(x) {
+ return JSON.stringify(x)
+ .replace(/\u2028/g, "\\u2028")
+ .replace(/\u2029/g, "\\u2029");
+}
+exports.safeStringify = safeStringify;
+function getProperty(key) {
+ return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
+}
+exports.getProperty = getProperty;
+//Does best effort to format the name properly
+function getEsmExportName(key) {
+ if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
+ return new _Code(`${key}`);
+ }
+ throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
+}
+exports.getEsmExportName = getEsmExportName;
+function regexpCode(rx) {
+ return new _Code(rx.toString());
+}
+exports.regexpCode = regexpCode;
+//# sourceMappingURL=code.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/codegen/code.js.map b/node_modules/ajv/dist/compile/codegen/code.js.map
new file mode 100644
index 0000000..c5c7a39
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/code.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"code.js","sourceRoot":"","sources":["../../../lib/compile/codegen/code.ts"],"names":[],"mappings":";;;AAAA,MAAsB,WAAW;CAKhC;AALD,kCAKC;AAEY,QAAA,UAAU,GAAG,uBAAuB,CAAA;AAEjD,MAAa,IAAK,SAAQ,WAAW;IAEnC,YAAY,CAAS;QACnB,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,kBAAU,CAAC,IAAI,CAAC,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;QACpF,IAAI,CAAC,GAAG,GAAG,CAAC,CAAA;IACd,CAAC;IAED,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C,CAAC,CAAC;SACrB,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;SAC7B,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AAClC,CAAC;AAJD,sCAIC;AAED,SAAgB,WAAW,CAAC,GAA2B;IACrD,OAAO,OAAO,GAAG,IAAI,QAAQ,IAAI,kBAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,IAAI,GAAG,GAAG,CAAA;AAC5F,CAAC;AAFD,kCAEC;AAED,8CAA8C;AAC9C,SAAgB,gBAAgB,CAAC,GAA2B;IAC1D,IAAI,OAAO,GAAG,IAAI,QAAQ,IAAI,kBAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAClD,OAAO,IAAI,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,CAAA;KAC3B;IACD,MAAM,IAAI,KAAK,CAAC,iCAAiC,GAAG,iCAAiC,CAAC,CAAA;AACxF,CAAC;AALD,4CAKC;AAED,SAAgB,UAAU,CAAC,EAAU;IACnC,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAA;AACjC,CAAC;AAFD,gCAEC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/codegen/index.d.ts b/node_modules/ajv/dist/compile/codegen/index.d.ts
new file mode 100644
index 0000000..db9101d
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/index.d.ts
@@ -0,0 +1,79 @@
+import type { ScopeValueSets, NameValue, ValueScope, ValueScopeName } from "./scope";
+import { _Code, Code, Name } from "./code";
+import { Scope } from "./scope";
+export { _, str, strConcat, nil, getProperty, stringify, regexpCode, Name, Code } from "./code";
+export { Scope, ScopeStore, ValueScope, ValueScopeName, ScopeValueSets, varKinds } from "./scope";
+export declare type SafeExpr = Code | number | boolean | null;
+export declare type Block = Code | (() => void);
+export declare const operators: {
+ GT: _Code;
+ GTE: _Code;
+ LT: _Code;
+ LTE: _Code;
+ EQ: _Code;
+ NEQ: _Code;
+ NOT: _Code;
+ OR: _Code;
+ AND: _Code;
+ ADD: _Code;
+};
+export interface CodeGenOptions {
+ es5?: boolean;
+ lines?: boolean;
+ ownProperties?: boolean;
+}
+export declare class CodeGen {
+ readonly _scope: Scope;
+ readonly _extScope: ValueScope;
+ readonly _values: ScopeValueSets;
+ private readonly _nodes;
+ private readonly _blockStarts;
+ private readonly _constants;
+ private readonly opts;
+ constructor(extScope: ValueScope, opts?: CodeGenOptions);
+ toString(): string;
+ name(prefix: string): Name;
+ scopeName(prefix: string): ValueScopeName;
+ scopeValue(prefixOrName: ValueScopeName | string, value: NameValue): Name;
+ getScopeValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined;
+ scopeRefs(scopeName: Name): Code;
+ scopeCode(): Code;
+ private _def;
+ const(nameOrPrefix: Name | string, rhs: SafeExpr, _constant?: boolean): Name;
+ let(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name;
+ var(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name;
+ assign(lhs: Code, rhs: SafeExpr, sideEffects?: boolean): CodeGen;
+ add(lhs: Code, rhs: SafeExpr): CodeGen;
+ code(c: Block | SafeExpr): CodeGen;
+ object(...keyValues: [Name | string, SafeExpr | string][]): _Code;
+ if(condition: Code | boolean, thenBody?: Block, elseBody?: Block): CodeGen;
+ elseIf(condition: Code | boolean): CodeGen;
+ else(): CodeGen;
+ endIf(): CodeGen;
+ private _for;
+ for(iteration: Code, forBody?: Block): CodeGen;
+ forRange(nameOrPrefix: Name | string, from: SafeExpr, to: SafeExpr, forBody: (index: Name) => void, varKind?: Code): CodeGen;
+ forOf(nameOrPrefix: Name | string, iterable: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen;
+ forIn(nameOrPrefix: Name | string, obj: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen;
+ endFor(): CodeGen;
+ label(label: Name): CodeGen;
+ break(label?: Code): CodeGen;
+ return(value: Block | SafeExpr): CodeGen;
+ try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen;
+ throw(error: Code): CodeGen;
+ block(body?: Block, nodeCount?: number): CodeGen;
+ endBlock(nodeCount?: number): CodeGen;
+ func(name: Name, args?: Code, async?: boolean, funcBody?: Block): CodeGen;
+ endFunc(): CodeGen;
+ optimize(n?: number): void;
+ private _leafNode;
+ private _blockNode;
+ private _endBlockNode;
+ private _elseNode;
+ private get _root();
+ private get _currNode();
+ private set _currNode(value);
+}
+export declare function not(x: T): T;
+export declare function and(...args: Code[]): Code;
+export declare function or(...args: Code[]): Code;
diff --git a/node_modules/ajv/dist/compile/codegen/index.js b/node_modules/ajv/dist/compile/codegen/index.js
new file mode 100644
index 0000000..a6c805a
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/index.js
@@ -0,0 +1,697 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
+const code_1 = require("./code");
+const scope_1 = require("./scope");
+var code_2 = require("./code");
+Object.defineProperty(exports, "_", { enumerable: true, get: function () { return code_2._; } });
+Object.defineProperty(exports, "str", { enumerable: true, get: function () { return code_2.str; } });
+Object.defineProperty(exports, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } });
+Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return code_2.nil; } });
+Object.defineProperty(exports, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } });
+Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return code_2.stringify; } });
+Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } });
+Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return code_2.Name; } });
+var scope_2 = require("./scope");
+Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } });
+Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } });
+Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });
+Object.defineProperty(exports, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } });
+exports.operators = {
+ GT: new code_1._Code(">"),
+ GTE: new code_1._Code(">="),
+ LT: new code_1._Code("<"),
+ LTE: new code_1._Code("<="),
+ EQ: new code_1._Code("==="),
+ NEQ: new code_1._Code("!=="),
+ NOT: new code_1._Code("!"),
+ OR: new code_1._Code("||"),
+ AND: new code_1._Code("&&"),
+ ADD: new code_1._Code("+"),
+};
+class Node {
+ optimizeNodes() {
+ return this;
+ }
+ optimizeNames(_names, _constants) {
+ return this;
+ }
+}
+class Def extends Node {
+ constructor(varKind, name, rhs) {
+ super();
+ this.varKind = varKind;
+ this.name = name;
+ this.rhs = rhs;
+ }
+ render({ es5, _n }) {
+ const varKind = es5 ? scope_1.varKinds.var : this.varKind;
+ const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`;
+ return `${varKind} ${this.name}${rhs};` + _n;
+ }
+ optimizeNames(names, constants) {
+ if (!names[this.name.str])
+ return;
+ if (this.rhs)
+ this.rhs = optimizeExpr(this.rhs, names, constants);
+ return this;
+ }
+ get names() {
+ return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
+ }
+}
+class Assign extends Node {
+ constructor(lhs, rhs, sideEffects) {
+ super();
+ this.lhs = lhs;
+ this.rhs = rhs;
+ this.sideEffects = sideEffects;
+ }
+ render({ _n }) {
+ return `${this.lhs} = ${this.rhs};` + _n;
+ }
+ optimizeNames(names, constants) {
+ if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
+ return;
+ this.rhs = optimizeExpr(this.rhs, names, constants);
+ return this;
+ }
+ get names() {
+ const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };
+ return addExprNames(names, this.rhs);
+ }
+}
+class AssignOp extends Assign {
+ constructor(lhs, op, rhs, sideEffects) {
+ super(lhs, rhs, sideEffects);
+ this.op = op;
+ }
+ render({ _n }) {
+ return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
+ }
+}
+class Label extends Node {
+ constructor(label) {
+ super();
+ this.label = label;
+ this.names = {};
+ }
+ render({ _n }) {
+ return `${this.label}:` + _n;
+ }
+}
+class Break extends Node {
+ constructor(label) {
+ super();
+ this.label = label;
+ this.names = {};
+ }
+ render({ _n }) {
+ const label = this.label ? ` ${this.label}` : "";
+ return `break${label};` + _n;
+ }
+}
+class Throw extends Node {
+ constructor(error) {
+ super();
+ this.error = error;
+ }
+ render({ _n }) {
+ return `throw ${this.error};` + _n;
+ }
+ get names() {
+ return this.error.names;
+ }
+}
+class AnyCode extends Node {
+ constructor(code) {
+ super();
+ this.code = code;
+ }
+ render({ _n }) {
+ return `${this.code};` + _n;
+ }
+ optimizeNodes() {
+ return `${this.code}` ? this : undefined;
+ }
+ optimizeNames(names, constants) {
+ this.code = optimizeExpr(this.code, names, constants);
+ return this;
+ }
+ get names() {
+ return this.code instanceof code_1._CodeOrName ? this.code.names : {};
+ }
+}
+class ParentNode extends Node {
+ constructor(nodes = []) {
+ super();
+ this.nodes = nodes;
+ }
+ render(opts) {
+ return this.nodes.reduce((code, n) => code + n.render(opts), "");
+ }
+ optimizeNodes() {
+ const { nodes } = this;
+ let i = nodes.length;
+ while (i--) {
+ const n = nodes[i].optimizeNodes();
+ if (Array.isArray(n))
+ nodes.splice(i, 1, ...n);
+ else if (n)
+ nodes[i] = n;
+ else
+ nodes.splice(i, 1);
+ }
+ return nodes.length > 0 ? this : undefined;
+ }
+ optimizeNames(names, constants) {
+ const { nodes } = this;
+ let i = nodes.length;
+ while (i--) {
+ // iterating backwards improves 1-pass optimization
+ const n = nodes[i];
+ if (n.optimizeNames(names, constants))
+ continue;
+ subtractNames(names, n.names);
+ nodes.splice(i, 1);
+ }
+ return nodes.length > 0 ? this : undefined;
+ }
+ get names() {
+ return this.nodes.reduce((names, n) => addNames(names, n.names), {});
+ }
+}
+class BlockNode extends ParentNode {
+ render(opts) {
+ return "{" + opts._n + super.render(opts) + "}" + opts._n;
+ }
+}
+class Root extends ParentNode {
+}
+class Else extends BlockNode {
+}
+Else.kind = "else";
+class If extends BlockNode {
+ constructor(condition, nodes) {
+ super(nodes);
+ this.condition = condition;
+ }
+ render(opts) {
+ let code = `if(${this.condition})` + super.render(opts);
+ if (this.else)
+ code += "else " + this.else.render(opts);
+ return code;
+ }
+ optimizeNodes() {
+ super.optimizeNodes();
+ const cond = this.condition;
+ if (cond === true)
+ return this.nodes; // else is ignored here
+ let e = this.else;
+ if (e) {
+ const ns = e.optimizeNodes();
+ e = this.else = Array.isArray(ns) ? new Else(ns) : ns;
+ }
+ if (e) {
+ if (cond === false)
+ return e instanceof If ? e : e.nodes;
+ if (this.nodes.length)
+ return this;
+ return new If(not(cond), e instanceof If ? [e] : e.nodes);
+ }
+ if (cond === false || !this.nodes.length)
+ return undefined;
+ return this;
+ }
+ optimizeNames(names, constants) {
+ var _a;
+ this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
+ if (!(super.optimizeNames(names, constants) || this.else))
+ return;
+ this.condition = optimizeExpr(this.condition, names, constants);
+ return this;
+ }
+ get names() {
+ const names = super.names;
+ addExprNames(names, this.condition);
+ if (this.else)
+ addNames(names, this.else.names);
+ return names;
+ }
+}
+If.kind = "if";
+class For extends BlockNode {
+}
+For.kind = "for";
+class ForLoop extends For {
+ constructor(iteration) {
+ super();
+ this.iteration = iteration;
+ }
+ render(opts) {
+ return `for(${this.iteration})` + super.render(opts);
+ }
+ optimizeNames(names, constants) {
+ if (!super.optimizeNames(names, constants))
+ return;
+ this.iteration = optimizeExpr(this.iteration, names, constants);
+ return this;
+ }
+ get names() {
+ return addNames(super.names, this.iteration.names);
+ }
+}
+class ForRange extends For {
+ constructor(varKind, name, from, to) {
+ super();
+ this.varKind = varKind;
+ this.name = name;
+ this.from = from;
+ this.to = to;
+ }
+ render(opts) {
+ const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
+ const { name, from, to } = this;
+ return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);
+ }
+ get names() {
+ const names = addExprNames(super.names, this.from);
+ return addExprNames(names, this.to);
+ }
+}
+class ForIter extends For {
+ constructor(loop, varKind, name, iterable) {
+ super();
+ this.loop = loop;
+ this.varKind = varKind;
+ this.name = name;
+ this.iterable = iterable;
+ }
+ render(opts) {
+ return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
+ }
+ optimizeNames(names, constants) {
+ if (!super.optimizeNames(names, constants))
+ return;
+ this.iterable = optimizeExpr(this.iterable, names, constants);
+ return this;
+ }
+ get names() {
+ return addNames(super.names, this.iterable.names);
+ }
+}
+class Func extends BlockNode {
+ constructor(name, args, async) {
+ super();
+ this.name = name;
+ this.args = args;
+ this.async = async;
+ }
+ render(opts) {
+ const _async = this.async ? "async " : "";
+ return `${_async}function ${this.name}(${this.args})` + super.render(opts);
+ }
+}
+Func.kind = "func";
+class Return extends ParentNode {
+ render(opts) {
+ return "return " + super.render(opts);
+ }
+}
+Return.kind = "return";
+class Try extends BlockNode {
+ render(opts) {
+ let code = "try" + super.render(opts);
+ if (this.catch)
+ code += this.catch.render(opts);
+ if (this.finally)
+ code += this.finally.render(opts);
+ return code;
+ }
+ optimizeNodes() {
+ var _a, _b;
+ super.optimizeNodes();
+ (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();
+ (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
+ return this;
+ }
+ optimizeNames(names, constants) {
+ var _a, _b;
+ super.optimizeNames(names, constants);
+ (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
+ (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
+ return this;
+ }
+ get names() {
+ const names = super.names;
+ if (this.catch)
+ addNames(names, this.catch.names);
+ if (this.finally)
+ addNames(names, this.finally.names);
+ return names;
+ }
+}
+class Catch extends BlockNode {
+ constructor(error) {
+ super();
+ this.error = error;
+ }
+ render(opts) {
+ return `catch(${this.error})` + super.render(opts);
+ }
+}
+Catch.kind = "catch";
+class Finally extends BlockNode {
+ render(opts) {
+ return "finally" + super.render(opts);
+ }
+}
+Finally.kind = "finally";
+class CodeGen {
+ constructor(extScope, opts = {}) {
+ this._values = {};
+ this._blockStarts = [];
+ this._constants = {};
+ this.opts = { ...opts, _n: opts.lines ? "\n" : "" };
+ this._extScope = extScope;
+ this._scope = new scope_1.Scope({ parent: extScope });
+ this._nodes = [new Root()];
+ }
+ toString() {
+ return this._root.render(this.opts);
+ }
+ // returns unique name in the internal scope
+ name(prefix) {
+ return this._scope.name(prefix);
+ }
+ // reserves unique name in the external scope
+ scopeName(prefix) {
+ return this._extScope.name(prefix);
+ }
+ // reserves unique name in the external scope and assigns value to it
+ scopeValue(prefixOrName, value) {
+ const name = this._extScope.value(prefixOrName, value);
+ const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set());
+ vs.add(name);
+ return name;
+ }
+ getScopeValue(prefix, keyOrRef) {
+ return this._extScope.getValue(prefix, keyOrRef);
+ }
+ // return code that assigns values in the external scope to the names that are used internally
+ // (same names that were returned by gen.scopeName or gen.scopeValue)
+ scopeRefs(scopeName) {
+ return this._extScope.scopeRefs(scopeName, this._values);
+ }
+ scopeCode() {
+ return this._extScope.scopeCode(this._values);
+ }
+ _def(varKind, nameOrPrefix, rhs, constant) {
+ const name = this._scope.toName(nameOrPrefix);
+ if (rhs !== undefined && constant)
+ this._constants[name.str] = rhs;
+ this._leafNode(new Def(varKind, name, rhs));
+ return name;
+ }
+ // `const` declaration (`var` in es5 mode)
+ const(nameOrPrefix, rhs, _constant) {
+ return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);
+ }
+ // `let` declaration with optional assignment (`var` in es5 mode)
+ let(nameOrPrefix, rhs, _constant) {
+ return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);
+ }
+ // `var` declaration with optional assignment
+ var(nameOrPrefix, rhs, _constant) {
+ return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);
+ }
+ // assignment code
+ assign(lhs, rhs, sideEffects) {
+ return this._leafNode(new Assign(lhs, rhs, sideEffects));
+ }
+ // `+=` code
+ add(lhs, rhs) {
+ return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));
+ }
+ // appends passed SafeExpr to code or executes Block
+ code(c) {
+ if (typeof c == "function")
+ c();
+ else if (c !== code_1.nil)
+ this._leafNode(new AnyCode(c));
+ return this;
+ }
+ // returns code for object literal for the passed argument list of key-value pairs
+ object(...keyValues) {
+ const code = ["{"];
+ for (const [key, value] of keyValues) {
+ if (code.length > 1)
+ code.push(",");
+ code.push(key);
+ if (key !== value || this.opts.es5) {
+ code.push(":");
+ (0, code_1.addCodeArg)(code, value);
+ }
+ }
+ code.push("}");
+ return new code_1._Code(code);
+ }
+ // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
+ if(condition, thenBody, elseBody) {
+ this._blockNode(new If(condition));
+ if (thenBody && elseBody) {
+ this.code(thenBody).else().code(elseBody).endIf();
+ }
+ else if (thenBody) {
+ this.code(thenBody).endIf();
+ }
+ else if (elseBody) {
+ throw new Error('CodeGen: "else" body without "then" body');
+ }
+ return this;
+ }
+ // `else if` clause - invalid without `if` or after `else` clauses
+ elseIf(condition) {
+ return this._elseNode(new If(condition));
+ }
+ // `else` clause - only valid after `if` or `else if` clauses
+ else() {
+ return this._elseNode(new Else());
+ }
+ // end `if` statement (needed if gen.if was used only with condition)
+ endIf() {
+ return this._endBlockNode(If, Else);
+ }
+ _for(node, forBody) {
+ this._blockNode(node);
+ if (forBody)
+ this.code(forBody).endFor();
+ return this;
+ }
+ // a generic `for` clause (or statement if `forBody` is passed)
+ for(iteration, forBody) {
+ return this._for(new ForLoop(iteration), forBody);
+ }
+ // `for` statement for a range of values
+ forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
+ const name = this._scope.toName(nameOrPrefix);
+ return this._for(new ForRange(varKind, name, from, to), () => forBody(name));
+ }
+ // `for-of` statement (in es5 mode replace with a normal for loop)
+ forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
+ const name = this._scope.toName(nameOrPrefix);
+ if (this.opts.es5) {
+ const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
+ return this.forRange("_i", 0, (0, code_1._) `${arr}.length`, (i) => {
+ this.var(name, (0, code_1._) `${arr}[${i}]`);
+ forBody(name);
+ });
+ }
+ return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
+ }
+ // `for-in` statement.
+ // With option `ownProperties` replaced with a `for-of` loop for object keys
+ forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
+ if (this.opts.ownProperties) {
+ return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody);
+ }
+ const name = this._scope.toName(nameOrPrefix);
+ return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
+ }
+ // end `for` loop
+ endFor() {
+ return this._endBlockNode(For);
+ }
+ // `label` statement
+ label(label) {
+ return this._leafNode(new Label(label));
+ }
+ // `break` statement
+ break(label) {
+ return this._leafNode(new Break(label));
+ }
+ // `return` statement
+ return(value) {
+ const node = new Return();
+ this._blockNode(node);
+ this.code(value);
+ if (node.nodes.length !== 1)
+ throw new Error('CodeGen: "return" should have one node');
+ return this._endBlockNode(Return);
+ }
+ // `try` statement
+ try(tryBody, catchCode, finallyCode) {
+ if (!catchCode && !finallyCode)
+ throw new Error('CodeGen: "try" without "catch" and "finally"');
+ const node = new Try();
+ this._blockNode(node);
+ this.code(tryBody);
+ if (catchCode) {
+ const error = this.name("e");
+ this._currNode = node.catch = new Catch(error);
+ catchCode(error);
+ }
+ if (finallyCode) {
+ this._currNode = node.finally = new Finally();
+ this.code(finallyCode);
+ }
+ return this._endBlockNode(Catch, Finally);
+ }
+ // `throw` statement
+ throw(error) {
+ return this._leafNode(new Throw(error));
+ }
+ // start self-balancing block
+ block(body, nodeCount) {
+ this._blockStarts.push(this._nodes.length);
+ if (body)
+ this.code(body).endBlock(nodeCount);
+ return this;
+ }
+ // end the current self-balancing block
+ endBlock(nodeCount) {
+ const len = this._blockStarts.pop();
+ if (len === undefined)
+ throw new Error("CodeGen: not in self-balancing block");
+ const toClose = this._nodes.length - len;
+ if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {
+ throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
+ }
+ this._nodes.length = len;
+ return this;
+ }
+ // `function` heading (or definition if funcBody is passed)
+ func(name, args = code_1.nil, async, funcBody) {
+ this._blockNode(new Func(name, args, async));
+ if (funcBody)
+ this.code(funcBody).endFunc();
+ return this;
+ }
+ // end function definition
+ endFunc() {
+ return this._endBlockNode(Func);
+ }
+ optimize(n = 1) {
+ while (n-- > 0) {
+ this._root.optimizeNodes();
+ this._root.optimizeNames(this._root.names, this._constants);
+ }
+ }
+ _leafNode(node) {
+ this._currNode.nodes.push(node);
+ return this;
+ }
+ _blockNode(node) {
+ this._currNode.nodes.push(node);
+ this._nodes.push(node);
+ }
+ _endBlockNode(N1, N2) {
+ const n = this._currNode;
+ if (n instanceof N1 || (N2 && n instanceof N2)) {
+ this._nodes.pop();
+ return this;
+ }
+ throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`);
+ }
+ _elseNode(node) {
+ const n = this._currNode;
+ if (!(n instanceof If)) {
+ throw new Error('CodeGen: "else" without "if"');
+ }
+ this._currNode = n.else = node;
+ return this;
+ }
+ get _root() {
+ return this._nodes[0];
+ }
+ get _currNode() {
+ const ns = this._nodes;
+ return ns[ns.length - 1];
+ }
+ set _currNode(node) {
+ const ns = this._nodes;
+ ns[ns.length - 1] = node;
+ }
+}
+exports.CodeGen = CodeGen;
+function addNames(names, from) {
+ for (const n in from)
+ names[n] = (names[n] || 0) + (from[n] || 0);
+ return names;
+}
+function addExprNames(names, from) {
+ return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
+}
+function optimizeExpr(expr, names, constants) {
+ if (expr instanceof code_1.Name)
+ return replaceName(expr);
+ if (!canOptimize(expr))
+ return expr;
+ return new code_1._Code(expr._items.reduce((items, c) => {
+ if (c instanceof code_1.Name)
+ c = replaceName(c);
+ if (c instanceof code_1._Code)
+ items.push(...c._items);
+ else
+ items.push(c);
+ return items;
+ }, []));
+ function replaceName(n) {
+ const c = constants[n.str];
+ if (c === undefined || names[n.str] !== 1)
+ return n;
+ delete names[n.str];
+ return c;
+ }
+ function canOptimize(e) {
+ return (e instanceof code_1._Code &&
+ e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined));
+ }
+}
+function subtractNames(names, from) {
+ for (const n in from)
+ names[n] = (names[n] || 0) - (from[n] || 0);
+}
+function not(x) {
+ return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`;
+}
+exports.not = not;
+const andCode = mappend(exports.operators.AND);
+// boolean AND (&&) expression with the passed arguments
+function and(...args) {
+ return args.reduce(andCode);
+}
+exports.and = and;
+const orCode = mappend(exports.operators.OR);
+// boolean OR (||) expression with the passed arguments
+function or(...args) {
+ return args.reduce(orCode);
+}
+exports.or = or;
+function mappend(op) {
+ return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);
+}
+function par(x) {
+ return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`;
+}
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/codegen/index.js.map b/node_modules/ajv/dist/compile/codegen/index.js.map
new file mode 100644
index 0000000..f3826d2
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/compile/codegen/index.ts"],"names":[],"mappings":";;;AACA,iCAA8F;AAC9F,mCAAuC;AAEvC,+BAA6F;AAArF,yFAAA,CAAC,OAAA;AAAE,2FAAA,GAAG,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,2FAAA,GAAG,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,4FAAA,IAAI,OAAA;AACxE,iCAA+F;AAAvF,8FAAA,KAAK,OAAA;AAAc,mGAAA,UAAU,OAAA;AAAE,uGAAA,cAAc,OAAA;AAAkB,iGAAA,QAAQ,OAAA;AAQlE,QAAA,SAAS,GAAG;IACvB,EAAE,EAAE,IAAI,YAAK,CAAC,GAAG,CAAC;IAClB,GAAG,EAAE,IAAI,YAAK,CAAC,IAAI,CAAC;IACpB,EAAE,EAAE,IAAI,YAAK,CAAC,GAAG,CAAC;IAClB,GAAG,EAAE,IAAI,YAAK,CAAC,IAAI,CAAC;IACpB,EAAE,EAAE,IAAI,YAAK,CAAC,KAAK,CAAC;IACpB,GAAG,EAAE,IAAI,YAAK,CAAC,KAAK,CAAC;IACrB,GAAG,EAAE,IAAI,YAAK,CAAC,GAAG,CAAC;IACnB,EAAE,EAAE,IAAI,YAAK,CAAC,IAAI,CAAC;IACnB,GAAG,EAAE,IAAI,YAAK,CAAC,IAAI,CAAC;IACpB,GAAG,EAAE,IAAI,YAAK,CAAC,GAAG,CAAC;CACpB,CAAA;AAED,MAAe,IAAI;IAGjB,aAAa;QACX,OAAO,IAAI,CAAA;IACb,CAAC;IAED,aAAa,CAAC,MAAiB,EAAE,UAAqB;QACpD,OAAO,IAAI,CAAA;IACb,CAAC;CAKF;AAED,MAAM,GAAI,SAAQ,IAAI;IACpB,YAA6B,OAAa,EAAmB,IAAU,EAAU,GAAc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;AAED,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAS,CAAC,GAAG,CAAC,CAAA;AAEtC,wDAAwD;AACxD,SAAgB,GAAG,CAAC,GAAG,IAAY;IACjC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,CAAC;AAFD,kBAEC;AAED,MAAM,MAAM,GAAG,OAAO,CAAC,iBAAS,CAAC,EAAE,CAAC,CAAA;AAEpC,uDAAuD;AACvD,SAAgB,EAAE,CAAC,GAAG,IAAY;IAChC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC5B,CAAC;AAFD,gBAEC;AAID,SAAS,OAAO,CAAC,EAAQ;IACvB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,UAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,UAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,QAAC,EAAA,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACjF,CAAC;AAED,SAAS,GAAG,CAAC,CAAO;IAClB,OAAO,CAAC,YAAY,WAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,QAAC,EAAA,IAAI,CAAC,GAAG,CAAA;AAC1C,CAAC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/codegen/scope.d.ts b/node_modules/ajv/dist/compile/codegen/scope.d.ts
new file mode 100644
index 0000000..3c351bb
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/scope.d.ts
@@ -0,0 +1,79 @@
+import { Code, Name } from "./code";
+interface NameGroup {
+ prefix: string;
+ index: number;
+}
+export interface NameValue {
+ ref: ValueReference;
+ key?: unknown;
+ code?: Code;
+}
+export declare type ValueReference = unknown;
+interface ScopeOptions {
+ prefixes?: Set;
+ parent?: Scope;
+}
+interface ValueScopeOptions extends ScopeOptions {
+ scope: ScopeStore;
+ es5?: boolean;
+ lines?: boolean;
+}
+export declare type ScopeStore = Record;
+declare type ScopeValues = {
+ [Prefix in string]?: Map;
+};
+export declare type ScopeValueSets = {
+ [Prefix in string]?: Set;
+};
+export declare enum UsedValueState {
+ Started = 0,
+ Completed = 1
+}
+export declare type UsedScopeValues = {
+ [Prefix in string]?: Map;
+};
+export declare const varKinds: {
+ const: Name;
+ let: Name;
+ var: Name;
+};
+export declare class Scope {
+ protected readonly _names: {
+ [Prefix in string]?: NameGroup;
+ };
+ protected readonly _prefixes?: Set;
+ protected readonly _parent?: Scope;
+ constructor({ prefixes, parent }?: ScopeOptions);
+ toName(nameOrPrefix: Name | string): Name;
+ name(prefix: string): Name;
+ protected _newName(prefix: string): string;
+ private _nameGroup;
+}
+interface ScopePath {
+ property: string;
+ itemIndex: number;
+}
+export declare class ValueScopeName extends Name {
+ readonly prefix: string;
+ value?: NameValue;
+ scopePath?: Code;
+ constructor(prefix: string, nameStr: string);
+ setValue(value: NameValue, { property, itemIndex }: ScopePath): void;
+}
+interface VSOptions extends ValueScopeOptions {
+ _n: Code;
+}
+export declare class ValueScope extends Scope {
+ protected readonly _values: ScopeValues;
+ protected readonly _scope: ScopeStore;
+ readonly opts: VSOptions;
+ constructor(opts: ValueScopeOptions);
+ get(): ScopeStore;
+ name(prefix: string): ValueScopeName;
+ value(nameOrPrefix: ValueScopeName | string, value: NameValue): ValueScopeName;
+ getValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined;
+ scopeRefs(scopeName: Name, values?: ScopeValues | ScopeValueSets): Code;
+ scopeCode(values?: ScopeValues | ScopeValueSets, usedValues?: UsedScopeValues, getCode?: (n: ValueScopeName) => Code | undefined): Code;
+ private _reduceValues;
+}
+export {};
diff --git a/node_modules/ajv/dist/compile/codegen/scope.js b/node_modules/ajv/dist/compile/codegen/scope.js
new file mode 100644
index 0000000..acc5f76
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/scope.js
@@ -0,0 +1,143 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
+const code_1 = require("./code");
+class ValueError extends Error {
+ constructor(name) {
+ super(`CodeGen: "code" for ${name} not defined`);
+ this.value = name.value;
+ }
+}
+var UsedValueState;
+(function (UsedValueState) {
+ UsedValueState[UsedValueState["Started"] = 0] = "Started";
+ UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
+})(UsedValueState = exports.UsedValueState || (exports.UsedValueState = {}));
+exports.varKinds = {
+ const: new code_1.Name("const"),
+ let: new code_1.Name("let"),
+ var: new code_1.Name("var"),
+};
+class Scope {
+ constructor({ prefixes, parent } = {}) {
+ this._names = {};
+ this._prefixes = prefixes;
+ this._parent = parent;
+ }
+ toName(nameOrPrefix) {
+ return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);
+ }
+ name(prefix) {
+ return new code_1.Name(this._newName(prefix));
+ }
+ _newName(prefix) {
+ const ng = this._names[prefix] || this._nameGroup(prefix);
+ return `${prefix}${ng.index++}`;
+ }
+ _nameGroup(prefix) {
+ var _a, _b;
+ if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) {
+ throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
+ }
+ return (this._names[prefix] = { prefix, index: 0 });
+ }
+}
+exports.Scope = Scope;
+class ValueScopeName extends code_1.Name {
+ constructor(prefix, nameStr) {
+ super(nameStr);
+ this.prefix = prefix;
+ }
+ setValue(value, { property, itemIndex }) {
+ this.value = value;
+ this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;
+ }
+}
+exports.ValueScopeName = ValueScopeName;
+const line = (0, code_1._) `\n`;
+class ValueScope extends Scope {
+ constructor(opts) {
+ super(opts);
+ this._values = {};
+ this._scope = opts.scope;
+ this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };
+ }
+ get() {
+ return this._scope;
+ }
+ name(prefix) {
+ return new ValueScopeName(prefix, this._newName(prefix));
+ }
+ value(nameOrPrefix, value) {
+ var _a;
+ if (value.ref === undefined)
+ throw new Error("CodeGen: ref must be passed in value");
+ const name = this.toName(nameOrPrefix);
+ const { prefix } = name;
+ const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;
+ let vs = this._values[prefix];
+ if (vs) {
+ const _name = vs.get(valueKey);
+ if (_name)
+ return _name;
+ }
+ else {
+ vs = this._values[prefix] = new Map();
+ }
+ vs.set(valueKey, name);
+ const s = this._scope[prefix] || (this._scope[prefix] = []);
+ const itemIndex = s.length;
+ s[itemIndex] = value.ref;
+ name.setValue(value, { property: prefix, itemIndex });
+ return name;
+ }
+ getValue(prefix, keyOrRef) {
+ const vs = this._values[prefix];
+ if (!vs)
+ return;
+ return vs.get(keyOrRef);
+ }
+ scopeRefs(scopeName, values = this._values) {
+ return this._reduceValues(values, (name) => {
+ if (name.scopePath === undefined)
+ throw new Error(`CodeGen: name "${name}" has no value`);
+ return (0, code_1._) `${scopeName}${name.scopePath}`;
+ });
+ }
+ scopeCode(values = this._values, usedValues, getCode) {
+ return this._reduceValues(values, (name) => {
+ if (name.value === undefined)
+ throw new Error(`CodeGen: name "${name}" has no value`);
+ return name.value.code;
+ }, usedValues, getCode);
+ }
+ _reduceValues(values, valueCode, usedValues = {}, getCode) {
+ let code = code_1.nil;
+ for (const prefix in values) {
+ const vs = values[prefix];
+ if (!vs)
+ continue;
+ const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map());
+ vs.forEach((name) => {
+ if (nameSet.has(name))
+ return;
+ nameSet.set(name, UsedValueState.Started);
+ let c = valueCode(name);
+ if (c) {
+ const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
+ code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;
+ }
+ else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {
+ code = (0, code_1._) `${code}${c}${this.opts._n}`;
+ }
+ else {
+ throw new ValueError(name);
+ }
+ nameSet.set(name, UsedValueState.Completed);
+ });
+ }
+ return code;
+ }
+}
+exports.ValueScope = ValueScope;
+//# sourceMappingURL=scope.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/codegen/scope.js.map b/node_modules/ajv/dist/compile/codegen/scope.js.map
new file mode 100644
index 0000000..7afde10
--- /dev/null
+++ b/node_modules/ajv/dist/compile/codegen/scope.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../lib/compile/codegen/scope.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAezC,MAAM,UAAW,SAAQ,KAAK;IAE5B,YAAY,IAAoB;QAC9B,KAAK,CAAC,uBAAuB,IAAI,cAAc,CAAC,CAAA;QAChD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IACzB,CAAC;CACF;AAuBD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,yDAAO,CAAA;IACP,6DAAS,CAAA;AACX,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAMY,QAAA,QAAQ,GAAG;IACtB,KAAK,EAAE,IAAI,WAAI,CAAC,OAAO,CAAC;IACxB,GAAG,EAAE,IAAI,WAAI,CAAC,KAAK,CAAC;IACpB,GAAG,EAAE,IAAI,WAAI,CAAC,KAAK,CAAC;CACrB,CAAA;AAED,MAAa,KAAK;IAKhB,YAAY,EAAC,QAAQ,EAAE,MAAM,KAAkB,EAAE;QAJ9B,WAAM,GAAqC,EAAE,CAAA;QAK9D,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QACzB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACvB,CAAC;IAED,MAAM,CAAC,YAA2B;QAChC,OAAO,YAAY,YAAY,WAAI,CAAC,CAAC,CAAC,Y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L,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;iBAC3B;gBACD,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;YAC7C,CAAC,CAAC,CAAA;SACH;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAjGD,gCAiGC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/errors.d.ts b/node_modules/ajv/dist/compile/errors.d.ts
new file mode 100644
index 0000000..74eef7e
--- /dev/null
+++ b/node_modules/ajv/dist/compile/errors.d.ts
@@ -0,0 +1,13 @@
+import type { KeywordErrorCxt, KeywordErrorDefinition } from "../types";
+import { CodeGen, Code, Name } from "./codegen";
+export declare const keywordError: KeywordErrorDefinition;
+export declare const keyword$DataError: KeywordErrorDefinition;
+export interface ErrorPaths {
+ instancePath?: Code;
+ schemaPath?: string;
+ parentSchema?: boolean;
+}
+export declare function reportError(cxt: KeywordErrorCxt, error?: KeywordErrorDefinition, errorPaths?: ErrorPaths, overrideAllErrors?: boolean): void;
+export declare function reportExtraError(cxt: KeywordErrorCxt, error?: KeywordErrorDefinition, errorPaths?: ErrorPaths): void;
+export declare function resetErrorsCount(gen: CodeGen, errsCount: Name): void;
+export declare function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }: KeywordErrorCxt): void;
diff --git a/node_modules/ajv/dist/compile/errors.js b/node_modules/ajv/dist/compile/errors.js
new file mode 100644
index 0000000..e2aca7b
--- /dev/null
+++ b/node_modules/ajv/dist/compile/errors.js
@@ -0,0 +1,123 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
+const codegen_1 = require("./codegen");
+const util_1 = require("./util");
+const names_1 = require("./names");
+exports.keywordError = {
+ message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`,
+};
+exports.keyword$DataError = {
+ message: ({ keyword, schemaType }) => schemaType
+ ? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)`
+ : (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`,
+};
+function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {
+ const { it } = cxt;
+ const { gen, compositeRule, allErrors } = it;
+ const errObj = errorObjectCode(cxt, error, errorPaths);
+ if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) {
+ addError(gen, errObj);
+ }
+ else {
+ returnErrors(it, (0, codegen_1._) `[${errObj}]`);
+ }
+}
+exports.reportError = reportError;
+function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
+ const { it } = cxt;
+ const { gen, compositeRule, allErrors } = it;
+ const errObj = errorObjectCode(cxt, error, errorPaths);
+ addError(gen, errObj);
+ if (!(compositeRule || allErrors)) {
+ returnErrors(it, names_1.default.vErrors);
+ }
+}
+exports.reportExtraError = reportExtraError;
+function resetErrorsCount(gen, errsCount) {
+ gen.assign(names_1.default.errors, errsCount);
+ gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
+}
+exports.resetErrorsCount = resetErrorsCount;
+function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {
+ /* istanbul ignore if */
+ if (errsCount === undefined)
+ throw new Error("ajv implementation error");
+ const err = gen.name("err");
+ gen.forRange("i", errsCount, names_1.default.errors, (i) => {
+ gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`);
+ gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
+ gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`);
+ if (it.opts.verbose) {
+ gen.assign((0, codegen_1._) `${err}.schema`, schemaValue);
+ gen.assign((0, codegen_1._) `${err}.data`, data);
+ }
+ });
+}
+exports.extendErrors = extendErrors;
+function addError(gen, errObj) {
+ const err = gen.const("err", errObj);
+ gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`);
+ gen.code((0, codegen_1._) `${names_1.default.errors}++`);
+}
+function returnErrors(it, errs) {
+ const { gen, validateName, schemaEnv } = it;
+ if (schemaEnv.$async) {
+ gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`);
+ }
+ else {
+ gen.assign((0, codegen_1._) `${validateName}.errors`, errs);
+ gen.return(false);
+ }
+}
+const E = {
+ keyword: new codegen_1.Name("keyword"),
+ schemaPath: new codegen_1.Name("schemaPath"),
+ params: new codegen_1.Name("params"),
+ propertyName: new codegen_1.Name("propertyName"),
+ message: new codegen_1.Name("message"),
+ schema: new codegen_1.Name("schema"),
+ parentSchema: new codegen_1.Name("parentSchema"),
+};
+function errorObjectCode(cxt, error, errorPaths) {
+ const { createErrors } = cxt.it;
+ if (createErrors === false)
+ return (0, codegen_1._) `{}`;
+ return errorObject(cxt, error, errorPaths);
+}
+function errorObject(cxt, error, errorPaths = {}) {
+ const { gen, it } = cxt;
+ const keyValues = [
+ errorInstancePath(it, errorPaths),
+ errorSchemaPath(cxt, errorPaths),
+ ];
+ extraErrorProps(cxt, error, keyValues);
+ return gen.object(...keyValues);
+}
+function errorInstancePath({ errorPath }, { instancePath }) {
+ const instPath = instancePath
+ ? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}`
+ : errorPath;
+ return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];
+}
+function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
+ let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`;
+ if (schemaPath) {
+ schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
+ }
+ return [E.schemaPath, schPath];
+}
+function extraErrorProps(cxt, { params, message }, keyValues) {
+ const { keyword, data, schemaValue, it } = cxt;
+ const { opts, propertyName, topSchemaRef, schemaPath } = it;
+ keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._) `{}`]);
+ if (opts.messages) {
+ keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
+ }
+ if (opts.verbose) {
+ keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
+ }
+ if (propertyName)
+ keyValues.push([E.propertyName, propertyName]);
+}
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/errors.js.map b/node_modules/ajv/dist/compile/errors.js.map
new file mode 100644
index 0000000..6620891
--- /dev/null
+++ b/node_modules/ajv/dist/compile/errors.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../lib/compile/errors.ts"],"names":[],"mappings":";;;AAEA,uCAAgE;AAEhE,iCAAyC;AACzC,mCAAuB;AAEV,QAAA,YAAY,GAA2B;IAClD,OAAO,EAAE,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA,cAAc,OAAO,sBAAsB;CACvE,CAAA;AAEY,QAAA,iBAAiB,GAA2B;IACvD,OAAO,EAAE,CAAC,EAAC,OAAO,EAAE,UAAU,EAAC,EAAE,EAAE,CACjC,UAAU;QACR,CAAC,CAAC,IAAA,aAAG,EAAA,IAAI,OAAO,qBAAqB,UAAU,UAAU;QACzD,CAAC,CAAC,IAAA,aAAG,EAAA,IAAI,OAAO,8BAA8B;CACnD,CAAA;AAQD,SAAgB,WAAW,CACzB,GAAoB,EACpB,QAAgC,oBAAY,EAC5C,UAAuB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,MAAM,EAAE,WAAW,CAAC,EACvB,CAAC,CAAC,CAAC,YAAY,EAAE,IAAA,WAAC,EAAA,GAAG,YAAY,GAAG,UAAU,EAAE,CAAC,EACjD,CAAC,eAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CACf,CAAA;KACF;IACD,IAAI,YAAY;QAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA;AAClE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/index.d.ts b/node_modules/ajv/dist/compile/index.d.ts
new file mode 100644
index 0000000..ca8920a
--- /dev/null
+++ b/node_modules/ajv/dist/compile/index.d.ts
@@ -0,0 +1,80 @@
+import type { AnySchema, AnySchemaObject, AnyValidateFunction, EvaluatedProperties, EvaluatedItems } from "../types";
+import type Ajv from "../core";
+import type { InstanceOptions } from "../core";
+import { CodeGen, Name, Code, ValueScopeName } from "./codegen";
+import { LocalRefs } from "./resolve";
+import { JSONType } from "./rules";
+export declare type SchemaRefs = {
+ [Ref in string]?: SchemaEnv | AnySchema;
+};
+export interface SchemaCxt {
+ readonly gen: CodeGen;
+ readonly allErrors?: boolean;
+ readonly data: Name;
+ readonly parentData: Name;
+ readonly parentDataProperty: Code | number;
+ readonly dataNames: Name[];
+ readonly dataPathArr: (Code | number)[];
+ readonly dataLevel: number;
+ dataTypes: JSONType[];
+ definedProperties: Set;
+ readonly topSchemaRef: Code;
+ readonly validateName: Name;
+ evaluated?: Name;
+ readonly ValidationError?: Name;
+ readonly schema: AnySchema;
+ readonly schemaEnv: SchemaEnv;
+ readonly rootId: string;
+ baseId: string;
+ readonly schemaPath: Code;
+ readonly errSchemaPath: string;
+ readonly errorPath: Code;
+ readonly propertyName?: Name;
+ readonly compositeRule?: boolean;
+ props?: EvaluatedProperties | Name;
+ items?: EvaluatedItems | Name;
+ jtdDiscriminator?: string;
+ jtdMetadata?: boolean;
+ readonly createErrors?: boolean;
+ readonly opts: InstanceOptions;
+ readonly self: Ajv;
+}
+export interface SchemaObjCxt extends SchemaCxt {
+ readonly schema: AnySchemaObject;
+}
+interface SchemaEnvArgs {
+ readonly schema: AnySchema;
+ readonly schemaId?: "$id" | "id";
+ readonly root?: SchemaEnv;
+ readonly baseId?: string;
+ readonly schemaPath?: string;
+ readonly localRefs?: LocalRefs;
+ readonly meta?: boolean;
+}
+export declare class SchemaEnv implements SchemaEnvArgs {
+ readonly schema: AnySchema;
+ readonly schemaId?: "$id" | "id";
+ readonly root: SchemaEnv;
+ baseId: string;
+ schemaPath?: string;
+ localRefs?: LocalRefs;
+ readonly meta?: boolean;
+ readonly $async?: boolean;
+ readonly refs: SchemaRefs;
+ readonly dynamicAnchors: {
+ [Ref in string]?: true;
+ };
+ validate?: AnyValidateFunction;
+ validateName?: ValueScopeName;
+ serialize?: (data: unknown) => string;
+ serializeName?: ValueScopeName;
+ parse?: (data: string) => unknown;
+ parseName?: ValueScopeName;
+ constructor(env: SchemaEnvArgs);
+}
+export declare function compileSchema(this: Ajv, sch: SchemaEnv): SchemaEnv;
+export declare function resolveRef(this: Ajv, root: SchemaEnv, baseId: string, ref: string): AnySchema | SchemaEnv | undefined;
+export declare function getCompilingSchema(this: Ajv, schEnv: SchemaEnv): SchemaEnv | void;
+export declare function resolveSchema(this: Ajv, root: SchemaEnv, // root object with properties schema, refs TODO below SchemaEnv is assigned to it
+ref: string): SchemaEnv | undefined;
+export {};
diff --git a/node_modules/ajv/dist/compile/index.js b/node_modules/ajv/dist/compile/index.js
new file mode 100644
index 0000000..b125ecd
--- /dev/null
+++ b/node_modules/ajv/dist/compile/index.js
@@ -0,0 +1,242 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
+const codegen_1 = require("./codegen");
+const validation_error_1 = require("../runtime/validation_error");
+const names_1 = require("./names");
+const resolve_1 = require("./resolve");
+const util_1 = require("./util");
+const validate_1 = require("./validate");
+class SchemaEnv {
+ constructor(env) {
+ var _a;
+ this.refs = {};
+ this.dynamicAnchors = {};
+ let schema;
+ if (typeof env.schema == "object")
+ schema = env.schema;
+ this.schema = env.schema;
+ this.schemaId = env.schemaId;
+ this.root = env.root || this;
+ this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
+ this.schemaPath = env.schemaPath;
+ this.localRefs = env.localRefs;
+ this.meta = env.meta;
+ this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
+ this.refs = {};
+ }
+}
+exports.SchemaEnv = SchemaEnv;
+// let codeSize = 0
+// let nodeCount = 0
+// Compiles schema in SchemaEnv
+function compileSchema(sch) {
+ // TODO refactor - remove compilations
+ const _sch = getCompilingSchema.call(this, sch);
+ if (_sch)
+ return _sch;
+ const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails
+ const { es5, lines } = this.opts.code;
+ const { ownProperties } = this.opts;
+ const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
+ let _ValidationError;
+ if (sch.$async) {
+ _ValidationError = gen.scopeValue("Error", {
+ ref: validation_error_1.default,
+ code: (0, codegen_1._) `require("ajv/dist/runtime/validation_error").default`,
+ });
+ }
+ const validateName = gen.scopeName("validate");
+ sch.validateName = validateName;
+ const schemaCxt = {
+ gen,
+ allErrors: this.opts.allErrors,
+ data: names_1.default.data,
+ parentData: names_1.default.parentData,
+ parentDataProperty: names_1.default.parentDataProperty,
+ dataNames: [names_1.default.data],
+ dataPathArr: [codegen_1.nil],
+ dataLevel: 0,
+ dataTypes: [],
+ definedProperties: new Set(),
+ topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true
+ ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }
+ : { ref: sch.schema }),
+ validateName,
+ ValidationError: _ValidationError,
+ schema: sch.schema,
+ schemaEnv: sch,
+ rootId,
+ baseId: sch.baseId || rootId,
+ schemaPath: codegen_1.nil,
+ errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
+ errorPath: (0, codegen_1._) `""`,
+ opts: this.opts,
+ self: this,
+ };
+ let sourceCode;
+ try {
+ this._compilations.add(sch);
+ (0, validate_1.validateFunctionCode)(schemaCxt);
+ gen.optimize(this.opts.code.optimize);
+ // gen.optimize(1)
+ const validateCode = gen.toString();
+ sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
+ // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))
+ if (this.opts.code.process)
+ sourceCode = this.opts.code.process(sourceCode, sch);
+ // console.log("\n\n\n *** \n", sourceCode)
+ const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
+ const validate = makeValidate(this, this.scope.get());
+ this.scope.value(validateName, { ref: validate });
+ validate.errors = null;
+ validate.schema = sch.schema;
+ validate.schemaEnv = sch;
+ if (sch.$async)
+ validate.$async = true;
+ if (this.opts.code.source === true) {
+ validate.source = { validateName, validateCode, scopeValues: gen._values };
+ }
+ if (this.opts.unevaluated) {
+ const { props, items } = schemaCxt;
+ validate.evaluated = {
+ props: props instanceof codegen_1.Name ? undefined : props,
+ items: items instanceof codegen_1.Name ? undefined : items,
+ dynamicProps: props instanceof codegen_1.Name,
+ dynamicItems: items instanceof codegen_1.Name,
+ };
+ if (validate.source)
+ validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
+ }
+ sch.validate = validate;
+ return sch;
+ }
+ catch (e) {
+ delete sch.validate;
+ delete sch.validateName;
+ if (sourceCode)
+ this.logger.error("Error compiling schema, function code:", sourceCode);
+ // console.log("\n\n\n *** \n", sourceCode, this.opts)
+ throw e;
+ }
+ finally {
+ this._compilations.delete(sch);
+ }
+}
+exports.compileSchema = compileSchema;
+function resolveRef(root, baseId, ref) {
+ var _a;
+ ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
+ const schOrFunc = root.refs[ref];
+ if (schOrFunc)
+ return schOrFunc;
+ let _sch = resolve.call(this, root, ref);
+ if (_sch === undefined) {
+ const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv
+ const { schemaId } = this.opts;
+ if (schema)
+ _sch = new SchemaEnv({ schema, schemaId, root, baseId });
+ }
+ if (_sch === undefined)
+ return;
+ return (root.refs[ref] = inlineOrCompile.call(this, _sch));
+}
+exports.resolveRef = resolveRef;
+function inlineOrCompile(sch) {
+ if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
+ return sch.schema;
+ return sch.validate ? sch : compileSchema.call(this, sch);
+}
+// Index of schema compilation in the currently compiled list
+function getCompilingSchema(schEnv) {
+ for (const sch of this._compilations) {
+ if (sameSchemaEnv(sch, schEnv))
+ return sch;
+ }
+}
+exports.getCompilingSchema = getCompilingSchema;
+function sameSchemaEnv(s1, s2) {
+ return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
+}
+// resolve and compile the references ($ref)
+// TODO returns AnySchemaObject (if the schema can be inlined) or validation function
+function resolve(root, // information about the root schema for the current schema
+ref // reference to resolve
+) {
+ let sch;
+ while (typeof (sch = this.refs[ref]) == "string")
+ ref = sch;
+ return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
+}
+// Resolve schema, its root and baseId
+function resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it
+ref // reference to resolve
+) {
+ const p = this.opts.uriResolver.parse(ref);
+ const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
+ let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);
+ // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests
+ if (Object.keys(root.schema).length > 0 && refPath === baseId) {
+ return getJsonPointer.call(this, p, root);
+ }
+ const id = (0, resolve_1.normalizeId)(refPath);
+ const schOrRef = this.refs[id] || this.schemas[id];
+ if (typeof schOrRef == "string") {
+ const sch = resolveSchema.call(this, root, schOrRef);
+ if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
+ return;
+ return getJsonPointer.call(this, p, sch);
+ }
+ if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
+ return;
+ if (!schOrRef.validate)
+ compileSchema.call(this, schOrRef);
+ if (id === (0, resolve_1.normalizeId)(ref)) {
+ const { schema } = schOrRef;
+ const { schemaId } = this.opts;
+ const schId = schema[schemaId];
+ if (schId)
+ baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
+ return new SchemaEnv({ schema, schemaId, root, baseId });
+ }
+ return getJsonPointer.call(this, p, schOrRef);
+}
+exports.resolveSchema = resolveSchema;
+const PREVENT_SCOPE_CHANGE = new Set([
+ "properties",
+ "patternProperties",
+ "enum",
+ "dependencies",
+ "definitions",
+]);
+function getJsonPointer(parsedRef, { baseId, schema, root }) {
+ var _a;
+ if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
+ return;
+ for (const part of parsedRef.fragment.slice(1).split("/")) {
+ if (typeof schema === "boolean")
+ return;
+ const partSchema = schema[(0, util_1.unescapeFragment)(part)];
+ if (partSchema === undefined)
+ return;
+ schema = partSchema;
+ // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?
+ const schId = typeof schema === "object" && schema[this.opts.schemaId];
+ if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
+ baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
+ }
+ }
+ let env;
+ if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
+ const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
+ env = resolveSchema.call(this, root, $ref);
+ }
+ // even though resolution failed we need to return SchemaEnv to throw exception
+ // so that compileAsync loads missing schema.
+ const { schemaId } = this.opts;
+ env = env || new SchemaEnv({ schema, schemaId, root, baseId });
+ if (env.schema !== env.root.schema)
+ return env;
+ return undefined;
+}
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/index.js.map b/node_modules/ajv/dist/compile/index.js.map
new file mode 100644
index 0000000..3fd890e
--- /dev/null
+++ b/node_modules/ajv/dist/compile/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/compile/index.ts"],"names":[],"mappings":";;;AAUA,uCAAgF;AAChF,kEAAyD;AACzD,mCAAuB;AACvB,uCAAkG;AAClG,iCAA6D;AAC7D,yCAA+C;AA0D/C,MAAa,SAAS;IAkBpB,YAAY,GAAkB;;QATrB,SAAI,GAAe,EAAE,CAAA;QACrB,mBAAc,GAA6B,EAAE,CAAA;QASpD,IAAI,MAAmC,CAAA;QACvC,IAAI,OAAO,GAAG,CAAC,MAAM,IAAI,QAAQ;YAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QACtD,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC5B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,IAAI,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAA,GAAG,CAAC,MAAM,mCAAI,IAAA,qBAAW,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,GAAG,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAA;QACxE,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAA;QAChC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAA;QAC5B,IAAI,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.d.ts b/node_modules/ajv/dist/compile/jtd/parse.d.ts
new file mode 100644
index 0000000..618c64a
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/parse.d.ts
@@ -0,0 +1,4 @@
+import type Ajv from "../../core";
+import { SchemaObjectMap } from "./types";
+import { SchemaEnv } from "..";
+export default function compileParser(this: Ajv, sch: SchemaEnv, definitions: SchemaObjectMap): SchemaEnv;
diff --git a/node_modules/ajv/dist/compile/jtd/parse.js b/node_modules/ajv/dist/compile/jtd/parse.js
new file mode 100644
index 0000000..8fc94fd
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/parse.js
@@ -0,0 +1,350 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const types_1 = require("./types");
+const __1 = require("..");
+const codegen_1 = require("../codegen");
+const ref_error_1 = require("../ref_error");
+const names_1 = require("../names");
+const code_1 = require("../../vocabularies/code");
+const ref_1 = require("../../vocabularies/jtd/ref");
+const type_1 = require("../../vocabularies/jtd/type");
+const parseJson_1 = require("../../runtime/parseJson");
+const util_1 = require("../util");
+const timestamp_1 = require("../../runtime/timestamp");
+const genParse = {
+ elements: parseElements,
+ values: parseValues,
+ discriminator: parseDiscriminator,
+ properties: parseProperties,
+ optionalProperties: parseProperties,
+ enum: parseEnum,
+ type: parseType,
+ ref: parseRef,
+};
+function compileParser(sch, definitions) {
+ const _sch = __1.getCompilingSchema.call(this, sch);
+ if (_sch)
+ return _sch;
+ const { es5, lines } = this.opts.code;
+ const { ownProperties } = this.opts;
+ const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
+ const parseName = gen.scopeName("parse");
+ const cxt = {
+ self: this,
+ gen,
+ schema: sch.schema,
+ schemaEnv: sch,
+ definitions,
+ data: names_1.default.data,
+ parseName,
+ char: gen.name("c"),
+ };
+ let sourceCode;
+ try {
+ this._compilations.add(sch);
+ sch.parseName = parseName;
+ parserFunction(cxt);
+ gen.optimize(this.opts.code.optimize);
+ const parseFuncCode = gen.toString();
+ sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${parseFuncCode}`;
+ const makeParse = new Function(`${names_1.default.scope}`, sourceCode);
+ const parse = makeParse(this.scope.get());
+ this.scope.value(parseName, { ref: parse });
+ sch.parse = parse;
+ }
+ catch (e) {
+ if (sourceCode)
+ this.logger.error("Error compiling parser, function code:", sourceCode);
+ delete sch.parse;
+ delete sch.parseName;
+ throw e;
+ }
+ finally {
+ this._compilations.delete(sch);
+ }
+ return sch;
+}
+exports.default = compileParser;
+const undef = (0, codegen_1._) `undefined`;
+function parserFunction(cxt) {
+ const { gen, parseName, char } = cxt;
+ gen.func(parseName, (0, codegen_1._) `${names_1.default.json}, ${names_1.default.jsonPos}, ${names_1.default.jsonPart}`, false, () => {
+ gen.let(names_1.default.data);
+ gen.let(char);
+ gen.assign((0, codegen_1._) `${parseName}.message`, undef);
+ gen.assign((0, codegen_1._) `${parseName}.position`, undef);
+ gen.assign(names_1.default.jsonPos, (0, codegen_1._) `${names_1.default.jsonPos} || 0`);
+ gen.const(names_1.default.jsonLen, (0, codegen_1._) `${names_1.default.json}.length`);
+ parseCode(cxt);
+ skipWhitespace(cxt);
+ gen.if(names_1.default.jsonPart, () => {
+ gen.assign((0, codegen_1._) `${parseName}.position`, names_1.default.jsonPos);
+ gen.return(names_1.default.data);
+ });
+ gen.if((0, codegen_1._) `${names_1.default.jsonPos} === ${names_1.default.jsonLen}`, () => gen.return(names_1.default.data));
+ jsonSyntaxError(cxt);
+ });
+}
+function parseCode(cxt) {
+ let form;
+ for (const key of types_1.jtdForms) {
+ if (key in cxt.schema) {
+ form = key;
+ break;
+ }
+ }
+ if (form)
+ parseNullable(cxt, genParse[form]);
+ else
+ parseEmpty(cxt);
+}
+const parseBoolean = parseBooleanToken(true, parseBooleanToken(false, jsonSyntaxError));
+function parseNullable(cxt, parseForm) {
+ const { gen, schema, data } = cxt;
+ if (!schema.nullable)
+ return parseForm(cxt);
+ tryParseToken(cxt, "null", parseForm, () => gen.assign(data, null));
+}
+function parseElements(cxt) {
+ const { gen, schema, data } = cxt;
+ parseToken(cxt, "[");
+ const ix = gen.let("i", 0);
+ gen.assign(data, (0, codegen_1._) `[]`);
+ parseItems(cxt, "]", () => {
+ const el = gen.let("el");
+ parseCode({ ...cxt, schema: schema.elements, data: el });
+ gen.assign((0, codegen_1._) `${data}[${ix}++]`, el);
+ });
+}
+function parseValues(cxt) {
+ const { gen, schema, data } = cxt;
+ parseToken(cxt, "{");
+ gen.assign(data, (0, codegen_1._) `{}`);
+ parseItems(cxt, "}", () => parseKeyValue(cxt, schema.values));
+}
+function parseItems(cxt, endToken, block) {
+ tryParseItems(cxt, endToken, block);
+ parseToken(cxt, endToken);
+}
+function tryParseItems(cxt, endToken, block) {
+ const { gen } = cxt;
+ gen.for((0, codegen_1._) `;${names_1.default.jsonPos}<${names_1.default.jsonLen} && ${jsonSlice(1)}!==${endToken};`, () => {
+ block();
+ tryParseToken(cxt, ",", () => gen.break(), hasItem);
+ });
+ function hasItem() {
+ tryParseToken(cxt, endToken, () => { }, jsonSyntaxError);
+ }
+}
+function parseKeyValue(cxt, schema) {
+ const { gen } = cxt;
+ const key = gen.let("key");
+ parseString({ ...cxt, data: key });
+ parseToken(cxt, ":");
+ parsePropertyValue(cxt, key, schema);
+}
+function parseDiscriminator(cxt) {
+ const { gen, data, schema } = cxt;
+ const { discriminator, mapping } = schema;
+ parseToken(cxt, "{");
+ gen.assign(data, (0, codegen_1._) `{}`);
+ const startPos = gen.const("pos", names_1.default.jsonPos);
+ const value = gen.let("value");
+ const tag = gen.let("tag");
+ tryParseItems(cxt, "}", () => {
+ const key = gen.let("key");
+ parseString({ ...cxt, data: key });
+ parseToken(cxt, ":");
+ gen.if((0, codegen_1._) `${key} === ${discriminator}`, () => {
+ parseString({ ...cxt, data: tag });
+ gen.assign((0, codegen_1._) `${data}[${key}]`, tag);
+ gen.break();
+ }, () => parseEmpty({ ...cxt, data: value }) // can be discarded/skipped
+ );
+ });
+ gen.assign(names_1.default.jsonPos, startPos);
+ gen.if((0, codegen_1._) `${tag} === undefined`);
+ parsingError(cxt, (0, codegen_1.str) `discriminator tag not found`);
+ for (const tagValue in mapping) {
+ gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);
+ parseSchemaProperties({ ...cxt, schema: mapping[tagValue] }, discriminator);
+ }
+ gen.else();
+ parsingError(cxt, (0, codegen_1.str) `discriminator value not in schema`);
+ gen.endIf();
+}
+function parseProperties(cxt) {
+ const { gen, data } = cxt;
+ parseToken(cxt, "{");
+ gen.assign(data, (0, codegen_1._) `{}`);
+ parseSchemaProperties(cxt);
+}
+function parseSchemaProperties(cxt, discriminator) {
+ const { gen, schema, data } = cxt;
+ const { properties, optionalProperties, additionalProperties } = schema;
+ parseItems(cxt, "}", () => {
+ const key = gen.let("key");
+ parseString({ ...cxt, data: key });
+ parseToken(cxt, ":");
+ gen.if(false);
+ parseDefinedProperty(cxt, key, properties);
+ parseDefinedProperty(cxt, key, optionalProperties);
+ if (discriminator) {
+ gen.elseIf((0, codegen_1._) `${key} === ${discriminator}`);
+ const tag = gen.let("tag");
+ parseString({ ...cxt, data: tag }); // can be discarded, it is already assigned
+ }
+ gen.else();
+ if (additionalProperties) {
+ parseEmpty({ ...cxt, data: (0, codegen_1._) `${data}[${key}]` });
+ }
+ else {
+ parsingError(cxt, (0, codegen_1.str) `property ${key} not allowed`);
+ }
+ gen.endIf();
+ });
+ if (properties) {
+ const hasProp = (0, code_1.hasPropFunc)(gen);
+ const allProps = (0, codegen_1.and)(...Object.keys(properties).map((p) => (0, codegen_1._) `${hasProp}.call(${data}, ${p})`));
+ gen.if((0, codegen_1.not)(allProps), () => parsingError(cxt, (0, codegen_1.str) `missing required properties`));
+ }
+}
+function parseDefinedProperty(cxt, key, schemas = {}) {
+ const { gen } = cxt;
+ for (const prop in schemas) {
+ gen.elseIf((0, codegen_1._) `${key} === ${prop}`);
+ parsePropertyValue(cxt, key, schemas[prop]);
+ }
+}
+function parsePropertyValue(cxt, key, schema) {
+ parseCode({ ...cxt, schema, data: (0, codegen_1._) `${cxt.data}[${key}]` });
+}
+function parseType(cxt) {
+ const { gen, schema, data, self } = cxt;
+ switch (schema.type) {
+ case "boolean":
+ parseBoolean(cxt);
+ break;
+ case "string":
+ parseString(cxt);
+ break;
+ case "timestamp": {
+ parseString(cxt);
+ const vts = (0, util_1.useFunc)(gen, timestamp_1.default);
+ const { allowDate, parseDate } = self.opts;
+ const notValid = allowDate ? (0, codegen_1._) `!${vts}(${data}, true)` : (0, codegen_1._) `!${vts}(${data})`;
+ const fail = parseDate
+ ? (0, codegen_1.or)(notValid, (0, codegen_1._) `(${data} = new Date(${data}), false)`, (0, codegen_1._) `isNaN(${data}.valueOf())`)
+ : notValid;
+ gen.if(fail, () => parsingError(cxt, (0, codegen_1.str) `invalid timestamp`));
+ break;
+ }
+ case "float32":
+ case "float64":
+ parseNumber(cxt);
+ break;
+ default: {
+ const t = schema.type;
+ if (!self.opts.int32range && (t === "int32" || t === "uint32")) {
+ parseNumber(cxt, 16); // 2 ** 53 - max safe integer
+ if (t === "uint32") {
+ gen.if((0, codegen_1._) `${data} < 0`, () => parsingError(cxt, (0, codegen_1.str) `integer out of range`));
+ }
+ }
+ else {
+ const [min, max, maxDigits] = type_1.intRange[t];
+ parseNumber(cxt, maxDigits);
+ gen.if((0, codegen_1._) `${data} < ${min} || ${data} > ${max}`, () => parsingError(cxt, (0, codegen_1.str) `integer out of range`));
+ }
+ }
+ }
+}
+function parseString(cxt) {
+ parseToken(cxt, '"');
+ parseWith(cxt, parseJson_1.parseJsonString);
+}
+function parseEnum(cxt) {
+ const { gen, data, schema } = cxt;
+ const enumSch = schema.enum;
+ parseToken(cxt, '"');
+ // TODO loopEnum
+ gen.if(false);
+ for (const value of enumSch) {
+ const valueStr = JSON.stringify(value).slice(1); // remove starting quote
+ gen.elseIf((0, codegen_1._) `${jsonSlice(valueStr.length)} === ${valueStr}`);
+ gen.assign(data, (0, codegen_1.str) `${value}`);
+ gen.add(names_1.default.jsonPos, valueStr.length);
+ }
+ gen.else();
+ jsonSyntaxError(cxt);
+ gen.endIf();
+}
+function parseNumber(cxt, maxDigits) {
+ const { gen } = cxt;
+ skipWhitespace(cxt);
+ gen.if((0, codegen_1._) `"-0123456789".indexOf(${jsonSlice(1)}) < 0`, () => jsonSyntaxError(cxt), () => parseWith(cxt, parseJson_1.parseJsonNumber, maxDigits));
+}
+function parseBooleanToken(bool, fail) {
+ return (cxt) => {
+ const { gen, data } = cxt;
+ tryParseToken(cxt, `${bool}`, () => fail(cxt), () => gen.assign(data, bool));
+ };
+}
+function parseRef(cxt) {
+ const { gen, self, definitions, schema, schemaEnv } = cxt;
+ const { ref } = schema;
+ const refSchema = definitions[ref];
+ if (!refSchema)
+ throw new ref_error_1.default(self.opts.uriResolver, "", ref, `No definition ${ref}`);
+ if (!(0, ref_1.hasRef)(refSchema))
+ return parseCode({ ...cxt, schema: refSchema });
+ const { root } = schemaEnv;
+ const sch = compileParser.call(self, new __1.SchemaEnv({ schema: refSchema, root }), definitions);
+ partialParse(cxt, getParser(gen, sch), true);
+}
+function getParser(gen, sch) {
+ return sch.parse
+ ? gen.scopeValue("parse", { ref: sch.parse })
+ : (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.parse`;
+}
+function parseEmpty(cxt) {
+ parseWith(cxt, parseJson_1.parseJson);
+}
+function parseWith(cxt, parseFunc, args) {
+ partialParse(cxt, (0, util_1.useFunc)(cxt.gen, parseFunc), args);
+}
+function partialParse(cxt, parseFunc, args) {
+ const { gen, data } = cxt;
+ gen.assign(data, (0, codegen_1._) `${parseFunc}(${names_1.default.json}, ${names_1.default.jsonPos}${args ? (0, codegen_1._) `, ${args}` : codegen_1.nil})`);
+ gen.assign(names_1.default.jsonPos, (0, codegen_1._) `${parseFunc}.position`);
+ gen.if((0, codegen_1._) `${data} === undefined`, () => parsingError(cxt, (0, codegen_1._) `${parseFunc}.message`));
+}
+function parseToken(cxt, tok) {
+ tryParseToken(cxt, tok, jsonSyntaxError);
+}
+function tryParseToken(cxt, tok, fail, success) {
+ const { gen } = cxt;
+ const n = tok.length;
+ skipWhitespace(cxt);
+ gen.if((0, codegen_1._) `${jsonSlice(n)} === ${tok}`, () => {
+ gen.add(names_1.default.jsonPos, n);
+ success === null || success === void 0 ? void 0 : success(cxt);
+ }, () => fail(cxt));
+}
+function skipWhitespace({ gen, char: c }) {
+ gen.code((0, codegen_1._) `while((${c}=${names_1.default.json}[${names_1.default.jsonPos}],${c}===" "||${c}==="\\n"||${c}==="\\r"||${c}==="\\t"))${names_1.default.jsonPos}++;`);
+}
+function jsonSlice(len) {
+ return len === 1
+ ? (0, codegen_1._) `${names_1.default.json}[${names_1.default.jsonPos}]`
+ : (0, codegen_1._) `${names_1.default.json}.slice(${names_1.default.jsonPos}, ${names_1.default.jsonPos}+${len})`;
+}
+function jsonSyntaxError(cxt) {
+ parsingError(cxt, (0, codegen_1._) `"unexpected token " + ${names_1.default.json}[${names_1.default.jsonPos}]`);
+}
+function parsingError({ gen, parseName }, msg) {
+ gen.assign((0, codegen_1._) `${parseName}.message`, msg);
+ gen.assign((0, codegen_1._) `${parseName}.position`, names_1.default.jsonPos);
+ gen.return(undef);
+}
+//# sourceMappingURL=parse.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/jtd/parse.js.map b/node_modules/ajv/dist/compile/jtd/parse.js.map
new file mode 100644
index 0000000..a1e8627
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/parse.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../../lib/compile/jtd/parse.ts"],"names":[],"mappings":";;AAEA,mCAA0D;AAC1D,0BAAgD;AAChD,wCAAmF;AACnF,4CAA0C;AAC1C,oCAAwB;AACxB,kDAAmD;AACnD,oDAAiD;AACjD,sDAA6D;AAC7D,uDAAmF;AACnF,kCAA+B;AAC/B,uDAAoD;AAIpD,MAAM,QAAQ,GAA+B;IAC3C,QAAQ,EAAE,aAAa;IACvB,MAAM,EAA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eAAC,CAAC,OAAO,KAAK,CAC7G,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,GAAkB;IACnC,OAAO,GAAG,KAAK,CAAC;QACd,CAAC,CAAC,IAAA,WAAC,EAAA,GAAG,eAAC,CAAC,IAAI,IAAI,eAAC,CAAC,OAAO,GAAG;QAC5B,CAAC,CAAC,IAAA,WAAC,EAAA,GAAG,eAAC,CAAC,IAAI,UAAU,eAAC,CAAC,OAAO,KAAK,eAAC,CAAC,OAAO,IAAI,GAAG,GAAG,CAAA;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,GAAa;IACpC,YAAY,CAAC,GAAG,EAAE,IAAA,WAAC,EAAA,yBAAyB,eAAC,CAAC,IAAI,IAAI,eAAC,CAAC,OAAO,GAAG,CAAC,CAAA;AACrE,CAAC;AAED,SAAS,YAAY,CAAC,EAAC,GAAG,EAAE,SAAS,EAAW,EAAE,GAAS;IACzD,GAAG,CAAC,MAAM,CAAC,IAAA,WAAC,EAAA,GAAG,SAAS,UAAU,EAAE,GAAG,CAAC,CAAA;IACxC,GAAG,CAAC,MAAM,CAAC,IAAA,WAAC,EAAA,GAAG,SAAS,WAAW,EAAE,eAAC,CAAC,OAAO,CAAC,CAAA;IAC/C,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACnB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/jtd/serialize.d.ts b/node_modules/ajv/dist/compile/jtd/serialize.d.ts
new file mode 100644
index 0000000..b0413d7
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/serialize.d.ts
@@ -0,0 +1,4 @@
+import type Ajv from "../../core";
+import { SchemaObjectMap } from "./types";
+import { SchemaEnv } from "..";
+export default function compileSerializer(this: Ajv, sch: SchemaEnv, definitions: SchemaObjectMap): SchemaEnv;
diff --git a/node_modules/ajv/dist/compile/jtd/serialize.js b/node_modules/ajv/dist/compile/jtd/serialize.js
new file mode 100644
index 0000000..29bf234
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/serialize.js
@@ -0,0 +1,218 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const types_1 = require("./types");
+const __1 = require("..");
+const codegen_1 = require("../codegen");
+const ref_error_1 = require("../ref_error");
+const names_1 = require("../names");
+const code_1 = require("../../vocabularies/code");
+const ref_1 = require("../../vocabularies/jtd/ref");
+const util_1 = require("../util");
+const quote_1 = require("../../runtime/quote");
+const genSerialize = {
+ elements: serializeElements,
+ values: serializeValues,
+ discriminator: serializeDiscriminator,
+ properties: serializeProperties,
+ optionalProperties: serializeProperties,
+ enum: serializeString,
+ type: serializeType,
+ ref: serializeRef,
+};
+function compileSerializer(sch, definitions) {
+ const _sch = __1.getCompilingSchema.call(this, sch);
+ if (_sch)
+ return _sch;
+ const { es5, lines } = this.opts.code;
+ const { ownProperties } = this.opts;
+ const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
+ const serializeName = gen.scopeName("serialize");
+ const cxt = {
+ self: this,
+ gen,
+ schema: sch.schema,
+ schemaEnv: sch,
+ definitions,
+ data: names_1.default.data,
+ };
+ let sourceCode;
+ try {
+ this._compilations.add(sch);
+ sch.serializeName = serializeName;
+ gen.func(serializeName, names_1.default.data, false, () => {
+ gen.let(names_1.default.json, (0, codegen_1.str) ``);
+ serializeCode(cxt);
+ gen.return(names_1.default.json);
+ });
+ gen.optimize(this.opts.code.optimize);
+ const serializeFuncCode = gen.toString();
+ sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${serializeFuncCode}`;
+ const makeSerialize = new Function(`${names_1.default.scope}`, sourceCode);
+ const serialize = makeSerialize(this.scope.get());
+ this.scope.value(serializeName, { ref: serialize });
+ sch.serialize = serialize;
+ }
+ catch (e) {
+ if (sourceCode)
+ this.logger.error("Error compiling serializer, function code:", sourceCode);
+ delete sch.serialize;
+ delete sch.serializeName;
+ throw e;
+ }
+ finally {
+ this._compilations.delete(sch);
+ }
+ return sch;
+}
+exports.default = compileSerializer;
+function serializeCode(cxt) {
+ let form;
+ for (const key of types_1.jtdForms) {
+ if (key in cxt.schema) {
+ form = key;
+ break;
+ }
+ }
+ serializeNullable(cxt, form ? genSerialize[form] : serializeEmpty);
+}
+function serializeNullable(cxt, serializeForm) {
+ const { gen, schema, data } = cxt;
+ if (!schema.nullable)
+ return serializeForm(cxt);
+ gen.if((0, codegen_1._) `${data} === undefined || ${data} === null`, () => gen.add(names_1.default.json, (0, codegen_1._) `"null"`), () => serializeForm(cxt));
+}
+function serializeElements(cxt) {
+ const { gen, schema, data } = cxt;
+ gen.add(names_1.default.json, (0, codegen_1.str) `[`);
+ const first = gen.let("first", true);
+ gen.forOf("el", data, (el) => {
+ addComma(cxt, first);
+ serializeCode({ ...cxt, schema: schema.elements, data: el });
+ });
+ gen.add(names_1.default.json, (0, codegen_1.str) `]`);
+}
+function serializeValues(cxt) {
+ const { gen, schema, data } = cxt;
+ gen.add(names_1.default.json, (0, codegen_1.str) `{`);
+ const first = gen.let("first", true);
+ gen.forIn("key", data, (key) => serializeKeyValue(cxt, key, schema.values, first));
+ gen.add(names_1.default.json, (0, codegen_1.str) `}`);
+}
+function serializeKeyValue(cxt, key, schema, first) {
+ const { gen, data } = cxt;
+ addComma(cxt, first);
+ serializeString({ ...cxt, data: key });
+ gen.add(names_1.default.json, (0, codegen_1.str) `:`);
+ const value = gen.const("value", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(key)}`);
+ serializeCode({ ...cxt, schema, data: value });
+}
+function serializeDiscriminator(cxt) {
+ const { gen, schema, data } = cxt;
+ const { discriminator } = schema;
+ gen.add(names_1.default.json, (0, codegen_1.str) `{${JSON.stringify(discriminator)}:`);
+ const tag = gen.const("tag", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(discriminator)}`);
+ serializeString({ ...cxt, data: tag });
+ gen.if(false);
+ for (const tagValue in schema.mapping) {
+ gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);
+ const sch = schema.mapping[tagValue];
+ serializeSchemaProperties({ ...cxt, schema: sch }, discriminator);
+ }
+ gen.endIf();
+ gen.add(names_1.default.json, (0, codegen_1.str) `}`);
+}
+function serializeProperties(cxt) {
+ const { gen } = cxt;
+ gen.add(names_1.default.json, (0, codegen_1.str) `{`);
+ serializeSchemaProperties(cxt);
+ gen.add(names_1.default.json, (0, codegen_1.str) `}`);
+}
+function serializeSchemaProperties(cxt, discriminator) {
+ const { gen, schema, data } = cxt;
+ const { properties, optionalProperties } = schema;
+ const props = keys(properties);
+ const optProps = keys(optionalProperties);
+ const allProps = allProperties(props.concat(optProps));
+ let first = !discriminator;
+ for (const key of props) {
+ serializeProperty(key, properties[key], keyValue(key));
+ }
+ for (const key of optProps) {
+ const value = keyValue(key);
+ gen.if((0, codegen_1.and)((0, codegen_1._) `${value} !== undefined`, (0, code_1.isOwnProperty)(gen, data, key)), () => serializeProperty(key, optionalProperties[key], value));
+ }
+ if (schema.additionalProperties) {
+ gen.forIn("key", data, (key) => gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, gen.let("first", first))));
+ }
+ function keys(ps) {
+ return ps ? Object.keys(ps) : [];
+ }
+ function allProperties(ps) {
+ if (discriminator)
+ ps.push(discriminator);
+ if (new Set(ps).size !== ps.length) {
+ throw new Error("JTD: properties/optionalProperties/disciminator overlap");
+ }
+ return ps;
+ }
+ function keyValue(key) {
+ return gen.const("value", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(key)}`);
+ }
+ function serializeProperty(key, propSchema, value) {
+ if (first)
+ first = false;
+ else
+ gen.add(names_1.default.json, (0, codegen_1.str) `,`);
+ gen.add(names_1.default.json, (0, codegen_1.str) `${JSON.stringify(key)}:`);
+ serializeCode({ ...cxt, schema: propSchema, data: value });
+ }
+ function isAdditional(key, ps) {
+ return ps.length ? (0, codegen_1.and)(...ps.map((p) => (0, codegen_1._) `${key} !== ${p}`)) : true;
+ }
+}
+function serializeType(cxt) {
+ const { gen, schema, data } = cxt;
+ switch (schema.type) {
+ case "boolean":
+ gen.add(names_1.default.json, (0, codegen_1._) `${data} ? "true" : "false"`);
+ break;
+ case "string":
+ serializeString(cxt);
+ break;
+ case "timestamp":
+ gen.if((0, codegen_1._) `${data} instanceof Date`, () => gen.add(names_1.default.json, (0, codegen_1._) `'"' + ${data}.toISOString() + '"'`), () => serializeString(cxt));
+ break;
+ default:
+ serializeNumber(cxt);
+ }
+}
+function serializeString({ gen, data }) {
+ gen.add(names_1.default.json, (0, codegen_1._) `${(0, util_1.useFunc)(gen, quote_1.default)}(${data})`);
+}
+function serializeNumber({ gen, data }) {
+ gen.add(names_1.default.json, (0, codegen_1._) `"" + ${data}`);
+}
+function serializeRef(cxt) {
+ const { gen, self, data, definitions, schema, schemaEnv } = cxt;
+ const { ref } = schema;
+ const refSchema = definitions[ref];
+ if (!refSchema)
+ throw new ref_error_1.default(self.opts.uriResolver, "", ref, `No definition ${ref}`);
+ if (!(0, ref_1.hasRef)(refSchema))
+ return serializeCode({ ...cxt, schema: refSchema });
+ const { root } = schemaEnv;
+ const sch = compileSerializer.call(self, new __1.SchemaEnv({ schema: refSchema, root }), definitions);
+ gen.add(names_1.default.json, (0, codegen_1._) `${getSerialize(gen, sch)}(${data})`);
+}
+function getSerialize(gen, sch) {
+ return sch.serialize
+ ? gen.scopeValue("serialize", { ref: sch.serialize })
+ : (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.serialize`;
+}
+function serializeEmpty({ gen, data }) {
+ gen.add(names_1.default.json, (0, codegen_1._) `JSON.stringify(${data})`);
+}
+function addComma({ gen }, first) {
+ gen.if(first, () => gen.assign(first, false), () => gen.add(names_1.default.json, (0, codegen_1.str) `,`));
+}
+//# sourceMappingURL=serialize.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/jtd/serialize.js.map b/node_modules/ajv/dist/compile/jtd/serialize.js.map
new file mode 100644
index 0000000..10c6ed1
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/serialize.js.map
@@ -0,0 +1 @@
+{"version":3,"file":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ACnD,CAAC,CAAC,IAAA,WAAC,EAAA,GAAG,GAAG,CAAC,UAAU,CAAC,SAAS,EAAE,EAAC,GAAG,EAAE,GAAG,EAAC,CAAC,YAAY,CAAA;AAC3D,CAAC;AAED,SAAS,cAAc,CAAC,EAAC,GAAG,EAAE,IAAI,EAAe;IAC/C,GAAG,CAAC,GAAG,CAAC,eAAC,CAAC,IAAI,EAAE,IAAA,WAAC,EAAA,kBAAkB,IAAI,GAAG,CAAC,CAAA;AAC7C,CAAC;AAED,SAAS,QAAQ,CAAC,EAAC,GAAG,EAAe,EAAE,KAAW;IAChD,GAAG,CAAC,EAAE,CACJ,KAAK,EACL,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAC9B,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,eAAC,CAAC,IAAI,EAAE,IAAA,aAAG,EAAA,GAAG,CAAC,CAC9B,CAAA;AACH,CAAC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/jtd/types.d.ts b/node_modules/ajv/dist/compile/jtd/types.d.ts
new file mode 100644
index 0000000..38c8bea
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/types.d.ts
@@ -0,0 +1,6 @@
+import type { SchemaObject } from "../../types";
+export declare type SchemaObjectMap = {
+ [Ref in string]?: SchemaObject;
+};
+export declare const jtdForms: readonly ["elements", "values", "discriminator", "properties", "optionalProperties", "enum", "type", "ref"];
+export declare type JTDForm = typeof jtdForms[number];
diff --git a/node_modules/ajv/dist/compile/jtd/types.js b/node_modules/ajv/dist/compile/jtd/types.js
new file mode 100644
index 0000000..b9c60a9
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/types.js
@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.jtdForms = void 0;
+exports.jtdForms = [
+ "elements",
+ "values",
+ "discriminator",
+ "properties",
+ "optionalProperties",
+ "enum",
+ "type",
+ "ref",
+];
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/jtd/types.js.map b/node_modules/ajv/dist/compile/jtd/types.js.map
new file mode 100644
index 0000000..53439e0
--- /dev/null
+++ b/node_modules/ajv/dist/compile/jtd/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/compile/jtd/types.ts"],"names":[],"mappings":";;;AAIa,QAAA,QAAQ,GAAG;IACtB,UAAU;IACV,QAAQ;IACR,eAAe;IACf,YAAY;IACZ,oBAAoB;IACpB,MAAM;IACN,MAAM;IACN,KAAK;CACG,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/names.d.ts b/node_modules/ajv/dist/compile/names.d.ts
new file mode 100644
index 0000000..5740e82
--- /dev/null
+++ b/node_modules/ajv/dist/compile/names.d.ts
@@ -0,0 +1,20 @@
+import { Name } from "./codegen";
+declare const names: {
+ data: Name;
+ valCxt: Name;
+ instancePath: Name;
+ parentData: Name;
+ parentDataProperty: Name;
+ rootData: Name;
+ dynamicAnchors: Name;
+ vErrors: Name;
+ errors: Name;
+ this: Name;
+ self: Name;
+ scope: Name;
+ json: Name;
+ jsonPos: Name;
+ jsonLen: Name;
+ jsonPart: Name;
+};
+export default names;
diff --git a/node_modules/ajv/dist/compile/names.js b/node_modules/ajv/dist/compile/names.js
new file mode 100644
index 0000000..015334b
--- /dev/null
+++ b/node_modules/ajv/dist/compile/names.js
@@ -0,0 +1,28 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const codegen_1 = require("./codegen");
+const names = {
+ // validation function arguments
+ data: new codegen_1.Name("data"),
+ // args passed from referencing schema
+ valCxt: new codegen_1.Name("valCxt"),
+ instancePath: new codegen_1.Name("instancePath"),
+ parentData: new codegen_1.Name("parentData"),
+ parentDataProperty: new codegen_1.Name("parentDataProperty"),
+ rootData: new codegen_1.Name("rootData"),
+ dynamicAnchors: new codegen_1.Name("dynamicAnchors"),
+ // function scoped variables
+ vErrors: new codegen_1.Name("vErrors"),
+ errors: new codegen_1.Name("errors"),
+ this: new codegen_1.Name("this"),
+ // "globals"
+ self: new codegen_1.Name("self"),
+ scope: new codegen_1.Name("scope"),
+ // JTD serialize/parse name for JSON string and position
+ json: new codegen_1.Name("json"),
+ jsonPos: new codegen_1.Name("jsonPos"),
+ jsonLen: new codegen_1.Name("jsonLen"),
+ jsonPart: new codegen_1.Name("jsonPart"),
+};
+exports.default = names;
+//# sourceMappingURL=names.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/names.js.map b/node_modules/ajv/dist/compile/names.js.map
new file mode 100644
index 0000000..9bbe8e2
--- /dev/null
+++ b/node_modules/ajv/dist/compile/names.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"names.js","sourceRoot":"","sources":["../../lib/compile/names.ts"],"names":[],"mappings":";;AAAA,uCAA8B;AAE9B,MAAM,KAAK,GAAG;IACZ,gCAAgC;IAChC,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,sCAAsC;IACtC,MAAM,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC;IAC1B,YAAY,EAAE,IAAI,cAAI,CAAC,cAAc,CAAC;IACtC,UAAU,EAAE,IAAI,cAAI,CAAC,YAAY,CAAC;IAClC,kBAAkB,EAAE,IAAI,cAAI,CAAC,oBAAoB,CAAC;IAClD,QAAQ,EAAE,IAAI,cAAI,CAAC,UAAU,CAAC;IAC9B,cAAc,EAAE,IAAI,cAAI,CAAC,gBAAgB,CAAC;IAC1C,4BAA4B;IAC5B,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,MAAM,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC;IAC1B,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,YAAY;IACZ,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,IAAI,cAAI,CAAC,OAAO,CAAC;IACxB,wDAAwD;IACxD,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,QAAQ,EAAE,IAAI,cAAI,CAAC,UAAU,CAAC;CAC/B,CAAA;AAED,kBAAe,KAAK,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/ref_error.d.ts b/node_modules/ajv/dist/compile/ref_error.d.ts
new file mode 100644
index 0000000..4337443
--- /dev/null
+++ b/node_modules/ajv/dist/compile/ref_error.d.ts
@@ -0,0 +1,6 @@
+import type { UriResolver } from "../types";
+export default class MissingRefError extends Error {
+ readonly missingRef: string;
+ readonly missingSchema: string;
+ constructor(resolver: UriResolver, baseId: string, ref: string, msg?: string);
+}
diff --git a/node_modules/ajv/dist/compile/ref_error.js b/node_modules/ajv/dist/compile/ref_error.js
new file mode 100644
index 0000000..3916dec
--- /dev/null
+++ b/node_modules/ajv/dist/compile/ref_error.js
@@ -0,0 +1,12 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const resolve_1 = require("./resolve");
+class MissingRefError extends Error {
+ constructor(resolver, baseId, ref, msg) {
+ super(msg || `can't resolve reference ${ref} from id ${baseId}`);
+ this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);
+ this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
+ }
+}
+exports.default = MissingRefError;
+//# sourceMappingURL=ref_error.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/ref_error.js.map b/node_modules/ajv/dist/compile/ref_error.js.map
new file mode 100644
index 0000000..d13f5f2
--- /dev/null
+++ b/node_modules/ajv/dist/compile/ref_error.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ref_error.js","sourceRoot":"","sources":["../../lib/compile/ref_error.ts"],"names":[],"mappings":";;AAAA,uCAA8D;AAG9D,MAAqB,eAAgB,SAAQ,KAAK;IAIhD,YAAY,QAAqB,EAAE,MAAc,EAAE,GAAW,EAAE,GAAY;QAC1E,KAAK,CAAC,GAAG,IAAI,2BAA2B,GAAG,YAAY,MAAM,EAAE,CAAC,CAAA;QAChE,IAAI,CAAC,UAAU,GAAG,IAAA,oBAAU,EAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;QACnD,IAAI,CAAC,aAAa,GAAG,IAAA,qBAAW,EAAC,IAAA,qBAAW,EAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;IAC1E,CAAC;CACF;AATD,kCASC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/resolve.d.ts b/node_modules/ajv/dist/compile/resolve.d.ts
new file mode 100644
index 0000000..745eaeb
--- /dev/null
+++ b/node_modules/ajv/dist/compile/resolve.d.ts
@@ -0,0 +1,12 @@
+import type { AnySchema, AnySchemaObject, UriResolver } from "../types";
+import type Ajv from "../ajv";
+import type { URIComponents } from "uri-js";
+export declare type LocalRefs = {
+ [Ref in string]?: AnySchemaObject;
+};
+export declare function inlineRef(schema: AnySchema, limit?: boolean | number): boolean;
+export declare function getFullPath(resolver: UriResolver, id?: string, normalize?: boolean): string;
+export declare function _getFullPath(resolver: UriResolver, p: URIComponents): string;
+export declare function normalizeId(id: string | undefined): string;
+export declare function resolveUrl(resolver: UriResolver, baseId: string, id: string): string;
+export declare function getSchemaRefs(this: Ajv, schema: AnySchema, baseId: string): LocalRefs;
diff --git a/node_modules/ajv/dist/compile/resolve.js b/node_modules/ajv/dist/compile/resolve.js
new file mode 100644
index 0000000..8b51a20
--- /dev/null
+++ b/node_modules/ajv/dist/compile/resolve.js
@@ -0,0 +1,155 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
+const util_1 = require("./util");
+const equal = require("fast-deep-equal");
+const traverse = require("json-schema-traverse");
+// TODO refactor to use keyword definitions
+const SIMPLE_INLINED = new Set([
+ "type",
+ "format",
+ "pattern",
+ "maxLength",
+ "minLength",
+ "maxProperties",
+ "minProperties",
+ "maxItems",
+ "minItems",
+ "maximum",
+ "minimum",
+ "uniqueItems",
+ "multipleOf",
+ "required",
+ "enum",
+ "const",
+]);
+function inlineRef(schema, limit = true) {
+ if (typeof schema == "boolean")
+ return true;
+ if (limit === true)
+ return !hasRef(schema);
+ if (!limit)
+ return false;
+ return countKeys(schema) <= limit;
+}
+exports.inlineRef = inlineRef;
+const REF_KEYWORDS = new Set([
+ "$ref",
+ "$recursiveRef",
+ "$recursiveAnchor",
+ "$dynamicRef",
+ "$dynamicAnchor",
+]);
+function hasRef(schema) {
+ for (const key in schema) {
+ if (REF_KEYWORDS.has(key))
+ return true;
+ const sch = schema[key];
+ if (Array.isArray(sch) && sch.some(hasRef))
+ return true;
+ if (typeof sch == "object" && hasRef(sch))
+ return true;
+ }
+ return false;
+}
+function countKeys(schema) {
+ let count = 0;
+ for (const key in schema) {
+ if (key === "$ref")
+ return Infinity;
+ count++;
+ if (SIMPLE_INLINED.has(key))
+ continue;
+ if (typeof schema[key] == "object") {
+ (0, util_1.eachItem)(schema[key], (sch) => (count += countKeys(sch)));
+ }
+ if (count === Infinity)
+ return Infinity;
+ }
+ return count;
+}
+function getFullPath(resolver, id = "", normalize) {
+ if (normalize !== false)
+ id = normalizeId(id);
+ const p = resolver.parse(id);
+ return _getFullPath(resolver, p);
+}
+exports.getFullPath = getFullPath;
+function _getFullPath(resolver, p) {
+ const serialized = resolver.serialize(p);
+ return serialized.split("#")[0] + "#";
+}
+exports._getFullPath = _getFullPath;
+const TRAILING_SLASH_HASH = /#\/?$/;
+function normalizeId(id) {
+ return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
+}
+exports.normalizeId = normalizeId;
+function resolveUrl(resolver, baseId, id) {
+ id = normalizeId(id);
+ return resolver.resolve(baseId, id);
+}
+exports.resolveUrl = resolveUrl;
+const ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
+function getSchemaRefs(schema, baseId) {
+ if (typeof schema == "boolean")
+ return {};
+ const { schemaId, uriResolver } = this.opts;
+ const schId = normalizeId(schema[schemaId] || baseId);
+ const baseIds = { "": schId };
+ const pathPrefix = getFullPath(uriResolver, schId, false);
+ const localRefs = {};
+ const schemaRefs = new Set();
+ traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {
+ if (parentJsonPtr === undefined)
+ return;
+ const fullPath = pathPrefix + jsonPtr;
+ let baseId = baseIds[parentJsonPtr];
+ if (typeof sch[schemaId] == "string")
+ baseId = addRef.call(this, sch[schemaId]);
+ addAnchor.call(this, sch.$anchor);
+ addAnchor.call(this, sch.$dynamicAnchor);
+ baseIds[jsonPtr] = baseId;
+ function addRef(ref) {
+ // eslint-disable-next-line @typescript-eslint/unbound-method
+ const _resolve = this.opts.uriResolver.resolve;
+ ref = normalizeId(baseId ? _resolve(baseId, ref) : ref);
+ if (schemaRefs.has(ref))
+ throw ambiguos(ref);
+ schemaRefs.add(ref);
+ let schOrRef = this.refs[ref];
+ if (typeof schOrRef == "string")
+ schOrRef = this.refs[schOrRef];
+ if (typeof schOrRef == "object") {
+ checkAmbiguosRef(sch, schOrRef.schema, ref);
+ }
+ else if (ref !== normalizeId(fullPath)) {
+ if (ref[0] === "#") {
+ checkAmbiguosRef(sch, localRefs[ref], ref);
+ localRefs[ref] = sch;
+ }
+ else {
+ this.refs[ref] = fullPath;
+ }
+ }
+ return ref;
+ }
+ function addAnchor(anchor) {
+ if (typeof anchor == "string") {
+ if (!ANCHOR.test(anchor))
+ throw new Error(`invalid anchor "${anchor}"`);
+ addRef.call(this, `#${anchor}`);
+ }
+ }
+ });
+ return localRefs;
+ function checkAmbiguosRef(sch1, sch2, ref) {
+ if (sch2 !== undefined && !equal(sch1, sch2))
+ throw ambiguos(ref);
+ }
+ function ambiguos(ref) {
+ return new Error(`reference "${ref}" resolves to more than one schema`);
+ }
+}
+exports.getSchemaRefs = getSchemaRefs;
+//# sourceMappingURL=resolve.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/resolve.js.map b/node_modules/ajv/dist/compile/resolve.js.map
new file mode 100644
index 0000000..81f08b0
--- /dev/null
+++ b/node_modules/ajv/dist/compile/resolve.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../lib/compile/resolve.ts"],"names":[],"mappings":";;;AAGA,iCAA+B;AAC/B,yCAAwC;AACxC,iDAAgD;AAKhD,2CAA2C;AAC3C,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC7B,MAAM;IACN,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,eAAe;IACf,eAAe;IACf,UAAU;IACV,UAAU;IACV,SAAS;IACT,SAAS;IACT,aAAa;IACb,YAAY;IACZ,UAAU;IACV,MAAM;IACN,OAAO;CACR,CAAC,CAAA;AAEF,SAAgB,SAAS,CAAC,MAAiB,EAAE,QAA0B,IAAI;IACzE,IAAI,OAAO,MAAM,IAAI,SAAS;QAAE,OAAO,IAAI,CAAA;IAC3C,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC1C,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IACxB,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,KAAK,CAAA;AACnC,CAAC;AALD,8BAKC;AAED,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,MAAM;IACN,eAAe;IACf,kBAAkB;IAClB,aAAa;IACb,gBAAgB;CACjB,CAAC,CAAA;AAEF,SAAS,MAAM,CAAC,MAAuB;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAA;QACtC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,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AAgB,CAAC,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAA;oBAC1C,SAAS,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;iBACrB;qBAAM;oBACL,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;iBAC1B;aACF;YACD,OAAO,GAAG,CAAA;QACZ,CAAC;QAED,SAAS,SAAS,CAAY,MAAe;YAC3C,IAAI,OAAO,MAAM,IAAI,QAAQ,EAAE;gBAC7B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;oBAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,GAAG,CAAC,CAAA;gBACvE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,MAAM,EAAE,CAAC,CAAA;aAChC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,SAAS,CAAA;IAEhB,SAAS,gBAAgB,CAAC,IAAe,EAAE,IAA2B,EAAE,GAAW;QACjF,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;YAAE,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAA;IACnE,CAAC;IAED,SAAS,QAAQ,CAAC,GAAW;QAC3B,OAAO,IAAI,KAAK,CAAC,cAAc,GAAG,oCAAoC,CAAC,CAAA;IACzE,CAAC;AACH,CAAC;AAxDD,sCAwDC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/rules.d.ts b/node_modules/ajv/dist/compile/rules.d.ts
new file mode 100644
index 0000000..7def4b5
--- /dev/null
+++ b/node_modules/ajv/dist/compile/rules.d.ts
@@ -0,0 +1,28 @@
+import type { AddedKeywordDefinition } from "../types";
+declare const _jsonTypes: readonly ["string", "number", "integer", "boolean", "null", "object", "array"];
+export declare type JSONType = typeof _jsonTypes[number];
+export declare function isJSONType(x: unknown): x is JSONType;
+declare type ValidationTypes = {
+ [K in JSONType]: boolean | RuleGroup | undefined;
+};
+export interface ValidationRules {
+ rules: RuleGroup[];
+ post: RuleGroup;
+ all: {
+ [Key in string]?: boolean | Rule;
+ };
+ keywords: {
+ [Key in string]?: boolean;
+ };
+ types: ValidationTypes;
+}
+export interface RuleGroup {
+ type?: JSONType;
+ rules: Rule[];
+}
+export interface Rule {
+ keyword: string;
+ definition: AddedKeywordDefinition;
+}
+export declare function getRules(): ValidationRules;
+export {};
diff --git a/node_modules/ajv/dist/compile/rules.js b/node_modules/ajv/dist/compile/rules.js
new file mode 100644
index 0000000..82a591f
--- /dev/null
+++ b/node_modules/ajv/dist/compile/rules.js
@@ -0,0 +1,26 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getRules = exports.isJSONType = void 0;
+const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
+const jsonTypes = new Set(_jsonTypes);
+function isJSONType(x) {
+ return typeof x == "string" && jsonTypes.has(x);
+}
+exports.isJSONType = isJSONType;
+function getRules() {
+ const groups = {
+ number: { type: "number", rules: [] },
+ string: { type: "string", rules: [] },
+ array: { type: "array", rules: [] },
+ object: { type: "object", rules: [] },
+ };
+ return {
+ types: { ...groups, integer: true, boolean: true, null: true },
+ rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],
+ post: { rules: [] },
+ all: {},
+ keywords: {},
+ };
+}
+exports.getRules = getRules;
+//# sourceMappingURL=rules.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/rules.js.map b/node_modules/ajv/dist/compile/rules.js.map
new file mode 100644
index 0000000..084c70f
--- /dev/null
+++ b/node_modules/ajv/dist/compile/rules.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../lib/compile/rules.ts"],"names":[],"mappings":";;;AAEA,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAA;AAIjG,MAAM,SAAS,GAAgB,IAAI,GAAG,CAAC,UAAU,CAAC,CAAA;AAElD,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,OAAO,CAAC,IAAI,QAAQ,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC;AAFD,gCAEC;AAyBD,SAAgB,QAAQ;IACtB,MAAM,MAAM,GAAgE;QAC1E,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAC;QACnC,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAC;QACnC,KAAK,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAC;QACjC,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAC;KACpC,CAAA;IACD,OAAO;QACL,KAAK,EAAE,EAAC,GAAG,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC;QAC5D,KAAK,EAAE,CAAC,EAAC,KAAK,EAAE,EAAE,EAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QAC/E,IAAI,EAAE,EAAC,KAAK,EAAE,EAAE,EAAC;QACjB,GAAG,EAAE,EAAE;QACP,QAAQ,EAAE,EAAE;KACb,CAAA;AACH,CAAC;AAdD,4BAcC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/util.d.ts b/node_modules/ajv/dist/compile/util.d.ts
new file mode 100644
index 0000000..17042cf
--- /dev/null
+++ b/node_modules/ajv/dist/compile/util.d.ts
@@ -0,0 +1,40 @@
+import type { AnySchema, EvaluatedProperties, EvaluatedItems } from "../types";
+import type { SchemaCxt, SchemaObjCxt } from ".";
+import { Code, Name, CodeGen } from "./codegen";
+import type { Rule, ValidationRules } from "./rules";
+export declare function toHash(arr: T[]): {
+ [K in T]?: true;
+};
+export declare function alwaysValidSchema(it: SchemaCxt, schema: AnySchema): boolean | void;
+export declare function checkUnknownRules(it: SchemaCxt, schema?: AnySchema): void;
+export declare function schemaHasRules(schema: AnySchema, rules: {
+ [Key in string]?: boolean | Rule;
+}): boolean;
+export declare function schemaHasRulesButRef(schema: AnySchema, RULES: ValidationRules): boolean;
+export declare function schemaRefOrVal({ topSchemaRef, schemaPath }: SchemaObjCxt, schema: unknown, keyword: string, $data?: string | false): Code | number | boolean;
+export declare function unescapeFragment(str: string): string;
+export declare function escapeFragment(str: string | number): string;
+export declare function escapeJsonPointer(str: string | number): string;
+export declare function unescapeJsonPointer(str: string): string;
+export declare function eachItem(xs: T | T[], f: (x: T) => void): void;
+declare type SomeEvaluated = EvaluatedProperties | EvaluatedItems;
+declare type MergeEvaluatedFunc = (gen: CodeGen, from: Name | T, to: Name | Exclude | undefined, toName?: typeof Name) => Name | T;
+interface MergeEvaluated {
+ props: MergeEvaluatedFunc;
+ items: MergeEvaluatedFunc;
+}
+export declare const mergeEvaluated: MergeEvaluated;
+export declare function evaluatedPropsToName(gen: CodeGen, ps?: EvaluatedProperties): Name;
+export declare function setEvaluated(gen: CodeGen, props: Name, ps: {
+ [K in string]?: true;
+}): void;
+export declare function useFunc(gen: CodeGen, f: {
+ code: string;
+}): Name;
+export declare enum Type {
+ Num = 0,
+ Str = 1
+}
+export declare function getErrorPath(dataProp: Name | string | number, dataPropType?: Type, jsPropertySyntax?: boolean): Code | string;
+export declare function checkStrictMode(it: SchemaCxt, msg: string, mode?: boolean | "log"): void;
+export {};
diff --git a/node_modules/ajv/dist/compile/util.js b/node_modules/ajv/dist/compile/util.js
new file mode 100644
index 0000000..091ad4c
--- /dev/null
+++ b/node_modules/ajv/dist/compile/util.js
@@ -0,0 +1,178 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
+const codegen_1 = require("./codegen");
+const code_1 = require("./codegen/code");
+// TODO refactor to use Set
+function toHash(arr) {
+ const hash = {};
+ for (const item of arr)
+ hash[item] = true;
+ return hash;
+}
+exports.toHash = toHash;
+function alwaysValidSchema(it, schema) {
+ if (typeof schema == "boolean")
+ return schema;
+ if (Object.keys(schema).length === 0)
+ return true;
+ checkUnknownRules(it, schema);
+ return !schemaHasRules(schema, it.self.RULES.all);
+}
+exports.alwaysValidSchema = alwaysValidSchema;
+function checkUnknownRules(it, schema = it.schema) {
+ const { opts, self } = it;
+ if (!opts.strictSchema)
+ return;
+ if (typeof schema === "boolean")
+ return;
+ const rules = self.RULES.keywords;
+ for (const key in schema) {
+ if (!rules[key])
+ checkStrictMode(it, `unknown keyword: "${key}"`);
+ }
+}
+exports.checkUnknownRules = checkUnknownRules;
+function schemaHasRules(schema, rules) {
+ if (typeof schema == "boolean")
+ return !schema;
+ for (const key in schema)
+ if (rules[key])
+ return true;
+ return false;
+}
+exports.schemaHasRules = schemaHasRules;
+function schemaHasRulesButRef(schema, RULES) {
+ if (typeof schema == "boolean")
+ return !schema;
+ for (const key in schema)
+ if (key !== "$ref" && RULES.all[key])
+ return true;
+ return false;
+}
+exports.schemaHasRulesButRef = schemaHasRulesButRef;
+function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
+ if (!$data) {
+ if (typeof schema == "number" || typeof schema == "boolean")
+ return schema;
+ if (typeof schema == "string")
+ return (0, codegen_1._) `${schema}`;
+ }
+ return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
+}
+exports.schemaRefOrVal = schemaRefOrVal;
+function unescapeFragment(str) {
+ return unescapeJsonPointer(decodeURIComponent(str));
+}
+exports.unescapeFragment = unescapeFragment;
+function escapeFragment(str) {
+ return encodeURIComponent(escapeJsonPointer(str));
+}
+exports.escapeFragment = escapeFragment;
+function escapeJsonPointer(str) {
+ if (typeof str == "number")
+ return `${str}`;
+ return str.replace(/~/g, "~0").replace(/\//g, "~1");
+}
+exports.escapeJsonPointer = escapeJsonPointer;
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, "/").replace(/~0/g, "~");
+}
+exports.unescapeJsonPointer = unescapeJsonPointer;
+function eachItem(xs, f) {
+ if (Array.isArray(xs)) {
+ for (const x of xs)
+ f(x);
+ }
+ else {
+ f(xs);
+ }
+}
+exports.eachItem = eachItem;
+function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) {
+ return (gen, from, to, toName) => {
+ const res = to === undefined
+ ? from
+ : to instanceof codegen_1.Name
+ ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)
+ : from instanceof codegen_1.Name
+ ? (mergeToName(gen, to, from), from)
+ : mergeValues(from, to);
+ return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
+ };
+}
+exports.mergeEvaluated = {
+ props: makeMergeEvaluated({
+ mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => {
+ gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`));
+ }),
+ mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => {
+ if (from === true) {
+ gen.assign(to, true);
+ }
+ else {
+ gen.assign(to, (0, codegen_1._) `${to} || {}`);
+ setEvaluated(gen, to, from);
+ }
+ }),
+ mergeValues: (from, to) => (from === true ? true : { ...from, ...to }),
+ resultToName: evaluatedPropsToName,
+ }),
+ items: makeMergeEvaluated({
+ mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
+ mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)),
+ mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),
+ resultToName: (gen, items) => gen.var("items", items),
+ }),
+};
+function evaluatedPropsToName(gen, ps) {
+ if (ps === true)
+ return gen.var("props", true);
+ const props = gen.var("props", (0, codegen_1._) `{}`);
+ if (ps !== undefined)
+ setEvaluated(gen, props, ps);
+ return props;
+}
+exports.evaluatedPropsToName = evaluatedPropsToName;
+function setEvaluated(gen, props, ps) {
+ Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true));
+}
+exports.setEvaluated = setEvaluated;
+const snippets = {};
+function useFunc(gen, f) {
+ return gen.scopeValue("func", {
+ ref: f,
+ code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)),
+ });
+}
+exports.useFunc = useFunc;
+var Type;
+(function (Type) {
+ Type[Type["Num"] = 0] = "Num";
+ Type[Type["Str"] = 1] = "Str";
+})(Type = exports.Type || (exports.Type = {}));
+function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
+ // let path
+ if (dataProp instanceof codegen_1.Name) {
+ const isNumber = dataPropType === Type.Num;
+ return jsPropertySyntax
+ ? isNumber
+ ? (0, codegen_1._) `"[" + ${dataProp} + "]"`
+ : (0, codegen_1._) `"['" + ${dataProp} + "']"`
+ : isNumber
+ ? (0, codegen_1._) `"/" + ${dataProp}`
+ : (0, codegen_1._) `"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; // TODO maybe use global escapePointer
+ }
+ return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
+}
+exports.getErrorPath = getErrorPath;
+function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
+ if (!mode)
+ return;
+ msg = `strict mode: ${msg}`;
+ if (mode === true)
+ throw new Error(msg);
+ it.self.logger.warn(msg);
+}
+exports.checkStrictMode = checkStrictMode;
+//# sourceMappingURL=util.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/util.js.map b/node_modules/ajv/dist/compile/util.js.map
new file mode 100644
index 0000000..a2128fc
--- /dev/null
+++ b/node_modules/ajv/dist/compile/util.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"util.js","sourceRoot":"","sources":["../../lib/compile/util.ts"],"names":[],"mappings":";;;AAEA,uCAA6D;AAC7D,yCAAoC;AAGpC,2BAA2B;AAC3B,SAAgB,MAAM,CAA4B,GAAQ;IACxD,MAAM,IAAI,GAAsB,EAAE,CAAA;IAClC,KAAK,MAAM,IAAI,IAAI,GAAG;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACzC,OAAO,IAAI,CAAA;AACb,CAAC;AAJD,wBAIC;AAED,SAAgB,iBAAiB,CAAC,EAAa,EAAE,MAAiB;IAChE,IAAI,OAAO,MAAM,IAAI,SAAS;QAAE,OAAO,MAAM,CAAA;IAC7C,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACjD,iBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IAC7B,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AACnD,CAAC;AALD,8CAKC;AAED,SAAgB,iBAAiB,CAAC,EAAa,EAAE,SAAoB,EAAE,CAAC,MAAM;IAC5E,MAAM,EAAC,IAAI,EAAE,IAAI,EAAC,GAAG,EAAE,CAAA;IACvB,IAAI,CAAC,IAAI,CAAC,YAAY;QAAE,OAAM;IAC9B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CASC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/applicability.d.ts b/node_modules/ajv/dist/compile/validate/applicability.d.ts
new file mode 100644
index 0000000..165d375
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/applicability.d.ts
@@ -0,0 +1,6 @@
+import type { AnySchemaObject } from "../../types";
+import type { SchemaObjCxt } from "..";
+import type { JSONType, RuleGroup, Rule } from "../rules";
+export declare function schemaHasRulesForType({ schema, self }: SchemaObjCxt, type: JSONType): boolean | undefined;
+export declare function shouldUseGroup(schema: AnySchemaObject, group: RuleGroup): boolean;
+export declare function shouldUseRule(schema: AnySchemaObject, rule: Rule): boolean | undefined;
diff --git a/node_modules/ajv/dist/compile/validate/applicability.js b/node_modules/ajv/dist/compile/validate/applicability.js
new file mode 100644
index 0000000..6187dbb
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/applicability.js
@@ -0,0 +1,19 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
+function schemaHasRulesForType({ schema, self }, type) {
+ const group = self.RULES.types[type];
+ return group && group !== true && shouldUseGroup(schema, group);
+}
+exports.schemaHasRulesForType = schemaHasRulesForType;
+function shouldUseGroup(schema, group) {
+ return group.rules.some((rule) => shouldUseRule(schema, rule));
+}
+exports.shouldUseGroup = shouldUseGroup;
+function shouldUseRule(schema, rule) {
+ var _a;
+ return (schema[rule.keyword] !== undefined ||
+ ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined)));
+}
+exports.shouldUseRule = shouldUseRule;
+//# sourceMappingURL=applicability.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/applicability.js.map b/node_modules/ajv/dist/compile/validate/applicability.js.map
new file mode 100644
index 0000000..450cfe7
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/applicability.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"applicability.js","sourceRoot":"","sources":["../../../lib/compile/validate/applicability.ts"],"names":[],"mappings":";;;AAIA,SAAgB,qBAAqB,CACnC,EAAC,MAAM,EAAE,IAAI,EAAe,EAC5B,IAAc;IAEd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACpC,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,IAAI,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AACjE,CAAC;AAND,sDAMC;AAED,SAAgB,cAAc,CAAC,MAAuB,EAAE,KAAgB;IACtE,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;AAChE,CAAC;AAFD,wCAEC;AAED,SAAgB,aAAa,CAAC,MAAuB,EAAE,IAAU;;IAC/D,OAAO,CACL,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,SAAS;SAClC,MAAA,IAAI,CAAC,UAAU,CAAC,UAAU,0CAAE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAA,CACrE,CAAA;AACH,CAAC;AALD,sCAKC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/boolSchema.d.ts b/node_modules/ajv/dist/compile/validate/boolSchema.d.ts
new file mode 100644
index 0000000..0ce7952
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/boolSchema.d.ts
@@ -0,0 +1,4 @@
+import type { SchemaCxt } from "..";
+import { Name } from "../codegen";
+export declare function topBoolOrEmptySchema(it: SchemaCxt): void;
+export declare function boolOrEmptySchema(it: SchemaCxt, valid: Name): void;
diff --git a/node_modules/ajv/dist/compile/validate/boolSchema.js b/node_modules/ajv/dist/compile/validate/boolSchema.js
new file mode 100644
index 0000000..8eeb7b5
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/boolSchema.js
@@ -0,0 +1,50 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
+const errors_1 = require("../errors");
+const codegen_1 = require("../codegen");
+const names_1 = require("../names");
+const boolError = {
+ message: "boolean schema is false",
+};
+function topBoolOrEmptySchema(it) {
+ const { gen, schema, validateName } = it;
+ if (schema === false) {
+ falseSchemaError(it, false);
+ }
+ else if (typeof schema == "object" && schema.$async === true) {
+ gen.return(names_1.default.data);
+ }
+ else {
+ gen.assign((0, codegen_1._) `${validateName}.errors`, null);
+ gen.return(true);
+ }
+}
+exports.topBoolOrEmptySchema = topBoolOrEmptySchema;
+function boolOrEmptySchema(it, valid) {
+ const { gen, schema } = it;
+ if (schema === false) {
+ gen.var(valid, false); // TODO var
+ falseSchemaError(it);
+ }
+ else {
+ gen.var(valid, true); // TODO var
+ }
+}
+exports.boolOrEmptySchema = boolOrEmptySchema;
+function falseSchemaError(it, overrideAllErrors) {
+ const { gen, data } = it;
+ // TODO maybe some other interface should be used for non-keyword validation errors...
+ const cxt = {
+ gen,
+ keyword: "false schema",
+ data,
+ schema: false,
+ schemaCode: false,
+ schemaValue: false,
+ params: {},
+ it,
+ };
+ (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors);
+}
+//# sourceMappingURL=boolSchema.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/boolSchema.js.map b/node_modules/ajv/dist/compile/validate/boolSchema.js.map
new file mode 100644
index 0000000..4aa6c99
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/boolSchema.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"boolSchema.js","sourceRoot":"","sources":["../../../lib/compile/validate/boolSchema.ts"],"names":[],"mappings":";;;AAEA,sCAAqC;AACrC,wCAAkC;AAClC,oCAAwB;AAExB,MAAM,SAAS,GAA2B;IACxC,OAAO,EAAE,yBAAyB;CACnC,CAAA;AAED,SAAgB,oBA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,EAAE,iBAAiB,CAAC,CAAA;AAC3D,CAAC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/dataType.d.ts b/node_modules/ajv/dist/compile/validate/dataType.d.ts
new file mode 100644
index 0000000..65c1268
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/dataType.d.ts
@@ -0,0 +1,17 @@
+import type { ErrorObject, AnySchemaObject } from "../../types";
+import type { SchemaObjCxt } from "..";
+import { JSONType } from "../rules";
+import { Code, Name } from "../codegen";
+export declare enum DataType {
+ Correct = 0,
+ Wrong = 1
+}
+export declare function getSchemaTypes(schema: AnySchemaObject): JSONType[];
+export declare function getJSONTypes(ts: unknown | unknown[]): JSONType[];
+export declare function coerceAndCheckDataType(it: SchemaObjCxt, types: JSONType[]): boolean;
+export declare function checkDataType(dataType: JSONType, data: Name, strictNums?: boolean | "log", correct?: DataType): Code;
+export declare function checkDataTypes(dataTypes: JSONType[], data: Name, strictNums?: boolean | "log", correct?: DataType): Code;
+export declare type TypeError = ErrorObject<"type", {
+ type: string;
+}>;
+export declare function reportTypeError(it: SchemaObjCxt): void;
diff --git a/node_modules/ajv/dist/compile/validate/dataType.js b/node_modules/ajv/dist/compile/validate/dataType.js
new file mode 100644
index 0000000..1732d46
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/dataType.js
@@ -0,0 +1,202 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
+const rules_1 = require("../rules");
+const applicability_1 = require("./applicability");
+const errors_1 = require("../errors");
+const codegen_1 = require("../codegen");
+const util_1 = require("../util");
+var DataType;
+(function (DataType) {
+ DataType[DataType["Correct"] = 0] = "Correct";
+ DataType[DataType["Wrong"] = 1] = "Wrong";
+})(DataType = exports.DataType || (exports.DataType = {}));
+function getSchemaTypes(schema) {
+ const types = getJSONTypes(schema.type);
+ const hasNull = types.includes("null");
+ if (hasNull) {
+ if (schema.nullable === false)
+ throw new Error("type: null contradicts nullable: false");
+ }
+ else {
+ if (!types.length && schema.nullable !== undefined) {
+ throw new Error('"nullable" cannot be used without "type"');
+ }
+ if (schema.nullable === true)
+ types.push("null");
+ }
+ return types;
+}
+exports.getSchemaTypes = getSchemaTypes;
+function getJSONTypes(ts) {
+ const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
+ if (types.every(rules_1.isJSONType))
+ return types;
+ throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
+}
+exports.getJSONTypes = getJSONTypes;
+function coerceAndCheckDataType(it, types) {
+ const { gen, data, opts } = it;
+ const coerceTo = coerceToTypes(types, opts.coerceTypes);
+ const checkTypes = types.length > 0 &&
+ !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));
+ if (checkTypes) {
+ const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);
+ gen.if(wrongType, () => {
+ if (coerceTo.length)
+ coerceData(it, types, coerceTo);
+ else
+ reportTypeError(it);
+ });
+ }
+ return checkTypes;
+}
+exports.coerceAndCheckDataType = coerceAndCheckDataType;
+const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null"]);
+function coerceToTypes(types, coerceTypes) {
+ return coerceTypes
+ ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === "array" && t === "array"))
+ : [];
+}
+function coerceData(it, types, coerceTo) {
+ const { gen, data, opts } = it;
+ const dataType = gen.let("dataType", (0, codegen_1._) `typeof ${data}`);
+ const coerced = gen.let("coerced", (0, codegen_1._) `undefined`);
+ if (opts.coerceTypes === "array") {
+ gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen
+ .assign(data, (0, codegen_1._) `${data}[0]`)
+ .assign(dataType, (0, codegen_1._) `typeof ${data}`)
+ .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
+ }
+ gen.if((0, codegen_1._) `${coerced} !== undefined`);
+ for (const t of coerceTo) {
+ if (COERCIBLE.has(t) || (t === "array" && opts.coerceTypes === "array")) {
+ coerceSpecificType(t);
+ }
+ }
+ gen.else();
+ reportTypeError(it);
+ gen.endIf();
+ gen.if((0, codegen_1._) `${coerced} !== undefined`, () => {
+ gen.assign(data, coerced);
+ assignParentData(it, coerced);
+ });
+ function coerceSpecificType(t) {
+ switch (t) {
+ case "string":
+ gen
+ .elseIf((0, codegen_1._) `${dataType} == "number" || ${dataType} == "boolean"`)
+ .assign(coerced, (0, codegen_1._) `"" + ${data}`)
+ .elseIf((0, codegen_1._) `${data} === null`)
+ .assign(coerced, (0, codegen_1._) `""`);
+ return;
+ case "number":
+ gen
+ .elseIf((0, codegen_1._) `${dataType} == "boolean" || ${data} === null
+ || (${dataType} == "string" && ${data} && ${data} == +${data})`)
+ .assign(coerced, (0, codegen_1._) `+${data}`);
+ return;
+ case "integer":
+ gen
+ .elseIf((0, codegen_1._) `${dataType} === "boolean" || ${data} === null
+ || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`)
+ .assign(coerced, (0, codegen_1._) `+${data}`);
+ return;
+ case "boolean":
+ gen
+ .elseIf((0, codegen_1._) `${data} === "false" || ${data} === 0 || ${data} === null`)
+ .assign(coerced, false)
+ .elseIf((0, codegen_1._) `${data} === "true" || ${data} === 1`)
+ .assign(coerced, true);
+ return;
+ case "null":
+ gen.elseIf((0, codegen_1._) `${data} === "" || ${data} === 0 || ${data} === false`);
+ gen.assign(coerced, null);
+ return;
+ case "array":
+ gen
+ .elseIf((0, codegen_1._) `${dataType} === "string" || ${dataType} === "number"
+ || ${dataType} === "boolean" || ${data} === null`)
+ .assign(coerced, (0, codegen_1._) `[${data}]`);
+ }
+ }
+}
+function assignParentData({ gen, parentData, parentDataProperty }, expr) {
+ // TODO use gen.property
+ gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr));
+}
+function checkDataType(dataType, data, strictNums, correct = DataType.Correct) {
+ const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
+ let cond;
+ switch (dataType) {
+ case "null":
+ return (0, codegen_1._) `${data} ${EQ} null`;
+ case "array":
+ cond = (0, codegen_1._) `Array.isArray(${data})`;
+ break;
+ case "object":
+ cond = (0, codegen_1._) `${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
+ break;
+ case "integer":
+ cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`);
+ break;
+ case "number":
+ cond = numCond();
+ break;
+ default:
+ return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`;
+ }
+ return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);
+ function numCond(_cond = codegen_1.nil) {
+ return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil);
+ }
+}
+exports.checkDataType = checkDataType;
+function checkDataTypes(dataTypes, data, strictNums, correct) {
+ if (dataTypes.length === 1) {
+ return checkDataType(dataTypes[0], data, strictNums, correct);
+ }
+ let cond;
+ const types = (0, util_1.toHash)(dataTypes);
+ if (types.array && types.object) {
+ const notObj = (0, codegen_1._) `typeof ${data} != "object"`;
+ cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`;
+ delete types.null;
+ delete types.array;
+ delete types.object;
+ }
+ else {
+ cond = codegen_1.nil;
+ }
+ if (types.number)
+ delete types.integer;
+ for (const t in types)
+ cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
+ return cond;
+}
+exports.checkDataTypes = checkDataTypes;
+const typeError = {
+ message: ({ schema }) => `must be ${schema}`,
+ params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`,
+};
+function reportTypeError(it) {
+ const cxt = getTypeErrorContext(it);
+ (0, errors_1.reportError)(cxt, typeError);
+}
+exports.reportTypeError = reportTypeError;
+function getTypeErrorContext(it) {
+ const { gen, data, schema } = it;
+ const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
+ return {
+ gen,
+ keyword: "type",
+ data,
+ schema: schema.type,
+ schemaCode,
+ schemaValue: schemaCode,
+ parentSchema: schema,
+ params: {},
+ it,
+ };
+}
+//# sourceMappingURL=dataType.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/dataType.js.map b/node_modules/ajv/dist/compile/validate/dataType.js.map
new file mode 100644
index 0000000..f19c40b
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/dataType.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"dataType.js","sourceRoot":"","sources":["../../../lib/compile/validate/dataType.ts"],"names":[],"mappings":";;;AAOA,oCAA6C;AAC7C,mDAAqD;AACrD,sCAAqC;AACrC,wCAAkE;AAClE,kCAA8C;AAE9C,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,6CAAO,CAAA;IACP,yCAAK,CAAA;AACP,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB;AAED,SAAgB,cAAc,CAAC,MAAuB;IACpD,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACvC,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IACtC,IAAI,OAAO,EAAE;QACX,IAAI,MAAM,CAAC,QAAQ,KAAK,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;KACzF;SAAM;QACL,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE;YAClD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;SAC5D;QACD,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;KACjD;IACD,O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C,MAAM,EAAE,CAAC,EAAC,MAAM,EAAE,WAAW,EAAC,EAAE,EAAE,CAChC,OAAO,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAA,WAAC,EAAA,UAAU,MAAM,GAAG,CAAC,CAAC,CAAC,IAAA,WAAC,EAAA,UAAU,WAAW,GAAG;CAC/E,CAAA;AAED,SAAgB,eAAe,CAAC,EAAgB;IAC9C,MAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAA;IACnC,IAAA,oBAAW,EAAC,GAAG,EAAE,SAAS,CAAC,CAAA;AAC7B,CAAC;AAHD,0CAGC;AAED,SAAS,mBAAmB,CAAC,EAAgB;IAC3C,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAC,GAAG,EAAE,CAAA;IAC9B,MAAM,UAAU,GAAG,IAAA,qBAAc,EAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IACrD,OAAO;QACL,GAAG;QACH,OAAO,EAAE,MAAM;QACf,IAAI;QACJ,MAAM,EAAE,MAAM,CAAC,IAAI;QACnB,UAAU;QACV,WAAW,EAAE,UAAU;QACvB,YAAY,EAAE,MAAM;QACpB,MAAM,EAAE,EAAE;QACV,EAAE;KACH,CAAA;AACH,CAAC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/defaults.d.ts b/node_modules/ajv/dist/compile/validate/defaults.d.ts
new file mode 100644
index 0000000..02ba453
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/defaults.d.ts
@@ -0,0 +1,2 @@
+import type { SchemaObjCxt } from "..";
+export declare function assignDefaults(it: SchemaObjCxt, ty?: string): void;
diff --git a/node_modules/ajv/dist/compile/validate/defaults.js b/node_modules/ajv/dist/compile/validate/defaults.js
new file mode 100644
index 0000000..cd9c42d
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/defaults.js
@@ -0,0 +1,35 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.assignDefaults = void 0;
+const codegen_1 = require("../codegen");
+const util_1 = require("../util");
+function assignDefaults(it, ty) {
+ const { properties, items } = it.schema;
+ if (ty === "object" && properties) {
+ for (const key in properties) {
+ assignDefault(it, key, properties[key].default);
+ }
+ }
+ else if (ty === "array" && Array.isArray(items)) {
+ items.forEach((sch, i) => assignDefault(it, i, sch.default));
+ }
+}
+exports.assignDefaults = assignDefaults;
+function assignDefault(it, prop, defaultValue) {
+ const { gen, compositeRule, data, opts } = it;
+ if (defaultValue === undefined)
+ return;
+ const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`;
+ if (compositeRule) {
+ (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);
+ return;
+ }
+ let condition = (0, codegen_1._) `${childData} === undefined`;
+ if (opts.useDefaults === "empty") {
+ condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === ""`;
+ }
+ // `${childData} === undefined` +
+ // (opts.useDefaults === "empty" ? ` || ${childData} === null || ${childData} === ""` : "")
+ gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);
+}
+//# sourceMappingURL=defaults.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/defaults.js.map b/node_modules/ajv/dist/compile/validate/defaults.js.map
new file mode 100644
index 0000000..c435d05
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/defaults.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../lib/compile/validate/defaults.ts"],"names":[],"mappings":";;;AACA,wCAAoD;AACpD,kCAAuC;AAEvC,SAAgB,cAAc,CAAC,EAAgB,EAAE,EAAW;IAC1D,MAAM,EAAC,UAAU,EAAE,KAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAA;IACrC,IAAI,EAAE,KAAK,QAAQ,IAAI,UAAU,EAAE;QACjC,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;YAC5B,aAAa,CAAC,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAA;SAChD;KACF;SAAM,IAAI,EAAE,KAAK,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;KACrE;AACH,CAAC;AATD,wCASC;AAED,SAAS,aAAa,CAAC,EAAgB,EAAE,IAAqB,EAAE,YAAqB;IACnF,MAAM,EAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAC,GAAG,EAAE,CAAA;IAC3C,IAAI,YAAY,KAAK,SAAS;QAAE,OAAM;IACtC,MAAM,SAAS,GAAG,IAAA,WAAC,EAAA,GAAG,IAAI,GAAG,IAAA,qBAAW,EAAC,IAAI,CAAC,EAAE,CAAA;IAChD,IAAI,aAAa,EAAE;QACjB,IAAA,sBAAe,EAAC,EAAE,EAAE,2BAA2B,SAAS,EAAE,CAAC,CAAA;QAC3D,OAAM;KACP;IAED,IAAI,SAAS,GAAG,IAAA,WAAC,EAAA,GAAG,SAAS,gBAAgB,CAAA;IAC7C,IAAI,IAAI,CAAC,WAAW,KAAK,OAAO,EAAE;QAChC,SAAS,GAAG,IAAA,WAAC,EAAA,GAAG,SAAS,OAAO,SAAS,gBAAgB,SAAS,SAAS,CAAA;KAC5E;IACD,iCAAiC;IACjC,2FAA2F;IAC3F,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,IAAA,WAAC,EAAA,GAAG,SAAS,MAAM,IAAA,mBAAS,EAAC,YAAY,CAAC,EAAE,CAAC,CAAA;AACjE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/index.d.ts b/node_modules/ajv/dist/compile/validate/index.d.ts
new file mode 100644
index 0000000..6c533ed
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/index.d.ts
@@ -0,0 +1,42 @@
+import type { AddedKeywordDefinition, AnySchemaObject, KeywordErrorCxt, KeywordCxtParams } from "../../types";
+import type { SchemaCxt, SchemaObjCxt } from "..";
+import { SubschemaArgs } from "./subschema";
+import { Code, Name, CodeGen } from "../codegen";
+import type { JSONType } from "../rules";
+import { ErrorPaths } from "../errors";
+export declare function validateFunctionCode(it: SchemaCxt): void;
+export declare class KeywordCxt implements KeywordErrorCxt {
+ readonly gen: CodeGen;
+ readonly allErrors?: boolean;
+ readonly keyword: string;
+ readonly data: Name;
+ readonly $data?: string | false;
+ schema: any;
+ readonly schemaValue: Code | number | boolean;
+ readonly schemaCode: Code | number | boolean;
+ readonly schemaType: JSONType[];
+ readonly parentSchema: AnySchemaObject;
+ readonly errsCount?: Name;
+ params: KeywordCxtParams;
+ readonly it: SchemaObjCxt;
+ readonly def: AddedKeywordDefinition;
+ constructor(it: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string);
+ result(condition: Code, successAction?: () => void, failAction?: () => void): void;
+ failResult(condition: Code, successAction?: () => void, failAction?: () => void): void;
+ pass(condition: Code, failAction?: () => void): void;
+ fail(condition?: Code): void;
+ fail$data(condition: Code): void;
+ error(append?: boolean, errorParams?: KeywordCxtParams, errorPaths?: ErrorPaths): void;
+ private _error;
+ $dataError(): void;
+ reset(): void;
+ ok(cond: Code | boolean): void;
+ setParams(obj: KeywordCxtParams, assign?: true): void;
+ block$data(valid: Name, codeBlock: () => void, $dataValid?: Code): void;
+ check$data(valid?: Name, $dataValid?: Code): void;
+ invalid$data(): Code;
+ subschema(appl: SubschemaArgs, valid: Name): SchemaCxt;
+ mergeEvaluated(schemaCxt: SchemaCxt, toName?: typeof Name): void;
+ mergeValidEvaluated(schemaCxt: SchemaCxt, valid: Name): boolean | void;
+}
+export declare function getData($data: string, { dataLevel, dataNames, dataPathArr }: SchemaCxt): Code | number;
diff --git a/node_modules/ajv/dist/compile/validate/index.js b/node_modules/ajv/dist/compile/validate/index.js
new file mode 100644
index 0000000..fffcd5f
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/index.js
@@ -0,0 +1,510 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
+const boolSchema_1 = require("./boolSchema");
+const dataType_1 = require("./dataType");
+const applicability_1 = require("./applicability");
+const dataType_2 = require("./dataType");
+const defaults_1 = require("./defaults");
+const keyword_1 = require("./keyword");
+const subschema_1 = require("./subschema");
+const codegen_1 = require("../codegen");
+const names_1 = require("../names");
+const resolve_1 = require("../resolve");
+const util_1 = require("../util");
+const errors_1 = require("../errors");
+// schema compilation - generates validation function, subschemaCode (below) is used for subschemas
+function validateFunctionCode(it) {
+ if (isSchemaObj(it)) {
+ checkKeywords(it);
+ if (schemaCxtHasRules(it)) {
+ topSchemaObjCode(it);
+ return;
+ }
+ }
+ validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
+}
+exports.validateFunctionCode = validateFunctionCode;
+function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
+ if (opts.code.es5) {
+ gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
+ gen.code((0, codegen_1._) `"use strict"; ${funcSourceUrl(schema, opts)}`);
+ destructureValCxtES5(gen, opts);
+ gen.code(body);
+ });
+ }
+ else {
+ gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
+ }
+}
+function destructureValCxt(opts) {
+ return (0, codegen_1._) `{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._) `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;
+}
+function destructureValCxtES5(gen, opts) {
+ gen.if(names_1.default.valCxt, () => {
+ gen.var(names_1.default.instancePath, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.instancePath}`);
+ gen.var(names_1.default.parentData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentData}`);
+ gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);
+ gen.var(names_1.default.rootData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.rootData}`);
+ if (opts.dynamicRef)
+ gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);
+ }, () => {
+ gen.var(names_1.default.instancePath, (0, codegen_1._) `""`);
+ gen.var(names_1.default.parentData, (0, codegen_1._) `undefined`);
+ gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `undefined`);
+ gen.var(names_1.default.rootData, names_1.default.data);
+ if (opts.dynamicRef)
+ gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `{}`);
+ });
+}
+function topSchemaObjCode(it) {
+ const { schema, opts, gen } = it;
+ validateFunction(it, () => {
+ if (opts.$comment && schema.$comment)
+ commentKeyword(it);
+ checkNoDefault(it);
+ gen.let(names_1.default.vErrors, null);
+ gen.let(names_1.default.errors, 0);
+ if (opts.unevaluated)
+ resetEvaluated(it);
+ typeAndKeywords(it);
+ returnResults(it);
+ });
+ return;
+}
+function resetEvaluated(it) {
+ // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated
+ const { gen, validateName } = it;
+ it.evaluated = gen.const("evaluated", (0, codegen_1._) `${validateName}.evaluated`);
+ gen.if((0, codegen_1._) `${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._) `${it.evaluated}.props`, (0, codegen_1._) `undefined`));
+ gen.if((0, codegen_1._) `${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._) `${it.evaluated}.items`, (0, codegen_1._) `undefined`));
+}
+function funcSourceUrl(schema, opts) {
+ const schId = typeof schema == "object" && schema[opts.schemaId];
+ return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._) `/*# sourceURL=${schId} */` : codegen_1.nil;
+}
+// schema compilation - this function is used recursively to generate code for sub-schemas
+function subschemaCode(it, valid) {
+ if (isSchemaObj(it)) {
+ checkKeywords(it);
+ if (schemaCxtHasRules(it)) {
+ subSchemaObjCode(it, valid);
+ return;
+ }
+ }
+ (0, boolSchema_1.boolOrEmptySchema)(it, valid);
+}
+function schemaCxtHasRules({ schema, self }) {
+ if (typeof schema == "boolean")
+ return !schema;
+ for (const key in schema)
+ if (self.RULES.all[key])
+ return true;
+ return false;
+}
+function isSchemaObj(it) {
+ return typeof it.schema != "boolean";
+}
+function subSchemaObjCode(it, valid) {
+ const { schema, gen, opts } = it;
+ if (opts.$comment && schema.$comment)
+ commentKeyword(it);
+ updateContext(it);
+ checkAsyncSchema(it);
+ const errsCount = gen.const("_errs", names_1.default.errors);
+ typeAndKeywords(it, errsCount);
+ // TODO var
+ gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);
+}
+function checkKeywords(it) {
+ (0, util_1.checkUnknownRules)(it);
+ checkRefsAndKeywords(it);
+}
+function typeAndKeywords(it, errsCount) {
+ if (it.opts.jtd)
+ return schemaKeywords(it, [], false, errsCount);
+ const types = (0, dataType_1.getSchemaTypes)(it.schema);
+ const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);
+ schemaKeywords(it, types, !checkedTypes, errsCount);
+}
+function checkRefsAndKeywords(it) {
+ const { schema, errSchemaPath, opts, self } = it;
+ if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {
+ self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
+ }
+}
+function checkNoDefault(it) {
+ const { schema, opts } = it;
+ if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {
+ (0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
+ }
+}
+function updateContext(it) {
+ const schId = it.schema[it.opts.schemaId];
+ if (schId)
+ it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);
+}
+function checkAsyncSchema(it) {
+ if (it.schema.$async && !it.schemaEnv.$async)
+ throw new Error("async schema in sync schema");
+}
+function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {
+ const msg = schema.$comment;
+ if (opts.$comment === true) {
+ gen.code((0, codegen_1._) `${names_1.default.self}.logger.log(${msg})`);
+ }
+ else if (typeof opts.$comment == "function") {
+ const schemaPath = (0, codegen_1.str) `${errSchemaPath}/$comment`;
+ const rootName = gen.scopeValue("root", { ref: schemaEnv.root });
+ gen.code((0, codegen_1._) `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);
+ }
+}
+function returnResults(it) {
+ const { gen, schemaEnv, validateName, ValidationError, opts } = it;
+ if (schemaEnv.$async) {
+ // TODO assign unevaluated
+ gen.if((0, codegen_1._) `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._) `new ${ValidationError}(${names_1.default.vErrors})`));
+ }
+ else {
+ gen.assign((0, codegen_1._) `${validateName}.errors`, names_1.default.vErrors);
+ if (opts.unevaluated)
+ assignEvaluated(it);
+ gen.return((0, codegen_1._) `${names_1.default.errors} === 0`);
+ }
+}
+function assignEvaluated({ gen, evaluated, props, items }) {
+ if (props instanceof codegen_1.Name)
+ gen.assign((0, codegen_1._) `${evaluated}.props`, props);
+ if (items instanceof codegen_1.Name)
+ gen.assign((0, codegen_1._) `${evaluated}.items`, items);
+}
+function schemaKeywords(it, types, typeErrors, errsCount) {
+ const { gen, schema, data, allErrors, opts, self } = it;
+ const { RULES } = self;
+ if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
+ gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); // TODO typecast
+ return;
+ }
+ if (!opts.jtd)
+ checkStrictTypes(it, types);
+ gen.block(() => {
+ for (const group of RULES.rules)
+ groupKeywords(group);
+ groupKeywords(RULES.post);
+ });
+ function groupKeywords(group) {
+ if (!(0, applicability_1.shouldUseGroup)(schema, group))
+ return;
+ if (group.type) {
+ gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));
+ iterateKeywords(it, group);
+ if (types.length === 1 && types[0] === group.type && typeErrors) {
+ gen.else();
+ (0, dataType_2.reportTypeError)(it);
+ }
+ gen.endIf();
+ }
+ else {
+ iterateKeywords(it, group);
+ }
+ // TODO make it "ok" call?
+ if (!allErrors)
+ gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`);
+ }
+}
+function iterateKeywords(it, group) {
+ const { gen, schema, opts: { useDefaults }, } = it;
+ if (useDefaults)
+ (0, defaults_1.assignDefaults)(it, group.type);
+ gen.block(() => {
+ for (const rule of group.rules) {
+ if ((0, applicability_1.shouldUseRule)(schema, rule)) {
+ keywordCode(it, rule.keyword, rule.definition, group.type);
+ }
+ }
+ });
+}
+function checkStrictTypes(it, types) {
+ if (it.schemaEnv.meta || !it.opts.strictTypes)
+ return;
+ checkContextTypes(it, types);
+ if (!it.opts.allowUnionTypes)
+ checkMultipleTypes(it, types);
+ checkKeywordTypes(it, it.dataTypes);
+}
+function checkContextTypes(it, types) {
+ if (!types.length)
+ return;
+ if (!it.dataTypes.length) {
+ it.dataTypes = types;
+ return;
+ }
+ types.forEach((t) => {
+ if (!includesType(it.dataTypes, t)) {
+ strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
+ }
+ });
+ it.dataTypes = it.dataTypes.filter((t) => includesType(types, t));
+}
+function checkMultipleTypes(it, ts) {
+ if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
+ strictTypesError(it, "use allowUnionTypes to allow union type keyword");
+ }
+}
+function checkKeywordTypes(it, ts) {
+ const rules = it.self.RULES.all;
+ for (const keyword in rules) {
+ const rule = rules[keyword];
+ if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
+ const { type } = rule.definition;
+ if (type.length && !type.some((t) => hasApplicableType(ts, t))) {
+ strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`);
+ }
+ }
+ }
+}
+function hasApplicableType(schTs, kwdT) {
+ return schTs.includes(kwdT) || (kwdT === "number" && schTs.includes("integer"));
+}
+function includesType(ts, t) {
+ return ts.includes(t) || (t === "integer" && ts.includes("number"));
+}
+function strictTypesError(it, msg) {
+ const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
+ msg += ` at "${schemaPath}" (strictTypes)`;
+ (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);
+}
+class KeywordCxt {
+ constructor(it, def, keyword) {
+ (0, keyword_1.validateKeywordUsage)(it, def, keyword);
+ this.gen = it.gen;
+ this.allErrors = it.allErrors;
+ this.keyword = keyword;
+ this.data = it.data;
+ this.schema = it.schema[keyword];
+ this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;
+ this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);
+ this.schemaType = def.schemaType;
+ this.parentSchema = it.schema;
+ this.params = {};
+ this.it = it;
+ this.def = def;
+ if (this.$data) {
+ this.schemaCode = it.gen.const("vSchema", getData(this.$data, it));
+ }
+ else {
+ this.schemaCode = this.schemaValue;
+ if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {
+ throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);
+ }
+ }
+ if ("code" in def ? def.trackErrors : def.errors !== false) {
+ this.errsCount = it.gen.const("_errs", names_1.default.errors);
+ }
+ }
+ result(condition, successAction, failAction) {
+ this.failResult((0, codegen_1.not)(condition), successAction, failAction);
+ }
+ failResult(condition, successAction, failAction) {
+ this.gen.if(condition);
+ if (failAction)
+ failAction();
+ else
+ this.error();
+ if (successAction) {
+ this.gen.else();
+ successAction();
+ if (this.allErrors)
+ this.gen.endIf();
+ }
+ else {
+ if (this.allErrors)
+ this.gen.endIf();
+ else
+ this.gen.else();
+ }
+ }
+ pass(condition, failAction) {
+ this.failResult((0, codegen_1.not)(condition), undefined, failAction);
+ }
+ fail(condition) {
+ if (condition === undefined) {
+ this.error();
+ if (!this.allErrors)
+ this.gen.if(false); // this branch will be removed by gen.optimize
+ return;
+ }
+ this.gen.if(condition);
+ this.error();
+ if (this.allErrors)
+ this.gen.endIf();
+ else
+ this.gen.else();
+ }
+ fail$data(condition) {
+ if (!this.$data)
+ return this.fail(condition);
+ const { schemaCode } = this;
+ this.fail((0, codegen_1._) `${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);
+ }
+ error(append, errorParams, errorPaths) {
+ if (errorParams) {
+ this.setParams(errorParams);
+ this._error(append, errorPaths);
+ this.setParams({});
+ return;
+ }
+ this._error(append, errorPaths);
+ }
+ _error(append, errorPaths) {
+ ;
+ (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);
+ }
+ $dataError() {
+ (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);
+ }
+ reset() {
+ if (this.errsCount === undefined)
+ throw new Error('add "trackErrors" to keyword definition');
+ (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);
+ }
+ ok(cond) {
+ if (!this.allErrors)
+ this.gen.if(cond);
+ }
+ setParams(obj, assign) {
+ if (assign)
+ Object.assign(this.params, obj);
+ else
+ this.params = obj;
+ }
+ block$data(valid, codeBlock, $dataValid = codegen_1.nil) {
+ this.gen.block(() => {
+ this.check$data(valid, $dataValid);
+ codeBlock();
+ });
+ }
+ check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {
+ if (!this.$data)
+ return;
+ const { gen, schemaCode, schemaType, def } = this;
+ gen.if((0, codegen_1.or)((0, codegen_1._) `${schemaCode} === undefined`, $dataValid));
+ if (valid !== codegen_1.nil)
+ gen.assign(valid, true);
+ if (schemaType.length || def.validateSchema) {
+ gen.elseIf(this.invalid$data());
+ this.$dataError();
+ if (valid !== codegen_1.nil)
+ gen.assign(valid, false);
+ }
+ gen.else();
+ }
+ invalid$data() {
+ const { gen, schemaCode, schemaType, def, it } = this;
+ return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());
+ function wrong$DataType() {
+ if (schemaType.length) {
+ /* istanbul ignore if */
+ if (!(schemaCode instanceof codegen_1.Name))
+ throw new Error("ajv implementation error");
+ const st = Array.isArray(schemaType) ? schemaType : [schemaType];
+ return (0, codegen_1._) `${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;
+ }
+ return codegen_1.nil;
+ }
+ function invalid$DataSchema() {
+ if (def.validateSchema) {
+ const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); // TODO value.code for standalone
+ return (0, codegen_1._) `!${validateSchemaRef}(${schemaCode})`;
+ }
+ return codegen_1.nil;
+ }
+ }
+ subschema(appl, valid) {
+ const subschema = (0, subschema_1.getSubschema)(this.it, appl);
+ (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);
+ (0, subschema_1.extendSubschemaMode)(subschema, appl);
+ const nextContext = { ...this.it, ...subschema, items: undefined, props: undefined };
+ subschemaCode(nextContext, valid);
+ return nextContext;
+ }
+ mergeEvaluated(schemaCxt, toName) {
+ const { it, gen } = this;
+ if (!it.opts.unevaluated)
+ return;
+ if (it.props !== true && schemaCxt.props !== undefined) {
+ it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);
+ }
+ if (it.items !== true && schemaCxt.items !== undefined) {
+ it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
+ }
+ }
+ mergeValidEvaluated(schemaCxt, valid) {
+ const { it, gen } = this;
+ if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
+ gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));
+ return true;
+ }
+ }
+}
+exports.KeywordCxt = KeywordCxt;
+function keywordCode(it, keyword, def, ruleType) {
+ const cxt = new KeywordCxt(it, def, keyword);
+ if ("code" in def) {
+ def.code(cxt, ruleType);
+ }
+ else if (cxt.$data && def.validate) {
+ (0, keyword_1.funcKeywordCode)(cxt, def);
+ }
+ else if ("macro" in def) {
+ (0, keyword_1.macroKeywordCode)(cxt, def);
+ }
+ else if (def.compile || def.validate) {
+ (0, keyword_1.funcKeywordCode)(cxt, def);
+ }
+}
+const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
+const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
+function getData($data, { dataLevel, dataNames, dataPathArr }) {
+ let jsonPointer;
+ let data;
+ if ($data === "")
+ return names_1.default.rootData;
+ if ($data[0] === "/") {
+ if (!JSON_POINTER.test($data))
+ throw new Error(`Invalid JSON-pointer: ${$data}`);
+ jsonPointer = $data;
+ data = names_1.default.rootData;
+ }
+ else {
+ const matches = RELATIVE_JSON_POINTER.exec($data);
+ if (!matches)
+ throw new Error(`Invalid JSON-pointer: ${$data}`);
+ const up = +matches[1];
+ jsonPointer = matches[2];
+ if (jsonPointer === "#") {
+ if (up >= dataLevel)
+ throw new Error(errorMsg("property/index", up));
+ return dataPathArr[dataLevel - up];
+ }
+ if (up > dataLevel)
+ throw new Error(errorMsg("data", up));
+ data = dataNames[dataLevel - up];
+ if (!jsonPointer)
+ return data;
+ }
+ let expr = data;
+ const segments = jsonPointer.split("/");
+ for (const segment of segments) {
+ if (segment) {
+ data = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
+ expr = (0, codegen_1._) `${expr} && ${data}`;
+ }
+ }
+ return expr;
+ function errorMsg(pointerType, up) {
+ return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;
+ }
+}
+exports.getData = getData;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/index.js.map b/node_modules/ajv/dist/compile/validate/index.js.map
new file mode 100644
index 0000000..b9ed942
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/compile/validate/index.ts"],"names":[],"mappings":";;;AASA,6CAAoE;AACpE,yCAAiE;AACjE,mDAA6D;AAC7D,yCAAmF;AACnF,yCAAyC;AACzC,uCAAkG;AAClG,2CAAiG;AACjG,wCAAwF;AACxF,oCAAwB;AACxB,wCAAqC;AACrC,kCAOgB;AAEhB,sCAMkB;AAElB,mGAAmG;AACnG,SAAgB,oBAAoB,CAAC,EAAa;IAChD,IAAI,WAAW,CAAC,EAAE,CAAC,EAAE;QACnB,aAAa,CAAC,EAAE,CAAC,CAAA;QACjB,IAAI,iBAAiB,CAAC,EAAE,CAAC,EAAE;YACzB,gBAAgB,CAAC,EAAE,CAAC,CAAA;YACpB,OAAM;SACP;KACF;IACD,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,IAAA,iCAAoB,EAAC,EAAE,CAAC,CAAC,CAAA;AACtD,CAAC;AATD,oDASC;AAED,SAAS,gBAAgB,CACvB,EAAC,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAY,EACvD,IAAW;IAEX,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;QACjB,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,IAAA,WAAC,EAAA,GAAG,eAAC,CAAC,IAAI,KAAK,eAAC,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE;YACvE,GAAG,CAAC,IAAI,CAAC,IAAA,WAAC,EAAA,iBAAiB,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CAAA;YACzD,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;YAC/B,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,CAAC,CAAC,CAAA;KACH;SAAM;QACL,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,IAAA,WAAC,EAAA,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AAC,CAAC,CAAC,CAAA;QACxB,IAAI,WAAW,KAAK,GAAG,EAAE;YACvB,IAAI,EAAE,IAAI,SAAS;gBAAE,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,CAAA;YACpE,OAAO,WAAW,CAAC,SAAS,GAAG,EAAE,CAAC,CAAA;SACnC;QACD,IAAI,EAAE,GAAG,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAA;QACzD,IAAI,GAAG,SAAS,CAAC,SAAS,GAAG,EAAE,CAAC,CAAA;QAChC,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAA;KAC9B;IAED,IAAI,IAAI,GAAG,IAAI,CAAA;IACf,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,IAAI,OAAO,EAAE;YACX,IAAI,GAAG,IAAA,WAAC,EAAA,GAAG,IAAI,GAAG,IAAA,qBAAW,EAAC,IAAA,0BAAmB,EAAC,OAAO,CAAC,CAAC,EAAE,CAAA;YAC7D,IAAI,GAAG,IAAA,WAAC,EAAA,GAAG,IAAI,OAAO,IAAI,EAAE,CAAA;SAC7B;KACF;IACD,OAAO,IAAI,CAAA;IAEX,SAAS,QAAQ,CAAC,WAAmB,EAAE,EAAU;QAC/C,OAAO,iBAAiB,WAAW,IAAI,EAAE,gCAAgC,SAAS,EAAE,CAAA;IACtF,CAAC;AACH,CAAC;AAtCD,0BAsCC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/keyword.d.ts b/node_modules/ajv/dist/compile/validate/keyword.d.ts
new file mode 100644
index 0000000..d15cee8
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/keyword.d.ts
@@ -0,0 +1,8 @@
+import type { KeywordCxt } from ".";
+import type { AddedKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition } from "../../types";
+import type { SchemaObjCxt } from "..";
+import type { JSONType } from "../rules";
+export declare function macroKeywordCode(cxt: KeywordCxt, def: MacroKeywordDefinition): void;
+export declare function funcKeywordCode(cxt: KeywordCxt, def: FuncKeywordDefinition): void;
+export declare function validSchemaType(schema: unknown, schemaType: JSONType[], allowUndefined?: boolean): boolean;
+export declare function validateKeywordUsage({ schema, opts, self, errSchemaPath }: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string): void;
diff --git a/node_modules/ajv/dist/compile/validate/keyword.js b/node_modules/ajv/dist/compile/validate/keyword.js
new file mode 100644
index 0000000..1109d3a
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/keyword.js
@@ -0,0 +1,124 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
+const codegen_1 = require("../codegen");
+const names_1 = require("../names");
+const code_1 = require("../../vocabularies/code");
+const errors_1 = require("../errors");
+function macroKeywordCode(cxt, def) {
+ const { gen, keyword, schema, parentSchema, it } = cxt;
+ const macroSchema = def.macro.call(it.self, schema, parentSchema, it);
+ const schemaRef = useKeyword(gen, keyword, macroSchema);
+ if (it.opts.validateSchema !== false)
+ it.self.validateSchema(macroSchema, true);
+ const valid = gen.name("valid");
+ cxt.subschema({
+ schema: macroSchema,
+ schemaPath: codegen_1.nil,
+ errSchemaPath: `${it.errSchemaPath}/${keyword}`,
+ topSchemaRef: schemaRef,
+ compositeRule: true,
+ }, valid);
+ cxt.pass(valid, () => cxt.error(true));
+}
+exports.macroKeywordCode = macroKeywordCode;
+function funcKeywordCode(cxt, def) {
+ var _a;
+ const { gen, keyword, schema, parentSchema, $data, it } = cxt;
+ checkAsyncKeyword(it, def);
+ const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
+ const validateRef = useKeyword(gen, keyword, validate);
+ const valid = gen.let("valid");
+ cxt.block$data(valid, validateKeyword);
+ cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);
+ function validateKeyword() {
+ if (def.errors === false) {
+ assignValid();
+ if (def.modifying)
+ modifyData(cxt);
+ reportErrs(() => cxt.error());
+ }
+ else {
+ const ruleErrs = def.async ? validateAsync() : validateSync();
+ if (def.modifying)
+ modifyData(cxt);
+ reportErrs(() => addErrs(cxt, ruleErrs));
+ }
+ }
+ function validateAsync() {
+ const ruleErrs = gen.let("ruleErrs", null);
+ gen.try(() => assignValid((0, codegen_1._) `await `), (e) => gen.assign(valid, false).if((0, codegen_1._) `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._) `${e}.errors`), () => gen.throw(e)));
+ return ruleErrs;
+ }
+ function validateSync() {
+ const validateErrs = (0, codegen_1._) `${validateRef}.errors`;
+ gen.assign(validateErrs, null);
+ assignValid(codegen_1.nil);
+ return validateErrs;
+ }
+ function assignValid(_await = def.async ? (0, codegen_1._) `await ` : codegen_1.nil) {
+ const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
+ const passSchema = !(("compile" in def && !$data) || def.schema === false);
+ gen.assign(valid, (0, codegen_1._) `${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
+ }
+ function reportErrs(errors) {
+ var _a;
+ gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors);
+ }
+}
+exports.funcKeywordCode = funcKeywordCode;
+function modifyData(cxt) {
+ const { gen, data, it } = cxt;
+ gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._) `${it.parentData}[${it.parentDataProperty}]`));
+}
+function addErrs(cxt, errs) {
+ const { gen } = cxt;
+ gen.if((0, codegen_1._) `Array.isArray(${errs})`, () => {
+ gen
+ .assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`)
+ .assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);
+ (0, errors_1.extendErrors)(cxt);
+ }, () => cxt.error());
+}
+function checkAsyncKeyword({ schemaEnv }, def) {
+ if (def.async && !schemaEnv.$async)
+ throw new Error("async keyword in sync schema");
+}
+function useKeyword(gen, keyword, result) {
+ if (result === undefined)
+ throw new Error(`keyword "${keyword}" failed to compile`);
+ return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
+}
+function validSchemaType(schema, schemaType, allowUndefined = false) {
+ // TODO add tests
+ return (!schemaType.length ||
+ schemaType.some((st) => st === "array"
+ ? Array.isArray(schema)
+ : st === "object"
+ ? schema && typeof schema == "object" && !Array.isArray(schema)
+ : typeof schema == st || (allowUndefined && typeof schema == "undefined")));
+}
+exports.validSchemaType = validSchemaType;
+function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {
+ /* istanbul ignore if */
+ if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
+ throw new Error("ajv implementation error");
+ }
+ const deps = def.dependencies;
+ if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
+ throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`);
+ }
+ if (def.validateSchema) {
+ const valid = def.validateSchema(schema[keyword]);
+ if (!valid) {
+ const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` +
+ self.errorsText(def.validateSchema.errors);
+ if (opts.validateSchema === "log")
+ self.logger.error(msg);
+ else
+ throw new Error(msg);
+ }
+ }
+}
+exports.validateKeywordUsage = validateKeywordUsage;
+//# sourceMappingURL=keyword.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/keyword.js.map b/node_modules/ajv/dist/compile/validate/keyword.js.map
new file mode 100644
index 0000000..10d716d
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/keyword.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"keyword.js","s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G,GAAG,CAAC,YAAY,CAAA;IAC7B,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE;QAC3E,MAAM,IAAI,KAAK,CAAC,2CAA2C,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;KACzF;IAED,IAAI,GAAG,CAAC,cAAc,EAAE;QACtB,MAAM,KAAK,GAAG,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;QACjD,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,GAAG,GACP,YAAY,OAAO,+BAA+B,aAAa,KAAK;gBACpE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;YAC5C,IAAI,IAAI,CAAC,cAAc,KAAK,KAAK;gBAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;gBACpD,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;SAC1B;KACF;AACH,CAAC;AAzBD,oDAyBC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/subschema.d.ts b/node_modules/ajv/dist/compile/validate/subschema.d.ts
new file mode 100644
index 0000000..8544271
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/subschema.d.ts
@@ -0,0 +1,47 @@
+import type { AnySchema } from "../../types";
+import type { SchemaObjCxt } from "..";
+import { Code, Name } from "../codegen";
+import { Type } from "../util";
+import type { JSONType } from "../rules";
+export interface SubschemaContext {
+ schema: AnySchema;
+ schemaPath: Code;
+ errSchemaPath: string;
+ topSchemaRef?: Code;
+ errorPath?: Code;
+ dataLevel?: number;
+ dataTypes?: JSONType[];
+ data?: Name;
+ parentData?: Name;
+ parentDataProperty?: Code | number;
+ dataNames?: Name[];
+ dataPathArr?: (Code | number)[];
+ propertyName?: Name;
+ jtdDiscriminator?: string;
+ jtdMetadata?: boolean;
+ compositeRule?: true;
+ createErrors?: boolean;
+ allErrors?: boolean;
+}
+export declare type SubschemaArgs = Partial<{
+ keyword: string;
+ schemaProp: string | number;
+ schema: AnySchema;
+ schemaPath: Code;
+ errSchemaPath: string;
+ topSchemaRef: Code;
+ data: Name | Code;
+ dataProp: Code | string | number;
+ dataTypes: JSONType[];
+ definedProperties: Set;
+ propertyName: Name;
+ dataPropType: Type;
+ jtdDiscriminator: string;
+ jtdMetadata: boolean;
+ compositeRule: true;
+ createErrors: boolean;
+ allErrors: boolean;
+}>;
+export declare function getSubschema(it: SchemaObjCxt, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }: SubschemaArgs): SubschemaContext;
+export declare function extendSubschemaData(subschema: SubschemaContext, it: SchemaObjCxt, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }: SubschemaArgs): void;
+export declare function extendSubschemaMode(subschema: SubschemaContext, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }: SubschemaArgs): void;
diff --git a/node_modules/ajv/dist/compile/validate/subschema.js b/node_modules/ajv/dist/compile/validate/subschema.js
new file mode 100644
index 0000000..9de2828
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/subschema.js
@@ -0,0 +1,81 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
+const codegen_1 = require("../codegen");
+const util_1 = require("../util");
+function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
+ if (keyword !== undefined && schema !== undefined) {
+ throw new Error('both "keyword" and "schema" passed, only one allowed');
+ }
+ if (keyword !== undefined) {
+ const sch = it.schema[keyword];
+ return schemaProp === undefined
+ ? {
+ schema: sch,
+ schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,
+ errSchemaPath: `${it.errSchemaPath}/${keyword}`,
+ }
+ : {
+ schema: sch[schemaProp],
+ schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,
+ errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`,
+ };
+ }
+ if (schema !== undefined) {
+ if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {
+ throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
+ }
+ return {
+ schema,
+ schemaPath,
+ topSchemaRef,
+ errSchemaPath,
+ };
+ }
+ throw new Error('either "keyword" or "schema" must be passed');
+}
+exports.getSubschema = getSubschema;
+function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
+ if (data !== undefined && dataProp !== undefined) {
+ throw new Error('both "data" and "dataProp" passed, only one allowed');
+ }
+ const { gen } = it;
+ if (dataProp !== undefined) {
+ const { errorPath, dataPathArr, opts } = it;
+ const nextData = gen.let("data", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
+ dataContextProps(nextData);
+ subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
+ subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`;
+ subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];
+ }
+ if (data !== undefined) {
+ const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); // replaceable if used once?
+ dataContextProps(nextData);
+ if (propertyName !== undefined)
+ subschema.propertyName = propertyName;
+ // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr
+ }
+ if (dataTypes)
+ subschema.dataTypes = dataTypes;
+ function dataContextProps(_nextData) {
+ subschema.data = _nextData;
+ subschema.dataLevel = it.dataLevel + 1;
+ subschema.dataTypes = [];
+ it.definedProperties = new Set();
+ subschema.parentData = it.data;
+ subschema.dataNames = [...it.dataNames, _nextData];
+ }
+}
+exports.extendSubschemaData = extendSubschemaData;
+function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
+ if (compositeRule !== undefined)
+ subschema.compositeRule = compositeRule;
+ if (createErrors !== undefined)
+ subschema.createErrors = createErrors;
+ if (allErrors !== undefined)
+ subschema.allErrors = allErrors;
+ subschema.jtdDiscriminator = jtdDiscriminator; // not inherited
+ subschema.jtdMetadata = jtdMetadata; // not inherited
+}
+exports.extendSubschemaMode = extendSubschemaMode;
+//# sourceMappingURL=subschema.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/compile/validate/subschema.js.map b/node_modules/ajv/dist/compile/validate/subschema.js.map
new file mode 100644
index 0000000..a1b84d3
--- /dev/null
+++ b/node_modules/ajv/dist/compile/validate/subschema.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"subschema.js","sourceRoot":"","sources":["../../../lib/compile/validate/subschema.ts"],"names":[],"mappings":";;;AAEA,wCAA0D;AAC1D,kCAA0D;AA6C1D,SAAgB,YAAY,CAC1B,EAAgB,EAChB,EAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAgB;IAErF,IAAI,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE;QACjD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;KACxE;IAED,IAAI,OAAO,KAAK,SAAS,EAAE;QACzB,MAAM,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QAC9B,OAAO,UAAU,KAAK,SAAS;YAC7B,CAAC,CAAC;gBACE,MAAM,EAAE,GAAG;gBACX,UAAU,EAAE,IAAA,WAAC,EAAA,GAAG,EAAE,CAAC,UAAU,GAAG,IAAA,qBAAW,EAAC,OAAO,CAAC,EAAE;gBACtD,aAAa,EAAE,GAAG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,CACjC,SAA2B,EAC3B,EAAC,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAgB;IAEtF,IAAI,aAAa,KAAK,SAAS;QAAE,SAAS,CAAC,aAAa,GAAG,aAAa,CAAA;IACxE,IAAI,YAAY,KAAK,SAAS;QAAE,SAAS,CAAC,YAAY,GAAG,YAAY,CAAA;IACrE,IAAI,SAAS,KAAK,SAAS;QAAE,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5D,SAAS,CAAC,gBAAgB,GAAG,gBAAgB,CAAA,CAAC,gBAAgB;IAC9D,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA,CAAC,gBAAgB;AACtD,CAAC;AATD,kDASC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/core.d.ts b/node_modules/ajv/dist/core.d.ts
new file mode 100644
index 0000000..ac39799
--- /dev/null
+++ b/node_modules/ajv/dist/core.d.ts
@@ -0,0 +1,173 @@
+export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, AnyValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
+export { SchemaCxt, SchemaObjCxt } from "./compile";
+export interface Plugin {
+ (ajv: Ajv, options?: Opts): Ajv;
+ [prop: string]: any;
+}
+export { KeywordCxt } from "./compile/validate";
+export { DefinedError } from "./vocabularies/errors";
+export { JSONType } from "./compile/rules";
+export { JSONSchemaType } from "./types/json-schema";
+export { JTDSchemaType, SomeJTDSchemaType, JTDDataType } from "./types/jtd-schema";
+export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
+import type { Schema, AnySchema, AnySchemaObject, SchemaObject, AsyncSchema, Vocabulary, KeywordDefinition, AddedKeywordDefinition, AnyValidateFunction, ValidateFunction, AsyncValidateFunction, ErrorObject, Format, AddedFormat, RegExpEngine, UriResolver } from "./types";
+import type { JSONSchemaType } from "./types/json-schema";
+import type { JTDSchemaType, SomeJTDSchemaType, JTDDataType } from "./types/jtd-schema";
+import ValidationError from "./runtime/validation_error";
+import MissingRefError from "./compile/ref_error";
+import { ValidationRules } from "./compile/rules";
+import { SchemaEnv } from "./compile";
+import { Code, ValueScope } from "./compile/codegen";
+export declare type Options = CurrentOptions & DeprecatedOptions;
+export interface CurrentOptions {
+ strict?: boolean | "log";
+ strictSchema?: boolean | "log";
+ strictNumbers?: boolean | "log";
+ strictTypes?: boolean | "log";
+ strictTuples?: boolean | "log";
+ strictRequired?: boolean | "log";
+ allowMatchingProperties?: boolean;
+ allowUnionTypes?: boolean;
+ validateFormats?: boolean;
+ $data?: boolean;
+ allErrors?: boolean;
+ verbose?: boolean;
+ discriminator?: boolean;
+ unicodeRegExp?: boolean;
+ timestamp?: "string" | "date";
+ parseDate?: boolean;
+ allowDate?: boolean;
+ $comment?: true | ((comment: string, schemaPath?: string, rootSchema?: AnySchemaObject) => unknown);
+ formats?: {
+ [Name in string]?: Format;
+ };
+ keywords?: Vocabulary;
+ schemas?: AnySchema[] | {
+ [Key in string]?: AnySchema;
+ };
+ logger?: Logger | false;
+ loadSchema?: (uri: string) => Promise;
+ removeAdditional?: boolean | "all" | "failing";
+ useDefaults?: boolean | "empty";
+ coerceTypes?: boolean | "array";
+ next?: boolean;
+ unevaluated?: boolean;
+ dynamicRef?: boolean;
+ schemaId?: "id" | "$id";
+ jtd?: boolean;
+ meta?: SchemaObject | boolean;
+ defaultMeta?: string | AnySchemaObject;
+ validateSchema?: boolean | "log";
+ addUsedSchema?: boolean;
+ inlineRefs?: boolean | number;
+ passContext?: boolean;
+ loopRequired?: number;
+ loopEnum?: number;
+ ownProperties?: boolean;
+ multipleOfPrecision?: number;
+ int32range?: boolean;
+ messages?: boolean;
+ code?: CodeOptions;
+ uriResolver?: UriResolver;
+}
+export interface CodeOptions {
+ es5?: boolean;
+ esm?: boolean;
+ lines?: boolean;
+ optimize?: boolean | number;
+ formats?: Code;
+ source?: boolean;
+ process?: (code: string, schema?: SchemaEnv) => string;
+ regExp?: RegExpEngine;
+}
+interface InstanceCodeOptions extends CodeOptions {
+ regExp: RegExpEngine;
+ optimize: number;
+}
+interface DeprecatedOptions {
+ /** @deprecated */
+ ignoreKeywordsWithRef?: boolean;
+ /** @deprecated */
+ jsPropertySyntax?: boolean;
+ /** @deprecated */
+ unicode?: boolean;
+}
+declare type RequiredInstanceOptions = {
+ [K in "strictSchema" | "strictNumbers" | "strictTypes" | "strictTuples" | "strictRequired" | "inlineRefs" | "loopRequired" | "loopEnum" | "meta" | "messages" | "schemaId" | "addUsedSchema" | "validateSchema" | "validateFormats" | "int32range" | "unicodeRegExp" | "uriResolver"]: NonNullable;
+} & {
+ code: InstanceCodeOptions;
+};
+export declare type InstanceOptions = Options & RequiredInstanceOptions;
+export interface Logger {
+ log(...args: unknown[]): unknown;
+ warn(...args: unknown[]): unknown;
+ error(...args: unknown[]): unknown;
+}
+export default class Ajv {
+ opts: InstanceOptions;
+ errors?: ErrorObject[] | null;
+ logger: Logger;
+ readonly scope: ValueScope;
+ readonly schemas: {
+ [Key in string]?: SchemaEnv;
+ };
+ readonly refs: {
+ [Ref in string]?: SchemaEnv | string;
+ };
+ readonly formats: {
+ [Name in string]?: AddedFormat;
+ };
+ readonly RULES: ValidationRules;
+ readonly _compilations: Set;
+ private readonly _loading;
+ private readonly _cache;
+ private readonly _metaOpts;
+ static ValidationError: typeof ValidationError;
+ static MissingRefError: typeof MissingRefError;
+ constructor(opts?: Options);
+ _addVocabularies(): void;
+ _addDefaultMetaSchema(): void;
+ defaultMeta(): string | AnySchemaObject | undefined;
+ validate(schema: Schema | string, data: unknown): boolean;
+ validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise;
+ validate(schema: Schema | JSONSchemaType | string, data: unknown): data is T;
+ validate(schema: JTDSchemaType, data: unknown): data is T;
+ validate(schema: T, data: unknown): data is JTDDataType;
+ validate(schema: AsyncSchema, data: unknown | T): Promise;
+ validate(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise;
+ compile(schema: Schema | JSONSchemaType, _meta?: boolean): ValidateFunction;
+ compile(schema: JTDSchemaType, _meta?: boolean): ValidateFunction;
+ compile(schema: T, _meta?: boolean): ValidateFunction>;
+ compile(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction;
+ compile(schema: AnySchema, _meta?: boolean): AnyValidateFunction;
+ compileAsync(schema: SchemaObject | JSONSchemaType, _meta?: boolean): Promise>;
+ compileAsync(schema: JTDSchemaType, _meta?: boolean): Promise>;
+ compileAsync(schema: AsyncSchema, meta?: boolean): Promise>;
+ compileAsync(schema: AnySchemaObject, meta?: boolean): Promise>;
+ addSchema(schema: AnySchema | AnySchema[], // If array is passed, `key` will be ignored
+ key?: string, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ _meta?: boolean, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ _validateSchema?: boolean | "log"): Ajv;
+ addMetaSchema(schema: AnySchemaObject, key?: string, // schema key
+ _validateSchema?: boolean | "log"): Ajv;
+ validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise;
+ getSchema(keyRef: string): AnyValidateFunction | undefined;
+ removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv;
+ addVocabulary(definitions: Vocabulary): Ajv;
+ addKeyword(kwdOrDef: string | KeywordDefinition, def?: KeywordDefinition): Ajv;
+ getKeyword(keyword: string): AddedKeywordDefinition | boolean;
+ removeKeyword(keyword: string): Ajv;
+ addFormat(name: string, format: Format): Ajv;
+ errorsText(errors?: ErrorObject[] | null | undefined, // optional array of validation errors
+ { separator, dataVar }?: ErrorsTextOptions): string;
+ $dataMetaSchema(metaSchema: AnySchemaObject, keywordsJsonPointers: string[]): AnySchemaObject;
+ private _removeAllSchemas;
+ _addSchema(schema: AnySchema, meta?: boolean, baseId?: string, validateSchema?: boolean | "log", addSchema?: boolean): SchemaEnv;
+ private _checkUnique;
+ private _compileSchemaEnv;
+ private _compileMetaSchema;
+}
+export interface ErrorsTextOptions {
+ separator?: string;
+ dataVar?: string;
+}
diff --git a/node_modules/ajv/dist/core.js b/node_modules/ajv/dist/core.js
new file mode 100644
index 0000000..8491116
--- /dev/null
+++ b/node_modules/ajv/dist/core.js
@@ -0,0 +1,617 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
+var validate_1 = require("./compile/validate");
+Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
+var codegen_1 = require("./compile/codegen");
+Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
+Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
+Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
+Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
+Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
+Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
+const validation_error_1 = require("./runtime/validation_error");
+const ref_error_1 = require("./compile/ref_error");
+const rules_1 = require("./compile/rules");
+const compile_1 = require("./compile");
+const codegen_2 = require("./compile/codegen");
+const resolve_1 = require("./compile/resolve");
+const dataType_1 = require("./compile/validate/dataType");
+const util_1 = require("./compile/util");
+const $dataRefSchema = require("./refs/data.json");
+const uri_1 = require("./runtime/uri");
+const defaultRegExp = (str, flags) => new RegExp(str, flags);
+defaultRegExp.code = "new RegExp";
+const META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
+const EXT_SCOPE_NAMES = new Set([
+ "validate",
+ "serialize",
+ "parse",
+ "wrapper",
+ "root",
+ "schema",
+ "keyword",
+ "pattern",
+ "formats",
+ "validate$data",
+ "func",
+ "obj",
+ "Error",
+]);
+const removedOptions = {
+ errorDataPath: "",
+ format: "`validateFormats: false` can be used instead.",
+ nullable: '"nullable" keyword is supported by default.',
+ jsonPointers: "Deprecated jsPropertySyntax can be used instead.",
+ extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.",
+ missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.",
+ processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`",
+ sourceCode: "Use option `code: {source: true}`",
+ strictDefaults: "It is default now, see option `strict`.",
+ strictKeywords: "It is default now, see option `strict`.",
+ uniqueItems: '"uniqueItems" keyword is always validated.',
+ unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",
+ cache: "Map is used as cache, schema object as key.",
+ serialize: "Map is used as cache, schema object as key.",
+ ajvErrors: "It is default now.",
+};
+const deprecatedOptions = {
+ ignoreKeywordsWithRef: "",
+ jsPropertySyntax: "",
+ unicode: '"minLength"/"maxLength" account for unicode characters by default.',
+};
+const MAX_EXPRESSION = 200;
+// eslint-disable-next-line complexity
+function requiredOptions(o) {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
+ const s = o.strict;
+ const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;
+ const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0;
+ const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
+ const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
+ return {
+ strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,
+ strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,
+ strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log",
+ strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log",
+ strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,
+ code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },
+ loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,
+ loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,
+ meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,
+ messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,
+ inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,
+ schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id",
+ addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,
+ validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,
+ validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,
+ unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,
+ int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,
+ uriResolver: uriResolver,
+ };
+}
+class Ajv {
+ constructor(opts = {}) {
+ this.schemas = {};
+ this.refs = {};
+ this.formats = {};
+ this._compilations = new Set();
+ this._loading = {};
+ this._cache = new Map();
+ opts = this.opts = { ...opts, ...requiredOptions(opts) };
+ const { es5, lines } = this.opts.code;
+ this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });
+ this.logger = getLogger(opts.logger);
+ const formatOpt = opts.validateFormats;
+ opts.validateFormats = false;
+ this.RULES = (0, rules_1.getRules)();
+ checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED");
+ checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn");
+ this._metaOpts = getMetaSchemaOptions.call(this);
+ if (opts.formats)
+ addInitialFormats.call(this);
+ this._addVocabularies();
+ this._addDefaultMetaSchema();
+ if (opts.keywords)
+ addInitialKeywords.call(this, opts.keywords);
+ if (typeof opts.meta == "object")
+ this.addMetaSchema(opts.meta);
+ addInitialSchemas.call(this);
+ opts.validateFormats = formatOpt;
+ }
+ _addVocabularies() {
+ this.addKeyword("$async");
+ }
+ _addDefaultMetaSchema() {
+ const { $data, meta, schemaId } = this.opts;
+ let _dataRefSchema = $dataRefSchema;
+ if (schemaId === "id") {
+ _dataRefSchema = { ...$dataRefSchema };
+ _dataRefSchema.id = _dataRefSchema.$id;
+ delete _dataRefSchema.$id;
+ }
+ if (meta && $data)
+ this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);
+ }
+ defaultMeta() {
+ const { meta, schemaId } = this.opts;
+ return (this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : undefined);
+ }
+ validate(schemaKeyRef, // key, ref or schema object
+ data // to be validated
+ ) {
+ let v;
+ if (typeof schemaKeyRef == "string") {
+ v = this.getSchema(schemaKeyRef);
+ if (!v)
+ throw new Error(`no schema with key or ref "${schemaKeyRef}"`);
+ }
+ else {
+ v = this.compile(schemaKeyRef);
+ }
+ const valid = v(data);
+ if (!("$async" in v))
+ this.errors = v.errors;
+ return valid;
+ }
+ compile(schema, _meta) {
+ const sch = this._addSchema(schema, _meta);
+ return (sch.validate || this._compileSchemaEnv(sch));
+ }
+ compileAsync(schema, meta) {
+ if (typeof this.opts.loadSchema != "function") {
+ throw new Error("options.loadSchema should be a function");
+ }
+ const { loadSchema } = this.opts;
+ return runCompileAsync.call(this, schema, meta);
+ async function runCompileAsync(_schema, _meta) {
+ await loadMetaSchema.call(this, _schema.$schema);
+ const sch = this._addSchema(_schema, _meta);
+ return sch.validate || _compileAsync.call(this, sch);
+ }
+ async function loadMetaSchema($ref) {
+ if ($ref && !this.getSchema($ref)) {
+ await runCompileAsync.call(this, { $ref }, true);
+ }
+ }
+ async function _compileAsync(sch) {
+ try {
+ return this._compileSchemaEnv(sch);
+ }
+ catch (e) {
+ if (!(e instanceof ref_error_1.default))
+ throw e;
+ checkLoaded.call(this, e);
+ await loadMissingSchema.call(this, e.missingSchema);
+ return _compileAsync.call(this, sch);
+ }
+ }
+ function checkLoaded({ missingSchema: ref, missingRef }) {
+ if (this.refs[ref]) {
+ throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);
+ }
+ }
+ async function loadMissingSchema(ref) {
+ const _schema = await _loadSchema.call(this, ref);
+ if (!this.refs[ref])
+ await loadMetaSchema.call(this, _schema.$schema);
+ if (!this.refs[ref])
+ this.addSchema(_schema, ref, meta);
+ }
+ async function _loadSchema(ref) {
+ const p = this._loading[ref];
+ if (p)
+ return p;
+ try {
+ return await (this._loading[ref] = loadSchema(ref));
+ }
+ finally {
+ delete this._loading[ref];
+ }
+ }
+ }
+ // Adds schema to the instance
+ addSchema(schema, // If array is passed, `key` will be ignored
+ key, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ _meta, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead.
+ ) {
+ if (Array.isArray(schema)) {
+ for (const sch of schema)
+ this.addSchema(sch, undefined, _meta, _validateSchema);
+ return this;
+ }
+ let id;
+ if (typeof schema === "object") {
+ const { schemaId } = this.opts;
+ id = schema[schemaId];
+ if (id !== undefined && typeof id != "string") {
+ throw new Error(`schema ${schemaId} must be string`);
+ }
+ }
+ key = (0, resolve_1.normalizeId)(key || id);
+ this._checkUnique(key);
+ this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
+ return this;
+ }
+ // Add schema that will be used to validate other schemas
+ // options in META_IGNORE_OPTIONS are alway set to false
+ addMetaSchema(schema, key, // schema key
+ _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema
+ ) {
+ this.addSchema(schema, key, true, _validateSchema);
+ return this;
+ }
+ // Validate schema against its meta-schema
+ validateSchema(schema, throwOrLogError) {
+ if (typeof schema == "boolean")
+ return true;
+ let $schema;
+ $schema = schema.$schema;
+ if ($schema !== undefined && typeof $schema != "string") {
+ throw new Error("$schema must be a string");
+ }
+ $schema = $schema || this.opts.defaultMeta || this.defaultMeta();
+ if (!$schema) {
+ this.logger.warn("meta-schema not available");
+ this.errors = null;
+ return true;
+ }
+ const valid = this.validate($schema, schema);
+ if (!valid && throwOrLogError) {
+ const message = "schema is invalid: " + this.errorsText();
+ if (this.opts.validateSchema === "log")
+ this.logger.error(message);
+ else
+ throw new Error(message);
+ }
+ return valid;
+ }
+ // Get compiled schema by `key` or `ref`.
+ // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
+ getSchema(keyRef) {
+ let sch;
+ while (typeof (sch = getSchEnv.call(this, keyRef)) == "string")
+ keyRef = sch;
+ if (sch === undefined) {
+ const { schemaId } = this.opts;
+ const root = new compile_1.SchemaEnv({ schema: {}, schemaId });
+ sch = compile_1.resolveSchema.call(this, root, keyRef);
+ if (!sch)
+ return;
+ this.refs[keyRef] = sch;
+ }
+ return (sch.validate || this._compileSchemaEnv(sch));
+ }
+ // Remove cached schema(s).
+ // If no parameter is passed all schemas but meta-schemas are removed.
+ // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ removeSchema(schemaKeyRef) {
+ if (schemaKeyRef instanceof RegExp) {
+ this._removeAllSchemas(this.schemas, schemaKeyRef);
+ this._removeAllSchemas(this.refs, schemaKeyRef);
+ return this;
+ }
+ switch (typeof schemaKeyRef) {
+ case "undefined":
+ this._removeAllSchemas(this.schemas);
+ this._removeAllSchemas(this.refs);
+ this._cache.clear();
+ return this;
+ case "string": {
+ const sch = getSchEnv.call(this, schemaKeyRef);
+ if (typeof sch == "object")
+ this._cache.delete(sch.schema);
+ delete this.schemas[schemaKeyRef];
+ delete this.refs[schemaKeyRef];
+ return this;
+ }
+ case "object": {
+ const cacheKey = schemaKeyRef;
+ this._cache.delete(cacheKey);
+ let id = schemaKeyRef[this.opts.schemaId];
+ if (id) {
+ id = (0, resolve_1.normalizeId)(id);
+ delete this.schemas[id];
+ delete this.refs[id];
+ }
+ return this;
+ }
+ default:
+ throw new Error("ajv.removeSchema: invalid parameter");
+ }
+ }
+ // add "vocabulary" - a collection of keywords
+ addVocabulary(definitions) {
+ for (const def of definitions)
+ this.addKeyword(def);
+ return this;
+ }
+ addKeyword(kwdOrDef, def // deprecated
+ ) {
+ let keyword;
+ if (typeof kwdOrDef == "string") {
+ keyword = kwdOrDef;
+ if (typeof def == "object") {
+ this.logger.warn("these parameters are deprecated, see docs for addKeyword");
+ def.keyword = keyword;
+ }
+ }
+ else if (typeof kwdOrDef == "object" && def === undefined) {
+ def = kwdOrDef;
+ keyword = def.keyword;
+ if (Array.isArray(keyword) && !keyword.length) {
+ throw new Error("addKeywords: keyword must be string or non-empty array");
+ }
+ }
+ else {
+ throw new Error("invalid addKeywords parameters");
+ }
+ checkKeyword.call(this, keyword, def);
+ if (!def) {
+ (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));
+ return this;
+ }
+ keywordMetaschema.call(this, def);
+ const definition = {
+ ...def,
+ type: (0, dataType_1.getJSONTypes)(def.type),
+ schemaType: (0, dataType_1.getJSONTypes)(def.schemaType),
+ };
+ (0, util_1.eachItem)(keyword, definition.type.length === 0
+ ? (k) => addRule.call(this, k, definition)
+ : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));
+ return this;
+ }
+ getKeyword(keyword) {
+ const rule = this.RULES.all[keyword];
+ return typeof rule == "object" ? rule.definition : !!rule;
+ }
+ // Remove keyword
+ removeKeyword(keyword) {
+ // TODO return type should be Ajv
+ const { RULES } = this;
+ delete RULES.keywords[keyword];
+ delete RULES.all[keyword];
+ for (const group of RULES.rules) {
+ const i = group.rules.findIndex((rule) => rule.keyword === keyword);
+ if (i >= 0)
+ group.rules.splice(i, 1);
+ }
+ return this;
+ }
+ // Add format
+ addFormat(name, format) {
+ if (typeof format == "string")
+ format = new RegExp(format);
+ this.formats[name] = format;
+ return this;
+ }
+ errorsText(errors = this.errors, // optional array of validation errors
+ { separator = ", ", dataVar = "data" } = {} // optional options with properties `separator` and `dataVar`
+ ) {
+ if (!errors || errors.length === 0)
+ return "No errors";
+ return errors
+ .map((e) => `${dataVar}${e.instancePath} ${e.message}`)
+ .reduce((text, msg) => text + separator + msg);
+ }
+ $dataMetaSchema(metaSchema, keywordsJsonPointers) {
+ const rules = this.RULES.all;
+ metaSchema = JSON.parse(JSON.stringify(metaSchema));
+ for (const jsonPointer of keywordsJsonPointers) {
+ const segments = jsonPointer.split("/").slice(1); // first segment is an empty string
+ let keywords = metaSchema;
+ for (const seg of segments)
+ keywords = keywords[seg];
+ for (const key in rules) {
+ const rule = rules[key];
+ if (typeof rule != "object")
+ continue;
+ const { $data } = rule.definition;
+ const schema = keywords[key];
+ if ($data && schema)
+ keywords[key] = schemaOrData(schema);
+ }
+ }
+ return metaSchema;
+ }
+ _removeAllSchemas(schemas, regex) {
+ for (const keyRef in schemas) {
+ const sch = schemas[keyRef];
+ if (!regex || regex.test(keyRef)) {
+ if (typeof sch == "string") {
+ delete schemas[keyRef];
+ }
+ else if (sch && !sch.meta) {
+ this._cache.delete(sch.schema);
+ delete schemas[keyRef];
+ }
+ }
+ }
+ }
+ _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
+ let id;
+ const { schemaId } = this.opts;
+ if (typeof schema == "object") {
+ id = schema[schemaId];
+ }
+ else {
+ if (this.opts.jtd)
+ throw new Error("schema must be object");
+ else if (typeof schema != "boolean")
+ throw new Error("schema must be object or boolean");
+ }
+ let sch = this._cache.get(schema);
+ if (sch !== undefined)
+ return sch;
+ baseId = (0, resolve_1.normalizeId)(id || baseId);
+ const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
+ sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });
+ this._cache.set(sch.schema, sch);
+ if (addSchema && !baseId.startsWith("#")) {
+ // TODO atm it is allowed to overwrite schemas without id (instead of not adding them)
+ if (baseId)
+ this._checkUnique(baseId);
+ this.refs[baseId] = sch;
+ }
+ if (validateSchema)
+ this.validateSchema(schema, true);
+ return sch;
+ }
+ _checkUnique(id) {
+ if (this.schemas[id] || this.refs[id]) {
+ throw new Error(`schema with key or id "${id}" already exists`);
+ }
+ }
+ _compileSchemaEnv(sch) {
+ if (sch.meta)
+ this._compileMetaSchema(sch);
+ else
+ compile_1.compileSchema.call(this, sch);
+ /* istanbul ignore if */
+ if (!sch.validate)
+ throw new Error("ajv implementation error");
+ return sch.validate;
+ }
+ _compileMetaSchema(sch) {
+ const currentOpts = this.opts;
+ this.opts = this._metaOpts;
+ try {
+ compile_1.compileSchema.call(this, sch);
+ }
+ finally {
+ this.opts = currentOpts;
+ }
+ }
+}
+exports.default = Ajv;
+Ajv.ValidationError = validation_error_1.default;
+Ajv.MissingRefError = ref_error_1.default;
+function checkOptions(checkOpts, options, msg, log = "error") {
+ for (const key in checkOpts) {
+ const opt = key;
+ if (opt in options)
+ this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);
+ }
+}
+function getSchEnv(keyRef) {
+ keyRef = (0, resolve_1.normalizeId)(keyRef); // TODO tests fail without this line
+ return this.schemas[keyRef] || this.refs[keyRef];
+}
+function addInitialSchemas() {
+ const optsSchemas = this.opts.schemas;
+ if (!optsSchemas)
+ return;
+ if (Array.isArray(optsSchemas))
+ this.addSchema(optsSchemas);
+ else
+ for (const key in optsSchemas)
+ this.addSchema(optsSchemas[key], key);
+}
+function addInitialFormats() {
+ for (const name in this.opts.formats) {
+ const format = this.opts.formats[name];
+ if (format)
+ this.addFormat(name, format);
+ }
+}
+function addInitialKeywords(defs) {
+ if (Array.isArray(defs)) {
+ this.addVocabulary(defs);
+ return;
+ }
+ this.logger.warn("keywords option as map is deprecated, pass array");
+ for (const keyword in defs) {
+ const def = defs[keyword];
+ if (!def.keyword)
+ def.keyword = keyword;
+ this.addKeyword(def);
+ }
+}
+function getMetaSchemaOptions() {
+ const metaOpts = { ...this.opts };
+ for (const opt of META_IGNORE_OPTIONS)
+ delete metaOpts[opt];
+ return metaOpts;
+}
+const noLogs = { log() { }, warn() { }, error() { } };
+function getLogger(logger) {
+ if (logger === false)
+ return noLogs;
+ if (logger === undefined)
+ return console;
+ if (logger.log && logger.warn && logger.error)
+ return logger;
+ throw new Error("logger must implement log, warn and error methods");
+}
+const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
+function checkKeyword(keyword, def) {
+ const { RULES } = this;
+ (0, util_1.eachItem)(keyword, (kwd) => {
+ if (RULES.keywords[kwd])
+ throw new Error(`Keyword ${kwd} is already defined`);
+ if (!KEYWORD_NAME.test(kwd))
+ throw new Error(`Keyword ${kwd} has invalid name`);
+ });
+ if (!def)
+ return;
+ if (def.$data && !("code" in def || "validate" in def)) {
+ throw new Error('$data keyword must have "code" or "validate" function');
+ }
+}
+function addRule(keyword, definition, dataType) {
+ var _a;
+ const post = definition === null || definition === void 0 ? void 0 : definition.post;
+ if (dataType && post)
+ throw new Error('keyword with "post" flag cannot have "type"');
+ const { RULES } = this;
+ let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);
+ if (!ruleGroup) {
+ ruleGroup = { type: dataType, rules: [] };
+ RULES.rules.push(ruleGroup);
+ }
+ RULES.keywords[keyword] = true;
+ if (!definition)
+ return;
+ const rule = {
+ keyword,
+ definition: {
+ ...definition,
+ type: (0, dataType_1.getJSONTypes)(definition.type),
+ schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType),
+ },
+ };
+ if (definition.before)
+ addBeforeRule.call(this, ruleGroup, rule, definition.before);
+ else
+ ruleGroup.rules.push(rule);
+ RULES.all[keyword] = rule;
+ (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
+}
+function addBeforeRule(ruleGroup, rule, before) {
+ const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
+ if (i >= 0) {
+ ruleGroup.rules.splice(i, 0, rule);
+ }
+ else {
+ ruleGroup.rules.push(rule);
+ this.logger.warn(`rule ${before} is not defined`);
+ }
+}
+function keywordMetaschema(def) {
+ let { metaSchema } = def;
+ if (metaSchema === undefined)
+ return;
+ if (def.$data && this.opts.$data)
+ metaSchema = schemaOrData(metaSchema);
+ def.validateSchema = this.compile(metaSchema, true);
+}
+const $dataRef = {
+ $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
+};
+function schemaOrData(schema) {
+ return { anyOf: [schema, $dataRef] };
+}
+//# sourceMappingURL=core.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/core.js.map b/node_modules/ajv/dist/core.js.map
new file mode 100644
index 0000000..c39cd6b
--- /dev/null
+++ b/node_modules/ajv/dist/core.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"core.js","sourceRoot":"","sources":["../lib/core.ts"],"names":[],"mappings":";;;AA4BA,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAKlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA;AAsBnD,iEAAwD;AACxD,mDAAiD;AACjD,2CAAoF;AACpF,uCAAiE;AACjE,+CAAkD;AAClD,+CAA4D;AAC5D,0DAAwD;AACxD,yCAAuC;AACvC,mDAAkD;AAElD,uCAA8C;AAE9C,MAAM,aAAa,GAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;AAC1E,aAAa,CAAC,IAAI,GAAG,YAAY,CAAA;AAEj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AAE,MAAc;IAChF,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,CAAC,CAAA;IACxE,IAAI,CAAC,IAAI,CAAC,EAAE;QACV,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;KACnC;SAAM;QACL,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,MAAM,iBAAiB,CAAC,CAAA;KAClD;AACH,CAAC;AAED,SAAS,iBAAiB,CAAY,GAAsB;IAC1D,IAAI,EAAC,UAAU,EAAC,GAAG,GAAG,CAAA;IACtB,IAAI,UAAU,KAAK,SAAS;QAAE,OAAM;IACpC,IAAI,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK;QAAE,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA;IACvE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AACrD,CAAC;AAED,MAAM,QAAQ,GAAG;IACf,IAAI,EAAE,gFAAgF;CACvF,CAAA;AAED,SAAS,YAAY,CAAC,MAAiB;IACrC,OAAO,EAAC,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAC,CAAA;AACpC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/jtd.d.ts b/node_modules/ajv/dist/jtd.d.ts
new file mode 100644
index 0000000..0caf84b
--- /dev/null
+++ b/node_modules/ajv/dist/jtd.d.ts
@@ -0,0 +1,45 @@
+import type { AnySchemaObject, SchemaObject, JTDParser } from "./types";
+import type { JTDSchemaType, SomeJTDSchemaType, JTDDataType } from "./types/jtd-schema";
+import AjvCore, { CurrentOptions } from "./core";
+declare type JTDOptions = CurrentOptions & {
+ strict?: never;
+ allowMatchingProperties?: never;
+ allowUnionTypes?: never;
+ validateFormats?: never;
+ $data?: never;
+ verbose?: boolean;
+ $comment?: never;
+ formats?: never;
+ loadSchema?: never;
+ useDefaults?: never;
+ coerceTypes?: never;
+ next?: never;
+ unevaluated?: never;
+ dynamicRef?: never;
+ meta?: boolean;
+ defaultMeta?: never;
+ inlineRefs?: boolean;
+ loopRequired?: never;
+ multipleOfPrecision?: never;
+};
+declare class Ajv extends AjvCore {
+ constructor(opts?: JTDOptions);
+ _addVocabularies(): void;
+ _addDefaultMetaSchema(): void;
+ defaultMeta(): string | AnySchemaObject | undefined;
+ compileSerializer(schema: SchemaObject): (data: T) => string;
+ compileSerializer(schema: JTDSchemaType): (data: T) => string;
+ compileParser(schema: SchemaObject): JTDParser;
+ compileParser(schema: JTDSchemaType): JTDParser;
+ private _compileSerializer;
+ private _compileParser;
+}
+export default Ajv;
+export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, JTDParser, } from "./types";
+export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
+export { SchemaCxt, SchemaObjCxt } from "./compile";
+export { KeywordCxt } from "./compile/validate";
+export { JTDErrorObject } from "./vocabularies/jtd";
+export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
+export { JTDSchemaType, SomeJTDSchemaType, JTDDataType };
+export { JTDOptions };
diff --git a/node_modules/ajv/dist/jtd.js b/node_modules/ajv/dist/jtd.js
new file mode 100644
index 0000000..dfb34dd
--- /dev/null
+++ b/node_modules/ajv/dist/jtd.js
@@ -0,0 +1,66 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
+const core_1 = require("./core");
+const jtd_1 = require("./vocabularies/jtd");
+const jtd_schema_1 = require("./refs/jtd-schema");
+const serialize_1 = require("./compile/jtd/serialize");
+const parse_1 = require("./compile/jtd/parse");
+const META_SCHEMA_ID = "JTD-meta-schema";
+class Ajv extends core_1.default {
+ constructor(opts = {}) {
+ super({
+ ...opts,
+ jtd: true,
+ });
+ }
+ _addVocabularies() {
+ super._addVocabularies();
+ this.addVocabulary(jtd_1.default);
+ }
+ _addDefaultMetaSchema() {
+ super._addDefaultMetaSchema();
+ if (!this.opts.meta)
+ return;
+ this.addMetaSchema(jtd_schema_1.default, META_SCHEMA_ID, false);
+ }
+ defaultMeta() {
+ return (this.opts.defaultMeta =
+ super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
+ }
+ compileSerializer(schema) {
+ const sch = this._addSchema(schema);
+ return sch.serialize || this._compileSerializer(sch);
+ }
+ compileParser(schema) {
+ const sch = this._addSchema(schema);
+ return (sch.parse || this._compileParser(sch));
+ }
+ _compileSerializer(sch) {
+ serialize_1.default.call(this, sch, sch.schema.definitions || {});
+ /* istanbul ignore if */
+ if (!sch.serialize)
+ throw new Error("ajv implementation error");
+ return sch.serialize;
+ }
+ _compileParser(sch) {
+ parse_1.default.call(this, sch, sch.schema.definitions || {});
+ /* istanbul ignore if */
+ if (!sch.parse)
+ throw new Error("ajv implementation error");
+ return sch.parse;
+ }
+}
+module.exports = exports = Ajv;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = Ajv;
+var validate_1 = require("./compile/validate");
+Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
+var codegen_1 = require("./compile/codegen");
+Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
+Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
+Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
+Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
+Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
+Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
+//# sourceMappingURL=jtd.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/jtd.js.map b/node_modules/ajv/dist/jtd.js.map
new file mode 100644
index 0000000..6f25378
--- /dev/null
+++ b/node_modules/ajv/dist/jtd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jtd.js","sourceRoot":"","sources":["../lib/jtd.ts"],"names":[],"mappings":";;;AAEA,iCAA8C;AAC9C,4CAA8C;AAC9C,kDAA6C;AAC7C,uDAAuD;AACvD,+CAA+C;AAG/C,MAAM,cAAc,GAAG,iBAAiB,CAAA;AA4BxC,MAAM,GAAI,SAAQ,cAAO;IACvB,YAAY,OAAmB,EAAE;QAC/B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,GAAG,EAAE,IAAI;SACV,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAA;IACnC,CAAC;IAED,qBAAqB;QACnB,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAM;QAC3B,IAAI,CAAC,aAAa,CAAC,oBAAa,EAAE,cAAc,EAAE,KAAK,CAAC,CAAA;IAC1D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;YAC3B,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,CAAC;IAMD,iBAAiB,CAAc,MAA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A,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/refs/data.json b/node_modules/ajv/dist/refs/data.json
new file mode 100644
index 0000000..9ffc9f5
--- /dev/null
+++ b/node_modules/ajv/dist/refs/data.json
@@ -0,0 +1,13 @@
+{
+ "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
+ "description": "Meta-schema for $data reference (JSON AnySchema extension proposal)",
+ "type": "object",
+ "required": ["$data"],
+ "properties": {
+ "$data": {
+ "type": "string",
+ "anyOf": [{"format": "relative-json-pointer"}, {"format": "json-pointer"}]
+ }
+ },
+ "additionalProperties": false
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts b/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts
new file mode 100644
index 0000000..cf00833
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts
@@ -0,0 +1,2 @@
+import type Ajv from "../../core";
+export default function addMetaSchema2019(this: Ajv, $data?: boolean): Ajv;
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/index.js b/node_modules/ajv/dist/refs/json-schema-2019-09/index.js
new file mode 100644
index 0000000..e864962
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/index.js
@@ -0,0 +1,28 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const metaSchema = require("./schema.json");
+const applicator = require("./meta/applicator.json");
+const content = require("./meta/content.json");
+const core = require("./meta/core.json");
+const format = require("./meta/format.json");
+const metadata = require("./meta/meta-data.json");
+const validation = require("./meta/validation.json");
+const META_SUPPORT_DATA = ["/properties"];
+function addMetaSchema2019($data) {
+ ;
+ [
+ metaSchema,
+ applicator,
+ content,
+ core,
+ with$data(this, format),
+ metadata,
+ with$data(this, validation),
+ ].forEach((sch) => this.addMetaSchema(sch, undefined, false));
+ return this;
+ function with$data(ajv, sch) {
+ return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
+ }
+}
+exports.default = addMetaSchema2019;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map b/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map
new file mode 100644
index 0000000..9b8a36d
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/refs/json-schema-2019-09/index.ts"],"names":[],"mappings":";;AAEA,4CAA2C;AAC3C,qDAAoD;AACpD,+CAA8C;AAC9C,yCAAwC;AACxC,6CAA4C;AAC5C,kDAAiD;AACjD,qDAAoD;AAEpD,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC,CAAA;AAEzC,SAAwB,iBAAiB,CAAY,KAAe;IAClE,CAAC;IAAA;QACC,UAAU;QACV,UAAU;QACV,OAAO;QACP,IAAI;QACJ,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;QACvB,QAAQ;QACR,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;KAC5B,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;IAC7D,OAAO,IAAI,CAAA;IAEX,SAAS,SAAS,CAAC,GAAQ,EAAE,GAAoB;QAC/C,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IAClE,CAAC;AACH,CAAC;AAfD,oCAeC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json
new file mode 100644
index 0000000..c5e91cf
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json
@@ -0,0 +1,53 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "https://json-schema.org/draft/2019-09/meta/applicator",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2019-09/vocab/applicator": true
+ },
+ "$recursiveAnchor": true,
+
+ "title": "Applicator vocabulary meta-schema",
+ "type": ["object", "boolean"],
+ "properties": {
+ "additionalItems": {"$recursiveRef": "#"},
+ "unevaluatedItems": {"$recursiveRef": "#"},
+ "items": {
+ "anyOf": [{"$recursiveRef": "#"}, {"$ref": "#/$defs/schemaArray"}]
+ },
+ "contains": {"$recursiveRef": "#"},
+ "additionalProperties": {"$recursiveRef": "#"},
+ "unevaluatedProperties": {"$recursiveRef": "#"},
+ "properties": {
+ "type": "object",
+ "additionalProperties": {"$recursiveRef": "#"},
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": {"$recursiveRef": "#"},
+ "propertyNames": {"format": "regex"},
+ "default": {}
+ },
+ "dependentSchemas": {
+ "type": "object",
+ "additionalProperties": {
+ "$recursiveRef": "#"
+ }
+ },
+ "propertyNames": {"$recursiveRef": "#"},
+ "if": {"$recursiveRef": "#"},
+ "then": {"$recursiveRef": "#"},
+ "else": {"$recursiveRef": "#"},
+ "allOf": {"$ref": "#/$defs/schemaArray"},
+ "anyOf": {"$ref": "#/$defs/schemaArray"},
+ "oneOf": {"$ref": "#/$defs/schemaArray"},
+ "not": {"$recursiveRef": "#"}
+ },
+ "$defs": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": {"$recursiveRef": "#"}
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json
new file mode 100644
index 0000000..b8f6373
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "https://json-schema.org/draft/2019-09/meta/content",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2019-09/vocab/content": true
+ },
+ "$recursiveAnchor": true,
+
+ "title": "Content vocabulary meta-schema",
+
+ "type": ["object", "boolean"],
+ "properties": {
+ "contentMediaType": {"type": "string"},
+ "contentEncoding": {"type": "string"},
+ "contentSchema": {"$recursiveRef": "#"}
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json
new file mode 100644
index 0000000..f71adbf
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json
@@ -0,0 +1,57 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "https://json-schema.org/draft/2019-09/meta/core",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2019-09/vocab/core": true
+ },
+ "$recursiveAnchor": true,
+
+ "title": "Core vocabulary meta-schema",
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "type": "string",
+ "format": "uri-reference",
+ "$comment": "Non-empty fragments not allowed.",
+ "pattern": "^[^#]*#?$"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$anchor": {
+ "type": "string",
+ "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$"
+ },
+ "$ref": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$recursiveRef": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$recursiveAnchor": {
+ "type": "boolean",
+ "default": false
+ },
+ "$vocabulary": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "format": "uri"
+ },
+ "additionalProperties": {
+ "type": "boolean"
+ }
+ },
+ "$comment": {
+ "type": "string"
+ },
+ "$defs": {
+ "type": "object",
+ "additionalProperties": {"$recursiveRef": "#"},
+ "default": {}
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json
new file mode 100644
index 0000000..03ccfce
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "https://json-schema.org/draft/2019-09/meta/format",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2019-09/vocab/format": true
+ },
+ "$recursiveAnchor": true,
+
+ "title": "Format vocabulary meta-schema",
+ "type": ["object", "boolean"],
+ "properties": {
+ "format": {"type": "string"}
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json
new file mode 100644
index 0000000..0e19432
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "https://json-schema.org/draft/2019-09/meta/meta-data",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2019-09/vocab/meta-data": true
+ },
+ "$recursiveAnchor": true,
+
+ "title": "Meta-data vocabulary meta-schema",
+
+ "type": ["object", "boolean"],
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": true,
+ "deprecated": {
+ "type": "boolean",
+ "default": false
+ },
+ "readOnly": {
+ "type": "boolean",
+ "default": false
+ },
+ "writeOnly": {
+ "type": "boolean",
+ "default": false
+ },
+ "examples": {
+ "type": "array",
+ "items": true
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json
new file mode 100644
index 0000000..7027a12
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json
@@ -0,0 +1,90 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "https://json-schema.org/draft/2019-09/meta/validation",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2019-09/vocab/validation": true
+ },
+ "$recursiveAnchor": true,
+
+ "title": "Validation vocabulary meta-schema",
+ "type": ["object", "boolean"],
+ "properties": {
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": {"$ref": "#/$defs/nonNegativeInteger"},
+ "minLength": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "maxItems": {"$ref": "#/$defs/nonNegativeInteger"},
+ "minItems": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxContains": {"$ref": "#/$defs/nonNegativeInteger"},
+ "minContains": {
+ "$ref": "#/$defs/nonNegativeInteger",
+ "default": 1
+ },
+ "maxProperties": {"$ref": "#/$defs/nonNegativeInteger"},
+ "minProperties": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
+ "required": {"$ref": "#/$defs/stringArray"},
+ "dependentRequired": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/stringArray"
+ }
+ },
+ "const": true,
+ "enum": {
+ "type": "array",
+ "items": true
+ },
+ "type": {
+ "anyOf": [
+ {"$ref": "#/$defs/simpleTypes"},
+ {
+ "type": "array",
+ "items": {"$ref": "#/$defs/simpleTypes"},
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ }
+ },
+ "$defs": {
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "$ref": "#/$defs/nonNegativeInteger",
+ "default": 0
+ },
+ "simpleTypes": {
+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": {"type": "string"},
+ "uniqueItems": true,
+ "default": []
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json b/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json
new file mode 100644
index 0000000..54eb715
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "https://json-schema.org/draft/2019-09/schema",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2019-09/vocab/core": true,
+ "https://json-schema.org/draft/2019-09/vocab/applicator": true,
+ "https://json-schema.org/draft/2019-09/vocab/validation": true,
+ "https://json-schema.org/draft/2019-09/vocab/meta-data": true,
+ "https://json-schema.org/draft/2019-09/vocab/format": false,
+ "https://json-schema.org/draft/2019-09/vocab/content": true
+ },
+ "$recursiveAnchor": true,
+
+ "title": "Core and Validation specifications meta-schema",
+ "allOf": [
+ {"$ref": "meta/core"},
+ {"$ref": "meta/applicator"},
+ {"$ref": "meta/validation"},
+ {"$ref": "meta/meta-data"},
+ {"$ref": "meta/format"},
+ {"$ref": "meta/content"}
+ ],
+ "type": ["object", "boolean"],
+ "properties": {
+ "definitions": {
+ "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",
+ "type": "object",
+ "additionalProperties": {"$recursiveRef": "#"},
+ "default": {}
+ },
+ "dependencies": {
+ "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"",
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [{"$recursiveRef": "#"}, {"$ref": "meta/validation#/$defs/stringArray"}]
+ }
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts b/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts
new file mode 100644
index 0000000..c232ab0
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts
@@ -0,0 +1,2 @@
+import type Ajv from "../../core";
+export default function addMetaSchema2020(this: Ajv, $data?: boolean): Ajv;
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/index.js b/node_modules/ajv/dist/refs/json-schema-2020-12/index.js
new file mode 100644
index 0000000..d925675
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/index.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const metaSchema = require("./schema.json");
+const applicator = require("./meta/applicator.json");
+const unevaluated = require("./meta/unevaluated.json");
+const content = require("./meta/content.json");
+const core = require("./meta/core.json");
+const format = require("./meta/format-annotation.json");
+const metadata = require("./meta/meta-data.json");
+const validation = require("./meta/validation.json");
+const META_SUPPORT_DATA = ["/properties"];
+function addMetaSchema2020($data) {
+ ;
+ [
+ metaSchema,
+ applicator,
+ unevaluated,
+ content,
+ core,
+ with$data(this, format),
+ metadata,
+ with$data(this, validation),
+ ].forEach((sch) => this.addMetaSchema(sch, undefined, false));
+ return this;
+ function with$data(ajv, sch) {
+ return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
+ }
+}
+exports.default = addMetaSchema2020;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map b/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map
new file mode 100644
index 0000000..eb90027
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/refs/json-schema-2020-12/index.ts"],"names":[],"mappings":";;AAEA,4CAA2C;AAC3C,qDAAoD;AACpD,uDAAsD;AACtD,+CAA8C;AAC9C,yCAAwC;AACxC,wDAAuD;AACvD,kDAAiD;AACjD,qDAAoD;AAEpD,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC,CAAA;AAEzC,SAAwB,iBAAiB,CAAY,KAAe;IAClE,CAAC;IAAA;QACC,UAAU;QACV,UAAU;QACV,WAAW;QACX,OAAO;QACP,IAAI;QACJ,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;QACvB,QAAQ;QACR,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;KAC5B,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;IAC7D,OAAO,IAAI,CAAA;IAEX,SAAS,SAAS,CAAC,GAAQ,EAAE,GAAoB;QAC/C,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IAClE,CAAC;AACH,CAAC;AAhBD,oCAgBC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
new file mode 100644
index 0000000..674c913
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
@@ -0,0 +1,48 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://json-schema.org/draft/2020-12/meta/applicator",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true
+ },
+ "$dynamicAnchor": "meta",
+
+ "title": "Applicator vocabulary meta-schema",
+ "type": ["object", "boolean"],
+ "properties": {
+ "prefixItems": {"$ref": "#/$defs/schemaArray"},
+ "items": {"$dynamicRef": "#meta"},
+ "contains": {"$dynamicRef": "#meta"},
+ "additionalProperties": {"$dynamicRef": "#meta"},
+ "properties": {
+ "type": "object",
+ "additionalProperties": {"$dynamicRef": "#meta"},
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": {"$dynamicRef": "#meta"},
+ "propertyNames": {"format": "regex"},
+ "default": {}
+ },
+ "dependentSchemas": {
+ "type": "object",
+ "additionalProperties": {"$dynamicRef": "#meta"},
+ "default": {}
+ },
+ "propertyNames": {"$dynamicRef": "#meta"},
+ "if": {"$dynamicRef": "#meta"},
+ "then": {"$dynamicRef": "#meta"},
+ "else": {"$dynamicRef": "#meta"},
+ "allOf": {"$ref": "#/$defs/schemaArray"},
+ "anyOf": {"$ref": "#/$defs/schemaArray"},
+ "oneOf": {"$ref": "#/$defs/schemaArray"},
+ "not": {"$dynamicRef": "#meta"}
+ },
+ "$defs": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": {"$dynamicRef": "#meta"}
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
new file mode 100644
index 0000000..2ae23dd
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://json-schema.org/draft/2020-12/meta/content",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/content": true
+ },
+ "$dynamicAnchor": "meta",
+
+ "title": "Content vocabulary meta-schema",
+
+ "type": ["object", "boolean"],
+ "properties": {
+ "contentEncoding": {"type": "string"},
+ "contentMediaType": {"type": "string"},
+ "contentSchema": {"$dynamicRef": "#meta"}
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
new file mode 100644
index 0000000..4c8e5cb
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
@@ -0,0 +1,51 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://json-schema.org/draft/2020-12/meta/core",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/core": true
+ },
+ "$dynamicAnchor": "meta",
+
+ "title": "Core vocabulary meta-schema",
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "$ref": "#/$defs/uriReferenceString",
+ "$comment": "Non-empty fragments not allowed.",
+ "pattern": "^[^#]*#?$"
+ },
+ "$schema": {"$ref": "#/$defs/uriString"},
+ "$ref": {"$ref": "#/$defs/uriReferenceString"},
+ "$anchor": {"$ref": "#/$defs/anchorString"},
+ "$dynamicRef": {"$ref": "#/$defs/uriReferenceString"},
+ "$dynamicAnchor": {"$ref": "#/$defs/anchorString"},
+ "$vocabulary": {
+ "type": "object",
+ "propertyNames": {"$ref": "#/$defs/uriString"},
+ "additionalProperties": {
+ "type": "boolean"
+ }
+ },
+ "$comment": {
+ "type": "string"
+ },
+ "$defs": {
+ "type": "object",
+ "additionalProperties": {"$dynamicRef": "#meta"}
+ }
+ },
+ "$defs": {
+ "anchorString": {
+ "type": "string",
+ "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
+ },
+ "uriString": {
+ "type": "string",
+ "format": "uri"
+ },
+ "uriReferenceString": {
+ "type": "string",
+ "format": "uri-reference"
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
new file mode 100644
index 0000000..83c26e3
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true
+ },
+ "$dynamicAnchor": "meta",
+
+ "title": "Format vocabulary meta-schema for annotation results",
+ "type": ["object", "boolean"],
+ "properties": {
+ "format": {"type": "string"}
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
new file mode 100644
index 0000000..11946fb
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://json-schema.org/draft/2020-12/meta/meta-data",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true
+ },
+ "$dynamicAnchor": "meta",
+
+ "title": "Meta-data vocabulary meta-schema",
+
+ "type": ["object", "boolean"],
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": true,
+ "deprecated": {
+ "type": "boolean",
+ "default": false
+ },
+ "readOnly": {
+ "type": "boolean",
+ "default": false
+ },
+ "writeOnly": {
+ "type": "boolean",
+ "default": false
+ },
+ "examples": {
+ "type": "array",
+ "items": true
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
new file mode 100644
index 0000000..5e4b203
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
@@ -0,0 +1,15 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true
+ },
+ "$dynamicAnchor": "meta",
+
+ "title": "Unevaluated applicator vocabulary meta-schema",
+ "type": ["object", "boolean"],
+ "properties": {
+ "unevaluatedItems": {"$dynamicRef": "#meta"},
+ "unevaluatedProperties": {"$dynamicRef": "#meta"}
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
new file mode 100644
index 0000000..e0ae13d
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
@@ -0,0 +1,90 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://json-schema.org/draft/2020-12/meta/validation",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/validation": true
+ },
+ "$dynamicAnchor": "meta",
+
+ "title": "Validation vocabulary meta-schema",
+ "type": ["object", "boolean"],
+ "properties": {
+ "type": {
+ "anyOf": [
+ {"$ref": "#/$defs/simpleTypes"},
+ {
+ "type": "array",
+ "items": {"$ref": "#/$defs/simpleTypes"},
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "const": true,
+ "enum": {
+ "type": "array",
+ "items": true
+ },
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": {"$ref": "#/$defs/nonNegativeInteger"},
+ "minLength": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "maxItems": {"$ref": "#/$defs/nonNegativeInteger"},
+ "minItems": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxContains": {"$ref": "#/$defs/nonNegativeInteger"},
+ "minContains": {
+ "$ref": "#/$defs/nonNegativeInteger",
+ "default": 1
+ },
+ "maxProperties": {"$ref": "#/$defs/nonNegativeInteger"},
+ "minProperties": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
+ "required": {"$ref": "#/$defs/stringArray"},
+ "dependentRequired": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/stringArray"
+ }
+ }
+ },
+ "$defs": {
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "$ref": "#/$defs/nonNegativeInteger",
+ "default": 0
+ },
+ "simpleTypes": {
+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": {"type": "string"},
+ "uniqueItems": true,
+ "default": []
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json b/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
new file mode 100644
index 0000000..1c68270
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
@@ -0,0 +1,55 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://json-schema.org/draft/2020-12/schema",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/core": true,
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true,
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
+ "https://json-schema.org/draft/2020-12/vocab/validation": true,
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
+ "https://json-schema.org/draft/2020-12/vocab/content": true
+ },
+ "$dynamicAnchor": "meta",
+
+ "title": "Core and Validation specifications meta-schema",
+ "allOf": [
+ {"$ref": "meta/core"},
+ {"$ref": "meta/applicator"},
+ {"$ref": "meta/unevaluated"},
+ {"$ref": "meta/validation"},
+ {"$ref": "meta/meta-data"},
+ {"$ref": "meta/format-annotation"},
+ {"$ref": "meta/content"}
+ ],
+ "type": ["object", "boolean"],
+ "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
+ "properties": {
+ "definitions": {
+ "$comment": "\"definitions\" has been replaced by \"$defs\".",
+ "type": "object",
+ "additionalProperties": {"$dynamicRef": "#meta"},
+ "deprecated": true,
+ "default": {}
+ },
+ "dependencies": {
+ "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [{"$dynamicRef": "#meta"}, {"$ref": "meta/validation#/$defs/stringArray"}]
+ },
+ "deprecated": true,
+ "default": {}
+ },
+ "$recursiveAnchor": {
+ "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
+ "$ref": "meta/core#/$defs/anchorString",
+ "deprecated": true
+ },
+ "$recursiveRef": {
+ "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
+ "$ref": "meta/core#/$defs/uriReferenceString",
+ "deprecated": true
+ }
+ }
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-draft-06.json b/node_modules/ajv/dist/refs/json-schema-draft-06.json
new file mode 100644
index 0000000..5410064
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-draft-06.json
@@ -0,0 +1,137 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "$id": "http://json-schema.org/draft-06/schema#",
+ "title": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": {"$ref": "#"}
+ },
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}]
+ },
+ "simpleTypes": {
+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": {"type": "string"},
+ "uniqueItems": true,
+ "default": []
+ }
+ },
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$ref": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "examples": {
+ "type": "array",
+ "items": {}
+ },
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": {"$ref": "#/definitions/nonNegativeInteger"},
+ "minLength": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": {"$ref": "#"},
+ "items": {
+ "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}],
+ "default": {}
+ },
+ "maxItems": {"$ref": "#/definitions/nonNegativeInteger"},
+ "minItems": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "contains": {"$ref": "#"},
+ "maxProperties": {"$ref": "#/definitions/nonNegativeInteger"},
+ "minProperties": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
+ "required": {"$ref": "#/definitions/stringArray"},
+ "additionalProperties": {"$ref": "#"},
+ "definitions": {
+ "type": "object",
+ "additionalProperties": {"$ref": "#"},
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": {"$ref": "#"},
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": {"$ref": "#"},
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/stringArray"}]
+ }
+ },
+ "propertyNames": {"$ref": "#"},
+ "const": {},
+ "enum": {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ {"$ref": "#/definitions/simpleTypes"},
+ {
+ "type": "array",
+ "items": {"$ref": "#/definitions/simpleTypes"},
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "format": {"type": "string"},
+ "allOf": {"$ref": "#/definitions/schemaArray"},
+ "anyOf": {"$ref": "#/definitions/schemaArray"},
+ "oneOf": {"$ref": "#/definitions/schemaArray"},
+ "not": {"$ref": "#"}
+ },
+ "default": {}
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-draft-07.json b/node_modules/ajv/dist/refs/json-schema-draft-07.json
new file mode 100644
index 0000000..6a74851
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-draft-07.json
@@ -0,0 +1,151 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "http://json-schema.org/draft-07/schema#",
+ "title": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": {"$ref": "#"}
+ },
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}]
+ },
+ "simpleTypes": {
+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": {"type": "string"},
+ "uniqueItems": true,
+ "default": []
+ }
+ },
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$ref": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$comment": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": true,
+ "readOnly": {
+ "type": "boolean",
+ "default": false
+ },
+ "examples": {
+ "type": "array",
+ "items": true
+ },
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": {"$ref": "#/definitions/nonNegativeInteger"},
+ "minLength": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": {"$ref": "#"},
+ "items": {
+ "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}],
+ "default": true
+ },
+ "maxItems": {"$ref": "#/definitions/nonNegativeInteger"},
+ "minItems": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "contains": {"$ref": "#"},
+ "maxProperties": {"$ref": "#/definitions/nonNegativeInteger"},
+ "minProperties": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
+ "required": {"$ref": "#/definitions/stringArray"},
+ "additionalProperties": {"$ref": "#"},
+ "definitions": {
+ "type": "object",
+ "additionalProperties": {"$ref": "#"},
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": {"$ref": "#"},
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": {"$ref": "#"},
+ "propertyNames": {"format": "regex"},
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/stringArray"}]
+ }
+ },
+ "propertyNames": {"$ref": "#"},
+ "const": true,
+ "enum": {
+ "type": "array",
+ "items": true,
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ {"$ref": "#/definitions/simpleTypes"},
+ {
+ "type": "array",
+ "items": {"$ref": "#/definitions/simpleTypes"},
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "format": {"type": "string"},
+ "contentMediaType": {"type": "string"},
+ "contentEncoding": {"type": "string"},
+ "if": {"$ref": "#"},
+ "then": {"$ref": "#"},
+ "else": {"$ref": "#"},
+ "allOf": {"$ref": "#/definitions/schemaArray"},
+ "anyOf": {"$ref": "#/definitions/schemaArray"},
+ "oneOf": {"$ref": "#/definitions/schemaArray"},
+ "not": {"$ref": "#"}
+ },
+ "default": true
+}
diff --git a/node_modules/ajv/dist/refs/json-schema-secure.json b/node_modules/ajv/dist/refs/json-schema-secure.json
new file mode 100644
index 0000000..3968abd
--- /dev/null
+++ b/node_modules/ajv/dist/refs/json-schema-secure.json
@@ -0,0 +1,88 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/json-schema-secure.json#",
+ "title": "Meta-schema for the security assessment of JSON Schemas",
+ "description": "If a JSON AnySchema fails validation against this meta-schema, it may be unsafe to validate untrusted data",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": {"$ref": "#"}
+ }
+ },
+ "dependencies": {
+ "patternProperties": {
+ "description": "prevent slow validation of large property names",
+ "required": ["propertyNames"],
+ "properties": {
+ "propertyNames": {
+ "required": ["maxLength"]
+ }
+ }
+ },
+ "uniqueItems": {
+ "description": "prevent slow validation of large non-scalar arrays",
+ "if": {
+ "properties": {
+ "uniqueItems": {"const": true},
+ "items": {
+ "properties": {
+ "type": {
+ "anyOf": [
+ {
+ "enum": ["object", "array"]
+ },
+ {
+ "type": "array",
+ "contains": {"enum": ["object", "array"]}
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "then": {
+ "required": ["maxItems"]
+ }
+ },
+ "pattern": {
+ "description": "prevent slow pattern matching of large strings",
+ "required": ["maxLength"]
+ },
+ "format": {
+ "description": "prevent slow format validation of large strings",
+ "required": ["maxLength"]
+ }
+ },
+ "properties": {
+ "additionalItems": {"$ref": "#"},
+ "additionalProperties": {"$ref": "#"},
+ "dependencies": {
+ "additionalProperties": {
+ "anyOf": [{"type": "array"}, {"$ref": "#"}]
+ }
+ },
+ "items": {
+ "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}]
+ },
+ "definitions": {
+ "additionalProperties": {"$ref": "#"}
+ },
+ "patternProperties": {
+ "additionalProperties": {"$ref": "#"}
+ },
+ "properties": {
+ "additionalProperties": {"$ref": "#"}
+ },
+ "if": {"$ref": "#"},
+ "then": {"$ref": "#"},
+ "else": {"$ref": "#"},
+ "allOf": {"$ref": "#/definitions/schemaArray"},
+ "anyOf": {"$ref": "#/definitions/schemaArray"},
+ "oneOf": {"$ref": "#/definitions/schemaArray"},
+ "not": {"$ref": "#"},
+ "contains": {"$ref": "#"},
+ "propertyNames": {"$ref": "#"}
+ }
+}
diff --git a/node_modules/ajv/dist/refs/jtd-schema.d.ts b/node_modules/ajv/dist/refs/jtd-schema.d.ts
new file mode 100644
index 0000000..932797a
--- /dev/null
+++ b/node_modules/ajv/dist/refs/jtd-schema.d.ts
@@ -0,0 +1,3 @@
+import { SchemaObject } from "../types";
+declare const jtdMetaSchema: SchemaObject;
+export default jtdMetaSchema;
diff --git a/node_modules/ajv/dist/refs/jtd-schema.js b/node_modules/ajv/dist/refs/jtd-schema.js
new file mode 100644
index 0000000..1ee940a
--- /dev/null
+++ b/node_modules/ajv/dist/refs/jtd-schema.js
@@ -0,0 +1,118 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const shared = (root) => {
+ const sch = {
+ nullable: { type: "boolean" },
+ metadata: {
+ optionalProperties: {
+ union: { elements: { ref: "schema" } },
+ },
+ additionalProperties: true,
+ },
+ };
+ if (root)
+ sch.definitions = { values: { ref: "schema" } };
+ return sch;
+};
+const emptyForm = (root) => ({
+ optionalProperties: shared(root),
+});
+const refForm = (root) => ({
+ properties: {
+ ref: { type: "string" },
+ },
+ optionalProperties: shared(root),
+});
+const typeForm = (root) => ({
+ properties: {
+ type: {
+ enum: [
+ "boolean",
+ "timestamp",
+ "string",
+ "float32",
+ "float64",
+ "int8",
+ "uint8",
+ "int16",
+ "uint16",
+ "int32",
+ "uint32",
+ ],
+ },
+ },
+ optionalProperties: shared(root),
+});
+const enumForm = (root) => ({
+ properties: {
+ enum: { elements: { type: "string" } },
+ },
+ optionalProperties: shared(root),
+});
+const elementsForm = (root) => ({
+ properties: {
+ elements: { ref: "schema" },
+ },
+ optionalProperties: shared(root),
+});
+const propertiesForm = (root) => ({
+ properties: {
+ properties: { values: { ref: "schema" } },
+ },
+ optionalProperties: {
+ optionalProperties: { values: { ref: "schema" } },
+ additionalProperties: { type: "boolean" },
+ ...shared(root),
+ },
+});
+const optionalPropertiesForm = (root) => ({
+ properties: {
+ optionalProperties: { values: { ref: "schema" } },
+ },
+ optionalProperties: {
+ additionalProperties: { type: "boolean" },
+ ...shared(root),
+ },
+});
+const discriminatorForm = (root) => ({
+ properties: {
+ discriminator: { type: "string" },
+ mapping: {
+ values: {
+ metadata: {
+ union: [propertiesForm(false), optionalPropertiesForm(false)],
+ },
+ },
+ },
+ },
+ optionalProperties: shared(root),
+});
+const valuesForm = (root) => ({
+ properties: {
+ values: { ref: "schema" },
+ },
+ optionalProperties: shared(root),
+});
+const schema = (root) => ({
+ metadata: {
+ union: [
+ emptyForm,
+ refForm,
+ typeForm,
+ enumForm,
+ elementsForm,
+ propertiesForm,
+ optionalPropertiesForm,
+ discriminatorForm,
+ valuesForm,
+ ].map((s) => s(root)),
+ },
+});
+const jtdMetaSchema = {
+ definitions: {
+ schema: schema(false),
+ },
+ ...schema(true),
+};
+exports.default = jtdMetaSchema;
+//# sourceMappingURL=jtd-schema.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/refs/jtd-schema.js.map b/node_modules/ajv/dist/refs/jtd-schema.js.map
new file mode 100644
index 0000000..d46755b
--- /dev/null
+++ b/node_modules/ajv/dist/refs/jtd-schema.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jtd-schema.js","sourceRoot":"","sources":["../../lib/refs/jtd-schema.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAe,CAAC,IAAI,EAAE,EAAE;IAClC,MAAM,GAAG,GAAiB;QACxB,QAAQ,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC;QAC3B,QAAQ,EAAE;YACR,kBAAkB,EAAE;gBAClB,KAAK,EAAE,EAAC,QAAQ,EAAE,EAAC,GAAG,EAAE,QAAQ,EAAC,EAAC;aACnC;YACD,oBAAoB,EAAE,IAAI;SAC3B;KACF,CAAA;IACD,IAAI,IAAI;QAAE,G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EAAE;QACR,KAAK,EAAE;YACL,SAAS;YACT,OAAO;YACP,QAAQ;YACR,QAAQ;YACR,YAAY;YACZ,cAAc;YACd,sBAAsB;YACtB,iBAAiB;YACjB,UAAU;SACX,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;KACtB;CACF,CAAC,CAAA;AAEF,MAAM,aAAa,GAAiB;IAClC,WAAW,EAAE;QACX,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;KACtB;IACD,GAAG,MAAM,CAAC,IAAI,CAAC;CAChB,CAAA;AAED,kBAAe,aAAa,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/equal.d.ts b/node_modules/ajv/dist/runtime/equal.d.ts
new file mode 100644
index 0000000..56149ea
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/equal.d.ts
@@ -0,0 +1,6 @@
+import * as equal from "fast-deep-equal";
+declare type Equal = typeof equal & {
+ code: string;
+};
+declare const _default: Equal;
+export default _default;
diff --git a/node_modules/ajv/dist/runtime/equal.js b/node_modules/ajv/dist/runtime/equal.js
new file mode 100644
index 0000000..774bba0
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/equal.js
@@ -0,0 +1,7 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+// https://github.com/ajv-validator/ajv/issues/889
+const equal = require("fast-deep-equal");
+equal.code = 'require("ajv/dist/runtime/equal").default';
+exports.default = equal;
+//# sourceMappingURL=equal.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/equal.js.map b/node_modules/ajv/dist/runtime/equal.js.map
new file mode 100644
index 0000000..0e17901
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/equal.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"equal.js","sourceRoot":"","sources":["../../lib/runtime/equal.ts"],"names":[],"mappings":";;AAAA,kDAAkD;AAClD,yCAAwC;AAGtC,KAAe,CAAC,IAAI,GAAG,2CAA2C,CAAA;AAEpE,kBAAe,KAAc,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/parseJson.d.ts b/node_modules/ajv/dist/runtime/parseJson.d.ts
new file mode 100644
index 0000000..85f1d56
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/parseJson.d.ts
@@ -0,0 +1,18 @@
+export declare function parseJson(s: string, pos: number): unknown;
+export declare namespace parseJson {
+ var message: string | undefined;
+ var position: number;
+ var code: string;
+}
+export declare function parseJsonNumber(s: string, pos: number, maxDigits?: number): number | undefined;
+export declare namespace parseJsonNumber {
+ var message: string | undefined;
+ var position: number;
+ var code: string;
+}
+export declare function parseJsonString(s: string, pos: number): string | undefined;
+export declare namespace parseJsonString {
+ var message: string | undefined;
+ var position: number;
+ var code: string;
+}
diff --git a/node_modules/ajv/dist/runtime/parseJson.js b/node_modules/ajv/dist/runtime/parseJson.js
new file mode 100644
index 0000000..7ebbc1b
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/parseJson.js
@@ -0,0 +1,184 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.parseJsonString = exports.parseJsonNumber = exports.parseJson = void 0;
+const rxParseJson = /position\s(\d+)$/;
+function parseJson(s, pos) {
+ let endPos;
+ parseJson.message = undefined;
+ let matches;
+ if (pos)
+ s = s.slice(pos);
+ try {
+ parseJson.position = pos + s.length;
+ return JSON.parse(s);
+ }
+ catch (e) {
+ matches = rxParseJson.exec(e.message);
+ if (!matches) {
+ parseJson.message = "unexpected end";
+ return undefined;
+ }
+ endPos = +matches[1];
+ const c = s[endPos];
+ s = s.slice(0, endPos);
+ parseJson.position = pos + endPos;
+ try {
+ return JSON.parse(s);
+ }
+ catch (e1) {
+ parseJson.message = `unexpected token ${c}`;
+ return undefined;
+ }
+ }
+}
+exports.parseJson = parseJson;
+parseJson.message = undefined;
+parseJson.position = 0;
+parseJson.code = 'require("ajv/dist/runtime/parseJson").parseJson';
+function parseJsonNumber(s, pos, maxDigits) {
+ let numStr = "";
+ let c;
+ parseJsonNumber.message = undefined;
+ if (s[pos] === "-") {
+ numStr += "-";
+ pos++;
+ }
+ if (s[pos] === "0") {
+ numStr += "0";
+ pos++;
+ }
+ else {
+ if (!parseDigits(maxDigits)) {
+ errorMessage();
+ return undefined;
+ }
+ }
+ if (maxDigits) {
+ parseJsonNumber.position = pos;
+ return +numStr;
+ }
+ if (s[pos] === ".") {
+ numStr += ".";
+ pos++;
+ if (!parseDigits()) {
+ errorMessage();
+ return undefined;
+ }
+ }
+ if (((c = s[pos]), c === "e" || c === "E")) {
+ numStr += "e";
+ pos++;
+ if (((c = s[pos]), c === "+" || c === "-")) {
+ numStr += c;
+ pos++;
+ }
+ if (!parseDigits()) {
+ errorMessage();
+ return undefined;
+ }
+ }
+ parseJsonNumber.position = pos;
+ return +numStr;
+ function parseDigits(maxLen) {
+ let digit = false;
+ while (((c = s[pos]), c >= "0" && c <= "9" && (maxLen === undefined || maxLen-- > 0))) {
+ digit = true;
+ numStr += c;
+ pos++;
+ }
+ return digit;
+ }
+ function errorMessage() {
+ parseJsonNumber.position = pos;
+ parseJsonNumber.message = pos < s.length ? `unexpected token ${s[pos]}` : "unexpected end";
+ }
+}
+exports.parseJsonNumber = parseJsonNumber;
+parseJsonNumber.message = undefined;
+parseJsonNumber.position = 0;
+parseJsonNumber.code = 'require("ajv/dist/runtime/parseJson").parseJsonNumber';
+const escapedChars = {
+ b: "\b",
+ f: "\f",
+ n: "\n",
+ r: "\r",
+ t: "\t",
+ '"': '"',
+ "/": "/",
+ "\\": "\\",
+};
+const CODE_A = "a".charCodeAt(0);
+const CODE_0 = "0".charCodeAt(0);
+function parseJsonString(s, pos) {
+ let str = "";
+ let c;
+ parseJsonString.message = undefined;
+ // eslint-disable-next-line no-constant-condition, @typescript-eslint/no-unnecessary-condition
+ while (true) {
+ c = s[pos++];
+ if (c === '"')
+ break;
+ if (c === "\\") {
+ c = s[pos];
+ if (c in escapedChars) {
+ str += escapedChars[c];
+ pos++;
+ }
+ else if (c === "u") {
+ pos++;
+ let count = 4;
+ let code = 0;
+ while (count--) {
+ code <<= 4;
+ c = s[pos];
+ if (c === undefined) {
+ errorMessage("unexpected end");
+ return undefined;
+ }
+ c = c.toLowerCase();
+ if (c >= "a" && c <= "f") {
+ code += c.charCodeAt(0) - CODE_A + 10;
+ }
+ else if (c >= "0" && c <= "9") {
+ code += c.charCodeAt(0) - CODE_0;
+ }
+ else {
+ errorMessage(`unexpected token ${c}`);
+ return undefined;
+ }
+ pos++;
+ }
+ str += String.fromCharCode(code);
+ }
+ else {
+ errorMessage(`unexpected token ${c}`);
+ return undefined;
+ }
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
+ }
+ else if (c === undefined) {
+ errorMessage("unexpected end");
+ return undefined;
+ }
+ else {
+ if (c.charCodeAt(0) >= 0x20) {
+ str += c;
+ }
+ else {
+ errorMessage(`unexpected token ${c}`);
+ return undefined;
+ }
+ }
+ }
+ parseJsonString.position = pos;
+ return str;
+ function errorMessage(msg) {
+ parseJsonString.position = pos;
+ parseJsonString.message = msg;
+ }
+}
+exports.parseJsonString = parseJsonString;
+parseJsonString.message = undefined;
+parseJsonString.position = 0;
+parseJsonString.code = 'require("ajv/dist/runtime/parseJson").parseJsonString';
+//# sourceMappingURL=parseJson.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/parseJson.js.map b/node_modules/ajv/dist/runtime/parseJson.js.map
new file mode 100644
index 0000000..7f239fb
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/parseJson.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"parseJson.js","sourceRoot":"","sources":["../../lib/runtime/parseJson.ts"],"names":[],"mappings":";;;AAAA,MAAM,WAAW,GAAG,kBAAkB,CAAA;AAEtC,SAAgB,SAAS,CAAC,CAAS,EAAE,GAAW;IAC9C,IAAI,MAA0B,CAAA;IAC9B,SAAS,CAAC,OAAO,GAAG,SAAS,CAAA;IAC7B,IAAI,OAA+B,CAAA;IACnC,IAAI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C1B,YAAY,CAAC,gBAAgB,CAAC,CAAA;YAC9B,OAAO,SAAS,CAAA;SACjB;aAAM;YACL,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;gBAC3B,GAAG,IAAI,CAAC,CAAA;aACT;iBAAM;gBACL,YAAY,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAA;gBACrC,OAAO,SAAS,CAAA;aACjB;SACF;KACF;IACD,eAAe,CAAC,QAAQ,GAAG,GAAG,CAAA;IAC9B,OAAO,GAAG,CAAA;IAEV,SAAS,YAAY,CAAC,GAAW;QAC/B,eAAe,CAAC,QAAQ,GAAG,GAAG,CAAA;QAC9B,eAAe,CAAC,OAAO,GAAG,GAAG,CAAA;IAC/B,CAAC;AACH,CAAC;AA5DD,0CA4DC;AAED,eAAe,CAAC,OAAO,GAAG,SAA+B,CAAA;AACzD,eAAe,CAAC,QAAQ,GAAG,CAAW,CAAA;AACtC,eAAe,CAAC,IAAI,GAAG,uDAAuD,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/quote.d.ts b/node_modules/ajv/dist/runtime/quote.d.ts
new file mode 100644
index 0000000..0579dd3
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/quote.d.ts
@@ -0,0 +1,5 @@
+declare function quote(s: string): string;
+declare namespace quote {
+ var code: string;
+}
+export default quote;
diff --git a/node_modules/ajv/dist/runtime/quote.js b/node_modules/ajv/dist/runtime/quote.js
new file mode 100644
index 0000000..ebf78f7
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/quote.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const rxEscapable =
+// eslint-disable-next-line no-control-regex, no-misleading-character-class
+/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+const escaped = {
+ "\b": "\\b",
+ "\t": "\\t",
+ "\n": "\\n",
+ "\f": "\\f",
+ "\r": "\\r",
+ '"': '\\"',
+ "\\": "\\\\",
+};
+function quote(s) {
+ rxEscapable.lastIndex = 0;
+ return ('"' +
+ (rxEscapable.test(s)
+ ? s.replace(rxEscapable, (a) => {
+ const c = escaped[a];
+ return typeof c === "string"
+ ? c
+ : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
+ })
+ : s) +
+ '"');
+}
+exports.default = quote;
+quote.code = 'require("ajv/dist/runtime/quote").default';
+//# sourceMappingURL=quote.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/quote.js.map b/node_modules/ajv/dist/runtime/quote.js.map
new file mode 100644
index 0000000..4d22625
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/quote.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../lib/runtime/quote.ts"],"names":[],"mappings":";;AAAA,MAAM,WAAW;AACf,2EAA2E;AAC3E,iIAAiI,CAAA;AAEnI,MAAM,OAAO,GAA6B;IACxC,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACb,CAAA;AAED,SAAwB,KAAK,CAAC,CAAS;IACrC,WAAW,CAAC,SAAS,GAAG,CAAC,CAAA;IACzB,OAAO,CACL,GAAG;QACH,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;gBAC3B,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;gBACpB,OAAO,OAAO,CAAC,KAAK,QAAQ;oBAC1B,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;YAC/D,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC,CAAC;QACN,GAAG,CACJ,CAAA;AACH,CAAC;AAdD,wBAcC;AAED,KAAK,CAAC,IAAI,GAAG,2CAA2C,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/re2.d.ts b/node_modules/ajv/dist/runtime/re2.d.ts
new file mode 100644
index 0000000..b49306f
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/re2.d.ts
@@ -0,0 +1,6 @@
+import * as re2 from "re2";
+declare type Re2 = typeof re2 & {
+ code: string;
+};
+declare const _default: Re2;
+export default _default;
diff --git a/node_modules/ajv/dist/runtime/re2.js b/node_modules/ajv/dist/runtime/re2.js
new file mode 100644
index 0000000..4b1ee25
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/re2.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const re2 = require("re2");
+re2.code = 'require("ajv/dist/runtime/re2").default';
+exports.default = re2;
+//# sourceMappingURL=re2.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/re2.js.map b/node_modules/ajv/dist/runtime/re2.js.map
new file mode 100644
index 0000000..bb938a2
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/re2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"re2.js","sourceRoot":"","sources":["../../lib/runtime/re2.ts"],"names":[],"mappings":";;AAAA,2BAA0B;AAGxB,GAAW,CAAC,IAAI,GAAG,yCAAyC,CAAA;AAE9D,kBAAe,GAAU,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/timestamp.d.ts b/node_modules/ajv/dist/runtime/timestamp.d.ts
new file mode 100644
index 0000000..cd48326
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/timestamp.d.ts
@@ -0,0 +1,5 @@
+declare function validTimestamp(str: string, allowDate: boolean): boolean;
+declare namespace validTimestamp {
+ var code: string;
+}
+export default validTimestamp;
diff --git a/node_modules/ajv/dist/runtime/timestamp.js b/node_modules/ajv/dist/runtime/timestamp.js
new file mode 100644
index 0000000..5e0f065
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/timestamp.js
@@ -0,0 +1,42 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const DT_SEPARATOR = /t|\s/i;
+const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
+const TIME = /^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i;
+const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+function validTimestamp(str, allowDate) {
+ // http://tools.ietf.org/html/rfc3339#section-5.6
+ const dt = str.split(DT_SEPARATOR);
+ return ((dt.length === 2 && validDate(dt[0]) && validTime(dt[1])) ||
+ (allowDate && dt.length === 1 && validDate(dt[0])));
+}
+exports.default = validTimestamp;
+function validDate(str) {
+ const matches = DATE.exec(str);
+ if (!matches)
+ return false;
+ const y = +matches[1];
+ const m = +matches[2];
+ const d = +matches[3];
+ return (m >= 1 &&
+ m <= 12 &&
+ d >= 1 &&
+ (d <= DAYS[m] ||
+ // leap year: https://tools.ietf.org/html/rfc3339#appendix-C
+ (m === 2 && d === 29 && (y % 100 === 0 ? y % 400 === 0 : y % 4 === 0))));
+}
+function validTime(str) {
+ const matches = TIME.exec(str);
+ if (!matches)
+ return false;
+ const hr = +matches[1];
+ const min = +matches[2];
+ const sec = +matches[3];
+ const tzH = +(matches[4] || 0);
+ const tzM = +(matches[5] || 0);
+ return ((hr <= 23 && min <= 59 && sec <= 59) ||
+ // leap second
+ (hr - tzH === 23 && min - tzM === 59 && sec === 60));
+}
+validTimestamp.code = 'require("ajv/dist/runtime/timestamp").default';
+//# sourceMappingURL=timestamp.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/timestamp.js.map b/node_modules/ajv/dist/runtime/timestamp.js.map
new file mode 100644
index 0000000..6b0eee0
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/timestamp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../lib/runtime/timestamp.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,OAAO,CAAA;AAC5B,MAAM,IAAI,GAAG,4BAA4B,CAAA;AACzC,MAAM,IAAI,GAAG,gEAAgE,CAAA;AAC7E,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;AAEhE,SAAwB,cAAc,CAAC,GAAW,EAAE,SAAkB;IACpE,iDAAiD;IACjD,MAAM,EAAE,GAAa,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IAC5C,OAAO,CACL,CAAC,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC,SAAS,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CACnD,CAAA;AACH,CAAC;AAPD,iCAOC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,OAAO,GAAoB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/C,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC1B,MAAM,CAAC,GAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC7B,MAAM,CAAC,GAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC7B,MAAM,CAAC,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/dist/runtime/ucs2length.d.ts b/node_modules/ajv/dist/runtime/ucs2length.d.ts
new file mode 100644
index 0000000..ecbee69
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/ucs2length.d.ts
@@ -0,0 +1,5 @@
+declare function ucs2length(str: string): number;
+declare namespace ucs2length {
+ var code: string;
+}
+export default ucs2length;
diff --git a/node_modules/ajv/dist/runtime/ucs2length.js b/node_modules/ajv/dist/runtime/ucs2length.js
new file mode 100644
index 0000000..92ea0c0
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/ucs2length.js
@@ -0,0 +1,24 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+// https://mathiasbynens.be/notes/javascript-encoding
+// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
+function ucs2length(str) {
+ const len = str.length;
+ let length = 0;
+ let pos = 0;
+ let value;
+ while (pos < len) {
+ length++;
+ value = str.charCodeAt(pos++);
+ if (value >= 0xd800 && value <= 0xdbff && pos < len) {
+ // high surrogate, and there is a next character
+ value = str.charCodeAt(pos);
+ if ((value & 0xfc00) === 0xdc00)
+ pos++; // low surrogate
+ }
+ }
+ return length;
+}
+exports.default = ucs2length;
+ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
+//# sourceMappingURL=ucs2length.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/ucs2length.js.map b/node_modules/ajv/dist/runtime/ucs2length.js.map
new file mode 100644
index 0000000..7c7f788
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/ucs2length.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ucs2length.js","sourceRoot":"","sources":["../../lib/runtime/ucs2length.ts"],"names":[],"mappings":";;AAAA,qDAAqD;AACrD,iEAAiE;AACjE,SAAwB,UAAU,CAAC,GAAW;IAC5C,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAA;IACtB,IAAI,MAAM,GAAG,CAAC,CAAA;IACd,IAAI,GAAG,GAAG,CAAC,CAAA;IACX,IAAI,KAAa,CAAA;IACjB,OAAO,GAAG,GAAG,GAAG,EAAE;QAChB,MAAM,EAAE,CAAA;QACR,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAA;QAC7B,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,IAAI,GAAG,GAAG,GAAG,EAAE;YACnD,gDAAgD;YAChD,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;YAC3B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,MAAM;gBAAE,GAAG,EAAE,CAAA,CAAC,gBAAgB;SACxD;KACF;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAfD,6BAeC;AAED,UAAU,CAAC,IAAI,GAAG,gDAAgD,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/uri.d.ts b/node_modules/ajv/dist/runtime/uri.d.ts
new file mode 100644
index 0000000..83b169f
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/uri.d.ts
@@ -0,0 +1,6 @@
+import * as uri from "uri-js";
+declare type URI = typeof uri & {
+ code: string;
+};
+declare const _default: URI;
+export default _default;
diff --git a/node_modules/ajv/dist/runtime/uri.js b/node_modules/ajv/dist/runtime/uri.js
new file mode 100644
index 0000000..fbd3815
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/uri.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const uri = require("uri-js");
+uri.code = 'require("ajv/dist/runtime/uri").default';
+exports.default = uri;
+//# sourceMappingURL=uri.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/uri.js.map b/node_modules/ajv/dist/runtime/uri.js.map
new file mode 100644
index 0000000..701bed9
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/uri.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../lib/runtime/uri.ts"],"names":[],"mappings":";;AAAA,8BAA6B;AAG3B,GAAW,CAAC,IAAI,GAAG,yCAAyC,CAAA;AAE9D,kBAAe,GAAU,CAAA"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/validation_error.d.ts b/node_modules/ajv/dist/runtime/validation_error.d.ts
new file mode 100644
index 0000000..b0ee969
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/validation_error.d.ts
@@ -0,0 +1,7 @@
+import type { ErrorObject } from "../types";
+export default class ValidationError extends Error {
+ readonly errors: Partial[];
+ readonly ajv: true;
+ readonly validation: true;
+ constructor(errors: Partial[]);
+}
diff --git a/node_modules/ajv/dist/runtime/validation_error.js b/node_modules/ajv/dist/runtime/validation_error.js
new file mode 100644
index 0000000..353502c
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/validation_error.js
@@ -0,0 +1,11 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class ValidationError extends Error {
+ constructor(errors) {
+ super("validation failed");
+ this.errors = errors;
+ this.ajv = this.validation = true;
+ }
+}
+exports.default = ValidationError;
+//# sourceMappingURL=validation_error.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/runtime/validation_error.js.map b/node_modules/ajv/dist/runtime/validation_error.js.map
new file mode 100644
index 0000000..70206fb
--- /dev/null
+++ b/node_modules/ajv/dist/runtime/validation_error.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"validation_error.js","sourceRoot":"","sources":["../../lib/runtime/validation_error.ts"],"names":[],"mappings":";;AAEA,MAAqB,eAAgB,SAAQ,KAAK;IAKhD,YAAY,MAA8B;QACxC,KAAK,CAAC,mBAAmB,CAAC,CAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;IACnC,CAAC;CACF;AAVD,kCAUC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/standalone/index.d.ts b/node_modules/ajv/dist/standalone/index.d.ts
new file mode 100644
index 0000000..a9141c3
--- /dev/null
+++ b/node_modules/ajv/dist/standalone/index.d.ts
@@ -0,0 +1,6 @@
+import type AjvCore from "../core";
+import type { AnyValidateFunction } from "../types";
+declare function standaloneCode(ajv: AjvCore, refsOrFunc?: {
+ [K in string]?: string;
+} | AnyValidateFunction): string;
+export default standaloneCode;
diff --git a/node_modules/ajv/dist/standalone/index.js b/node_modules/ajv/dist/standalone/index.js
new file mode 100644
index 0000000..b44bb5d
--- /dev/null
+++ b/node_modules/ajv/dist/standalone/index.js
@@ -0,0 +1,90 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const scope_1 = require("../compile/codegen/scope");
+const code_1 = require("../compile/codegen/code");
+function standaloneCode(ajv, refsOrFunc) {
+ if (!ajv.opts.code.source) {
+ throw new Error("moduleCode: ajv instance must have code.source option");
+ }
+ const { _n } = ajv.scope.opts;
+ return typeof refsOrFunc == "function"
+ ? funcExportCode(refsOrFunc.source)
+ : refsOrFunc !== undefined
+ ? multiExportsCode(refsOrFunc, getValidate)
+ : multiExportsCode(ajv.schemas, (sch) => sch.meta ? undefined : ajv.compile(sch.schema));
+ function getValidate(id) {
+ const v = ajv.getSchema(id);
+ if (!v)
+ throw new Error(`moduleCode: no schema with id ${id}`);
+ return v;
+ }
+ function funcExportCode(source) {
+ const usedValues = {};
+ const n = source === null || source === void 0 ? void 0 : source.validateName;
+ const vCode = validateCode(usedValues, source);
+ if (ajv.opts.code.esm) {
+ // Always do named export as `validate` rather than the variable `n` which is `validateXX` for known export value
+ return `"use strict";${_n}export const validate = ${n};${_n}export default ${n};${_n}${vCode}`;
+ }
+ return `"use strict";${_n}module.exports = ${n};${_n}module.exports.default = ${n};${_n}${vCode}`;
+ }
+ function multiExportsCode(schemas, getValidateFunc) {
+ var _a;
+ const usedValues = {};
+ let code = (0, code_1._) `"use strict";`;
+ for (const name in schemas) {
+ const v = getValidateFunc(schemas[name]);
+ if (v) {
+ const vCode = validateCode(usedValues, v.source);
+ const exportSyntax = ajv.opts.code.esm
+ ? (0, code_1._) `export const ${(0, code_1.getEsmExportName)(name)}`
+ : (0, code_1._) `exports${(0, code_1.getProperty)(name)}`;
+ code = (0, code_1._) `${code}${_n}${exportSyntax} = ${(_a = v.source) === null || _a === void 0 ? void 0 : _a.validateName};${_n}${vCode}`;
+ }
+ }
+ return `${code}`;
+ }
+ function validateCode(usedValues, s) {
+ if (!s)
+ throw new Error('moduleCode: function does not have "source" property');
+ if (usedState(s.validateName) === scope_1.UsedValueState.Completed)
+ return code_1.nil;
+ setUsedState(s.validateName, scope_1.UsedValueState.Started);
+ const scopeCode = ajv.scope.scopeCode(s.scopeValues, usedValues, refValidateCode);
+ const code = new code_1._Code(`${scopeCode}${_n}${s.validateCode}`);
+ return s.evaluated ? (0, code_1._) `${code}${s.validateName}.evaluated = ${s.evaluated};${_n}` : code;
+ function refValidateCode(n) {
+ var _a;
+ const vRef = (_a = n.value) === null || _a === void 0 ? void 0 : _a.ref;
+ if (n.prefix === "validate" && typeof vRef == "function") {
+ const v = vRef;
+ return validateCode(usedValues, v.source);
+ }
+ else if ((n.prefix === "root" || n.prefix === "wrapper") && typeof vRef == "object") {
+ const { validate, validateName } = vRef;
+ if (!validateName)
+ throw new Error("ajv internal error");
+ const def = ajv.opts.code.es5 ? scope_1.varKinds.var : scope_1.varKinds.const;
+ const wrapper = (0, code_1._) `${def} ${n} = {validate: ${validateName}};`;
+ if (usedState(validateName) === scope_1.UsedValueState.Started)
+ return wrapper;
+ const vCode = validateCode(usedValues, validate === null || validate === void 0 ? void 0 : validate.source);
+ return (0, code_1._) `${wrapper}${_n}${vCode}`;
+ }
+ return undefined;
+ }
+ function usedState(name) {
+ var _a;
+ return (_a = usedValues[name.prefix]) === null || _a === void 0 ? void 0 : _a.get(name);
+ }
+ function setUsedState(name, state) {
+ const { prefix } = name;
+ const names = (usedValues[prefix] = usedValues[prefix] || new Map());
+ names.set(name, state);
+ }
+ }
+}
+module.exports = exports = standaloneCode;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = standaloneCode;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/standalone/index.js.map b/node_modules/ajv/dist/standalone/index.js.map
new file mode 100644
index 0000000..11864d3
--- /dev/null
+++ b/node_modules/ajv/dist/standalone/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/standalone/index.ts"],"names":[],"mappings":";;AAGA,oDAAkG;AAClG,kDAA0F;AAE1F,SAAS,cAAc,CACrB,GAAY,EACZ,UAA2D;IAE3D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;KACzE;IACD,MAAM,EAAC,EAAE,EAAC,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAA;IAC3B,OAAO,OAAO,UAAU,IAAI,UAAU;QACpC,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC;QACnC,CAAC,CAAC,UAAU,KAAK,SAAS;YAC1B,CAAC,CAAC,gBAAgB,CAAS,UAAU,EAAE,WAAW,CAAC;YACnD,CAAC,CAAC,gBAAgB,CAAY,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAC/C,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAC/C,CAAA;IAEL,SAAS,WAAW,CAAC,EAAU;QAC7B,MAAM,CAAC,GAAG,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,EAAE,EAAE,CAAC,CAAA;QAC9D,OAAO,CAAC,CAAA;IACV,CAAC;IAED,SAAS,cAAc,CAAC,MAAmB;QACzC,MAAM,UAAU,GAAoB,EAAE,CAAA;QACtC,MAAM,CA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modules/ajv/dist/standalone/instance.d.ts b/node_modules/ajv/dist/standalone/instance.d.ts
new file mode 100644
index 0000000..156ac32
--- /dev/null
+++ b/node_modules/ajv/dist/standalone/instance.d.ts
@@ -0,0 +1,12 @@
+import Ajv, { AnySchema, AnyValidateFunction, ErrorObject } from "../core";
+export default class AjvPack {
+ readonly ajv: Ajv;
+ errors?: ErrorObject[] | null;
+ constructor(ajv: Ajv);
+ validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise;
+ compile(schema: AnySchema, meta?: boolean): AnyValidateFunction;
+ getSchema(keyRef: string): AnyValidateFunction | undefined;
+ private getStandalone;
+ addSchema(...args: Parameters): AjvPack;
+ addKeyword(...args: Parameters): AjvPack;
+}
diff --git a/node_modules/ajv/dist/standalone/instance.js b/node_modules/ajv/dist/standalone/instance.js
new file mode 100644
index 0000000..35e5c99
--- /dev/null
+++ b/node_modules/ajv/dist/standalone/instance.js
@@ -0,0 +1,35 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const core_1 = require("../core");
+const _1 = require(".");
+const requireFromString = require("require-from-string");
+class AjvPack {
+ constructor(ajv) {
+ this.ajv = ajv;
+ }
+ validate(schemaKeyRef, data) {
+ return core_1.default.prototype.validate.call(this, schemaKeyRef, data);
+ }
+ compile(schema, meta) {
+ return this.getStandalone(this.ajv.compile(schema, meta));
+ }
+ getSchema(keyRef) {
+ const v = this.ajv.getSchema(keyRef);
+ if (!v)
+ return undefined;
+ return this.getStandalone(v);
+ }
+ getStandalone(v) {
+ return requireFromString((0, _1.default)(this.ajv, v));
+ }
+ addSchema(...args) {
+ this.ajv.addSchema.call(this.ajv, ...args);
+ return this;
+ }
+ addKeyword(...args) {
+ this.ajv.addKeyword.call(this.ajv, ...args);
+ return this;
+ }
+}
+exports.default = AjvPack;
+//# sourceMappingURL=instance.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/standalone/instance.js.map b/node_modules/ajv/dist/standalone/instance.js.map
new file mode 100644
index 0000000..6ac33b1
--- /dev/null
+++ b/node_modules/ajv/dist/standalone/instance.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"instance.js","sourceRoot":"","sources":["../../lib/standalone/instance.ts"],"names":[],"mappings":";;AAAA,kCAAwE;AACxE,wBAA8B;AAC9B,yDAAwD;AAExD,MAAqB,OAAO;IAE1B,YAAqB,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;IAAG,CAAC;IAEjC,QAAQ,CAAC,YAAgC,EAAE,IAAa;QACtD,OAAO,cAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;IAC9D,CAAC;IAED,OAAO,CAAc,MAAiB,EAAE,IAAc;QACpD,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAI,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;IAC9D,CAAC;IAED,SAAS,CAAc,MAAc;QACnC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAI,MAAM,CAAC,CAAA;QACvC,IAAI,CAAC,CAAC;YAAE,OAAO,SAAS,CAAA;QACxB,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;IAC9B,CAAC;IAEO,aAAa,CAAc,CAAyB;QAC1D,OAAO,iBAAiB,CAAC,IAAA,UAAc,EAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAA2B,CAAA;IACjF,CAAC;IAED,SAAS,CAAC,GAAG,IAAgD;QAC3D,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU,CAAC,GAAG,IAAiD;QAC7D,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;QAC3C,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AA/BD,0BA+BC"}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/types/index.d.ts b/node_modules/ajv/dist/types/index.d.ts
new file mode 100644
index 0000000..065261e
--- /dev/null
+++ b/node_modules/ajv/dist/types/index.d.ts
@@ -0,0 +1,183 @@
+import * as URI from "uri-js";
+import type { CodeGen, Code, Name, ScopeValueSets, ValueScopeName } from "../compile/codegen";
+import type { SchemaEnv, SchemaCxt, SchemaObjCxt } from "../compile";
+import type { JSONType } from "../compile/rules";
+import type { KeywordCxt } from "../compile/validate";
+import type Ajv from "../core";
+interface _SchemaObject {
+ id?: string;
+ $id?: string;
+ $schema?: string;
+ [x: string]: any;
+}
+export interface SchemaObject extends _SchemaObject {
+ id?: string;
+ $id?: string;
+ $schema?: string;
+ $async?: false;
+ [x: string]: any;
+}
+export interface AsyncSchema extends _SchemaObject {
+ $async: true;
+}
+export declare type AnySchemaObject = SchemaObject | AsyncSchema;
+export declare type Schema = SchemaObject | boolean;
+export declare type AnySchema = Schema | AsyncSchema;
+export declare type SchemaMap = {
+ [Key in string]?: AnySchema;
+};
+export interface SourceCode {
+ validateName: ValueScopeName;
+ validateCode: string;
+ scopeValues: ScopeValueSets;
+ evaluated?: Code;
+}
+export interface DataValidationCxt {
+ instancePath: string;
+ parentData: {
+ [K in T]: any;
+ };
+ parentDataProperty: T;
+ rootData: Record | any[];
+ dynamicAnchors: {
+ [Ref in string]?: ValidateFunction;
+ };
+}
+export interface ValidateFunction {
+ (this: Ajv | any, data: any, dataCxt?: DataValidationCxt): data is T;
+ errors?: null | ErrorObject[];
+ evaluated?: Evaluated;
+ schema: AnySchema;
+ schemaEnv: SchemaEnv;
+ source?: SourceCode;
+}
+export interface JTDParser {
+ (json: string): T | undefined;
+ message?: string;
+ position?: number;
+}
+export declare type EvaluatedProperties = {
+ [K in string]?: true;
+} | true;
+export declare type EvaluatedItems = number | true;
+export interface Evaluated {
+ props?: EvaluatedProperties;
+ items?: EvaluatedItems;
+ dynamicProps: boolean;
+ dynamicItems: boolean;
+}
+export interface AsyncValidateFunction extends ValidateFunction {
+ (...args: Parameters>): Promise;
+ $async: true;
+}
+export declare type AnyValidateFunction = ValidateFunction | AsyncValidateFunction;
+export interface ErrorObject, S = unknown> {
+ keyword: K;
+ instancePath: string;
+ schemaPath: string;
+ params: P;
+ propertyName?: string;
+ message?: string;
+ schema?: S;
+ parentSchema?: AnySchemaObject;
+ data?: unknown;
+}
+export declare type ErrorNoParams = ErrorObject, S>;
+interface _KeywordDef {
+ keyword: string | string[];
+ type?: JSONType | JSONType[];
+ schemaType?: JSONType | JSONType[];
+ allowUndefined?: boolean;
+ $data?: boolean;
+ implements?: string[];
+ before?: string;
+ post?: boolean;
+ metaSchema?: AnySchemaObject;
+ validateSchema?: AnyValidateFunction;
+ dependencies?: string[];
+ error?: KeywordErrorDefinition;
+ $dataError?: KeywordErrorDefinition;
+}
+export interface CodeKeywordDefinition extends _KeywordDef {
+ code: (cxt: KeywordCxt, ruleType?: string) => void;
+ trackErrors?: boolean;
+}
+export declare type MacroKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaCxt) => AnySchema;
+export declare type CompileKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaObjCxt) => DataValidateFunction;
+export interface DataValidateFunction {
+ (...args: Parameters): boolean | Promise;
+ errors?: Partial[];
+}
+export interface SchemaValidateFunction {
+ (schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise;
+ errors?: Partial[];
+}
+export interface FuncKeywordDefinition extends _KeywordDef {
+ validate?: SchemaValidateFunction | DataValidateFunction;
+ compile?: CompileKeywordFunc;
+ schema?: boolean;
+ modifying?: boolean;
+ async?: boolean;
+ valid?: boolean;
+ errors?: boolean | "full";
+}
+export interface MacroKeywordDefinition extends FuncKeywordDefinition {
+ macro: MacroKeywordFunc;
+}
+export declare type KeywordDefinition = CodeKeywordDefinition | FuncKeywordDefinition | MacroKeywordDefinition;
+export declare type AddedKeywordDefinition = KeywordDefinition & {
+ type: JSONType[];
+ schemaType: JSONType[];
+};
+export interface KeywordErrorDefinition {
+ message: string | Code | ((cxt: KeywordErrorCxt) => string | Code);
+ params?: Code | ((cxt: KeywordErrorCxt) => Code);
+}
+export declare type Vocabulary = (KeywordDefinition | string)[];
+export interface KeywordErrorCxt {
+ gen: CodeGen;
+ keyword: string;
+ data: Name;
+ $data?: string | false;
+ schema: any;
+ parentSchema?: AnySchemaObject;
+ schemaCode: Code | number | boolean;
+ schemaValue: Code | number | boolean;
+ schemaType?: JSONType[];
+ errsCount?: Name;
+ params: KeywordCxtParams;
+ it: SchemaCxt;
+}
+export declare type KeywordCxtParams = {
+ [P in string]?: Code | string | number;
+};
+export declare type FormatValidator = (data: T) => boolean;
+export declare type FormatCompare = (data1: T, data2: T) => number | undefined;
+export declare type AsyncFormatValidator = (data: T) => Promise;
+export interface FormatDefinition {
+ type?: T extends string ? "string" | undefined : "number";
+ validate: FormatValidator | (T extends string ? string | RegExp : never);
+ async?: false | undefined;
+ compare?: FormatCompare;
+}
+export interface AsyncFormatDefinition {
+ type?: T extends string ? "string" | undefined : "number";
+ validate: AsyncFormatValidator;
+ async: true;
+ compare?: FormatCompare;
+}
+export declare type AddedFormat = true | RegExp | FormatValidator | FormatDefinition | FormatDefinition | AsyncFormatDefinition | AsyncFormatDefinition;
+export declare type Format = AddedFormat | string;
+export interface RegExpEngine {
+ (pattern: string, u: string): RegExpLike;
+ code: string;
+}
+export interface RegExpLike {
+ test: (s: string) => boolean;
+}
+export interface UriResolver {
+ parse(uri: string): URI.URIComponents;
+ resolve(base: string, path: string): string;
+ serialize(component: URI.URIComponents): string;
+}
+export {};
diff --git a/node_modules/ajv/dist/types/index.js b/node_modules/ajv/dist/types/index.js
new file mode 100644
index 0000000..aa219d8
--- /dev/null
+++ b/node_modules/ajv/dist/types/index.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/types/index.js.map b/node_modules/ajv/dist/types/index.js.map
new file mode 100644
index 0000000..1f80f85
--- /dev/null
+++ b/node_modules/ajv/dist/types/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/types/index.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/types/json-schema.d.ts b/node_modules/ajv/dist/types/json-schema.d.ts
new file mode 100644
index 0000000..78ec842
--- /dev/null
+++ b/node_modules/ajv/dist/types/json-schema.d.ts
@@ -0,0 +1,124 @@
+declare type StrictNullChecksWrapper = undefined extends null ? `strictNullChecks must be true in tsconfig to use ${Name}` : Type;
+declare type UnionToIntersection = (U extends any ? (_: U) => void : never) extends (_: infer I) => void ? I : never;
+export declare type SomeJSONSchema = UncheckedJSONSchemaType;
+declare type UncheckedPartialSchema = Partial>;
+export declare type PartialSchema = StrictNullChecksWrapper<"PartialSchema", UncheckedPartialSchema>;
+declare type JSONType = IsPartial extends true ? T | undefined : T;
+interface NumberKeywords {
+ minimum?: number;
+ maximum?: number;
+ exclusiveMinimum?: number;
+ exclusiveMaximum?: number;
+ multipleOf?: number;
+ format?: string;
+}
+interface StringKeywords {
+ minLength?: number;
+ maxLength?: number;
+ pattern?: string;
+ format?: string;
+}
+declare type UncheckedJSONSchemaType = (// these two unions allow arbitrary unions of types
+{
+ anyOf: readonly UncheckedJSONSchemaType[];
+} | {
+ oneOf: readonly UncheckedJSONSchemaType[];
+} | ({
+ type: readonly (T extends number ? JSONType<"number" | "integer", IsPartial> : T extends string ? JSONType<"string", IsPartial> : T extends boolean ? JSONType<"boolean", IsPartial> : never)[];
+} & UnionToIntersection) | ((T extends number ? {
+ type: JSONType<"number" | "integer", IsPartial>;
+} & NumberKeywords : T extends string ? {
+ type: JSONType<"string", IsPartial>;
+} & StringKeywords : T extends boolean ? {
+ type: JSONType<"boolean", IsPartial>;
+} : T extends readonly [any, ...any[]] ? {
+ type: JSONType<"array", IsPartial>;
+ items: {
+ readonly [K in keyof T]-?: UncheckedJSONSchemaType & Nullable;
+ } & {
+ length: T["length"];
+ };
+ minItems: T["length"];
+} & ({
+ maxItems: T["length"];
+} | {
+ additionalItems: false;
+}) : T extends readonly any[] ? {
+ type: JSONType<"array", IsPartial>;
+ items: UncheckedJSONSchemaType;
+ contains?: UncheckedPartialSchema;
+ minItems?: number;
+ maxItems?: number;
+ minContains?: number;
+ maxContains?: number;
+ uniqueItems?: true;
+ additionalItems?: never;
+} : T extends Record ? {
+ type: JSONType<"object", IsPartial>;
+ additionalProperties?: boolean | UncheckedJSONSchemaType;
+ unevaluatedProperties?: boolean | UncheckedJSONSchemaType;
+ properties?: IsPartial extends true ? Partial> : UncheckedPropertiesSchema;
+ patternProperties?: Record>;
+ propertyNames?: Omit, "type"> & {
+ type?: "string";
+ };
+ dependencies?: {
+ [K in keyof T]?: Readonly<(keyof T)[]> | UncheckedPartialSchema;
+ };
+ dependentRequired?: {
+ [K in keyof T]?: Readonly<(keyof T)[]>;
+ };
+ dependentSchemas?: {
+ [K in keyof T]?: UncheckedPartialSchema;
+ };
+ minProperties?: number;
+ maxProperties?: number;
+} & (IsPartial extends true ? {
+ required: Readonly<(keyof T)[]>;
+} : [UncheckedRequiredMembers] extends [never] ? {
+ required?: Readonly[]>;
+} : {
+ required: Readonly[]>;
+}) : T extends null ? {
+ type: JSONType<"null", IsPartial>;
+ nullable: true;
+} : never) & {
+ allOf?: Readonly[]>;
+ anyOf?: Readonly[]>;
+ oneOf?: Readonly[]>;
+ if?: UncheckedPartialSchema;
+ then?: UncheckedPartialSchema;
+ else?: UncheckedPartialSchema;
+ not?: UncheckedPartialSchema;
+})) & {
+ [keyword: string]: any;
+ $id?: string;
+ $ref?: string;
+ $defs?: Record>;
+ definitions?: Record>;
+};
+export declare type JSONSchemaType = StrictNullChecksWrapper<"JSONSchemaType", UncheckedJSONSchemaType>;
+declare type Known = {
+ [key: string]: Known;
+} | [Known, ...Known[]] | Known[] | number | string | boolean | null;
+declare type UncheckedPropertiesSchema = {
+ [K in keyof T]-?: (UncheckedJSONSchemaType & Nullable) | {
+ $ref: string;
+ };
+};
+export declare type PropertiesSchema = StrictNullChecksWrapper<"PropertiesSchema", UncheckedPropertiesSchema>;
+declare type UncheckedRequiredMembers = {
+ [K in keyof T]-?: undefined extends T[K] ? never : K;
+}[keyof T];
+export declare type RequiredMembers = StrictNullChecksWrapper<"RequiredMembers", UncheckedRequiredMembers>;
+declare type Nullable = undefined extends T ? {
+ nullable: true;
+ const?: null;
+ enum?: Readonly<(T | null)[]>;
+ default?: T | null;
+} : {
+ const?: T;
+ enum?: Readonly;
+ default?: T;
+};
+export {};
diff --git a/node_modules/ajv/dist/types/json-schema.js b/node_modules/ajv/dist/types/json-schema.js
new file mode 100644
index 0000000..2d8f98d
--- /dev/null
+++ b/node_modules/ajv/dist/types/json-schema.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=json-schema.js.map
\ No newline at end of file
diff --git a/node_modules/ajv/dist/types/json-schema.js.map b/node_modules/ajv/dist/types/json-schema.js.map
new file mode 100644
index 0000000..ae6b4d0
--- /dev/null
+++ b/node_modules/ajv/dist/types/json-schema.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../../lib/types/json-schema.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/ajv/dist/types/jtd-schema.d.ts b/node_modules/ajv/dist/types/jtd-schema.d.ts
new file mode 100644
index 0000000..3004e5e
--- /dev/null
+++ b/node_modules/ajv/dist/types/jtd-schema.d.ts
@@ -0,0 +1,169 @@
+/** numeric strings */
+declare type NumberType = "float32" | "float64" | "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32";
+/** string strings */
+declare type StringType = "string" | "timestamp";
+/** Generic JTD Schema without inference of the represented type */
+export declare type SomeJTDSchemaType = (// ref
+{
+ ref: string;
+} | {
+ type: NumberType | StringType | "boolean";
+} | {
+ enum: string[];
+} | {
+ elements: SomeJTDSchemaType;
+} | {
+ values: SomeJTDSchemaType;
+} | {
+ properties: Record;
+ optionalProperties?: Record;
+ additionalProperties?: boolean;
+} | {
+ properties?: Record;
+ optionalProperties: Record;
+ additionalProperties?: boolean;
+} | {
+ discriminator: string;
+ mapping: Record;
+} | {}) & {
+ nullable?: boolean;
+ metadata?: Record;
+ definitions?: Record;
+};
+/** required keys of an object, not undefined */
+declare type RequiredKeys = {
+ [K in keyof T]-?: undefined extends T[K] ? never : K;
+}[keyof T];
+/** optional or undifined-able keys of an object */
+declare type OptionalKeys = {
+ [K in keyof T]-?: undefined extends T[K] ? K : never;
+}[keyof T];
+/** type is true if T is a union type */
+declare type IsUnion_ = false extends (T extends unknown ? ([U] extends [T] ? false : true) : never) ? false : true;
+declare type IsUnion = IsUnion_;
+/** type is true if T is identically E */
+declare type TypeEquality = [T] extends [E] ? ([E] extends [T] ? true : false) : false;
+/** type is true if T or null is identically E or null*/
+declare type NullTypeEquality = TypeEquality;
+/** gets only the string literals of a type or null if a type isn't a string literal */
+declare type EnumString = [T] extends [never] ? null : T extends string ? string extends T ? null : T : null;
+/** true if type is a union of string literals */
+declare type IsEnum = null extends EnumString> ? false : true;
+/** true only if all types are array types (not tuples) */
+declare type IsElements = false extends IsUnion ? [T] extends [readonly unknown[]] ? undefined extends T[0.5] ? false : true : false : false;
+/** true if the the type is a values type */
+declare type IsValues = false extends IsUnion> ? TypeEquality, string> : false;
+/** true if type is a proeprties type and Union is false, or type is a discriminator type and Union is true */
+declare type IsRecord = Union extends IsUnion> ? null extends EnumString> ? false : true : false;
+/** actual schema */
+export declare type JTDSchemaType = Record> = (// refs - where null wasn't specified, must match exactly
+(null extends EnumString ? never : ({
+ [K in keyof D]: [T] extends [D[K]] ? {
+ ref: K;
+ } : never;
+}[keyof D] & {
+ nullable?: false;
+}) | (null extends T ? {
+ [K in keyof D]: [Exclude] extends [Exclude] ? {
+ ref: K;
+ } : never;
+}[keyof D] & {
+ nullable: true;
+} : never)) | (unknown extends T ? {
+ nullable?: boolean;
+} : never) | ((true extends NullTypeEquality ? {
+ type: NumberType;
+} : true extends NullTypeEquality ? {
+ type: "boolean";
+} : true extends NullTypeEquality ? {
+ type: StringType;
+} : true extends NullTypeEquality ? {
+ type: "timestamp";
+} : true extends IsEnum ? {
+ enum: EnumString>[];
+} : true extends IsElements> ? T extends readonly (infer E)[] ? {
+ elements: JTDSchemaType;
+} : never : true extends IsValues ? T extends Record ? {
+ values: JTDSchemaType;
+} : never : true extends IsRecord ? ([RequiredKeys>] extends [never] ? {
+ properties?: Record;
+} : {
+ properties: {
+ [K in RequiredKeys]: JTDSchemaType;
+ };
+}) & ([OptionalKeys>] extends [never] ? {
+ optionalProperties?: Record;
+} : {
+ optionalProperties: {
+ [K in OptionalKeys]: JTDSchemaType, D>;
+ };
+}) & {
+ additionalProperties?: boolean;
+} : true extends IsRecord ? {
+ [K in keyof Exclude]-?: Exclude[K] extends string ? {
+ discriminator: K;
+ mapping: {
+ [M in Exclude[K]]: JTDSchemaType, D>;
+ };
+ } : never;
+}[keyof Exclude] : never) & (null extends T ? {
+ nullable: true;
+} : {
+ nullable?: false;
+}))) & {
+ metadata?: Record;
+ definitions?: {
+ [K in keyof D]: JTDSchemaType;
+ };
+};
+declare type JTDDataDef> = // ref
+(S extends {
+ ref: string;
+} ? D extends {
+ [K in S["ref"]]: infer V;
+} ? JTDDataDef : never : S extends {
+ type: NumberType;
+} ? number : S extends {
+ type: "boolean";
+} ? boolean : S extends {
+ type: "string";
+} ? string : S extends {
+ type: "timestamp";
+} ? string | Date : S extends {
+ enum: readonly (infer E)[];
+} ? string extends E ? never : [E] extends [string] ? E : never : S extends {
+ elements: infer E;
+} ? JTDDataDef[] : S extends {
+ properties: Record;
+ optionalProperties?: Record;
+ additionalProperties?: boolean;
+} ? {
+ -readonly [K in keyof S["properties"]]-?: JTDDataDef;
+} & {
+ -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef;
+} & ([S["additionalProperties"]] extends [true] ? Record : unknown) : S extends {
+ properties?: Record;
+ optionalProperties: Record;
+ additionalProperties?: boolean;
+} ? {
+ -readonly [K in keyof S["properties"]]-?: JTDDataDef;
+} & {
+ -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef;
+} & ([S["additionalProperties"]] extends [true] ? Record : unknown) : S extends {
+ values: infer V;
+} ? Record> : S extends {
+ discriminator: infer M;
+ mapping: Record;
+} ? [M] extends [string] ? {
+ [K in keyof S["mapping"]]: JTDDataDef & {
+ [KM in M]: K;
+ };
+}[keyof S["mapping"]] : never : unknown) | (S extends {
+ nullable: true;
+} ? null : never);
+export declare type JTDDataType