From f8a7318e409c04d3ba9ae3793096a85f399e32cd Mon Sep 17 00:00:00 2001 From: zhongjianfei Date: Sat, 28 Aug 2021 12:08:25 +0800 Subject: [PATCH] zhongjianfei@huawei.com Signed-off-by: zhongjianfei --- BUILD.gn | 94 + LICENSE | 177 + ace-loader/.eslintrc.js | 36 + ace-loader/.gitignore | 3 + ace-loader/.npmignore | 3 + ace-loader/README.md | 27 + ace-loader/babel.config.js | 36 + ace-loader/index.js | 16 + ace-loader/main.product.js | 79 + ace-loader/module-source.js | 73 + ace-loader/npm-install.js | 37 + ace-loader/package-lock.json | 6423 +++++++++++++++++ ace-loader/package.json | 74 + ace-loader/plugin/codegen/index.js | 736 ++ ace-loader/plugin/templater/bind.js | 239 + .../plugin/templater/card_component_map.js | 335 + .../plugin/templater/component_validator.js | 1291 ++++ ace-loader/plugin/templater/content.js | 95 + ace-loader/plugin/templater/data.js | 67 + ace-loader/plugin/templater/index.js | 298 + .../plugin/templater/lite_component_map.js | 385 + .../plugin/templater/rich_component_map.js | 1638 +++++ ace-loader/plugin/theme/customThemeStyles.js | 452 ++ ace-loader/plugin/theme/ohosStyles.js | 684 ++ ace-loader/router/findDev.js | 86 + ace-loader/router/main.product.router.js | 57 + ace-loader/router/module-scipt-router.js | 24 + ace-loader/router/push.js | 206 + ace-loader/router/pushHelper.js | 320 + ace-loader/sample/card/i18n/en.json | 5 + ace-loader/sample/card/i18n/zh.json | 5 + ace-loader/sample/card/manifest.json | 15 + ace-loader/sample/card/pages/index/index.css | 23 + ace-loader/sample/card/pages/index/index.hml | 8 + ace-loader/sample/card/pages/index/index.json | 19 + ace-loader/sample/lite/app.js | 8 + ace-loader/sample/lite/manifest.json | 11 + .../sample/lite/pages/detail/detail.css | 11 + .../sample/lite/pages/detail/detail.hml | 11 + ace-loader/sample/lite/pages/detail/detail.js | 19 + ace-loader/sample/lite/pages/index/index.css | 23 + ace-loader/sample/lite/pages/index/index.hml | 5 + ace-loader/sample/lite/pages/index/index.js | 5 + ace-loader/sample/rich/app.js | 8 + ace-loader/sample/rich/i18n/en.json | 5 + ace-loader/sample/rich/i18n/zh.json | 5 + ace-loader/sample/rich/manifest.json | 15 + .../sample/rich/pages/detail/detail.css | 23 + .../sample/rich/pages/detail/detail.hml | 8 + ace-loader/sample/rich/pages/detail/detail.js | 11 + ace-loader/sample/rich/pages/index/index.css | 23 + ace-loader/sample/rich/pages/index/index.hml | 8 + ace-loader/sample/rich/pages/index/index.js | 11 + ace-loader/src/card-loader.js | 149 + ace-loader/src/cardJson-plugin.js | 83 + ace-loader/src/compile-plugin.js | 159 + ace-loader/src/extgen.js | 38 + ace-loader/src/genAbc-plugin.js | 136 + ace-loader/src/genBin-plugin.js | 127 + ace-loader/src/lite/lite-customize.js | 87 + ace-loader/src/lite/lite-enum.js | 63 + .../src/lite/lite-image-coverter-plugin.js | 85 + ace-loader/src/lite/lite-image2bin.js | 76 + .../src/lite/lite-return-exports-plugin.js | 45 + ace-loader/src/lite/lite-snapshot-plugin.js | 68 + ace-loader/src/lite/lite-transform-style.js | 179 + .../src/lite/lite-transform-template.js | 557 ++ ace-loader/src/lite/lite-utils.js | 24 + ace-loader/src/loader-gen.js | 226 + ace-loader/src/manifest-loader.js | 29 + ace-loader/src/manifest-plugin.js | 26 + ace-loader/src/module-script.js | 25 + ace-loader/src/resource-plugin.js | 233 + ace-loader/src/resource-reference-script.js | 67 + .../card/expected/commonAttr/commonAttr.json | 134 + .../test/card/expected/event/event.json | 37 + .../card/expected/expression/expression.json | 23 + .../expected/exteriorStyle/exteriorStyle.json | 86 + .../test/card/expected/ifAttr/ifAttr.json | 36 + .../card/expected/importCSS/importCSS.json | 21 + .../card/expected/importLess/importLess.json | 18 + .../expected/inlineStyle/inlineStyle.json | 145 + .../card/expected/mediaQuery/mediaQuery.json | 49 + .../expected/privateAttr/privateAttr.json | 61 + .../test/card/expected/showAttr/showAttr.json | 31 + ace-loader/test/card/test.js | 96 + .../testError/common/component/comp/comp.css | 13 + .../testError/common/component/comp/comp.hml | 5 + .../testError/common/component/comp/comp.js | 14 + ace-loader/test/card/testError/manifest.json | 20 + .../testError/pages/amimation/amimation.css | 43 + .../testError/pages/amimation/amimation.hml | 8 + .../card/testError/pages/element/element.hml | 7 + .../test/card/testError/pages/for/for.css | 17 + .../test/card/testError/pages/for/for.hml | 15 + .../pages/pseudoclasses/pseudoclasses.css | 3 + .../pages/pseudoclasses/pseudoclasses.hml | 8 + .../testError/pages/selector/selector.css | 23 + .../testError/pages/selector/selector.hml | 7 + .../testError/pages/transition/transition.css | 22 + .../testError/pages/transition/transition.hml | 8 + .../test/card/testcase/common/common.css | 3 + .../test/card/testcase/common/media.css | 15 + ace-loader/test/card/testcase/manifest.json | 25 + .../testcase/pages/commonAttr/commonAttr.hml | 34 + .../testcase/pages/commonAttr/commonAttr.json | 17 + .../test/card/testcase/pages/event/event.hml | 6 + .../test/card/testcase/pages/event/event.json | 14 + .../testcase/pages/expression/expression.hml | 4 + .../testcase/pages/expression/expression.json | 5 + .../pages/exteriorStyle/exteriorStyle.css | 98 + .../pages/exteriorStyle/exteriorStyle.hml | 1 + .../card/testcase/pages/ifAttr/ifAttr.hml | 5 + .../card/testcase/pages/ifAttr/ifAttr.json | 6 + .../testcase/pages/importCSS/importCSS.css | 4 + .../testcase/pages/importCSS/importCSS.hml | 1 + .../testcase/pages/importLess/importLess.hml | 2 + .../testcase/pages/importLess/importLess.less | 4 + .../pages/inlineStyle/inlineStyle.hml | 40 + .../testcase/pages/mediaQuery/mediaQuery.css | 25 + .../testcase/pages/mediaQuery/mediaQuery.hml | 1 + .../pages/privateAttr/privateAttr.hml | 19 + .../card/testcase/pages/showAttr/showAttr.hml | 7 + .../testcase/pages/showAttr/showAttr.json | 5 + ace-loader/test/lite/commandTest/compile.js | 33 + .../test/lite/commandTest/compile.test.js | 45 + ace-loader/test/lite/customize.js | 79 + ace-loader/test/lite/expected/attribute.js | 1 + ace-loader/test/lite/expected/bubble.js | 1 + ace-loader/test/lite/expected/class.js | 1 + ace-loader/test/lite/expected/event.js | 1 + ace-loader/test/lite/expected/expression.js | 1 + .../test/lite/expected/exteriorStyle.js | 92 + ace-loader/test/lite/expected/forDirective.js | 1 + ace-loader/test/lite/expected/ifDirective.js | 1 + ace-loader/test/lite/expected/importJS.js | 4 + ace-loader/test/lite/expected/inlineStyle.js | 1 + ace-loader/test/lite/expected/music.js | 58 + ace-loader/test/lite/expected/sick.js | 44 + ace-loader/test/lite/test.js | 103 + ace-loader/test/lite/testcase/app.js | 8 + ace-loader/test/lite/testcase/i18n/zh-CN.json | 15 + ace-loader/test/lite/testcase/manifest.json | 21 + .../testcase/pages/attribute/attribute.hml | 17 + .../lite/testcase/pages/bubble/bubble.hml | 33 + .../test/lite/testcase/pages/class/class.hml | 7 + .../test/lite/testcase/pages/event/event.hml | 31 + .../testcase/pages/expression/expression.hml | 31 + .../pages/exteriorStyle/exteriorStyle.css | 84 + .../pages/exteriorStyle/exteriorStyle.hml | 2 + .../pages/forDirective/forDirective.hml | 49 + .../pages/ifDirective/ifDirective.hml | 32 + .../lite/testcase/pages/importJS/importJS.hml | 3 + .../lite/testcase/pages/importJS/importJS.js | 8 + .../pages/inlineStyle/inlineStyle.hml | 31 + .../test/lite/testcase/pages/music/music.css | 16 + .../test/lite/testcase/pages/music/music.hml | 15 + .../test/lite/testcase/pages/music/music.js | 38 + .../test/lite/testcase/pages/sick/sick.css | 34 + .../test/lite/testcase/pages/sick/sick.hml | 20 + .../test/lite/testcase/pages/sick/sick.js | 10 + ace-loader/test/rich/common/css/common.css | 26 + ace-loader/test/rich/common/css/media.css | 15 + ace-loader/test/rich/expected/class.js | 68 + ace-loader/test/rich/expected/commonAttr.js | 124 + ace-loader/test/rich/expected/event.js | 176 + ace-loader/test/rich/expected/expression.js | 381 + .../test/rich/expected/exteriorStyle.js | 268 + ace-loader/test/rich/expected/forDirective.js | 260 + ace-loader/test/rich/expected/ifDirective.js | 154 + ace-loader/test/rich/expected/importCSS.js | 63 + ace-loader/test/rich/expected/importJS.js | 44 + ace-loader/test/rich/expected/inlineStyle.js | 262 + ace-loader/test/rich/expected/mediaQuery.js | 83 + ace-loader/test/rich/expected/privateAttr.js | 472 ++ ace-loader/test/rich/expected/uncommonAttr.js | 106 + ace-loader/test/rich/test.js | 131 + ace-loader/test/rich/testcase/app.js | 8 + ace-loader/test/rich/testcase/manifest.json | 22 + .../test/rich/testcase/pages/class/class.hml | 16 + .../test/rich/testcase/pages/class/class.js | 0 .../testcase/pages/commonAttr/commonAttr.hml | 40 + .../testcase/pages/commonAttr/commonAttr.js | 0 .../test/rich/testcase/pages/event/event.hml | 39 + .../test/rich/testcase/pages/event/event.js | 0 .../testcase/pages/expression/expression.hml | 67 + .../testcase/pages/expression/expression.js | 0 .../pages/exteriorStyle/exteriorStyle.css | 276 + .../pages/exteriorStyle/exteriorStyle.hml | 1 + .../pages/exteriorStyle/exteriorStyle.js | 0 .../pages/forDirective/forDirective.hml | 54 + .../pages/forDirective/forDirective.js | 0 .../pages/ifDirective/ifDirective.hml | 38 + .../testcase/pages/ifDirective/ifDirective.js | 0 .../testcase/pages/importCSS/importCSS.css | 23 + .../testcase/pages/importCSS/importCSS.hml | 1 + .../testcase/pages/importCSS/importCSS.js | 0 .../rich/testcase/pages/importJS/importJS.hml | 4 + .../rich/testcase/pages/importJS/importJS.js | 8 + .../pages/inlineStyle/inlineStyle.hml | 70 + .../testcase/pages/inlineStyle/inlineStyle.js | 0 .../testcase/pages/mediaQuery/mediaQuery.css | 25 + .../testcase/pages/mediaQuery/mediaQuery.hml | 1 + .../testcase/pages/mediaQuery/mediaQuery.js | 0 .../pages/privateAttr/privateAttr.hml | 134 + .../testcase/pages/privateAttr/privateAttr.js | 0 .../pages/uncommonAttr/uncommonAttr.hml | 34 + .../pages/uncommonAttr/uncommonAttr.js | 0 ace-loader/uglify-source.js | 44 + ace-loader/webpack.lite.config.js | 200 + ace-loader/webpack.rich.config.js | 245 + ace-loader/webpack.router.config.js | 51 + build_ace_loader_library.py | 78 + prebuilts/babel.config.js | 36 + prebuilts/uglify-source.js | 44 + 215 files changed, 23212 insertions(+) create mode 100644 BUILD.gn create mode 100644 LICENSE create mode 100644 ace-loader/.eslintrc.js create mode 100644 ace-loader/.gitignore create mode 100644 ace-loader/.npmignore create mode 100644 ace-loader/README.md create mode 100644 ace-loader/babel.config.js create mode 100644 ace-loader/index.js create mode 100644 ace-loader/main.product.js create mode 100644 ace-loader/module-source.js create mode 100644 ace-loader/npm-install.js create mode 100644 ace-loader/package-lock.json create mode 100644 ace-loader/package.json create mode 100644 ace-loader/plugin/codegen/index.js create mode 100644 ace-loader/plugin/templater/bind.js create mode 100644 ace-loader/plugin/templater/card_component_map.js create mode 100644 ace-loader/plugin/templater/component_validator.js create mode 100644 ace-loader/plugin/templater/content.js create mode 100644 ace-loader/plugin/templater/data.js create mode 100644 ace-loader/plugin/templater/index.js create mode 100644 ace-loader/plugin/templater/lite_component_map.js create mode 100644 ace-loader/plugin/templater/rich_component_map.js create mode 100644 ace-loader/plugin/theme/customThemeStyles.js create mode 100644 ace-loader/plugin/theme/ohosStyles.js create mode 100644 ace-loader/router/findDev.js create mode 100644 ace-loader/router/main.product.router.js create mode 100644 ace-loader/router/module-scipt-router.js create mode 100644 ace-loader/router/push.js create mode 100644 ace-loader/router/pushHelper.js create mode 100644 ace-loader/sample/card/i18n/en.json create mode 100644 ace-loader/sample/card/i18n/zh.json create mode 100644 ace-loader/sample/card/manifest.json create mode 100644 ace-loader/sample/card/pages/index/index.css create mode 100644 ace-loader/sample/card/pages/index/index.hml create mode 100644 ace-loader/sample/card/pages/index/index.json create mode 100644 ace-loader/sample/lite/app.js create mode 100644 ace-loader/sample/lite/manifest.json create mode 100644 ace-loader/sample/lite/pages/detail/detail.css create mode 100644 ace-loader/sample/lite/pages/detail/detail.hml create mode 100644 ace-loader/sample/lite/pages/detail/detail.js create mode 100644 ace-loader/sample/lite/pages/index/index.css create mode 100644 ace-loader/sample/lite/pages/index/index.hml create mode 100644 ace-loader/sample/lite/pages/index/index.js create mode 100644 ace-loader/sample/rich/app.js create mode 100644 ace-loader/sample/rich/i18n/en.json create mode 100644 ace-loader/sample/rich/i18n/zh.json create mode 100644 ace-loader/sample/rich/manifest.json create mode 100644 ace-loader/sample/rich/pages/detail/detail.css create mode 100644 ace-loader/sample/rich/pages/detail/detail.hml create mode 100644 ace-loader/sample/rich/pages/detail/detail.js create mode 100644 ace-loader/sample/rich/pages/index/index.css create mode 100644 ace-loader/sample/rich/pages/index/index.hml create mode 100644 ace-loader/sample/rich/pages/index/index.js create mode 100644 ace-loader/src/card-loader.js create mode 100644 ace-loader/src/cardJson-plugin.js create mode 100644 ace-loader/src/compile-plugin.js create mode 100644 ace-loader/src/extgen.js create mode 100644 ace-loader/src/genAbc-plugin.js create mode 100644 ace-loader/src/genBin-plugin.js create mode 100644 ace-loader/src/lite/lite-customize.js create mode 100644 ace-loader/src/lite/lite-enum.js create mode 100644 ace-loader/src/lite/lite-image-coverter-plugin.js create mode 100644 ace-loader/src/lite/lite-image2bin.js create mode 100644 ace-loader/src/lite/lite-return-exports-plugin.js create mode 100644 ace-loader/src/lite/lite-snapshot-plugin.js create mode 100644 ace-loader/src/lite/lite-transform-style.js create mode 100644 ace-loader/src/lite/lite-transform-template.js create mode 100644 ace-loader/src/lite/lite-utils.js create mode 100644 ace-loader/src/loader-gen.js create mode 100644 ace-loader/src/manifest-loader.js create mode 100644 ace-loader/src/manifest-plugin.js create mode 100644 ace-loader/src/module-script.js create mode 100644 ace-loader/src/resource-plugin.js create mode 100644 ace-loader/src/resource-reference-script.js create mode 100644 ace-loader/test/card/expected/commonAttr/commonAttr.json create mode 100644 ace-loader/test/card/expected/event/event.json create mode 100644 ace-loader/test/card/expected/expression/expression.json create mode 100644 ace-loader/test/card/expected/exteriorStyle/exteriorStyle.json create mode 100644 ace-loader/test/card/expected/ifAttr/ifAttr.json create mode 100644 ace-loader/test/card/expected/importCSS/importCSS.json create mode 100644 ace-loader/test/card/expected/importLess/importLess.json create mode 100644 ace-loader/test/card/expected/inlineStyle/inlineStyle.json create mode 100644 ace-loader/test/card/expected/mediaQuery/mediaQuery.json create mode 100644 ace-loader/test/card/expected/privateAttr/privateAttr.json create mode 100644 ace-loader/test/card/expected/showAttr/showAttr.json create mode 100644 ace-loader/test/card/test.js create mode 100644 ace-loader/test/card/testError/common/component/comp/comp.css create mode 100644 ace-loader/test/card/testError/common/component/comp/comp.hml create mode 100644 ace-loader/test/card/testError/common/component/comp/comp.js create mode 100644 ace-loader/test/card/testError/manifest.json create mode 100644 ace-loader/test/card/testError/pages/amimation/amimation.css create mode 100644 ace-loader/test/card/testError/pages/amimation/amimation.hml create mode 100644 ace-loader/test/card/testError/pages/element/element.hml create mode 100644 ace-loader/test/card/testError/pages/for/for.css create mode 100644 ace-loader/test/card/testError/pages/for/for.hml create mode 100644 ace-loader/test/card/testError/pages/pseudoclasses/pseudoclasses.css create mode 100644 ace-loader/test/card/testError/pages/pseudoclasses/pseudoclasses.hml create mode 100644 ace-loader/test/card/testError/pages/selector/selector.css create mode 100644 ace-loader/test/card/testError/pages/selector/selector.hml create mode 100644 ace-loader/test/card/testError/pages/transition/transition.css create mode 100644 ace-loader/test/card/testError/pages/transition/transition.hml create mode 100644 ace-loader/test/card/testcase/common/common.css create mode 100644 ace-loader/test/card/testcase/common/media.css create mode 100644 ace-loader/test/card/testcase/manifest.json create mode 100644 ace-loader/test/card/testcase/pages/commonAttr/commonAttr.hml create mode 100644 ace-loader/test/card/testcase/pages/commonAttr/commonAttr.json create mode 100644 ace-loader/test/card/testcase/pages/event/event.hml create mode 100644 ace-loader/test/card/testcase/pages/event/event.json create mode 100644 ace-loader/test/card/testcase/pages/expression/expression.hml create mode 100644 ace-loader/test/card/testcase/pages/expression/expression.json create mode 100644 ace-loader/test/card/testcase/pages/exteriorStyle/exteriorStyle.css create mode 100644 ace-loader/test/card/testcase/pages/exteriorStyle/exteriorStyle.hml create mode 100644 ace-loader/test/card/testcase/pages/ifAttr/ifAttr.hml create mode 100644 ace-loader/test/card/testcase/pages/ifAttr/ifAttr.json create mode 100644 ace-loader/test/card/testcase/pages/importCSS/importCSS.css create mode 100644 ace-loader/test/card/testcase/pages/importCSS/importCSS.hml create mode 100644 ace-loader/test/card/testcase/pages/importLess/importLess.hml create mode 100644 ace-loader/test/card/testcase/pages/importLess/importLess.less create mode 100644 ace-loader/test/card/testcase/pages/inlineStyle/inlineStyle.hml create mode 100644 ace-loader/test/card/testcase/pages/mediaQuery/mediaQuery.css create mode 100644 ace-loader/test/card/testcase/pages/mediaQuery/mediaQuery.hml create mode 100644 ace-loader/test/card/testcase/pages/privateAttr/privateAttr.hml create mode 100644 ace-loader/test/card/testcase/pages/showAttr/showAttr.hml create mode 100644 ace-loader/test/card/testcase/pages/showAttr/showAttr.json create mode 100644 ace-loader/test/lite/commandTest/compile.js create mode 100644 ace-loader/test/lite/commandTest/compile.test.js create mode 100644 ace-loader/test/lite/customize.js create mode 100644 ace-loader/test/lite/expected/attribute.js create mode 100644 ace-loader/test/lite/expected/bubble.js create mode 100644 ace-loader/test/lite/expected/class.js create mode 100644 ace-loader/test/lite/expected/event.js create mode 100644 ace-loader/test/lite/expected/expression.js create mode 100644 ace-loader/test/lite/expected/exteriorStyle.js create mode 100644 ace-loader/test/lite/expected/forDirective.js create mode 100644 ace-loader/test/lite/expected/ifDirective.js create mode 100644 ace-loader/test/lite/expected/importJS.js create mode 100644 ace-loader/test/lite/expected/inlineStyle.js create mode 100644 ace-loader/test/lite/expected/music.js create mode 100644 ace-loader/test/lite/expected/sick.js create mode 100644 ace-loader/test/lite/test.js create mode 100644 ace-loader/test/lite/testcase/app.js create mode 100644 ace-loader/test/lite/testcase/i18n/zh-CN.json create mode 100644 ace-loader/test/lite/testcase/manifest.json create mode 100644 ace-loader/test/lite/testcase/pages/attribute/attribute.hml create mode 100644 ace-loader/test/lite/testcase/pages/bubble/bubble.hml create mode 100644 ace-loader/test/lite/testcase/pages/class/class.hml create mode 100644 ace-loader/test/lite/testcase/pages/event/event.hml create mode 100644 ace-loader/test/lite/testcase/pages/expression/expression.hml create mode 100644 ace-loader/test/lite/testcase/pages/exteriorStyle/exteriorStyle.css create mode 100644 ace-loader/test/lite/testcase/pages/exteriorStyle/exteriorStyle.hml create mode 100644 ace-loader/test/lite/testcase/pages/forDirective/forDirective.hml create mode 100644 ace-loader/test/lite/testcase/pages/ifDirective/ifDirective.hml create mode 100644 ace-loader/test/lite/testcase/pages/importJS/importJS.hml create mode 100644 ace-loader/test/lite/testcase/pages/importJS/importJS.js create mode 100644 ace-loader/test/lite/testcase/pages/inlineStyle/inlineStyle.hml create mode 100644 ace-loader/test/lite/testcase/pages/music/music.css create mode 100644 ace-loader/test/lite/testcase/pages/music/music.hml create mode 100644 ace-loader/test/lite/testcase/pages/music/music.js create mode 100644 ace-loader/test/lite/testcase/pages/sick/sick.css create mode 100644 ace-loader/test/lite/testcase/pages/sick/sick.hml create mode 100644 ace-loader/test/lite/testcase/pages/sick/sick.js create mode 100644 ace-loader/test/rich/common/css/common.css create mode 100644 ace-loader/test/rich/common/css/media.css create mode 100644 ace-loader/test/rich/expected/class.js create mode 100644 ace-loader/test/rich/expected/commonAttr.js create mode 100644 ace-loader/test/rich/expected/event.js create mode 100644 ace-loader/test/rich/expected/expression.js create mode 100644 ace-loader/test/rich/expected/exteriorStyle.js create mode 100644 ace-loader/test/rich/expected/forDirective.js create mode 100644 ace-loader/test/rich/expected/ifDirective.js create mode 100644 ace-loader/test/rich/expected/importCSS.js create mode 100644 ace-loader/test/rich/expected/importJS.js create mode 100644 ace-loader/test/rich/expected/inlineStyle.js create mode 100644 ace-loader/test/rich/expected/mediaQuery.js create mode 100644 ace-loader/test/rich/expected/privateAttr.js create mode 100644 ace-loader/test/rich/expected/uncommonAttr.js create mode 100644 ace-loader/test/rich/test.js create mode 100644 ace-loader/test/rich/testcase/app.js create mode 100644 ace-loader/test/rich/testcase/manifest.json create mode 100644 ace-loader/test/rich/testcase/pages/class/class.hml create mode 100644 ace-loader/test/rich/testcase/pages/class/class.js create mode 100644 ace-loader/test/rich/testcase/pages/commonAttr/commonAttr.hml create mode 100644 ace-loader/test/rich/testcase/pages/commonAttr/commonAttr.js create mode 100644 ace-loader/test/rich/testcase/pages/event/event.hml create mode 100644 ace-loader/test/rich/testcase/pages/event/event.js create mode 100644 ace-loader/test/rich/testcase/pages/expression/expression.hml create mode 100644 ace-loader/test/rich/testcase/pages/expression/expression.js create mode 100644 ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.css create mode 100644 ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.hml create mode 100644 ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.js create mode 100644 ace-loader/test/rich/testcase/pages/forDirective/forDirective.hml create mode 100644 ace-loader/test/rich/testcase/pages/forDirective/forDirective.js create mode 100644 ace-loader/test/rich/testcase/pages/ifDirective/ifDirective.hml create mode 100644 ace-loader/test/rich/testcase/pages/ifDirective/ifDirective.js create mode 100644 ace-loader/test/rich/testcase/pages/importCSS/importCSS.css create mode 100644 ace-loader/test/rich/testcase/pages/importCSS/importCSS.hml create mode 100644 ace-loader/test/rich/testcase/pages/importCSS/importCSS.js create mode 100644 ace-loader/test/rich/testcase/pages/importJS/importJS.hml create mode 100644 ace-loader/test/rich/testcase/pages/importJS/importJS.js create mode 100644 ace-loader/test/rich/testcase/pages/inlineStyle/inlineStyle.hml create mode 100644 ace-loader/test/rich/testcase/pages/inlineStyle/inlineStyle.js create mode 100644 ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.css create mode 100644 ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.hml create mode 100644 ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.js create mode 100644 ace-loader/test/rich/testcase/pages/privateAttr/privateAttr.hml create mode 100644 ace-loader/test/rich/testcase/pages/privateAttr/privateAttr.js create mode 100644 ace-loader/test/rich/testcase/pages/uncommonAttr/uncommonAttr.hml create mode 100644 ace-loader/test/rich/testcase/pages/uncommonAttr/uncommonAttr.js create mode 100644 ace-loader/uglify-source.js create mode 100644 ace-loader/webpack.lite.config.js create mode 100644 ace-loader/webpack.rich.config.js create mode 100644 ace-loader/webpack.router.config.js create mode 100644 build_ace_loader_library.py create mode 100644 prebuilts/babel.config.js create mode 100644 prebuilts/uglify-source.js diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 000000000..8fd4039dc --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,94 @@ +# Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. + +import("//build/ohos.gni") +import("//build/ohos/ace/ace.gni") +import("//foundation/ace/ace_engine/ace_config.gni") + +ace_loader_lib_dir = + get_label_info(":build_ace_loader_library", "target_out_dir") + "/lib" + +action("build_ace_loader_library") { + script = "//foundation/ace/huawei_proprietary/tools/ace-loader/build_ace_loader_library.py" + depfile = "$target_gen_dir/$target_name.d" + outputs = [ ace_loader_lib_dir ] + + _ace_loader_dir = + "//foundation/ace/huawei_proprietary/tools/ace-loader/ace-loader" + _ace_toolkit_dir = "//prebuilts/ace-toolkit/ace-loader/linux-x64" + + _module_source_js = _ace_loader_dir + "/module-source.js" + + _babel_js = _ace_toolkit_dir + "/node_modules/@babel/cli/bin/babel.js" + _babel_config_js = _ace_toolkit_dir + "/babel.config.js" + _uglify_source_js = _ace_toolkit_dir + "/uglify-source.js" + + inputs = [ + _babel_config_js, + _babel_js, + _module_source_js, + _uglify_source_js, + ] + + # different host platform nodejs tool directory + if (host_os == "linux") { + nodejs_path = + "//prebuilts/ace-toolkit/nodejs/node-v12.18.4-linux-x64/bin/node" + } else if (host_os == "mac") { + nodejs_path = + "//prebuilts/ace-toolkit/nodejs/node-v12.18.4-darwin-x64/bin/node" + } else { + assert(false, "Unsupported host_os: $host_os") + } + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--node", + rebase_path(nodejs_path, root_build_dir), + "--babel-js", + rebase_path(_babel_js, root_build_dir), + "--weex-loader-src-dir", + rebase_path(_ace_loader_dir + "/third_party/weex-loader/src", + root_build_dir), + "--ace-loader-src-dir", + rebase_path(_ace_loader_dir + "/src", root_build_dir), + "--babel-config-js", + rebase_path(_babel_config_js, root_build_dir), + "--module-source-js", + rebase_path(_module_source_js, root_build_dir), + "--uglify-source-js", + rebase_path(_uglify_source_js, root_build_dir), + "--output-dir", + rebase_path(ace_loader_lib_dir, root_build_dir), + ] +} + +ohos_copy("ace_loader") { + sources = [ + "ace-loader/.npmignore", + "ace-loader/babel.config.js", + "ace-loader/index.js", + "ace-loader/main.product.js", + "ace-loader/npm-install.js", + "ace-loader/package-lock.json", + "ace-loader/package.json", + "ace-loader/router", + "ace-loader/sample", + "ace-loader/webpack.lite.config.js", + "ace-loader/webpack.rich.config.js", + "ace-loader/webpack.router.config.js", + ] + outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/$target_name/" + module_install_name = "" + license_file = "//third_party/parse5/LICENSE" +} + +ohos_copy("ace_loader_library") { + deps = [ ":build_ace_loader_library" ] + sources = [ ace_loader_lib_dir ] + outputs = [ target_out_dir + "/$target_name" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" + license_file = "//third_party/weex-loader/NOTICE" +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..4947287f7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,177 @@ + + 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 \ No newline at end of file diff --git a/ace-loader/.eslintrc.js b/ace-loader/.eslintrc.js new file mode 100644 index 000000000..9e738f188 --- /dev/null +++ b/ace-loader/.eslintrc.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +module.exports = { + env: { + browser: true, + es6: true, + node: true, + }, + extends: ['google'], + globals: { + profiler: 'readonly', + initStyleSheet: 'readonly', + }, + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + }, + rules: { + 'comma-dangle': ['error', 'always-multiline'], + 'object-curly-spacing': ['error', 'always'], + 'max-len': ['error', { 'code': 120 }], + }, +}; diff --git a/ace-loader/.gitignore b/ace-loader/.gitignore new file mode 100644 index 000000000..1f5cced8c --- /dev/null +++ b/ace-loader/.gitignore @@ -0,0 +1,3 @@ +node_modules +lib +build \ No newline at end of file diff --git a/ace-loader/.npmignore b/ace-loader/.npmignore new file mode 100644 index 000000000..246c4aa25 --- /dev/null +++ b/ace-loader/.npmignore @@ -0,0 +1,3 @@ +node_modules +src +test diff --git a/ace-loader/README.md b/ace-loader/README.md new file mode 100644 index 000000000..4c2573346 --- /dev/null +++ b/ace-loader/README.md @@ -0,0 +1,27 @@ +# Ace Loader + +A webpack loader for Ace. + +## Install Dependencies under the ace-loader dir. + +npm install + +## Build built-in sample for Rich devices under the ace-loader dir. + +npm run rich + +## Build built-in sample for Lite devices under the ace-loader dir. + +npm run lite + +## How to build custom ace project + +Windows: +Step 1. set aceModuleRoot=path/to/your/ace/project +Step 2. set aceModuleBuild=path/to/your/jsbundle/build +Step 3. node ./node_modules/webpack/bin/webpack.js --config webpack.rich.config.js + +Linux: +Step 1. export aceModuleRoot=path/to/your/ace/project +Step 2. export aceModuleBuild=path/to/your/jsbundle/build +Step 3. node ./node_modules/webpack/bin/webpack.js --config webpack.rich.config.js diff --git a/ace-loader/babel.config.js b/ace-loader/babel.config.js new file mode 100644 index 000000000..c56c70303 --- /dev/null +++ b/ace-loader/babel.config.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +module.exports = function(api) { + api.cache(true); + + const presets = ['@babel/preset-env']; + const plugins = [ + '@babel/plugin-transform-modules-commonjs', + '@babel/plugin-proposal-class-properties', + '@babel/plugin-transform-runtime', + [ + '@babel/plugin-transform-arrow-functions', + { + spec: true, + }, + ], + ]; + + return { + presets, + plugins, + }; +}; diff --git a/ace-loader/index.js b/ace-loader/index.js new file mode 100644 index 000000000..d92b13813 --- /dev/null +++ b/ace-loader/index.js @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +module.exports = require('./lib/loader') diff --git a/ace-loader/main.product.js b/ace-loader/main.product.js new file mode 100644 index 000000000..86caa53cd --- /dev/null +++ b/ace-loader/main.product.js @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +var path = require('path') +var fs = require('fs') + +const red = '\u001b[31m'; +const reset = '\u001b[39m'; + +function deleteFolderRecursive(url) { + let files = []; + if (fs.existsSync(url)) { + files = fs.readdirSync(url); + files.forEach(function(file) { + const curPath = path.join(url, file); + if (fs.statSync(curPath).isDirectory()) { + deleteFolderRecursive(curPath); + } else { + fs.unlinkSync(curPath); + } + }); + fs.rmdir(url, function(err) {}); + } +} + +function readManifest(manifestFilePath) { + let manifest = {}; + try { + const jsonString = fs.readFileSync(manifestFilePath).toString() + manifest = JSON.parse(jsonString) + } catch (e) { + throw Error('\u001b[31m' + 'ERROR: the manifest file is lost or format is invalid.' + '\u001b[39m').message + } + return manifest; +} + +function loadEntryObj(manifest, projectPath, device_level) { + let entryObj = {} + const appJSPath = path.resolve(projectPath, 'app.js'); + if (device_level === 'card') { + entryObj = addPageEntryObj(manifest, projectPath); + } else { + if (!fs.existsSync(appJSPath)) { + throw Error(red + 'ERROR: missing app.js' + reset).message; + } + entryObj['./app'] = projectPath + '/app.js?entry'; + } + return entryObj; +} + +function addPageEntryObj(manifest, projectPath) { + let entryObj = {}; + const pages = manifest.pages; + if (pages === undefined) { + throw Error('ERROR: missing pages').message; + } + pages.forEach((element) => { + entryObj['./' + element] = projectPath + path.sep + element + '.hml?entry' + }) + return entryObj; +} + +module.exports = { + deleteFolderRecursive: deleteFolderRecursive, + readManifest: readManifest, + loadEntryObj: loadEntryObj +}; diff --git a/ace-loader/module-source.js b/ace-loader/module-source.js new file mode 100644 index 000000000..094d268c9 --- /dev/null +++ b/ace-loader/module-source.js @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const fs = require('fs'); +const path = require('path'); + +const exists = function(src, dst, callback) { + if (src.match(/\/test$/)) { + return; + } + fs.exists(dst, function(exists) { + if(exists){ + callback(src, dst); + } else{ + fs.mkdir(dst, function() { + callback(src, dst); + }); + } + }); +} + +stat = fs.stat; +const copy = function(src, dst){ + fs.readdir(src, function(err, paths){ + if(err){ + throw err; + } + paths.forEach(function(_path){ + var _src = src + '/' + _path, + _dst = dst + '/' + _path, + readable, writable; + stat(_src, function(err, st){ + if(err){ + throw err; + } + if(st.isFile()){ + const pathInfo = path.parse(_src); + if (pathInfo.name == 'gulpfile' || pathInfo.ext != '.js') { + return; + } + readable = fs.createReadStream(_src); + writable = fs.createWriteStream(_dst); + readable.pipe(writable); + } else if(st.isDirectory()){ + exists(_src, _dst, copy); + } + }); + }); + }); +}; + +function copyResource(src, dist) { + exists(path.resolve(__dirname, src), dist, copy); +} + +copyResource(path.resolve(__dirname, './plugin/templater'), process.argv[2] + '/templater'); +copyResource(path.resolve(__dirname, './plugin/theme'), process.argv[2] + '/theme'); +copyResource(path.resolve(__dirname, './plugin/codegen'), process.argv[2] + '/codegen'); +copyResource(path.resolve(__dirname, './third_party/weex-loader/deps/weex-scripter'), process.argv[2] + '/scripter'); +copyResource(path.resolve(__dirname, './third_party/weex-loader/deps/weex-styler'), process.argv[2] + '/styler'); +copyResource(path.resolve(__dirname, '../../../../../../third_party/parse5/packages/parse5/lib'), process.argv[2] + '/parse'); diff --git a/ace-loader/npm-install.js b/ace-loader/npm-install.js new file mode 100644 index 000000000..bceaf4e66 --- /dev/null +++ b/ace-loader/npm-install.js @@ -0,0 +1,37 @@ +"use strict"; +var path = require("path"); +var fs = require("fs"); +let exec = require('child_process').exec; + +if ( !fs.existsSync(path.resolve(path.join(__dirname, 'bin'), "ark"))) return; + +var build_linux = path.join(__dirname, "bin", "ark", "build"); +var build_win = path.join(__dirname, "bin", "ark", "build-win"); +var build_mac = path.join(__dirname, "bin", "ark", "build-mac"); + +var isWin = !1; +var isMac = !1; + +if (fs.existsSync(path.resolve(path.join(__dirname, 'bin'), "ark/build-win"))) { + isWin = !0; +} else if (fs.existsSync(path.resolve(path.join(__dirname, 'bin'), "ark/build-mac"))) { + isMac = !0; +} else if (!fs.existsSync(path.resolve(path.join(__dirname, 'bin'), "ark/build"))) { + throw Error("Error: find build fail").message; +} + +let cwd; +if (isWin) { + cwd = build_win +} else if (isMac) { + cwd = build_mac +} else { + cwd = build_linux +} + +exec("npm install", { cwd: cwd }, function (err, stdout, stderr) { + console.log("", stdout, ""); + if (err != null) { + throw Error(`npm install filed: ${err}`).message; + } +}); \ No newline at end of file diff --git a/ace-loader/package-lock.json b/ace-loader/package-lock.json new file mode 100644 index 000000000..75f2236e1 --- /dev/null +++ b/ace-loader/package-lock.json @@ -0,0 +1,6423 @@ +{ + "name": "ace-loader", + "version": "1.0.11", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/cli": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.8.4.tgz", + "integrity": "sha512-XXLgAm6LBbaNxaGhMAznXXaxtCWfuv6PIDJ9Alsy9JYTOh+j2jJz+L/162kkfU1j/pTSxK1xGmlwI4pdIMkoag==", + "requires": { + "chokidar": "^2.1.8", + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.0.0", + "lodash": "^4.17.13", + "make-dir": "^2.1.0", + "slash": "^2.0.0", + "source-map": "^0.5.0" + }, + "dependencies": { + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/compat-data": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.6.tgz", + "integrity": "sha512-5QPTrNen2bm7RBc7dsOmcA5hbrS4O2Vhmk5XOL4zWW/zD/hV0iinpefDlkm+tBBy8kDtFaaeEvmAqt+nURAV2g==", + "requires": { + "browserslist": "^4.11.1", + "invariant": "^2.2.4", + "semver": "^5.5.0" + } + }, + "@babel/core": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz", + "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.6", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helpers": "^7.9.6", + "@babel/parser": "^7.9.6", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "@babel/generator": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz", + "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==", + "requires": { + "@babel/types": "^7.9.6", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", + "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", + "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", + "requires": { + "@babel/helper-explode-assignable-expression": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.9.6.tgz", + "integrity": "sha512-x2Nvu0igO0ejXzx09B/1fGBxY9NXQlBW2kZsSxCJft+KHN8t9XWzIvFxtPHnBOAXpVsdxZKZFbRUC8TsNKajMw==", + "requires": { + "@babel/compat-data": "^7.9.6", + "browserslist": "^4.11.1", + "invariant": "^2.2.4", + "levenary": "^1.1.1", + "semver": "^5.5.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.6.tgz", + "integrity": "sha512-6N9IeuyHvMBRyjNYOMJHrhwtu4WJMrYf8hVbEHD3pbbbmNOk1kmXSQs7bA4dYDUaIx4ZEzdnvo6NwC3WHd/Qow==", + "requires": { + "@babel/helper-function-name": "^7.9.5", + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.9.6", + "@babel/helper-split-export-declaration": "^7.8.3" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", + "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-regex": "^7.8.3", + "regexpu-core": "^4.7.0" + } + }, + "@babel/helper-define-map": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", + "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/types": "^7.8.3", + "lodash": "^4.17.13" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", + "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", + "requires": { + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-function-name": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", + "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.9.5" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", + "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", + "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-module-imports": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", + "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-module-transforms": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", + "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", + "requires": { + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-simple-access": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/template": "^7.8.6", + "@babel/types": "^7.9.0", + "lodash": "^4.17.13" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", + "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==" + }, + "@babel/helper-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", + "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", + "requires": { + "lodash": "^4.17.13" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", + "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-wrap-function": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-replace-supers": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz", + "integrity": "sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA==", + "requires": { + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6" + } + }, + "@babel/helper-simple-access": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", + "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", + "requires": { + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==" + }, + "@babel/helper-wrap-function": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", + "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helpers": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.6.tgz", + "integrity": "sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw==", + "requires": { + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6" + } + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz", + "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==" + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", + "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz", + "integrity": "sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", + "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", + "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", + "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.6.tgz", + "integrity": "sha512-Ga6/fhGqA9Hj+y6whNpPv8psyaK5xzrQwSPsGPloVkvmH+PqW1ixdnfJ9uIO06OjQNYol3PMnfmJ8vfZtkzF+A==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.9.5" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", + "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", + "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.8", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", + "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", + "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", + "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", + "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", + "requires": { + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", + "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", + "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "lodash": "^4.17.13" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz", + "integrity": "sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-define-map": "^7.8.3", + "@babel/helper-function-name": "^7.9.5", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-split-export-declaration": "^7.8.3", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", + "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz", + "integrity": "sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", + "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", + "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", + "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", + "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", + "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", + "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", + "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.6.tgz", + "integrity": "sha512-zoT0kgC3EixAyIAU+9vfaUVKTv9IxBDSabgHoUCBP6FqEJ+iNiN7ip7NBKcYqbfUDfuC2mFCbM7vbu4qJgOnDw==", + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz", + "integrity": "sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ==", + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-simple-access": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.6.tgz", + "integrity": "sha512-NW5XQuW3N2tTHim8e1b7qGy7s0kZ2OH3m5octc49K1SdAKGxYxeIx7hiIz05kS1R2R+hOWcsr1eYwcGhrdHsrg==", + "requires": { + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz", + "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==", + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", + "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", + "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", + "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz", + "integrity": "sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA==", + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", + "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", + "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", + "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.12.10", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.10.tgz", + "integrity": "sha512-xOrUfzPxw7+WDm9igMgQCbO3cJKymX7dFdsgRr1eu9n3KjjyU4pptIXbXPseQDquw+W+RuJEJMHKHNsPNNm3CA==", + "requires": { + "@babel/helper-module-imports": "^7.12.5", + "@babel/helper-plugin-utils": "^7.10.4", + "semver": "^5.5.1" + }, + "dependencies": { + "@babel/helper-module-imports": { + "version": "7.12.5", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", + "requires": { + "@babel/types": "^7.12.5" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/babel/helper-plugin-utils/7.10.4/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha1-L3WoMSadT2d95JmG3/WZJ1M883U=" + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + }, + "@babel/types": { + "version": "7.12.12", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/@babel/types/-/types-7.12.12.tgz", + "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/lodash/4.17.20/lodash-4.17.20.tgz", + "integrity": "sha1-tEqbYpe8tpjxxRo1RaKzs2jVnFI=" + } + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", + "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", + "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", + "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-regex": "^7.8.3" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", + "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", + "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", + "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/preset-env": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.6.tgz", + "integrity": "sha512-0gQJ9RTzO0heXOhzftog+a/WyOuqMrAIugVYxMYf83gh1CQaQDjMtsOpqOwXyDL/5JcWsrCm8l4ju8QC97O7EQ==", + "requires": { + "@babel/compat-data": "^7.9.6", + "@babel/helper-compilation-targets": "^7.9.6", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-proposal-async-generator-functions": "^7.8.3", + "@babel/plugin-proposal-dynamic-import": "^7.8.3", + "@babel/plugin-proposal-json-strings": "^7.8.3", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-numeric-separator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.9.6", + "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.9.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.8.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.8.3", + "@babel/plugin-transform-async-to-generator": "^7.8.3", + "@babel/plugin-transform-block-scoped-functions": "^7.8.3", + "@babel/plugin-transform-block-scoping": "^7.8.3", + "@babel/plugin-transform-classes": "^7.9.5", + "@babel/plugin-transform-computed-properties": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.9.5", + "@babel/plugin-transform-dotall-regex": "^7.8.3", + "@babel/plugin-transform-duplicate-keys": "^7.8.3", + "@babel/plugin-transform-exponentiation-operator": "^7.8.3", + "@babel/plugin-transform-for-of": "^7.9.0", + "@babel/plugin-transform-function-name": "^7.8.3", + "@babel/plugin-transform-literals": "^7.8.3", + "@babel/plugin-transform-member-expression-literals": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.9.6", + "@babel/plugin-transform-modules-commonjs": "^7.9.6", + "@babel/plugin-transform-modules-systemjs": "^7.9.6", + "@babel/plugin-transform-modules-umd": "^7.9.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", + "@babel/plugin-transform-new-target": "^7.8.3", + "@babel/plugin-transform-object-super": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.9.5", + "@babel/plugin-transform-property-literals": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.7", + "@babel/plugin-transform-reserved-words": "^7.8.3", + "@babel/plugin-transform-shorthand-properties": "^7.8.3", + "@babel/plugin-transform-spread": "^7.8.3", + "@babel/plugin-transform-sticky-regex": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/plugin-transform-typeof-symbol": "^7.8.4", + "@babel/plugin-transform-unicode-regex": "^7.8.3", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.9.6", + "browserslist": "^4.11.1", + "core-js-compat": "^3.6.2", + "invariant": "^2.2.2", + "levenary": "^1.1.1", + "semver": "^5.5.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", + "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", + "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/traverse": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz", + "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.6", + "@babel/helper-function-name": "^7.9.5", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.9.6", + "@babel/types": "^7.9.6", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz", + "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==", + "requires": { + "@babel/helper-validator-identifier": "^7.9.5", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "@discoveryjs/json-ext": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz", + "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==" + }, + "@jimp/bmp": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.12.1.tgz", + "integrity": "sha512-t16IamuBMv4GiGa1VAMzsgrVKVANxXG81wXECzbikOUkUv7pKJ2vHZDgkLBEsZQ9sAvFCneM1+yoSRpuENrfVQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1", + "bmp-js": "^0.1.0" + } + }, + "@jimp/core": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.12.1.tgz", + "integrity": "sha512-mWfjExYEjHxBal+1gPesGChOQBSpxO7WUQkrO9KM7orboitOdQ15G5UA75ce7XVZ+5t+FQPOLmVkVZzzTQSEJA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1", + "any-base": "^1.1.0", + "buffer": "^5.2.0", + "exif-parser": "^0.1.12", + "file-type": "^9.0.0", + "load-bmfont": "^1.3.1", + "mkdirp": "^0.5.1", + "phin": "^2.9.1", + "pixelmatch": "^4.0.2", + "tinycolor2": "^1.4.1" + }, + "dependencies": { + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + } + } + }, + "@jimp/custom": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.12.1.tgz", + "integrity": "sha512-bVClp8FEJ/11GFTKeRTrfH7NgUWvVO5/tQzO/68aOwMIhbz9BOYQGh533K9+mSy29VjZJo8jxZ0C9ZwYHuFwfA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/core": "^0.12.1" + } + }, + "@jimp/gif": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.12.1.tgz", + "integrity": "sha512-cGn/AcvMGUGcqR6ByClGSnrja4AYmTwsGVXTQ1+EmfAdTiy6ztGgZCTDpZ/tq4SpdHXwm9wDHez7damKhTrH0g==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1", + "omggif": "^1.0.9" + } + }, + "@jimp/jpeg": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.12.1.tgz", + "integrity": "sha512-UoCUHbKLj2CDCETd7LrJnmK/ExDsSfJXmc1pKkfgomvepjXogdl2KTHf141wL6D+9CfSD2VBWQLC5TvjMvcr9A==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1", + "jpeg-js": "^0.4.0" + } + }, + "@jimp/plugin-blit": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.12.1.tgz", + "integrity": "sha512-VRBB6bx6EpQuaH0WX8ytlGNqUQcmuxXBbzL3e+cD0W6MluYibzQy089okvXcyUS72Q+qpSMmUDCVr3pDqLAsSA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-blur": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.12.1.tgz", + "integrity": "sha512-rTFY0yrwVJFNgNsAlYGn2GYCRLVEcPQ6cqAuhNylXuR/7oH3Acul+ZWafeKtvN8D8uMlth/6VP74gruXvwffZw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-circle": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-circle/-/plugin-circle-0.12.1.tgz", + "integrity": "sha512-+/OiBDjby7RBbQoDX8ZsqJRr1PaGPdTaaKUVGAsrE7KCNO9ODYNFAizB9lpidXkGgJ4Wx5R4mJy21i22oY/a4Q==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-color": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.12.1.tgz", + "integrity": "sha512-xlnK/msWN4uZ+Bu7+UrCs9oMzTSA9QE0jWFnF3h0aBsD8t1LGxozkckHe8nHtC/y/sxIa8BGKSfkiaW+r6FbnA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1", + "tinycolor2": "^1.4.1" + } + }, + "@jimp/plugin-contain": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.12.1.tgz", + "integrity": "sha512-WZ/D6G0jhnBh2bkBh610PEh/caGhAUIAxYLsQsfSSlOxPsDhbj3S6hMbFKRgnDvf0hsd5zTIA0j1B0UG4kh18A==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-cover": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.12.1.tgz", + "integrity": "sha512-ddWwTQO40GcabJ2UwUYCeuNxnjV4rBTiLprnjGMqAJCzdz3q3Sp20FkRf+H+E22k2v2LHss8dIOFOF4i6ycr9Q==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-crop": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.12.1.tgz", + "integrity": "sha512-CKjVkrNO8FDZKYVpMireQW4SgKBSOdF+Ip/1sWssHHe77+jGEKqOjhYju+VhT3dZJ3+75rJNI9II7Kethp+rTw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-displace": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.12.1.tgz", + "integrity": "sha512-MQAw2iuf1/bVJ6P95WWTLA+WBjvIZ7TeGBerkvBaTK8oWdj+NSLNRIYOIoyPbZ7DTL8f1SN4Vd6KD6BZaoWrwg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-dither": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.12.1.tgz", + "integrity": "sha512-mCrBHdx2ViTLJDLcrobqGLlGhZF/Mq41bURWlElQ2ArvrQ3/xR52We9DNDfC08oQ2JVb6q3v1GnCCdn0KNojGQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-fisheye": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-fisheye/-/plugin-fisheye-0.12.1.tgz", + "integrity": "sha512-CHvYSXtHNplzkkYzB44tENPDmvfUHiYCnAETTY+Hx58kZ0w8ERZ+OiLhUmiBcvH/QHm/US1iiNjgGUAfeQX6dg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-flip": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.12.1.tgz", + "integrity": "sha512-xi+Yayrnln8A/C9E3yQBExjxwBSeCkt/ZQg1CxLgszVyX/3Zo8+nkV8MJYpkTpj8LCZGTOKlsE05mxu/a3lbJQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-gaussian": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.12.1.tgz", + "integrity": "sha512-7O6eKlhL37hsLfV6WAX1Cvce7vOqSwL1oWbBveC1agutDlrtvcTh1s2mQ4Pde654hCJu55mq1Ur10+ote5j3qw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-invert": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.12.1.tgz", + "integrity": "sha512-JTAs7A1Erbxwl+7ph7tgcb2PZ4WzB+3nb2WbfiWU8iCrKj17mMDSc5soaCCycn8wfwqvgB1vhRfGpseOLWxsuQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-mask": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.12.1.tgz", + "integrity": "sha512-bnDdY0RO/x5Mhqoy+056SN1wEj++sD4muAKqLD2CIT8Zq5M/0TA4hkdf/+lwFy3H2C0YTK39PSE9xyb4jPX3kA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-normalize": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.12.1.tgz", + "integrity": "sha512-4kSaI4JLM/PNjHwbnAHgyh51V5IlPfPxYvsZyZ1US32pebWtocxSMaSuOaJUg7OGSkwSDBv81UR2h5D+Dz1b5A==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-print": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.12.1.tgz", + "integrity": "sha512-T0lNS3qU9SwCHOEz7AGrdp50+gqiWGZibOL3350/X/dqoFs1EvGDjKVeWncsGCyLlpfd7M/AibHZgu8Fx2bWng==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1", + "load-bmfont": "^1.4.0" + } + }, + "@jimp/plugin-resize": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.12.1.tgz", + "integrity": "sha512-sbNn4tdBGcgGlPt9XFxCuDl4ZOoxa8/Re8nAikyxYhRss2Dqz91ARbBQxOf1vlUGeicQMsjEuWbPQAogTSJRug==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-rotate": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.12.1.tgz", + "integrity": "sha512-RYkLzwG2ervG6hHy8iepbIVeWdT1kz4Qz044eloqo6c66MK0KAqp228YI8+CAKm0joQnVDC/A0FgRIj/K8uyAw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-scale": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.12.1.tgz", + "integrity": "sha512-zjNVI1fUj+ywfG78T1ZU33g9a5sk4rhEQkkhtny8koAscnVsDN2YaZEKoFli54kqaWh5kSS5DDL7a/9pEfXnFQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-shadow": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-shadow/-/plugin-shadow-0.12.1.tgz", + "integrity": "sha512-Z82IwvunXWQ2jXegd3W3TYUXpfJcEvNbHodr7Z+oVnwhM1OoQ5QC6RSRQwsj2qXIhbGffQjH8eguHgEgAV+u5w==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugin-threshold": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugin-threshold/-/plugin-threshold-0.12.1.tgz", + "integrity": "sha512-PFezt5fSk0q+xKvdpuv0eLggy2I7EgYotrK8TRZOT0jimuYFXPF0Z514c6szumoW5kEsRz04L1HkPT1FqI97Yg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1" + } + }, + "@jimp/plugins": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.12.1.tgz", + "integrity": "sha512-7+Yp29T6BbYo+Oqnc+m7A5AH+O+Oy5xnxvxlfmsp48+SuwEZ4akJp13Gu2PSmRlylENzR7MlWOxzhas5ERNlIg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/plugin-blit": "^0.12.1", + "@jimp/plugin-blur": "^0.12.1", + "@jimp/plugin-circle": "^0.12.1", + "@jimp/plugin-color": "^0.12.1", + "@jimp/plugin-contain": "^0.12.1", + "@jimp/plugin-cover": "^0.12.1", + "@jimp/plugin-crop": "^0.12.1", + "@jimp/plugin-displace": "^0.12.1", + "@jimp/plugin-dither": "^0.12.1", + "@jimp/plugin-fisheye": "^0.12.1", + "@jimp/plugin-flip": "^0.12.1", + "@jimp/plugin-gaussian": "^0.12.1", + "@jimp/plugin-invert": "^0.12.1", + "@jimp/plugin-mask": "^0.12.1", + "@jimp/plugin-normalize": "^0.12.1", + "@jimp/plugin-print": "^0.12.1", + "@jimp/plugin-resize": "^0.12.1", + "@jimp/plugin-rotate": "^0.12.1", + "@jimp/plugin-scale": "^0.12.1", + "@jimp/plugin-shadow": "^0.12.1", + "@jimp/plugin-threshold": "^0.12.1", + "timm": "^1.6.1" + } + }, + "@jimp/png": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.12.1.tgz", + "integrity": "sha512-tOUSJMJzcMAN82F9/Q20IToquIVWzvOe/7NIpVQJn6m+Lq6TtVmd7d8gdcna9AEFm2FIza5lhq2Kta6Xj0KXhQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.12.1", + "pngjs": "^3.3.3" + } + }, + "@jimp/tiff": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.12.1.tgz", + "integrity": "sha512-bzWDgv3202TKhaBGzV9OFF0PVQWEb4194h9kv5js348SSnbCusz/tzTE1EwKrnbDZThZPgTB1ryKs7D+Q9Mhmg==", + "requires": { + "@babel/runtime": "^7.7.2", + "utif": "^2.0.1" + } + }, + "@jimp/types": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.12.1.tgz", + "integrity": "sha512-hg5OKXpWWeKGuDrfibrjWWhr7hqb7f552wqnPWSLQpVrdWgjH+hpOv6cOzdo9bsU78qGTelZJPxr0ERRoc+MhQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/bmp": "^0.12.1", + "@jimp/gif": "^0.12.1", + "@jimp/jpeg": "^0.12.1", + "@jimp/png": "^0.12.1", + "@jimp/tiff": "^0.12.1", + "timm": "^1.6.1" + } + }, + "@jimp/utils": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.12.1.tgz", + "integrity": "sha512-EjPkDQOzV/oZfbolEUgFT6SE++PtCccVBvjuACkttyCfl0P2jnpR49SwstyVLc2u8AwBAZEHHAw9lPYaMjtbXQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "regenerator-runtime": "^0.13.3" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" + }, + "@nodelib/fs.walk": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz", + "integrity": "sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA==", + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/eslint": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", + "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==" + }, + "@types/json-schema": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz", + "integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg==" + }, + "@types/node": { + "version": "16.4.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.13.tgz", + "integrity": "sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg==" + }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz", + "integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==" + }, + "@webpack-cli/info": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.3.0.tgz", + "integrity": "sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w==", + "requires": { + "envinfo": "^7.7.3" + } + }, + "@webpack-cli/serve": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz", + "integrity": "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw==" + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + }, + "acorn": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==" + }, + "acorn-import-assertions": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz", + "integrity": "sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA==" + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "ajv": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==" + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "any-base": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/any-base/-/any-base-1.1.0.tgz", + "integrity": "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg==" + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "optional": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "optional": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "optional": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "optional": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "optional": true + }, + "aws4": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "optional": true + }, + "babel-loader": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", + "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==", + "requires": { + "find-cache-dir": "^2.1.0", + "loader-utils": "^1.4.0", + "mkdirp": "^0.5.3", + "pify": "^4.0.1", + "schema-utils": "^2.6.5" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-require-context-hook": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-require-context-hook/-/babel-plugin-require-context-hook-1.0.0.tgz", + "integrity": "sha512-EMZD1563QUqLhzrqcThk759RhuNVX/ZJdrtGK6drwzgvnR+ARjWyXIHPbu+tUNaMGtPz/gQeAM2M6VUw2UiUeA==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" + }, + "bmp-js": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.1.0.tgz", + "integrity": "sha1-4Fpj95amwf8l9Hcex62twUjAcjM=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserslist": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", + "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "requires": { + "caniuse-lite": "^1.0.30001043", + "electron-to-chromium": "^1.3.413", + "node-releases": "^1.1.53", + "pkg-up": "^2.0.0" + } + }, + "buffer-equal": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", + "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=" + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "caniuse-lite": { + "version": "1.0.30001205", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", + "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "optional": true + }, + "chai": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", + "dev": true, + "requires": { + "assertion-error": "^1.0.1", + "deep-eql": "^0.1.3", + "type-detect": "^1.0.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "fsevents": { + "version": "2.1.3", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public//fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==" + } + } + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "optional": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "copy-webpack-plugin": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-8.1.1.tgz", + "integrity": "sha512-rYM2uzRxrLRpcyPqGceRBDpxxUV8vcDqIKxAUKfcnFpcrPxT5+XvhTxv7XLjo5AvEJFPdAE3zCogG2JVahqgSQ==", + "requires": { + "fast-glob": "^3.2.5", + "glob-parent": "^5.1.1", + "globby": "^11.0.3", + "normalize-path": "^3.0.0", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "schema-utils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz", + "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==", + "requires": { + "@types/json-schema": "^7.0.7", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "core-js-compat": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", + "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==", + "requires": { + "browserslist": "^4.8.5", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==" + } + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" + }, + "css": { + "version": "3.0.0", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "requires": { + "inherits": "^2.0.4", + "source-map": "^0.6.1", + "source-map-resolve": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/source-map/0.6.1/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + }, + "source-map-resolve": { + "version": "0.6.0", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0" + } + } + } + }, + "css-loader": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.5.3.tgz", + "integrity": "sha512-UEr9NH5Lmi7+dguAm+/JSPovNjYbm2k3TK58EiwQHzOHH5Jfq1Y+XoP2bQO6TMn7PptMd0opxxedAWcaSTRKHw==", + "requires": { + "camelcase": "^5.3.1", + "cssesc": "^3.0.0", + "icss-utils": "^4.1.1", + "loader-utils": "^1.2.3", + "normalize-path": "^3.0.0", + "postcss": "^7.0.27", + "postcss-modules-extract-imports": "^2.0.0", + "postcss-modules-local-by-default": "^3.0.2", + "postcss-modules-scope": "^2.2.0", + "postcss-modules-values": "^3.0.0", + "postcss-value-parser": "^4.0.3", + "schema-utils": "^2.6.6", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deccjsunit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/deccjsunit/-/deccjsunit-1.0.3.tgz", + "integrity": "sha512-GER7j7yKoZHFzr9CzWEdTOhR5LuxXV7PkUqL4lcU9+UmutIiDvvBW3rce4nTcbrvCd6DDqOrgqJ/0+GqA2W+Xw==" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dev": true, + "requires": { + "type-detect": "0.1.1" + }, + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", + "dev": true + } + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "optional": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "electron-to-chromium": { + "version": "1.3.434", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.434.tgz", + "integrity": "sha512-WjzGrE6appXvMyc2kH9Ide7OxsgTuRzag9sjQ5AcbOnbS9ut7P1HzOeEbJFLhr81IR7n2Hlr6qTTSGTXLIX5Pg==" + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" + }, + "enhanced-resolve": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", + "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + }, + "dependencies": { + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + } + } + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==" + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "optional": true, + "requires": { + "prr": "~1.0.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-module-lexer": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", + "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==" + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escodegen": { + "version": "2.0.0", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/estraverse/5.2.0/estraverse-5.2.0.tgz", + "integrity": "sha1-MH30JUfmzHMk088DwVXVzbjFOIA=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/source-map/0.6.1/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "optional": true + } + } + }, + "eslint": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.7.0.tgz", + "integrity": "sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.0", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^1.3.0", + "espree": "^7.2.0", + "esquery": "^1.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + } + } + }, + "eslint-config-google": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.14.0.tgz", + "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "dependencies": { + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } + } + } + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "espree": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", + "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "acorn": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", + "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/esprima/4.0.1/esprima-4.0.1.tgz", + "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=" + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exif-parser": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.12.tgz", + "integrity": "sha1-WKnS1ywCwfbwKg70qRZicrd2CSI=" + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "optional": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "optional": true + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + }, + "fast-glob": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.6.tgz", + "integrity": "sha512-GnLuqj/pvQ7pX8/L4J84nijv6sAnlwvSDpMkJi9i7nPmPxGtRPkBSStfvDW5l6nMdX9VWe+pkKWFTgD+vF2QSQ==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/fast-levenshtein/2.0.6/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==" + }, + "fastq": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", + "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", + "requires": { + "reusify": "^1.0.4" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "file-type": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz", + "integrity": "sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==" + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + } + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "optional": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "formatio": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", + "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", + "dev": true, + "requires": { + "samsam": "~1.1" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + }, + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "requires": { + "min-document": "^2.19.0", + "process": "~0.5.1" + }, + "dependencies": { + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + } + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + } + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "optional": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "optional": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=" + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + }, + "icss-utils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz", + "integrity": "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==", + "requires": { + "postcss": "^7.0.14" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "optional": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "requires": { + "find-up": "^4.0.0" + } + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==" + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "optional": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "optional": true + }, + "jest-worker": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", + "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jimp": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.12.1.tgz", + "integrity": "sha512-0soPJif+yjmzmOF+4cF2hyhxUWWpXpQntsm2joJXFFoRcQiPzsG4dbLKYqYPT3Fc6PjZ8MaLtCkDqqckVSfmRw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/custom": "^0.12.1", + "@jimp/plugins": "^0.12.1", + "@jimp/types": "^0.12.1", + "regenerator-runtime": "^0.13.3" + } + }, + "jpeg-js": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.0.tgz", + "integrity": "sha512-960VHmtN1vTpasX/1LupLohdP5odwAT7oK/VSm6mW0M58LbrBnowLAPWAZhWGhDAGjzbMnPXZxzB/QYgBwkN0w==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + } + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "optional": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "optional": true + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "less": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/less/-/less-3.11.1.tgz", + "integrity": "sha512-tlWX341RECuTOvoDIvtFqXsKj072hm3+9ymRBe76/mD6O5ZZecnlAOVDlWAleF2+aohFrxNidXhv2773f6kY7g==", + "requires": { + "clone": "^2.1.2", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "mime": "^1.4.1", + "mkdirp": "^0.5.0", + "promise": "^7.1.1", + "request": "^2.83.0", + "source-map": "~0.6.0", + "tslib": "^1.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } + } + }, + "less-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-5.0.0.tgz", + "integrity": "sha512-bquCU89mO/yWLaUq0Clk7qCsKhsF/TZpJUzETRvJa9KSVEL9SO3ovCvdEHISBhrC81OwC8QSVX7E0bzElZj9cg==", + "requires": { + "clone": "^2.1.1", + "loader-utils": "^1.1.0", + "pify": "^4.0.1" + } + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" + }, + "levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "requires": { + "leven": "^3.1.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/levn/0.3.0/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-bmfont": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.4.0.tgz", + "integrity": "sha512-kT63aTAlNhZARowaNYcY29Fn/QYkc52M3l6V1ifRcPewg2lvUZDAj7R6dXjOL9D0sict76op3T5+odumDSF81g==", + "requires": { + "buffer-equal": "0.0.1", + "mime": "^1.3.4", + "parse-bmfont-ascii": "^1.0.3", + "parse-bmfont-binary": "^1.0.5", + "parse-bmfont-xml": "^1.1.4", + "phin": "^2.9.1", + "xhr": "^2.0.1", + "xtend": "^4.0.0" + } + }, + "loader-runner": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==" + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "lolex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", + "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", + "integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=", + "requires": { + "charenc": "~0.0.1", + "crypt": "~0.0.1", + "is-buffer": "~1.1.1" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", + "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node-releases": { + "version": "1.1.55", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.55.tgz", + "integrity": "sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w==" + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "optional": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, + "omggif": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", + "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/optionator/0.8.3/optionator-0.8.3.tgz", + "integrity": "sha1-hPodA2/p08fiHZmIS2ARZ+yPtJU=", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-bmfont-ascii": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz", + "integrity": "sha1-Eaw8P/WPfCAgqyJ2kHkQjU36AoU=" + }, + "parse-bmfont-binary": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz", + "integrity": "sha1-0Di0dtPp3Z2x4RoLDlOiJ5K2kAY=" + }, + "parse-bmfont-xml": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/parse-bmfont-xml/-/parse-bmfont-xml-1.1.4.tgz", + "integrity": "sha512-bjnliEOmGv3y1aMEfREMBJ9tfL3WR0i0CKPj61DnSLaoxWR3nLrsQrEbCId/8rF4NyRF0cCqisSVXyQYWM+mCQ==", + "requires": { + "xml-parse-from-string": "^1.0.0", + "xml2js": "^0.4.5" + } + }, + "parse-headers": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" + }, + "parse5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-2.2.3.tgz", + "integrity": "sha1-DE/EHBAAxea5PUiwP4CDg3g06fY=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "optional": true + }, + "phin": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/phin/-/phin-2.9.3.tgz", + "integrity": "sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA==" + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "pixelmatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", + "integrity": "sha1-j0fc7FARtHe2fbA8JDvB8wheiFQ=", + "requires": { + "pngjs": "^3.0.0" + } + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + } + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "requires": { + "find-up": "^2.1.0" + } + }, + "pngjs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", + "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==" + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "postcss": { + "version": "7.0.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.30.tgz", + "integrity": "sha512-nu/0m+NtIzoubO+xdAlwZl/u5S5vi/y6BCsoL8D+8IxsD3XvBS8X4YEADNIVXKVuQvduiucnRv+vPIqj56EGMQ==", + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-extract-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", + "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", + "requires": { + "postcss": "^7.0.5" + } + }, + "postcss-modules-local-by-default": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz", + "integrity": "sha512-jM/V8eqM4oJ/22j0gx4jrp63GSvDH6v86OqyTHHUvk4/k1vceipZsaymiZ5PvocqZOl5SFHiFJqjs3la0wnfIQ==", + "requires": { + "icss-utils": "^4.1.1", + "postcss": "^7.0.16", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.0" + } + }, + "postcss-modules-scope": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz", + "integrity": "sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==", + "requires": { + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0" + } + }, + "postcss-modules-values": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz", + "integrity": "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==", + "requires": { + "icss-utils": "^4.0.0", + "postcss": "^7.0.6" + } + }, + "postcss-selector-parser": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==" + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/prelude-ls/1.1.2/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "optional": true, + "requires": { + "asap": "~2.0.3" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "optional": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "optional": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "optional": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "rechoir": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", + "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "requires": { + "resolve": "^1.9.0" + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==" + }, + "regenerator-transform": { + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", + "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", + "requires": { + "@babel/runtime": "^7.8.4", + "private": "^0.1.8" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "regexpu-core": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", + "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "regjsgen": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==" + }, + "regjsparser": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "optional": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-bin": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/resolve-bin/-/resolve-bin-0.4.0.tgz", + "integrity": "sha1-RxMiSYkRAa+xmZH+k3ywpfBy5dk=", + "requires": { + "find-parent-dir": "~0.3.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + } + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true + }, + "samsam": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", + "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", + "dev": true + }, + "sass": { + "version": "1.26.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.26.8.tgz", + "integrity": "sha512-yvtzyrKLGiXQu7H12ekXqsfoGT/aTKeMDyVzCB675k1HYuaj0py63i8Uf4SI9CHXj6apDhpfwbUr3gGOjdpu2Q==", + "requires": { + "chokidar": ">=2.0.0 <4.0.0" + } + }, + "sass-loader": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.3.1.tgz", + "integrity": "sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA==", + "requires": { + "clone-deep": "^4.0.1", + "loader-utils": "^1.0.1", + "neo-async": "^2.5.0", + "pify": "^4.0.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "schema-utils": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.6.tgz", + "integrity": "sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA==", + "requires": { + "ajv": "^6.12.0", + "ajv-keywords": "^3.4.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "requires": { + "randombytes": "^2.1.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "sinon": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", + "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", + "dev": true, + "requires": { + "formatio": "1.1.1", + "lolex": "1.3.2", + "samsam": "1.1.2", + "util": ">=0.10.3 <1" + } + }, + "sinon-chai": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-2.14.0.tgz", + "integrity": "sha512-9stIF1utB0ywNHNT7RgiXbdmen8QDCRsrTjw+G9TgKt1Yexjiv8TOWZ6WHsTPz57Yky3DIswZvEqX8fpuHNDtQ==", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "optional": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "tapable": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==" + }, + "terser": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", + "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + } + }, + "terser-webpack-plugin": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", + "integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", + "requires": { + "jest-worker": "^27.0.2", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^6.0.0", + "source-map": "^0.6.1", + "terser": "^5.7.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "requires": { + "randombytes": "^2.1.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "timm": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/timm/-/timm-1.6.2.tgz", + "integrity": "sha512-IH3DYDL1wMUwmIlVmMrmesw5lZD6N+ZOAFWEyLrtpoL9Bcrs9u7M/vyOnHzDD2SMs4irLkVjqxZbHrXStS/Nmw==" + }, + "tinycolor2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", + "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "optional": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tslib": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.12.0.tgz", + "integrity": "sha512-5rxCQkP0kytf4H1T4xz1imjxaUUPMvc5aWp0rJ/VMIN7ClRiH1FwFvBt8wOeMasp/epeUnmSW6CixSIePtiLqA==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "optional": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "http://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-public/type-check/0.3.2/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==" + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==" + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==" + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + }, + "utif": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/utif/-/utif-2.0.1.tgz", + "integrity": "sha512-Z/S1fNKCicQTf375lIP9G8Sa1H/phcysstNrrSdZKj1f9g58J4NMgb5IgiEZN9/nLMPDwF0W7hdOe9Qq2IYoLg==", + "requires": { + "pako": "^1.0.5" + } + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "optional": true + }, + "v8-compile-cache": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz", + "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "watchpack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", + "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "webpack": { + "version": "5.49.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.49.0.tgz", + "integrity": "sha512-XarsANVf28A7Q3KPxSnX80EkCcuOer5hTOEJWJNvbskOZ+EK3pobHarGHceyUZMxpsTHBHhlV7hiQyLZzGosYw==", + "requires": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.50", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.8.0", + "es-module-lexer": "^0.7.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.2.0", + "webpack-sources": "^3.2.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + }, + "browserslist": { + "version": "4.16.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz", + "integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==", + "requires": { + "caniuse-lite": "^1.0.30001248", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.793", + "escalade": "^3.1.1", + "node-releases": "^1.1.73" + } + }, + "caniuse-lite": { + "version": "1.0.30001249", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001249.tgz", + "integrity": "sha512-vcX4U8lwVXPdqzPWi6cAJ3FnQaqXbBqy/GZseKNQzRj37J7qZdGcBtxq/QLFNLLlfsoXLUdHw8Iwenri86Tagw==" + }, + "electron-to-chromium": { + "version": "1.3.800", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.800.tgz", + "integrity": "sha512-qagikPjZJSDWP85uWoxs32oK/xk/y3MhDZELfKRCWI7pBc0ZFlmjnXb+3+aNMaiqboeDJJa0v7CJd5cO1HKwEQ==" + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node-releases": { + "version": "1.1.73", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", + "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==" + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "webpack-cli": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.7.2.tgz", + "integrity": "sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw==", + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.0.4", + "@webpack-cli/info": "^1.3.0", + "@webpack-cli/serve": "^1.5.1", + "colorette": "^1.2.1", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + } + } + }, + "webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.0.tgz", + "integrity": "sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw==" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "xhr": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", + "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", + "requires": { + "global": "~4.3.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xml-parse-from-string": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz", + "integrity": "sha1-qQKekp09vN7RafPG4oI42VpdWig=" + }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" + } + } +} diff --git a/ace-loader/package.json b/ace-loader/package.json new file mode 100644 index 000000000..f5bf20fdd --- /dev/null +++ b/ace-loader/package.json @@ -0,0 +1,74 @@ +{ + "name": "ace-loader", + "version": "1.0.11", + "description": "a webpack loader for ace", + "main": "index.js", + "private": true, + "keywords": [ + "ace", + "loader", + "webpack", + "Lite", + "Rich" + ], + "scripts": { + "build": "", + "rich": "cd sample/rich && webpack --config ../../webpack.rich.config.js", + "lite": "cd sample/lite && webpack --config ../../webpack.lite.config.js", + "card": "cd sample/card && webpack --config ../../webpack.rich.config.js", + "postinstall": "node npm-install.js" + }, + "devDependencies": { + "chai": "^3.5.0", + "eslint": "^7.3.1", + "eslint-config-google": "^0.14.0", + "mocha": "^7.1.2", + "sinon": "^1.17.3", + "sinon-chai": "^2.8.0" + }, + "dependencies": { + "@babel/cli": "^7.8.4", + "@babel/core": "^7.9.0", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.12.10", + "@babel/preset-env": "^7.9.0", + "@babel/runtime": "^7.0.0", + "babel-loader": "^8.0.6", + "babel-plugin-require-context-hook": "^1.0.0", + "copy-webpack-plugin": "^8.1.0", + "css": "^3.0.0", + "css-loader": "^3.4.2", + "deccjsunit": "latest", + "escodegen": "^2.0.0", + "esprima": "^4.0.1", + "hash-sum": "^1.0.2", + "jimp": "^0.12.1", + "less": "^3.11.1", + "less-loader": "^5.0.0", + "loader-utils": "^1.1.0", + "md5": "^2.1.0", + "parse5": "^2.1.5", + "resolve-bin": "^0.4.0", + "sass": "^1.26.8", + "sass-loader": "^7.3.1", + "source-map": "^0.7.3", + "uglify-es": "^3.3.9", + "webpack": "^5.48.0", + "webpack-cli": "^4.6.0" + }, + "babel": { + "presets": [ + "@babel/preset-env" + ], + "plugins": [ + "@babel/plugin-transform-modules-commonjs", + "@babel/plugin-proposal-class-properties", + [ + "@babel/plugin-transform-arrow-functions", + { + "spec": true + } + ] + ] + } +} diff --git a/ace-loader/plugin/codegen/index.js b/ace-loader/plugin/codegen/index.js new file mode 100644 index 000000000..790809e9f --- /dev/null +++ b/ace-loader/plugin/codegen/index.js @@ -0,0 +1,736 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 784: +/***/ ((__unused_webpack_module, exports) => { + + +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.errorMap = void 0; +exports.errorMap = new Map([ + ["fileError", "Visual file is damaged"], + ["versionError", "Version number of visual file does not match"], + ["modelError", "Visual model in visual file is damaged"], + ["codegenError", "Codegen hml and css failed"], +]); + + +/***/ }), + +/***/ 243: +/***/ ((__unused_webpack_module, exports) => { + + +/* + * @Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Style = exports.Tag = void 0; +class Tag { + /** + * @description: constructor for Tag + * @param tagName is name of component + * @param attributes is attributes of component + * @param content is child elements or innerHtml of component + */ + constructor(tagName, attributes, content) { + this.tagName = tagName; + this.attributes = attributes; + this.content = content; + } + accept(v) { + return v.genTag(this); + } +} +exports.Tag = Tag; +class Style { + /** + * @description: constructor for Style + * @param kind distinguishes id and class + * @param name is name of id or class + * @param content is style name and value of component + */ + constructor(kind, name, content) { + this.kind = kind; + this.name = name; + this.content = content; + } + accept(v) { + return v.genStyle(this); + } +} +exports.Style = Style; + + +/***/ }), + +/***/ 245: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +/* + * @Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StringWriter = void 0; +const ASTNodeVisitor_1 = __webpack_require__(573); +const Cache_1 = __webpack_require__(695); +class StringWriter { + constructor() { + this.generator = ASTNodeVisitor_1.ASTNodeGenerator.getMethodGen(new Cache_1.Cache("")); + } + /** + * @description: generate HML + * @param t is Tag in AST + * @return HML code + */ + genHML(t) { + t.accept(this.generator); + return this.generator.cache.toString(); + } + /** + * @description: generate CSS + * @param t is Style in AST + * @return CSS code + */ + genCSS(t) { + t.forEach((value) => { + value.accept(this.generator); + }); + return this.generator.cache.toString(); + } +} +exports.StringWriter = StringWriter; + + +/***/ }), + +/***/ 573: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +/* + * @Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ASTNodeGenerator = void 0; +const Token_1 = __webpack_require__(334); +class ASTNodeGenerator { + /** + * @description: constructor for BridgeVisitor + * @param reference is cache for Harmony FA code + */ + constructor(reference) { + this.cache = reference; + } + /** + * @description: code generator + * @param ref is cache for code + * @return ast node generator + */ + static getMethodGen(ref) { + if (ASTNodeGenerator.instance === undefined) { + ASTNodeGenerator.instance = new ASTNodeGenerator(ref); + } + else { + ASTNodeGenerator.instance.setCache(ref); + } + return ASTNodeGenerator.instance; + } + /** + * @description: cache for code + * @param ref is cache for code + * @return void + */ + setCache(ref) { + this.cache = ref; + } + /** + * @description: parse Tag in AST and generate code for Tag in cache + * @param Tag in AST + * @return void + */ + genTag(t) { + this.cache.concat(Token_1.TokenClass.TAG_START, t.tagName); + this.cache.indentOff(); + t.attributes.forEach((value, key) => { + let valueBK = ""; + for (const char of value) { + valueBK += (char === "\"" ? """ : (char === "\n" ? " " : char)); + } + this.cache.concat(Token_1.TokenClass.SPACE, key, Token_1.TokenClass.ASSIGN, Token_1.TokenClass.LQUOTE, valueBK, Token_1.TokenClass.RQUOTE); + }); + if (t.content === null) { + this.cache.concat(Token_1.TokenClass.EMPTY_TAG_END); + } + else { + this.cache.concat(Token_1.TokenClass.TAG_END); + if (typeof t.content === "string") { + let contentBK = ""; + for (const char of t.content) { + contentBK += (char === "<" ? "<" : (char === "\n" ? " " : char)); + } + this.cache.concat(contentBK); + } + else if (t.content.length !== 0) { + this.cache.concat(Token_1.TokenClass.NEW_LINE); + this.cache.indentOn(); + this.cache.incIndent(); + t.content.forEach((tag) => { + tag.accept(this); + this.cache.indentOff(); + this.cache.concat(Token_1.TokenClass.NEW_LINE); + this.cache.indentOn(); + }); + this.cache.decIndent(); + this.cache.indentOn(); + } + this.cache.concat(Token_1.TokenClass.END_TAG_START, t.tagName, Token_1.TokenClass.TAG_END); + } + } + /** + * @description: parse Style in AST and generate code for Style in cache + * @param Style in AST + * @return void + */ + genStyle(s) { + if (s.kind === "IDStyle") { + this.cache.concat(Token_1.TokenClass.ID_STYLE_START); + this.cache.indentOff(); + } + this.cache.concat(s.name, Token_1.TokenClass.SPACE, Token_1.TokenClass.LBRA, Token_1.TokenClass.NEW_LINE); + this.cache.indentOn(); + this.cache.incIndent(); + s.content.forEach((value, key) => { + this.cache.concat(key, Token_1.TokenClass.COLON, Token_1.TokenClass.SPACE, value, Token_1.TokenClass.SEMICOLON, Token_1.TokenClass.NEW_LINE); + }); + this.cache.decIndent(); + this.cache.concat(Token_1.TokenClass.RBRA, Token_1.TokenClass.NEW_LINE, Token_1.TokenClass.NEW_LINE); + } +} +exports.ASTNodeGenerator = ASTNodeGenerator; +ASTNodeGenerator.instance = undefined; + + +/***/ }), + +/***/ 844: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +/* + * @Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CSSBridge = exports.HMLBridge = void 0; +const FATypeChecker_1 = __webpack_require__(335); +const AST_1 = __webpack_require__(243); +class HMLBridge { + constructor() { + this.errors = 0; + } + /** + * @description: generate error message + * @param msg is error message to showup in console + */ + error(msg) { + console.error("Code generating error: " + msg); + this.errors += 1; + } + /** + * @description: get error number + * @return error number + */ + getErrorCount() { + return this.errors; + } + /** + * @description: code generator for Tag, which is HML type in AST in IR + * @param tag is a object with HML type to be generated + * @return a code tree representing Harmony FA HML code + */ + genTag(tag) { + let content = null; + if (FATypeChecker_1.hasTextContent(tag)) { + content = tag.content; + } + else if (FATypeChecker_1.hasArrayContent(tag)) { + const subTags = []; + tag.content.forEach((t) => { + const tree = t.accept(this); + if (tree instanceof AST_1.Tag) { + subTags.push(tree); + } + else { + throw new Error("WTF: what a trrrible failure"); + } + }); + content = subTags; + } + return new AST_1.Tag(tag.tagName, tag.attributes, content); + } + /** + * @description: visitor gurdance method for contents, + * sort out incoming type and guide to matching code generator + * @param obj is a object with Model or Container or CharUI primitive types to be generated + * @return a code tree representing input object + */ + visit(obj) { + if (FATypeChecker_1.isHmlNode(obj)) { + return this.genTag(obj); + } + throw new Error("no return"); + } +} +exports.HMLBridge = HMLBridge; +class CSSBridge { + constructor() { + this.errors = 0; + this.styles = []; + } + /** + * @description: generate error message + * @param msg is error message to showup in console + */ + error(msg) { + console.error("Code generating error: " + msg); + this.errors += 1; + } + /** + * @description: get error number + * @return error number + */ + getErrorCount() { + return this.errors; + } + /** + * @description: code generator for ID Style, which is CSS type in AST in IR + * @param tag is a object with CSS type to be generated + * @return a code tree representing Harmony FA CSS code + */ + genIDStyle(tag) { + if (tag.idStyle.size > 0) { + this.styles.push(new AST_1.Style("IDStyle", tag.id, tag.idStyle)); + } + if (FATypeChecker_1.hasArrayContent(tag)) { + for (const child of tag.content) { + child.accept(this); + } + } + } + /** + * @description: code generator for Class Style, which is CSS type in AST in IR + * @param style is a object with CSS type to be generated + * @return a code tree representing Harmony FA CSS code + */ + genClassStyle(style) { + this.styles.push(new AST_1.Style("ClassStyle", style.className, style.content)); + } + /** + * @description: visitor gurdance method for contents, + * sort out incoming type and guide to matching code generator + * @param obj is a object with Model or Container or CharUI primitive types to be generated + * @return a code tree representing input object + */ + visit(obj) { + if (FATypeChecker_1.isHmlNode(obj)) { + this.genIDStyle(obj); + return this.styles; + } + else if (FATypeChecker_1.isClassStyle(obj)) { + this.genClassStyle(obj); + return this.styles; + } + throw new Error("no return"); + } +} +exports.CSSBridge = CSSBridge; + + +/***/ }), + +/***/ 695: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Cache = void 0; +const Token_1 = __webpack_require__(334); +// There is no way pass value by reference with JS and TS, but object +class Cache { + /** + * @description: constructor for Cache + * @param value is HML/CSS code with no indents + */ + constructor(value) { + this.value = value; + this.indent = 0; + this.flag = true; + } + /** + * @description: when flag is true, there should be some indents + * @return void + */ + indentOn() { + this.flag = true; + } + /** + * @description: when flag is false, there should be no indents + * @return void + */ + indentOff() { + this.flag = false; + } + /** + * @description: increase indent + * @return void + */ + incIndent() { + this.indent++; + } + /** + * @description: decrease indent + * @return void + */ + decIndent() { + this.indent--; + } + /** + * @description: check whether indent is LT 0 + * @return boolean value representing whether indent is LT 0 + */ + checkIndent() { + return this.indent < 0; + } + /** + * @description: get indent + * @return indents + */ + getIndents() { + if (this.flag) { + let indents = ""; + Array.from(Array(this.indent).keys()).forEach(element => { + indents += Token_1.TokenClass.INDENT; + }); + return indents; + } + else { + return ""; + } + } + /** + * @description: concat indents and HML/CSS code + * @param strings means HML/CSS code + * @return HML/CSS code after indents are set + */ + concat(...strings) { + this.value += this.getIndents(); + this.value = this.value.concat(...strings); + return String(this.value); + } + /** + * @description: concat indents and HML/CSS code + * @return HML/CSS code + */ + toString() { + return this.value; + } +} +exports.Cache = Cache; + + +/***/ }), + +/***/ 334: +/***/ ((__unused_webpack_module, exports) => { + + +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TokenClass = void 0; +var TokenClass; +(function (TokenClass) { + TokenClass[TokenClass["IDENTIFIER"] = 0] = "IDENTIFIER"; + // literals + TokenClass[TokenClass["STRING_LITERAL"] = 1] = "STRING_LITERAL"; + TokenClass[TokenClass["NUMBER"] = 2] = "NUMBER"; + TokenClass[TokenClass["CHARACTER"] = 3] = "CHARACTER"; + // special tokens + TokenClass[TokenClass["EOF"] = 4] = "EOF"; + TokenClass[TokenClass["INVALID"] = 5] = "INVALID"; + TokenClass["EMPTY_DATA"] = "empty"; + TokenClass["ASSIGN"] = "="; + // Escape character + TokenClass["NEW_LINE"] = "\n"; + TokenClass["CARRIAGE_RETURN"] = "\r"; + TokenClass["INDENT"] = " "; + // delimiters + TokenClass["SPACE"] = " "; + TokenClass["LQUOTE"] = "\""; + TokenClass["RQUOTE"] = "\""; + TokenClass["TAG_START"] = "<"; + TokenClass["TAG_END"] = ">"; + TokenClass["EMPTY_TAG_END"] = "/>"; + TokenClass["END_TAG_START"] = " { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.emit = exports.emitCSS = exports.emitHml = void 0; +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved. + */ +const BridgeVisitor_1 = __webpack_require__(844); +const ASTFileVisitor_1 = __webpack_require__(245); +/** + * @description: output the HML source code of the model + */ +function emitHml(rootModel) { + const visitor = new BridgeVisitor_1.HMLBridge(); + const ast = rootModel.accept(visitor); + const stringWriter = new ASTFileVisitor_1.StringWriter(); + const res = stringWriter.genHML(ast); + if (visitor.getErrorCount() > 0) { + console.error("Cannot generate code, error found: " + visitor.getErrorCount().toString()); + return "error"; + } + else { + return res; + } +} +exports.emitHml = emitHml; +/** + * @description: output the CSS source code of the model + */ +function emitCSS(rootModel) { + const visitor = new BridgeVisitor_1.CSSBridge(); + const styles = rootModel.accept(visitor); + const stringWriter = new ASTFileVisitor_1.StringWriter(); + const res = stringWriter.genCSS(styles); + if (visitor.getErrorCount() > 0) { + console.error("Cannot generate code, error found: " + visitor.getErrorCount().toString()); + return "error"; + } + else { + return res; + } +} +exports.emitCSS = emitCSS; +/** + * @description: output all source code of the model + */ +function emit(rootModel) { + const obj = { + hml: emitHml(rootModel), + css: emitCSS(rootModel), + }; + return obj; +} +exports.emit = emit; + + +/***/ }), + +/***/ 335: +/***/ ((__unused_webpack_module, exports) => { + + +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hasJsonTextContent = exports.hasJsonArrayContent = exports.isClassStyle = exports.hasArrayContent = exports.hasTextContent = exports.isText = exports.isHmlNode = exports.isContainer = void 0; +function isContainer(obj) { + return obj.type === "Container"; +} +exports.isContainer = isContainer; +function isHmlNode(obj) { + return obj.type === "Container" || obj.type === "TextContent" || obj.type === "Base" || obj.type === "Text"; +} +exports.isHmlNode = isHmlNode; +function isText(obj) { + return obj.type === "Text"; +} +exports.isText = isText; +function hasTextContent(obj) { + return obj.content !== undefined && typeof obj.content === "string"; +} +exports.hasTextContent = hasTextContent; +function hasArrayContent(obj) { + return obj.content !== undefined && obj.content instanceof Array; +} +exports.hasArrayContent = hasArrayContent; +function isClassStyle(obj) { + return obj.kind === "ClassStyle"; +} +exports.isClassStyle = isClassStyle; +/** + * @description: judge whether jsonmodel is nested + * @param obj is jsonModel + * @return obj is JsonContainerModel + */ +function hasJsonArrayContent(obj) { + return obj.content !== undefined && obj.content instanceof Array; +} +exports.hasJsonArrayContent = hasJsonArrayContent; +/** + * @description: judge whether type of jsonmodel's content is string + * @param obj is jsonModel + * @return obj is JsonTextContentModel + */ +function hasJsonTextContent(obj) { + return obj.content !== undefined && typeof obj.content === "string"; +} +exports.hasJsonTextContent = hasJsonTextContent; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // 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: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __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. +(() => { +var exports = __webpack_exports__; + +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +const FATypeChecker_1 = __webpack_require__(335); +const Emit_1 = __webpack_require__(704); +const errorMap_1 = __webpack_require__(784); +const visualVersion = 10; +/** + * @description: codegen hml and css according to code in visual file + * @param source is code in visual file + * @return object of hmlCSS, errorType and errorMessage + */ +function genHmlAndCss(source) { + const retObj = { + hmlCss: { + hml: "", + css: "", + }, + errorType: "", + errorMessage: "", + }; + try { + // parse source code in visual file + const visualSource = JSON.parse(source); + const destVisualVersion = visualSource.VisualVersion; + const regex = /^([1-9]+[0-9]*)$/; + if (destVisualVersion === undefined) { + retObj.errorType = "versionError"; + } + else { + const expression = destVisualVersion.match(regex); + if (expression === null || parseInt(expression[1]) > visualVersion) { + retObj.errorType = "versionError"; + } + } + try { + const model = genHmlNode(JSON.parse(visualSource.content)); + const hmlCss = Emit_1.emit(model); + if (hmlCss.hml === "error" || hmlCss.css === "error") { + retObj.errorType = "codegenError"; + } + retObj.hmlCss = hmlCss; + } + catch (e) { + retObj.errorType = "modelError"; + } + } + catch (e) { + retObj.errorType = "fileError"; + } + if (retObj.errorType !== "") { + retObj.errorMessage = errorMap_1.errorMap.get(retObj.errorType); + retObj.hmlCss.hml = ""; + retObj.hmlCss.css = ""; + } + return retObj; +} +/** + * @description: generate HmlNode + * @param model is json format of HmlNode + * @return HmlNode after codegen + */ +function genHmlNode(model) { + const res = { + id: model.id, + tagName: model.tagName, + type: model.type, + idStyle: new Map(model.idStyle), + attributes: new Map(model.attributes), + accept: (v) => { + return v.visit(res); + }, + }; + if (FATypeChecker_1.hasJsonTextContent(model)) { + res.content = model.content; + } + else if (FATypeChecker_1.hasJsonArrayContent(model)) { + const content = []; + for (const child of model.content) { + content.push(genHmlNode(child)); + } + res.content = content; + } + return res; +} +exports.genHmlAndCss = genHmlAndCss; + +})(); + +var __webpack_export_target__ = exports; +for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i]; +if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true }); +/******/ })() +; diff --git a/ace-loader/plugin/templater/bind.js b/ace-loader/plugin/templater/bind.js new file mode 100644 index 000000000..9f42b6f37 --- /dev/null +++ b/ace-loader/plugin/templater/bind.js @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const content = require('./content') +const data = require('./data') +const { DEVICE_LEVEL } = require('../lite/lite-enum') +const card = process.env.DEVICE_LEVEL === DEVICE_LEVEL.CARD +const REG_CARD_ARRAY = /(\['.+?'\])|(\[".+?"\])/g + +/** + * Check if there is data binding. + * @param {Object} initValue Hml text token information. + * @param {Object} functionFlag Hml text token information. + * @return {String} Compiled data binding + */ +function transExp(initValue, functionFlag, isValue, out, nodeLoc) { + let value = initValue.toString().trim() + const hasExpFlag = isExp(value) + if (hasExpFlag) { + value = parseExp(value, functionFlag, isValue, out, nodeLoc) + } + return value +} +/** + * parse data binding. + * @param {Object} value Hml text token information. + * @param {Object} functionFlag Hml text token information. + * @return {String} Compiled data binding + */ +function parseExp(value, functionFlag, isValue, out, nodeLoc) { + const textArray = data.parseText(value) + const explist = [] + for (let i = 0; i < textArray.length; i++) { + const exp = textArray[i] + let transValue + if (exp.tag) { + if (card) { + checkCard(exp.value, out, nodeLoc) + } + transValue = card ? `{{${transCardArray(exp.value)}}}` : content.parseExpression(exp.value) + if (textArray.length !== 1 && !card) { + transValue = `(${transValue})` + } + } else { + transValue = card ? exp.value : `decodeURI('${encodeURI(exp.value).replace(/\'/g, '%27')}')` + } + explist.push(transValue) + } + if (card && checkCardVersionLimit() && isValue) { + if (explist.length > 1) { + out.log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: The variable concatenation is not supported in card (supproted later).', + }) + } + } + let func = explist.join(card ? '' : ' + ') + if (functionFlag !== false && !card) { + func = eval('(function () {return ' + func + '})') + } + func = card && textArray.length > 1 ? '$f(' + func + ')' : func + + return func +} + +/** + * Check if there is data binding in the list. + * @param {String} initValue Hml text token information. + * @return {String} Compiled data binding in list + */ +function transExpForList(initValue) { + let value = initValue.toString().trim() + const hasExpListFlag = containExp(value) + if (hasExpListFlag) { + value = parseExpList(value) + } + return value +} +/** + * parse data binding in list. + * @param {String} value Hml text token information. + * @return {String} Compiled data binding in list + */ +function parseExpList(value) { + const exprMatch = value.match(/{{{([\s\S]+?)}}}|{{([\s\S]+?)}}/g) + const exprArray = value.replace(/{{{([\s\S]+?)}}}|{{([\s\S]+?)}}/g, '&e').split(/\s+/) + let n = 0 + const result = [] + exprArray.forEach((item)=>{ + if (item.indexOf('&e') >= 0) { + while (item.indexOf('&e') >= 0) { + item = item.replace('&e', exprMatch[n++]) + } + const textArray = data.parseText(item) + const exprlist = [] + if (textArray) { + textArray.forEach(function(text) { + const transValue = text.tag ? + card ? `{{${text.value}}}` : content.parseExpression(text.value) : + card ? text.value : `'${text.value}'` + exprlist.push(transValue) + }) + result.push(exprlist.join('+')) + } + } else { + const value = card ? item : `'${item}'` + result.push(value) + } + }) + + return card ? result : "(function () {return [" + result.join(", ") + "]})" +} + +/** + * Regexp determine whether there is data binding. + * @param {String} value expression value. + * @return {Boolean} Test results + */ +function isExp(value) { + const REGEXP_DATABIND = /{{{([\s\S]+?)}}}|{{([\s\S]+?)}}/ + return REGEXP_DATABIND.test(value) +} + +/** + * Global regexp determine whether there is data binding. + * @param {String} value expression value. + * @return {Boolean} Test results + */ +function containExp(value) { + const REGEXP_DATABIND_ALL = /{{{([\s\S]+?)}}}|{{([\s\S]+?)}}/g + return REGEXP_DATABIND_ALL.test(value) +} + +/** + * Replace value on match. + * @param {String} value expression value. + * @return {String} The result after replacement + */ +function removeAllExpFix(value) { + const REGEXP_PRE_DATABIND = /\{\{\{?|\}\}\}?/g + return containExp(value) ? value.replace(REGEXP_PRE_DATABIND, '') : value +} + +/** + * Change array format in card + * @param {String} value Array in card + * @return {String} The card array format + */ +function transCardArray(value) { + value = value.replace(REG_CARD_ARRAY, item => { + return `.${item.slice(2, -2)}.` + }) + if (value.charAt(value.length - 1) === '.') { + value = value.slice(0, -1) + } + return value +} + +function checkCard(value, out, nodeLoc) { + if (!checkApi(value) && !checkIdxAndItem(value)) { + if (checkCardVersionLimit() && !checkVariable(value)){ + out.log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: `ERROR: The expression '${value}' is not supported in card (only support a single variable in the verion).` + }) + } else if (!checkCardVersionLimit() && !checkExpression(value)) { + out.log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: `ERROR: The expression '${value}' is not supported in card (only support the binocular expression, ` + + `OR expression, AND expression and NOT expression).` + }) + } + } +} + +function checkCardVersionLimit() { + return parseInt(process.env.PLATFORM_VERSION.replace('Version', '')) < 6 +} + +function checkApi(value) { + return /^\$(tc|t|r)/m.test(value) +} + +function checkExpression(value) { + return checkVariable(value) || checkOR(value) || checkAND(value) || checkNOT(value) || checkBinocular(value) +} + +function checkIdxAndItem(value) { + return value === '$idx' || value === '$item' +} + +function checkVariable(value) { + return /^[a-zA-Z\$_][a-zA-Z\d_\.\[\]'"`\s]*$/.test(value) +} + +function checkOR(value) { + return /^[a-zA-Z\$_][a-zA-Z\d_\.\[\]'"`\s]*\|\|[a-zA-Z\$_\s][a-zA-Z\d_\.\[\]'"`\s]*$/m.test(value) +} + +function checkAND(value) { + return /^[a-zA-Z\$_][a-zA-Z\d_\.\[\]'"`\s]*&&[a-zA-Z\$_\s][a-zA-Z\d_\.\[\]'"`\s]*$/m.test(value) +} + +function checkNOT(value) { + return /^![a-zA-Z\$_][a-zA-Z\d_\.\[\]'"`\s]*$/m.test(value) +} + +function checkBinocular(value) { + return /^[a-zA-Z\$_][a-zA-Z\d_\.\[\]'"`\s]*\?[a-zA-Z\$_\s][a-zA-Z\d_\.\[\]'"`\s]*:[a-zA-Z\$_\s][a-zA-Z\d_\.\[\]'"`\s]*$/m.test(value) +} + +transExp.checkApi = checkApi +transExp.checkExpression = checkExpression +transExp.checkIdxAndItem = checkIdxAndItem +transExp.checkVariable = checkVariable +transExp.checkAND = checkAND +transExp.checkOR = checkOR +transExp.checkNOT = checkNOT +transExp.isExp = isExp +transExp.containExp = containExp +transExp.removeAllExpFix = removeAllExpFix +transExp.transExpForList = transExpForList +transExp.transCardArray = transCardArray +module.exports = transExp diff --git a/ace-loader/plugin/templater/card_component_map.js b/ace-loader/plugin/templater/card_component_map.js new file mode 100644 index 000000000..436654be5 --- /dev/null +++ b/ace-loader/plugin/templater/card_component_map.js @@ -0,0 +1,335 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +var cardNativeTag = { + 'div': { + events: [], + attrs: {} + }, + 'stack': { + events: [], + attrs: {} + }, + 'image': { + alias: ['img'], + atomic: true, + selfClosing: true, + events: ['error', 'complete'], + attrs: { + src: {}, + alt: {} + } + }, + 'progress': { + atomic: true, + selfClosing: true, + events: [], + attrs: { + type: { + def: 'horizontal', + enum: ['horizontal', 'circular', 'ring', 'scale-ring', 'arc', 'eclipse'] + }, + percent: { + def: 0, + checkFunc: 'number' + }, + secondarypercent: { + def: 0, + checkFunc: 'number' + }, + clockwise: { + def: 'true', + enum: ['true', 'false'] + }, + }, + }, + 'text': { + textContent: true, + events: [], + children: ['span'], + attrs: {} + }, + 'span': { + textContent: true, + excludeRoot: true, + parents: ['text', 'span'], + events: [], + children: ['span'], + attrs: {}, + }, + 'chart': { + atomic: true, + selfClosing: true, + events: [], + attrs: { + type: { + def: 'line', + enum: ['line', 'bar', 'gauge', 'progress', 'loading', 'rainbow'], + required: true + }, + options: {}, + datasets: {}, + percent: { + def: 0, + checkFunc: 'number' + }, + segments: {}, + effects: { + def: 'true', + enum: ['true', 'false'] + }, + } + }, + 'button': { + textContent: true, + atomic: true, + selfClosing: true, + attrs: { + type: { + enum: ['capsule', 'circle', 'text', 'arc'] + }, + value: {}, + icon: {}, + waiting: { + def: 'false', + enum: ['false', 'true'] + }, + placement: { + def: 'end', + enum: ['end', 'start', 'top', 'bottom'], + }, + } + }, + 'badge': { + attrs: { + placement: { + def: 'rightTop', + enum: ['rightTop', 'right', 'left'] + }, + count: { + def: 0, + checkFunc: 'number' + }, + visible: { + def: 'false', + enum: ["false", "true"] + }, + maxcount: { + def: 99, + checkFunc: 'number', + }, + config: {}, + }, + }, + 'list': { + children: ['list-item'], + attrs: { + cachedcount: { + def: 0, + checkFunc: 'number', + }, + scrollbar: { + def: 'off', + enum: ['off', 'auto', 'on'], + }, + scrolleffect: { + def: 'spring', + enum: ['spring', 'fade', 'no'], + }, + divider: { + def: 'false', + enum: ['false', 'true'], + }, + shapemode: { + def: 'default', + enum: ['default', 'rect', 'round'], + }, + updateeffect: { + def: 'false', + enum: ['false', 'true'], + }, + initialindex: { + def: 0, + checkFunc: 'number', + }, + initialoffset: { + def: 0, + checkFunc: 'length', + }, + selected: {} + }, + }, + 'list-item': { + excludeRoot: true, + parents: ['list'], + attrs: { + for: {}, + type: { + def: 'default', + }, + section: {}, + sticky: { + def: 'none', + enum: ['none', 'normal', 'opacity'], + }, + }, + }, + 'block': { + excludeRoot: true, + attrs: {}, + }, + 'swiper': { + unSupportedChildren: ['list'], + attrs: { + indicator: { + def: 'true', + enum: ['true', 'false'], + }, + index: { + def: 0, + checkFunc: 'number', + }, + duration: { + checkFunc: 'number', + }, + vertical: { + def: 'false', + enum: ['false', 'true'], + }, + digital: { + def: 'false', + enum: ['false', 'true'], + }, + loop: { + def: 'true', + enum: ['true', 'false'], + }, + animationopacity: { + def: 'true', + enum: ['true', 'false'], + } + }, + }, + 'calendar': { + atomic: true, + events: [ + 'selectedchange', + 'requestdata' + ], + attrs: { + date: {}, + cardcalendar: { + def: 'false', + enum: ['false', 'true'], + }, + startdayofweek: { + def: 6, + }, + offdays: {}, + calendardata: {}, + showholiday: { + def: 'true', + enum: ['true', 'false'], + }, + }, + }, + 'clock': { + atomic: true, + attrs: { + clockconfig: { + required: true + }, + showdigit: { + def: 'true', + enum: ['true', 'false'], + }, + hourswest: { + checkFunc: 'number', + }, + }, + }, + 'divider': { + atomic: true, + selfClosing: true, + attrs: { + vertical: { + def: 'false', + enum: ['false', 'true'], + }, + }, + }, + 'input': { + atomic: true, + selfClosing: true, + events: ['change'], + attrs: { + checked: { + def: 'false', + enum: ['false', 'true'], + }, + type: { + def: 'radio', + enum: ['radio'], + required: true, + }, + name: {}, + value: {}, + }, + }, +} + +var cardCommonTag = { + 'events': [ + 'click' + ], + 'attrs': { + id: {}, + style: {}, + class: {}, + disabled: { + def: 'false', + enum: ['false', 'true'] + }, + if: { + excludeRoot: true, + def: 'true' + }, + elif: { + def: 'true' + }, + else: { + excludeRoot: true + }, + show: { + excludeRoot: true, + def: 'true' + }, + accessibilitygroup: { + enum: ['false', 'true'], + }, + accessibilitytext: {}, + accessibilitydescription: {}, + accessibilityimportance: { + enum: ['auto', 'yes', 'no', 'no-hide-descendants'], + }, + }, + 'children': ['block', 'slot'], + 'parents': ['block'] +} + +module.exports = { + cardCommonTag: cardCommonTag, + cardNativeTag: cardNativeTag +} diff --git a/ace-loader/plugin/templater/component_validator.js b/ace-loader/plugin/templater/component_validator.js new file mode 100644 index 000000000..d0c7db6be --- /dev/null +++ b/ace-loader/plugin/templater/component_validator.js @@ -0,0 +1,1291 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const bind = require('./bind') +const styler = require('../styler') +const styleValidator = require('../styler/lib/validator') +const OHOS_THEME_PROP_GROUPS = require('../theme/ohosStyles') +const path = require('path') +const projectPath = process.env.aceModuleRoot || process.cwd() +const transContent = require('./content') + +const REG_TAG_DATA_ATTR = /^data-\w+/ +const REG_EVENT = /([^(]*)\((.+)\)/ +const REG_DATA_BINDING = /{{{(.+?)}}}|{{(.+?)}}/ +const { DEVICE_LEVEL, PLATFORM } = require('../../lib/lite/lite-enum') +const { richCommonTag, richNativeTag } = require('./rich_component_map') +const { liteCommonTag, liteNativeTag } = require('./lite_component_map') +const { cardCommonTag, cardNativeTag } = require('./card_component_map') + +const card = process.env.DEVICE_LEVEL === DEVICE_LEVEL.CARD +const nativeTag = process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE ? liteNativeTag : + card ? cardNativeTag: richNativeTag +const commonTag = process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE ? liteCommonTag : + card ? cardCommonTag: richCommonTag + +const tagSelfClosing = [] +const tagWithoutRoot = [] +const tagWithoutChild = [] +const tagWithTextContent = [] +const tagWithAll = [] +const tagWithPath = [] +const aliasTagMap = {} +const attrTagMap = {} +const funcAttrTagMap = {} +const defaultAttrTagMap = {} +const requireAttrTagMap = {} +const enumAttrTagMap = {} +const rootAttrTagMap = {} +const parentsTagMap = {} +const childrenTagMap = {} +const unSupportedChildren = {} +const eventsTagMap = {} +let elementNames = {} + +/** + * prepare criteria for + * checking tag and attribute + * + * @type {{Object}} + */ +;(function initRules() { + for (const tag of Object.keys(nativeTag)) { + // tag with selfClosing attribute + if (nativeTag[tag].selfClosing) { + tagSelfClosing.push(tag) + } + + // tag can not be root + if (nativeTag[tag].excludeRoot) { + tagWithoutRoot.push(tag) + } + + // tag can not have children + if (nativeTag[tag].atomic) { + tagWithoutChild.push(tag) + } + + // tag support text content + if (nativeTag[tag].textContent) { + tagWithTextContent.push(tag) + } + + // store all tags + tagWithAll.push(tag) + + // tags with other name + if (nativeTag[tag].alias && nativeTag[tag].alias.length) { + for (const alia of nativeTag[tag].alias) { + aliasTagMap[alia] = tag + } + } + + // store private and common attr + const attrTagSet = {} + + if (nativeTag[tag].uattrs) { + Object.assign(attrTagSet, nativeTag[tag].uattrs, {}) + } else { + Object.assign(attrTagSet, nativeTag[tag].attrs, commonTag.attrs) + } + + attrTagMap[tag] = attrTagSet + const checkFuncSet = {} + const attrDefaultSet = {} + const attrRequireArr = [] + const attrEnumSet = {} + const rootNoAttr = [] + + for (const attr of Object.keys(attrTagSet)) { + if (attrTagSet[attr].checkFunc) { + checkFuncSet[attr] = attrTagSet[attr].checkFunc + } + + if (attrTagSet[attr].def) { + attrDefaultSet[attr] = attrTagSet[attr].def + } + + if (attrTagSet[attr].required) { + attrRequireArr.push(attr) + } + + if (attrTagSet[attr].enum && attrTagSet[attr].enum.length > 0) { + attrEnumSet[attr] = attrTagSet[attr].enum + attrDefaultSet[attr] = attrTagSet[attr].enum[0] + } + + if (attrTagSet[attr].excludeRoot) { + rootNoAttr.push(attr) + } + + if (attrTagSet[attr].checkPath) { + tagWithPath.push(attr) + } + } + + funcAttrTagMap[tag] = checkFuncSet + defaultAttrTagMap[tag] = attrDefaultSet + requireAttrTagMap[tag] = attrRequireArr + enumAttrTagMap[tag] = attrEnumSet + rootAttrTagMap[tag] = rootNoAttr + + if (nativeTag[tag].parents) { + parentsTagMap[tag] = nativeTag[tag].parents.concat(commonTag.parents) + } + + if (nativeTag[tag].children) { + childrenTagMap[tag] = nativeTag[tag].children.concat(commonTag.children) + } + + if (nativeTag[tag].unSupportedChildren) { + unSupportedChildren[tag] = nativeTag[tag].unSupportedChildren.concat(commonTag.unSupportedChildren) + } + + if (nativeTag[tag].uevents) { + eventsTagMap[tag] = nativeTag[tag].uevents.concat(nativeTag[tag].events) + } else { + eventsTagMap[tag] = [].concat(commonTag.events).concat(nativeTag[tag].events) + } + } +})() + +/** + * verify the validity of tag + * + * @param {Object} domNode + * @param {Object} out + */ +function validateTagName(domNode, out, relativePath) { + const tagName = domNode.tagName + const children = domNode.childNodes || [] + const nodeLoc = domNode.sourceCodeLocation ? { + line: domNode.sourceCodeLocation.startLine, + col: domNode.sourceCodeLocation.endLine + } : {} + const depends = out.deps + const jsonTemplate = out.jsonTemplate + const log = out.log + const oneChildNode = ['dialog', 'popup', 'badge'] + const logType = process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE ? 'ERROR' : 'WARNING' + let pos = domNode.__location || {} + const elementNamesInFile = elementNames[relativePath] || [] + + // validate tag + if (!tagWithAll.includes(tagName) && tagName !== 'img' && !elementNamesInFile.includes(tagName)) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: logType + ': The `' + tagName + '` tag is not supported.', + }) + } + + // validate dialog tag + if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH && oneChildNode.includes(tagName)) { + checkOneChild(tagName, children, pos, log) + } + + // preprocess attribute + if (!depends[tagName] && typeof tagName === 'string') { + depends.push(tagName) + } + const domNodeAttrs = domNode.attrs || [] + const domNodeAttrName = [] + for (const attr of domNodeAttrs) { + domNodeAttrName.push(attr.name.toLowerCase()) + } + setDebugLine(jsonTemplate, relativePath, nodeLoc.line) + + validateAliasTagMap(tagName, jsonTemplate, nodeLoc, log) + validateTagWithoutRoot(domNode, tagName, domNodeAttrName, nodeLoc, log) + validateName(tagName, children, nodeLoc, log) + validateForAttr(tagName, domNodeAttrs, domNodeAttrName, nodeLoc, log) + validatorLite(tagName, domNodeAttrs, domNodeAttrName, log, nodeLoc) +} + +function validateName(tagName, children, nodeLoc, log) { + validateAtomicTag(tagName, children, nodeLoc, log) + validateTagWithAll(tagName, children, nodeLoc, log) +} + +function validateForAttr(tagName, domNodeAttrs, domNodeAttrName, nodeLoc, log) { + validateAttrTagMap(tagName, domNodeAttrName, nodeLoc, log) + validateDefaultAttrTagMap(tagName, domNodeAttrs, domNodeAttrName, nodeLoc, log) + validateRequireAttrTagMap(tagName, domNodeAttrName, nodeLoc, log) + validateEnumAttrTagMap(tagName, domNodeAttrName, domNodeAttrs, nodeLoc, log) + validateFuncAttrTagMap(tagName, domNodeAttrName, domNodeAttrs, nodeLoc, log) + validateEventsTagMap(tagName, domNodeAttrName, nodeLoc, log) +} + +/** + * verify the dialog tag + * + * @param {String} tagName + * @param {Array} children + * @param {Object} nodeLoc + * @param {Array} log + */ +function checkOneChild(name, children, pos, log) { + const oneChild = children.filter((child) => { + return child && child.nodeName !== '#text' && child.nodeName !== '#comment' + }) + if (oneChild.length > 1) { + log.push({ + line: pos.line || 1, + column: pos.col || 1, + reason: 'ERROR: The `' + name + '` tag can have only one child node.' + }) + } +} + +/** + * whether it can be root + * or be the root, check the + * attr can not have + * + * @param {Object} domNode + * @param {String} tagName + * @param {Object} domNodeAttrName + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateTagWithoutRoot(domNode, tagName, domNodeAttrName, nodeLoc, log) { + if (domNode._isroot) { + if (tagWithoutRoot.indexOf(tagName) !== -1) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: component `' + tagName + '` can not as root component.', + }) + } + if (rootAttrTagMap[tagName]) { + rootAttrTagMap.forEach(function(attrName) { + if (domNodeAttrName[attrName]) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: root node `' + tagName + '` can not use attr `' + attrName + '`', + }) + } + }) + } + } +} + +/** + * whether tag can have alias name + * + * @param {String} tagName + * @param {Object} result + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateAliasTagMap(tagName, result, nodeLoc, log) { + if (aliasTagMap[tagName]) { + if (tagName !== 'img') { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'NOTE: tag name `' + tagName + '` is automatically changed to `' + aliasTagMap[tagName] + '`', + }) + } + tagName = aliasTagMap[tagName] + } + result.type = tagName +} + +/** + * whether tag can have children + * how many text child the tag have + * + * @param {String} tagName + * @param {Object} children + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateAtomicTag(tagName, children, nodeLoc, log) { + if (tagWithoutChild.indexOf(tagName) >= 0 && children.length > 0 && !isSupportedSelfClosing(tagName)) { + if (tagWithTextContent.indexOf(tagName) < 0) { + children.every( + function(child) { + return child.nodeName === '#text' || child.nodeName === '#comment' || + log.push({ + line: nodeLoc.Line || 1, + column: nodeLoc.Col || 1, + reason: 'ERROR: tag `' + tagName + '` should just have one text node only', + }) + }, + ) + } else { + children.every( + function(child) { + return child.nodeName === '#text' || child.nodeName === '#comment' || + log.push({ + line: nodeLoc.Line || 1, + column: nodeLoc.Col || 1, + reason: 'ERROR: tag `' + tagName + '` should not have children', + }) + }, + ) + } + } +} + +/** + * verify the tag whether + * support its attr + * + * @param {String} tagName + * @param {Object} domNodeAttrName + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateAttrTagMap(tagName, domNodeAttrName, nodeLoc, log) { + if (tagName === 'img') { + tagName = 'image' + } + if (attrTagMap[tagName]) { + domNodeAttrName.forEach(function(attrKey) { + if (attrKey === 'stroke-width') { + attrKey = 'strokeWidth' + } else if (attrKey === 'fill-opacity') { + attrKey = 'fillOpacity' + } else if (attrKey === 'stroke-dasharray') { + attrKey = 'strokeDasharray' + } else if (attrKey === 'stroke-dashoffset') { + attrKey = 'strokeDashoffset' + } else if (attrKey === 'stroke-linecap') { + attrKey = 'strokeLinecap' + } else if (attrKey === 'fill-rule') { + attrKey = 'fillRule' + } else if (attrKey === 'stroke-linejoin') { + attrKey = 'strokeLinejoin' + } else if (attrKey === 'stroke-miterlimit') { + attrKey = 'strokeMiterlimit' + } else if (attrKey === 'font-size') { + attrKey = 'fontSize' + } else if (attrKey === 'stroke-opacity') { + attrKey = 'strokeOpacity' + } + if (!attrKey.match(EVENT_START_REGEXP) && !(attrKey in attrTagMap[tagName])) { + if (attrKey in commonTag.attrs) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'WARNING: tag `' + tagName + '` not support attr `' + attrKey + '`', + }) + } else if (!validateDataAttr(attrKey)) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'WARNING: tag `' + tagName + '` use customize attr `' + attrKey + '`', + }) + } + } + }) + } +} + +/** + * validate the default attr can be + * supported by the tag + * + * @param {String} tagName + * @param {Object} domNodeAttrs + * @param {Object} domNodeAttrName + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateDefaultAttrTagMap(tagName, domNodeAttrs, domNodeAttrName, nodeLoc, log) { + if (defaultAttrTagMap[tagName]) { + Object.keys(defaultAttrTagMap[tagName]).forEach(function(attrKey) { + const n = domNodeAttrName.indexOf(attrKey) + if (n >= 0 && domNodeAttrs[n].value === '') { + domNodeAttrs[n].value = defaultAttrTagMap[tagName][attrKey] + if (attrKey !== 'else') { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'WARNING: tag `' + tagName + '` attr `' + attrKey + '`' + 'is null', + }) + } + } + }) + } +} + +/** + * validate whether the required tag + * included in the tag + * + * @param {String} tagName + * @param {Object} domNodeAttrName + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateRequireAttrTagMap(tagName, domNodeAttrName, nodeLoc, log) { + if (requireAttrTagMap[tagName]) { + requireAttrTagMap[tagName].forEach(function(attrKey) { + if (domNodeAttrName.indexOf(attrKey) < 0) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: tag `' + tagName + '` not define attr `' + attrKey + '`', + }) + } + }) + } +} + +/** + * validate whether the tag include + * illegal enum attr + * + * @param {String} tagName + * @param {Object} domNodeAttrName + * @param {Object} nodeAttrs + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateEnumAttrTagMap(tagName, domNodeAttrName, domNodeAttrs, nodeLoc, log) { + if (enumAttrTagMap[tagName]) { + Object.keys(enumAttrTagMap[tagName]).forEach(function(attrKey) { + const index = domNodeAttrName.indexOf(attrKey) + if (index >= 0) { + const v = domNodeAttrs[index].value.trim() + if (!REG_DATA_BINDING.test(v)) { + const attrValueEnum = enumAttrTagMap[tagName][attrKey] + if (attrValueEnum.indexOf(v) < 0) { + domNodeAttrs[index].value = attrValueEnum[0] + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: tag `' + tagName + '` attr `' + attrKey + '` value `' + v + '` is illegal', + }) + } + } + } + }) + } +} + +/** + * verify the validity of func + * attr of the tag + * + * @param {String} tagName + * @param {Object} domNodeAttrName + * @param {Object} domNodeAttrs + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateFuncAttrTagMap(tagName, domNodeAttrName, domNodeAttrs, nodeLoc, log) { + if (funcAttrTagMap[tagName]) { + Object.keys(funcAttrTagMap[tagName]).forEach(function(attrKey) { + const n = domNodeAttrName.indexOf(attrKey) + if (n >= 0) { + const v = domNodeAttrs[n].value + if (!REG_DATA_BINDING.test(v)) { + const func = funcAttrTagMap[tagName][attrKey] + const validator = styleValidator.validateFuncMap[func] + if (typeof validator == 'function') { + const res = validator(v) + if (res && res.reason) { + domNodeAttrs[n].value = res.value + const rea = res.reason(attrKey, v, res.value) + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: rea, + }) + } + } + } + } + }) + } +} + +/** + * verify the validity of event + * attr in this tag + * + * @param {String} tagName + * @param {Object} domNodeAttrName + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateEventsTagMap(tagName, domNodeAttrName, nodeLoc, log) { + if (eventsTagMap[tagName]) { + const eventArray = eventsTagMap[tagName] + domNodeAttrName.forEach(function(attrKey) { + if (attrKey.match(EVENT_START_REGEXP)) { + const tempName = attrKey.replace(EVENT_START_REGEXP, '') + const eventName = (tempName.match(TOUCH_CAPTURE_EVENT_REGEXP) && process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH && + process.env.PLATFORM_VERSION === PLATFORM.VERSION6) ? tempName : tempName.replace(EVENT_END_REGEXP, '') + if (eventArray.indexOf(eventName.toLowerCase()) < 0) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'WARNING: tag `' + tagName + '` not support event `' + eventName + '`', + }) + } + } + }) + } +} + +/** + * verify validity of tag children + * verify the children is validity + * + * @param {String} tagName + * @param {Object} children + * @param {Object} nodeLoc + * @param {Object} log + */ +function validateTagWithAll(tagName, children, nodeLoc, log) { + if (tagWithAll.indexOf(tagName) >= 0 && children.length > 0) { + const childrenArray = childrenTagMap[tagName] + const unSupportedChildrenArray = unSupportedChildren[tagName] + const isTabs = tagName === 'tabs' + let tabContentCount = void 0 + let tabBarCount = void 0 + if (isTabs) { + tabBarCount = 0 + tabContentCount = 0 + } + children.forEach(function(child) { + if (tagWithAll.indexOf(child.nodeName) >= 0) { + const t = parentsTagMap[child.nodeNames] + if ((t && t.indexOf(tagName) < 0) || (childrenArray && childrenArray.indexOf(child.nodeName) < 0) || + (unSupportedChildrenArray && unSupportedChildrenArray.indexOf(child.nodeName) >= 0)) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: tag `' + tagName + '` not support child tag `' + child.nodeName + '`', + }) + if (isTabs) { + let count = 0 + if (child.nodeName === 'tab-content') { + count = ++tabContentCount + } + if (child.nodeName === 'tab-bar') { + count = ++tabBarCount + } + if (count > 1) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: tag `tabs` child tag `' + child.nodeName + '` support at most one', + }) + } + } + } + } + }) + } +} + +/** + * validate attr of lite device + * + * @param {String} tagName + * @param {Object} domNodeAttrs + * @param {Object} domNodeAttrName + * @param {Object} log + * @param {Object} nodeLoc + */ +function validatorLite(tagName, domNodeAttrs, domNodeAttrName, log, nodeLoc) { + if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE) { + inputLite(tagName, domNodeAttrs, domNodeAttrName, log, nodeLoc) + + // in lite device, not support writing `if` and `for` in the same component + if (ismatchIfAndFor(domNodeAttrName)) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: in tag `' + tagName + '` not support writing `if` and `for` in the same component', + }) + } + // in lite device, class selector does not support data binding + classLite(tagName, domNodeAttrs, log, nodeLoc) + } +} + +/** + * validate the type when + * event change + * + * @param {String} tagName + * @param {Object} domNodeAttrs + * @param {Object} domNodeAttrName + * @param {Object} log + * @param {Object} nodeLoc + */ +function inputLite(tagName, domNodeAttrs, domNodeAttrName, log, nodeLoc) { + let typeValue + if (tagName=== 'input') { + domNodeAttrs.map(function(item) { + if (item.name === 'type') { + typeValue = item.value + } + }) + if (isMatchChange(typeValue, domNodeAttrName)) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: tag `' + tagName + '` not support event `change` when the type is not checkbox and radio', + }) + } + } +} + +function isMatchChange(typeValue, nodeAttrName) { + return !['checkbox', 'radio'].includes(typeValue) && (nodeAttrName.includes('onchange') || nodeAttrName.includes('@change')) +} + +function ismatchIfAndFor(nodeAttrName) { + return nodeAttrName.includes('if') && nodeAttrName.includes('for') +} + +function classLite(tagName, domNodeAttrs, log, nodeLoc) { + // in lite device, class selector does not support data binding + domNodeAttrs.map(function(item) { + if (item.name === 'class' && bind.containExp(item.value)) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: in tag `' + tagName + '` class selector does not support data binding.', + }) + } + }) +} + +/** + * parse class for tag + * + * @param {String} classNames + * @param {Object} out + */ +function validateClass(classNames, out, nodeLoc, relativePath) { + classNames = classNames.trim() + setDebugLine(out.jsonTemplate, relativePath, nodeLoc.line, classNames) + if (bind.containExp(classNames)) { + out.jsonTemplate.classList = eval(bind.transExpForList(classNames)) + } else { + out.jsonTemplate.classList = classNames.split(/\s+/) + } +} + +function preprocessSystemResourceReference(styleContent, cssStyle) { + if (styleContent.length !== 2) { + return false; + } + const key = styleContent[0].trim().replace(/-([a-z])/g, function(s, m) { return m.toUpperCase() }) + let value = styleContent[1].trim() + let result + // target format: {{$r("ohos.id_color_background")}} or {{$r('ohos.id_color_background')}} + let ResourceRefReg = /{{\s*\$r\s*\(\s*(['"]ohos\.(?\w+)['"])\s*\)\s*}}/ + result = ResourceRefReg.exec(value); + if (result) { + const resourceName = result.groups['resName'] + if (resourceName && OHOS_THEME_PROP_GROUPS[resourceName]) { + cssStyle[key] = "@ohos_id_" + OHOS_THEME_PROP_GROUPS[resourceName] + return true + } + } + // target format: {{$r("sys.type.id_color_background")}} or {{$r('sys.type.id_color_background')}} + // The "type" field can be "float", "color", "string" and so on. + let SysResourceTypeRefReg = /{{\s*\$r\s*\(\s*(['"]sys\.(?\w+)\.(?\w+)['"])\s*\)\s*}}/ + result = SysResourceTypeRefReg.exec(value); + if (result) { + const resourceName = result.groups['resName'] + const resourceType = result.groups['resType'] + if (resourceName && resourceType && OHOS_THEME_PROP_GROUPS[resourceName]) { + cssStyle[key] = "@sys." + resourceType + "." + OHOS_THEME_PROP_GROUPS[resourceName] + return true + } + } + // target format: {{$r("app.type.developer_defined_color")}} or {{$r('app.type.developer_defined_color')}} + // The "type" field can be "float", "color", "string" and so on. + let AppResourceTypeRefReg = /{{\s*\$r\s*\(\s*(['"]app\.(?\w+)\.(?\w+)['"])\s*\)\s*}}/ + result = AppResourceTypeRefReg.exec(value); + if (result) { + const resourceName = result.groups['resName'] + const resourceType = result.groups['resType'] + if (resourceName && resourceType) { + cssStyle[key] = "@app." + resourceType + "." + resourceName + return true + } + } + return false +} + +function validateItem(key, value, nodeLoc, log) { + const valuejsonTemplate = styler.validateItem(key, value) + if (valuejsonTemplate.log) { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: valuejsonTemplate.log.reason + }) + } + return valuejsonTemplate +} + +/** + * parse style for tag + * + * @param {String} css + * @param {Object} out + * @param {Object} nodeLoc + */ +function validateStyle(css, out, nodeLoc, relativePath) { + const log = out.log + if (css) { + const cssStyle = {} + const cssArray = css.split(';') + for (let i = 0; i < cssArray.length; i++) { + let styleContent = cssArray[i].trim().split(':') + if (preprocessSystemResourceReference(styleContent, cssStyle)) { + continue; + } + if (styleContent.length === 2) { + const key = styleContent[0].trim().replace(/-([a-z])/g, function(s, m) { return m.toUpperCase() }) + let value = bind(styleContent[1].trim(), undefined, true, out, nodeLoc) + if (key === 'flex' && typeof value === 'string') { + expandFlex(key, value, cssStyle, nodeLoc, log) + } else { + const valuejsonTemplate = validateItem(key, value, nodeLoc, log) + value = valuejsonTemplate.value + if (['[object Number]', '[object String]', '[object Function]', '[object Object]', '[object Array]'].includes( + Object.prototype.toString.call(value))) { + expandStyle(key, value, valuejsonTemplate, cssStyle, out, nodeLoc, log) + } + } + } + if (styleContent.length > 2) { + styleContent[1] = styleContent.slice(1).join(':') + styleContent = styleContent.slice(0, 2) + if (REG_DATA_BINDING.test(styleContent[1])) { + styleContent[0] = styleContent[0].trim().replace(/-([a-z])/g, function(s, m) { return m.toUpperCase() }) + cssStyle[styleContent[0]] = bind(styleContent[1], undefined, true, out, nodeLoc) + } else { + // handle special cases like "background-image: url('https://xxx.jpg')" + const key = styleContent[0].trim().replace(/-([a-z])/g, function(s, m) { return m.toUpperCase() }) + if (key === 'backgroundImage') { + let value = styleContent[1].trim() + const valuejsonTemplate = validateItem(key, value, nodeLoc, log) + cssStyle[key] = valuejsonTemplate.value + } + } + } + } + out.jsonTemplate.style = cssStyle + setDebugLine(out.jsonTemplate, relativePath, nodeLoc.line) + } else { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'WARNING: style attr is null' + }) + } +} + +function expandFlex(key, value, cssStyle, nodeLoc, log) { + const valueArray = value.split(/\s+/) + if (valueArray.length === 1) { + expandFlexOne(key, valueArray, cssStyle, nodeLoc, log) + } else if (valueArray.length === 2) { + expandFlexTwo(key, value, valueArray, cssStyle, nodeLoc, log) + } else if (valueArray.length === 3) { + expandFlexThree(key, value, valueArray, cssStyle, nodeLoc, log) + } else { + log.push({ + line: nodeLoc.line, + column: nodeLoc.column, + reason: 'ERROR: Value `' + value + '` of the `' + key + '` attribute is incorrect.', + }) + } +} + + +function expandFlexOne(key, valueArray, cssStyle, nodeLoc, log) { + const array = ['none', 'auto', 'initial'] + if (array.includes(valueArray[0])) { + cssStyle['flex'] = valueArray[0] + } else if (styler.getUnit(valueArray[0]) === 'px') { + cssStyle['flexBasis'] = valueArray[0] + } else if (styler.getUnit(valueArray[0]) === 'none') { + cssStyle['flexGrow'] = valueArray[0] + } else { + log.push({ + line: nodeLoc.line, + column: nodeLoc.column, + reason: 'ERROR: Value `' + valueArray[0] + '` of the `' + key + '` attribute is incorrect.' + + 'It must be a number, a number with unit `' + 'px`' + ', none, auto, or initial.', + }) + } +} + +function expandFlexTwo(key, value, valueArray, cssStyle, nodeLoc, log) { + if (styler.getUnit(valueArray[0]) === 'none') { + cssStyle['flexGrow'] = valueArray[0] + if (styler.getUnit(valueArray[1]) === 'px') { + cssStyle['flexBasis'] = valueArray[1] + } else if (styler.getUnit(valueArray[1]) === 'none') { + cssStyle['flexShrink'] = valueArray[1] + } else { + log.push({ + line: nodeLoc.line, + column: nodeLoc.column, + reason: 'ERROR: Value `' + value + '` of the `' + key + '` attribute is incorrect. Value `' + + valueArray[1] + '` must be a number or a number with unit `' + 'px`.', + }) + } + } else { + log.push({ + line: nodeLoc.line, + column: nodeLoc.column, + reason: 'ERROR: Value `' + value + '` of the `' + key + '` attribute is incorrect. Value `' + valueArray[0] + '` must be a number.', + }) + } +} + +function expandFlexThree(key, value, valueArray, cssStyle, nodeLoc, log) { + if (styler.getUnit(valueArray[0]) === 'none' && styler.getUnit(valueArray[1]) === 'none' && + styler.getUnit(valueArray[2]) === 'px') { + cssStyle['flexGrow'] = valueArray[0] + cssStyle['flexShrink'] = valueArray[1] + cssStyle['flexBasis'] = valueArray[2] + } else { + log.push({ + line: nodeLoc.line, + column: nodeLoc.column, + reason: 'ERROR: Value `' + value + '` of the `' + key + '` attribute is incorrect. It must be in the format of (1, 1, 1px).', + }) + } +} + +function expandStyle(key, value, valuejsonTemplate, cssStyle, out, nodeLoc, log) { + if (Object.values(styler.util.SPLECIAL_ATTR).includes(key) && typeof value !== 'function') { + styler.expand(valuejsonTemplate, key, cssStyle) + } else if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE && key === 'border' && typeof value === 'function') { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: ' + key + ' shorthand inline style does not support data binding.', + }) + } else if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE && out.jsonTemplate.type === 'list' && + key == 'flexDirection' && typeof value === 'function') { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'ERROR: `list` tag `flex-direction` inline style does not support data binding.', + }) + } else { + cssStyle[key] = value + } +} + +/** + * parse if and else expression + * + * @param {String} val + * @param {Object} out + * @param {Boolean} flag + * @param {Object} nodeLoc + */ +function validateIf(val, out, flag, nodeLoc, relativePath) { + if (!REG_DATA_BINDING.test(val)) { + if (val.trim() === 'false' || val === '') { + val = card ? false : '{{false}}' + } else { + val = card ? true : '{{true}}' + } + } + if (flag) { + const content = val.replace('{{', '').replace('}}', '') + val = !card ? '{{!(' + content + ')}}' : + REG_DATA_BINDING.test(val) ? '!{{' + content + '}}' : '!' + content + } + const value = bind(val, undefined, false, out, nodeLoc) + const show = card && flag && /\$f/.test(value) ? value.substr(3, value.length - 4) : value + out.jsonTemplate.shown = show + setDebugLine(out.jsonTemplate, relativePath, nodeLoc.line) +} + +/** + * parse elif and else expression + * + * @param {String} val + * @param {Object} out + * @param {Boolean} flag + */ +function validateElif(val, out, flag, nodeLoc, relativePath) { + if (!REG_DATA_BINDING.test(val)) { + val = card ? val : '{{' + val + '}}' + } + if (val) { + if (flag) { + const first = val.indexOf('&&') + const content = !card ? + '{{!(' + val.substr(2, first - 2) + ')' : + REG_DATA_BINDING.test(val) ? + '!{{' + val.substr(2, first - 2) : + '!' + val.substr(0, first) + val = content + val.substr(first, val.length) + } + const value = bind(val, undefined, false, out, nodeLoc) + out.jsonTemplate.shown = card && /\$f/.test(value) ? value.substr(3, value.length - 4) : value + setDebugLine(out.jsonTemplate, relativePath, nodeLoc.line) + } +} + +/** + * + * parse for expression + * + * @param {String} val + * @param {Object} out + * @param {Object} nodeLoc + */ +function validateFor(val, out, nodeLoc, relativePath) { + const log = out.log + if (val) { + if (val.startsWith('{{') && val.endsWith('}}')) { + val = val.substr(2, val.length - 4) + } + let forMatch + const suffix = val.match(/(?<=in\s)(.*)/) + const prefix = val.match(/(.*)(?=\s+in\s+)/) + if (suffix && prefix) { + const v = prefix[0].match(/\((.*),(.*)\)/) + forMatch = { exp: bind(('{{' + suffix[0].trim() + '}}'), undefined, false, out, nodeLoc) } + if (v) { + forMatch.key = v[1].trim() + forMatch.value = v[2].trim() + } else { + forMatch.value = prefix[0].trim() + } + } else { + forMatch = bind('{{' + val + '}}', undefined, false, out, nodeLoc) + } + out.jsonTemplate.repeat = forMatch + setDebugLine(out.jsonTemplate, relativePath, nodeLoc.line) + } else { + log.push({ + line: nodeLoc.line || 1, + column: nodeLoc.col || 1, + reason: 'WARNING: for attr is null', + }) + } +} + +/** + * parse id for tag + * + * @param {String} id + * @param {Object} out + */ +function validateId(id, out, nodeLoc, relativePath) { + if (id) { + out.jsonTemplate.id = REG_DATA_BINDING.test(id) ? bind(id, undefined, true, out, nodeLoc) : id + setDebugLine(out.jsonTemplate, relativePath, nodeLoc.line) + if (!card) { + out.jsonTemplate.attr = out.jsonTemplate.attr || {} + out.jsonTemplate.attr[styler.util.hyphenedToCamelCase('id')] = bind(id, undefined, true, out, nodeLoc) + } + } +} + +/** + * parse append for tag + * + * @param {String} val + * @param {Object} out + */ +function validateAppend(val, out, nodeLoc, relativePath) { + if (val) { + out.jsonTemplate.append = bind(val, undefined, true, out, nodeLoc) + setDebugLine(out.jsonTemplate, relativePath, nodeLoc.line) + } +} + +const EVENT_START_REGEXP = /^(on:|on|@|grab:)/; +const EVENT_END_REGEXP = /(\.bubble|\.capture)$/; +const START_CATCH_REGEXP = /^(grab:)/; +const END_CAPTURE_REGEXP = /(\.capture)$/; +const TOUCH_EVENT_REGEXP = /^(touch)/; +const CLICK_EVENT_REGEXP = /click/; +const TOUCH_CAPTURE_EVENT_REGEXP = /^(?!touch).*?(\.capture)$/; + +/** + * parse event for tag + * + * @param {String} eventName + * @param {Object} val + * @param {Object} out + */ +function validateEvent(eventName, val, out, pos, relativePath) { + const tempName = eventName.replace(EVENT_START_REGEXP, '') + const name = (tempName.match(TOUCH_CAPTURE_EVENT_REGEXP) && process.env.PLATFORM_VERSION === PLATFORM.VERSION6 && + process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH) ? tempName : tempName.replace(EVENT_END_REGEXP, '') + if (name && val) { + if (card && val.match(/(.*)\((.*)\)/)) { + out.log.push({ + line: pos.line || 1, + column: pos.col || 1, + reason: 'ERROR: The event `' + val + '` does not support.' + }) + return + } + if (REG_DATA_BINDING.test(val)) { + val = bind.removeAllExpFix(val.trim()) + } + // empty event param e.g. onclick="test()" + const empty = val.match(/(.*)\(\)$/) + if (empty) { + val = empty[1] + } else { + const content = val.match(REG_EVENT) + if (content) { + const functionName = content[1] + let paramList = content[2] + if (paramList) { + paramList = transContent.parseExpression(paramList, true) + val = eval('(function (evt) {' + bind('{{' + functionName + '(' + paramList + ',evt)}}', false, true, out, pos) + '})') + } + } + } + if ((process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE || TOUCH_EVENT_REGEXP.test(name)) && + process.env.PLATFORM_VERSION !== PLATFORM.VERSION3) { + if (eventName.match(START_CATCH_REGEXP)) { + if (eventName.match(END_CAPTURE_REGEXP)) { + out.jsonTemplate.catchCaptureEvents = out.jsonTemplate.catchCaptureEvents || {} + out.jsonTemplate.catchCaptureEvents[name] = val + } else { + out.jsonTemplate.catchBubbleEvents = out.jsonTemplate.catchBubbleEvents || {} + out.jsonTemplate.catchBubbleEvents[name] = val + } + } else if (eventName.match(END_CAPTURE_REGEXP)) { + out.jsonTemplate.onCaptureEvents = out.jsonTemplate.onCaptureEvents || {} + out.jsonTemplate.onCaptureEvents[name] = val + } else { + out.jsonTemplate.onBubbleEvents = out.jsonTemplate.onBubbleEvents || {} + out.jsonTemplate.onBubbleEvents[name] = val + } + } else if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH && CLICK_EVENT_REGEXP.test(name) && + !eventName.match(END_CAPTURE_REGEXP) && process.env.PLATFORM_VERSION === PLATFORM.VERSION6) { + if (eventName.match(START_CATCH_REGEXP)) { + out.jsonTemplate.catchBubbleEvents = out.jsonTemplate.catchBubbleEvents || {} + out.jsonTemplate.catchBubbleEvents[name] = val + } else { + out.jsonTemplate.onBubbleEvents = out.jsonTemplate.onBubbleEvents || {} + out.jsonTemplate.onBubbleEvents[name] = val + } + } else { + out.jsonTemplate.events = out.jsonTemplate.events || {} + out.jsonTemplate.events[name] = val + } + setDebugLine(out.jsonTemplate, relativePath, pos.line) + } +} + +const transArray = [/\\a/g, /\\b/g, /\\f/g, /\\n/g, /\\r/g, /\\t/g, + /\\v/g, /\\\\/g, /\\'/g, /\\"/g, /\\0/g] +const transReplaceArray = ['\a', '\b', '\f', '\n', '\r', '\t', + '\v', '\\', '\'', '\"', '\0'] + +function validateAttr(resourcePath, attrName, attrValue, out, tagName, nodeLoc, relativePath) { + if (card && attrName === 'tid' && bind.isExp(attrValue)) { + out.log.push({ + line: nodeLoc.line, + column: nodeLoc.col, + reason: `ERROR: The 'tid' cannot support the expression.` + }) + } + if (attrName === 'value') { + transArray.forEach((trans, index) => { + attrValue = attrValue.replace(trans, transReplaceArray[index]) + }) + } + if (attrName && (typeof attrValue === 'string' || typeof attrValue === 'number') && attrValue) { + if (attrName === 'value' && tagName === 'text') { + out.log.push({ + line: nodeLoc.line, + column: nodeLoc.col, + reason: 'WARNING: `value` content could be written between and ', + }) + } + + // dealing with + let result + // target format: {{$r('sys.media.sys_background_image')}} + let SysResourceTypeRefReg = /{{\s*\$r\s*\(\s*(['"]sys\.media\.(?\w+)['"])\s*\)\s*}}/ + result = SysResourceTypeRefReg.exec(attrValue); + if (result) { + const resourceName = result.groups['resName'] + if (resourceName && OHOS_THEME_PROP_GROUPS[resourceName]) { + attrValue = "@sys.media." + OHOS_THEME_PROP_GROUPS[resourceName] + } + } + // target format: {{$r('app.media.customized_background_image')}} + let AppResourceTypeRefReg = /{{\s*\$r\s*\(\s*(['"]app\.media\.(?\w+)['"])\s*\)\s*}}/ + result = AppResourceTypeRefReg.exec(attrValue); + if (result) { + const resourceName = result.groups['resName'] + if (resourceName) { + attrValue = "@app.media." + resourceName + } + } + + if (tagWithPath.indexOf(attrName) >= 0 && attrValue.match(/^\.\.\/|^\.\//)) { + if (!resourcePath) { + return + } + if (attrValue.indexOf('./') >= 0) { + resourcePath = resourcePath.substring(0, resourcePath.lastIndexOf(path.sep) + 1) + attrValue = path.resolve(resourcePath, attrValue) + } + attrValue = attrValue.replace(projectPath, '').replace(/\\/g, '/') + } + out.jsonTemplate.attr = out.jsonTemplate.attr || {} + out.jsonTemplate.attr[attrName.replace(/-([a-z])/g, function (s, m) { return m.toUpperCase() })] = + bind(attrValue, undefined, true, out, nodeLoc) + setDebugLine(out.jsonTemplate, relativePath, nodeLoc.line) + } +} + +/** + * parse elif attr + * + * @param {Object} preNode + * @param {String} attrValue + * @param {Object} hmlAttrs + * @param {Number} i + * @param {Object} out + */ +function validateAttrElif(preNode, attrValue, hmlAttrs, i, out, nodeLoc, relativePath) { + if (preNode && preNode.attrs) { + for (let j = 0; j < preNode.attrs.length; j++) { + const prop = preNode.attrs[j] + const newAttrValue = attrValue.replace('{{', '').replace('}}', '') + if (prop.name === 'if') { + const newPropValue = prop.value.replace('{{', '').replace('}}', '') + attrValue = !card ? + '{{' + newAttrValue + '&&!(' + newPropValue + ')}}' : + REG_DATA_BINDING.test(attrValue) ? + '{{' + newAttrValue + '}}' + '&&!{{' + newPropValue + '}}' : + newAttrValue + ' && !' + newPropValue + validateElif(attrValue, out, false, nodeLoc, relativePath) + } + if (prop.name === 'elif') { + const first = prop.value.indexOf('&&') + const firstPropValue = prop.value.substr(0, first).replace("{{", '') + const lengthPropValue = prop.value.substr(first, prop.value.length) + attrValue = !card ? + '{{' + newAttrValue + '&&!(' + firstPropValue + ')' + lengthPropValue : + REG_DATA_BINDING.test(attrValue) ? + '{{' + newAttrValue + '}}' + '&&!{{' + firstPropValue + lengthPropValue : + newAttrValue + ' && !' + firstPropValue + lengthPropValue + validateElif(attrValue, out, false, nodeLoc, relativePath) + } + } + } + hmlAttrs[i].value = attrValue +} + +/** + * parse else attr + * + * @param {Object} preNode + * @param {Object} out + * @param {Object} nodeLoc + */ +function validateAttrElse(preNode, out, nodeLoc, relativePath) { + if (preNode && preNode.attrs) { + for (let j = 0; j < preNode.attrs.length; j++) { + const prop = preNode.attrs[j] + if (prop.name === 'if') { + validateIf(prop.value, out, true, nodeLoc, relativePath) + } + if (prop.name === 'elif') { + validateElif(prop.value, out, true, nodeLoc, relativePath) + } + } + } +} + +function parseDataAttr(name, value, out) { + const childName = name.replace('data-', '') + out.jsonTemplate.attr = out.jsonTemplate.attr || {} + out.jsonTemplate.attr.data = out.jsonTemplate.attr.data || {} + out.jsonTemplate.attr.data[childName] = bind(value, undefined, true, out) +} + +function isSupportedSelfClosing(tagName) { + if (tagName && typeof tagName === 'string') { + const n = aliasTagMap[tagName] + if (n) { + if (nativeTag[n] && tagSelfClosing.indexOf(n) !== -1) { + return true + } + } else { + if (nativeTag[tagName] && tagSelfClosing.indexOf(tagName) !== -1) { + return true + } + } + } + return false +} + +function validateDataAttr(e) { + return REG_TAG_DATA_ATTR.test(e) +} + +function isReservedTag(tagName) { + return tagWithAll.indexOf(tagName) !== -1 +} + +function setDebugLine(jsonTemplate, relativePath, line, className) { + jsonTemplate.attr = jsonTemplate.attr || {} + if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH && process.env.buildMode === 'debug') { + jsonTemplate.attr['debugLine'] = relativePath + ':' + line + if (className) { + jsonTemplate.attr['className'] = className + } + } +} + +module.exports = { + validateTagName: validateTagName, + validateId: validateId, + validateClass: validateClass, + validateStyle: validateStyle, + validateIf: validateIf, + validateElif: validateElif, + validateFor: validateFor, + validateAppend: validateAppend, + validateEvent: validateEvent, + validateAttr: validateAttr, + validateAttrElse: validateAttrElse, + validateAttrElif: validateAttrElif, + parseDataAttr: parseDataAttr, + + isReservedTag: isReservedTag, + isSupportedSelfClosing: isSupportedSelfClosing, + elementNames: elementNames +} diff --git a/ace-loader/plugin/templater/content.js b/ace-loader/plugin/templater/content.js new file mode 100644 index 000000000..781334a3a --- /dev/null +++ b/ace-loader/plugin/templater/content.js @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +var parser = require("@babel/parser") +var traverse = require("@babel/traverse").default +var generate = require("@babel/generator").default + +function parseExpression(expression, isEventFunc) { + const keyWordsReg = new RegExp(`^(NaN\\b|isNaN\\b|isFinite\\b|decodeURI\\b|decodeURIComponent\\b|Math\\b|Date\\b|this\\b|true\\b|false\\b| + encodeURI\\b|encodeURIComponent\\b|parseInt\\b|parseFloat\\b|null\\b|undefined\\b|Infinity\\b)`, 'g') + const internalKeyWords = new RegExp(`^(var\\b|while\\b|with\\b|yield\\b|enum\\b|await\\b|implements\\b|package\\b|for\\b|function\\b|if\\b|import\\b| + protected\\b|static\\b|interface\\b|private\\b|public\\b|break\\b|case\\b|class\\b|catch\\b|const\\b|continue\\b|debugger\\b| + default\\b|delete\\b|do\\b|else\\b|export\\b|extends\\b|finally\\b|in\\b|instanceof\\b|let\\b|return\\b|super\\b|switch\\b|throw\\b|try\\b)`, 'g') + const reservedKeyWords = new RegExp(`^(var\\b|while\\b|with\\b|yield\\b|enum\\b|await\\b|implements\\b|package\\b|for\\b|function\\b|if\\b|import\\b| + protected\\b|static\\b|interface\\b|private\\b|public\\b|break\\b|case\\b|class\\b|catch\\b|const\\b|continue\\b|debugger\\b| + default\\b|delete\\b|do\\b|else\\b|export\\b|extends\\b|finally\\b|in\\b|instanceof\\b|let\\b|return\\b|super\\b|switch\\b|throw\\b|try\\b|show\\b|tid\\b)$`, 'g') + try { + if (reservedKeyWords.test(expression)) { + throw Error("A data binding parsing error occurred. Do not use the reserved:" + expression).message + } + let expAst = isEventFunc ? parser.parse('(' + expression + ')') : parser.parse(expression) + traverse(expAst, { + enter(path) { + if (path.parent && path.node.type === "Identifier") { + let flag = false + if (['ConditionalExpression', 'BinaryExpression'].includes(path.parent.type) || + path.parent.type === 'CallExpression' && path.parent.callee === path.node) { + flag = true + } + else if (path.parent.type === "ObjectProperty" && !path.parent.computed && path.parent.value === path.node) { + flag = true + } + else { + flag = addPrefix(path.node, path.parent) + } + if (flag && !keyWordsReg.test(path.node.name)) { + path.node.name = 'this.' + path.node.name + } + } + } + }) + return generate(expAst, { compact: true }).code.replace(';', '').replace(/\"/g, '\'').replace(/\n/g, '') + } catch (e) { + if (isEventFunc) { + throw internalKeyWords.test(expression) ? Error("An event parsing error occurred. Do not use the reserved:" + expression).message : + Error("An event parsing error occurred:" + expression).message + } else { + throw internalKeyWords.test(expression) ? Error("A data binding parsing error occurred. Do not use the reserved:" + expression).message : + Error("A data binding parsing error occurred:" + expression).message + } + } +} + +function addPrefix(node, parent) { + const attrArr1 = ['expression', 'argument', 'expressions', 'elements', 'left', 'right'] + const attrArr2 = ['object', 'property', 'id', 'key'] + let keyArr = Object.keys(parent) + for (let i = 0; i < attrArr1.length; i++) { + if (keyArr.includes(attrArr1[i])) { + if (parent[attrArr1[i]] === node || ['expressions', 'elements'].includes(attrArr1[i]) && + parent[attrArr1[i]].includes(node)) { + return true + } + } + } + for (let i = 0; i < attrArr2.length; i++) { + if (keyArr.includes(attrArr2[i])) { + if (parent.computed && parent[attrArr2[i]] === node) { + return true + } else { + if (parent.type === "Property" && parent.key.range[0] === parent.value.range[0] && + parent.key.range[1] === parent.value.range[1]) { + node.name = node.name + ":this." + node.name + } else if (parent.object === node) { + return true + } + } + } + } + return false +} + +exports.parseExpression = parseExpression diff --git a/ace-loader/plugin/templater/data.js b/ace-loader/plugin/templater/data.js new file mode 100644 index 000000000..32ab35a87 --- /dev/null +++ b/ace-loader/plugin/templater/data.js @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const reg = '{{{((.|\n)+?)}}}|{{((.|\n)+?)}}' +const dataReg = new RegExp(reg, 'g') +const expressionReg = new RegExp(reg) + +/** + * Parse expression in hml text + */ +function parseData(v) { + v.match(dataReg).forEach(element => { + const repElement = element.toString().trim().replace(/\n/g, '') + v = v.replace(element, repElement) + }) + + if (!expressionReg.test(v)) { + return null + } + let start + let next = 0 + const res = [] + dataReg.lastIndex = 0 + for (let i = next; i < v.length; i++) { + let match = dataReg.exec(v) + if (!match) { + break + } + start = match.index + getValue(next, start, v, res) + parseValue(match, res) + next = start + match[0].length + } + getValue(next, v.length, v, res) + return res +} + +function getValue(begin, end, v, res) { + if (begin < end) { + res.push({ + value: v.slice(begin, end) + }) + } +} + +function parseValue(match, res) { + let three= /^{{{.*}}}$/.test(match[0]) + let v = three ? match[1] : match[3] + res.push({ + tag: true, + value: v.trim() + }) +} + +exports.parseText = parseData diff --git a/ace-loader/plugin/templater/index.js b/ace-loader/plugin/templater/index.js new file mode 100644 index 000000000..7bed2cc56 --- /dev/null +++ b/ace-loader/plugin/templater/index.js @@ -0,0 +1,298 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const componentValidator = require('./component_validator') +const Parser = require('../parse/parser/index') +const path = require('path') +let compileResult +const EVENT_START_REGEXP = /^(on:|on|@|grab:)/ +const REGEXP_TEXT = /^#/ +const REGEXP_DATA = /^data-/ + +/** + * Compile html file into ast object. + * @param {String} source Hml file content. + * @param {Function} operate The second number. + * @param {String} filePath File resource path. + */ +function parse(source, operate, filePath) { + const pathParse = path.parse(filePath) + let relativePath = pathParse.dir.replace(process.env.aceModuleRoot || + process.cwd(), '') + '/' + pathParse.base.replace(pathParse.ext, '') + relativePath = replaceAll(path.sep, '/', relativePath).replace('/', '') + const result = { jsonTemplate: {}, deps: [], log: [] } + compileResult = result + const template = hmlParse(source, { + sourceCodeLocationInfo: true, + }) + if (checkNullNode(template, operate) || checkRootNode(template, operate, relativePath)) { + return + } + const rootArray = template.childNodes.filter(function(currentValue) { + return currentValue.nodeName.indexOf('#') === -1 + }) + let rootIndex = 0 + rootArray.forEach((root, index) => { + if(root.tagName !== 'element') { + rootIndex = index + } + }) + generate(rootArray[rootIndex], filePath, undefined, relativePath) + operate(null, compileResult) +} + + +/** + * Use parse5 to get html conversion results. + * @param {String} code Hml file content. + * @param {Object} config parse5 parseFragment function config. + * @return {Object} html conversion results. + */ +function hmlParse(code, config) { + const parse = new Parser({ sourceCodeLocationInfo: true, componentValidator, compileResult }) + const res = parse.parseFragment(code, config) + return res +} + +/** + * Check if the hml file does not contain nodes. + * @param {String} template hml conversion results. + * @return {Boolean} Check result. + */ +function checkNullNode(template, operate) { + let errorFlag = false + if (template.childNodes.length === 0) { + compileResult.log.push({ reason: 'ERROR: parsing hml file failed' }) + operate(null, compileResult) + errorFlag = true + } + return errorFlag +} + +/** + * Check if the root node is legal. + * @param {String} template hml conversion results. + * @return {Boolean} Check result. + */ +function checkRootNode(template, operate, relativePath) { + let errorFlag = false + const rootArray = template.childNodes.filter(function(currentValue) { + return currentValue.nodeName.indexOf('#') === -1 + }) + let rootNum = 0 + rootArray.forEach(root => { + if (root.nodeName !== 'element') { + rootNum ++ + } else if (root.attrs && root.attrs.length) { + for (let index = 0; index < root.attrs.length; index++) { + const element = root.attrs[index]; + if (element.name === 'name') { + componentValidator.elementNames[relativePath] = componentValidator.elementNames[relativePath] || [] + componentValidator.elementNames[relativePath].push(element.value) + break + } + } + } + }) + if (rootNum !== 1) { + if (!rootNum) { + compileResult.log.push({ + reason: 'ERROR: need a legal root node', + line: 1, + column: 1, + }) + } + if (rootNum > 1) { + compileResult.log.push({ + reason: 'ERROR: there can only be one root node', + line: 1, + column: 1, + }) + } + operate(null, compileResult) + errorFlag = true + } + return errorFlag +} +/** + * Recursively parse every node. + * @param {Object} node Nodes that need to be resolved. + * @param {String} filePath File resource path. + * @param {Object} preNode the previous node. + */ +function generate(node, filePath, preNode, relativePath) { + componentValidator.validateTagName(node, compileResult, relativePath) + if (node.attrs && node.attrs.length !== 0) { + checkNodeAttrs(node, filePath, preNode, relativePath) + } + if (node.childNodes && node.childNodes.length !== 0) { + checkNodeChildren(node, filePath, relativePath) + } +} + +/** + * Parse node properties. + * @param {Object} node Nodes that need to be resolved. + * @param {String} filePath File resource path. + * @param {Object} preNode the previous node. + */ +function checkNodeAttrs(node, filePath, preNode, relativePath) { + const attributes = node.attrs + const pos = { + line: node.sourceCodeLocation.startLine, + col: node.sourceCodeLocation.endLine, + } + attributes.forEach((attr, index) => { + const attrName = attr.name + const attrValue = attr.value + switch (attrName) { + case 'style': + componentValidator.validateStyle(attrValue, compileResult, pos, relativePath) + break + case 'class': + componentValidator.validateClass(attrValue, compileResult, pos, relativePath) + break + case 'id': + componentValidator.validateId(attrValue, compileResult, pos, relativePath) + break + case 'for': + checkAttrFor(node, attributes, pos); + componentValidator.validateFor(attrValue, compileResult, pos, relativePath) + break + case 'if': + componentValidator.validateIf(attrValue, compileResult, false, pos, relativePath) + break + case 'elif': + componentValidator.validateAttrElif(preNode, attrValue, attributes, index, + compileResult, pos, relativePath) + break + case 'else': + componentValidator.validateAttrElse(preNode, compileResult, pos, relativePath) + break + case 'append': + componentValidator.validateAppend(attrValue, compileResult, pos, relativePath) + break + default: + if (EVENT_START_REGEXP.test(attrName)) { + componentValidator.validateEvent(attrName, attrValue, compileResult, pos, relativePath) + } else if (REGEXP_DATA.test(attrName)) { + componentValidator.parseDataAttr(attrName, attrValue, compileResult, pos, relativePath) + } else { + componentValidator.validateAttr( + filePath, + attrName, + attrValue, + compileResult, + node.tagName, + pos, + relativePath + ) + } + } + }) +} + +function checkAttrFor(node, attributes, pos) { + if (process.env.DEVICE_LEVEL === 'card') { + let tidExists = false + let ifExists = false + attributes.forEach(element => { + if(element.name === 'tid') { + tidExists = true + } + if(element.name === 'if' || element.name === 'elif' || element.name === 'else') { + ifExists = true + } + }) + if (!tidExists) { + compileResult.log.push({ + line: pos.line || 1, + column: pos.col || 1, + reason: `WARNING: The 'tid' is recommended to use here.`, + }) + } + if (ifExists) { + compileResult.log.push({ + line: pos.line || 1, + column: pos.col || 1, + reason: `ERROR: The 'for' and 'if' cannot be used in the same node.`, + }) + } + let isParentFor = false + if (node && node.parentNode && node.parentNode.attrs) { + node.parentNode.attrs.forEach(element => { + if (element.name === 'for') { + isParentFor = true + } + }) + } + if (isParentFor) { + compileResult.log.push({ + line: pos.line || 1, + column: pos.col || 1, + reason: `ERROR: The nested 'for' is not support.`, + }) + } + } +} + +function replaceAll(find, replace, str) { + find = find.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + return str.replace(new RegExp(find, 'g'), replace); +} + +/** + * Parse node children. + * @param {Object} node Nodes that need to be resolved. + * @param {String} filePath File resource path. + * @param {Object} preNode the previous node. + */ +function checkNodeChildren(node, filePath, relativePath) { + const children = node.childNodes.filter((child) => { + return ( + (child.nodeName === '#text' && child.value.trim()) || + !REGEXP_TEXT.test(child.nodeName) + ) + }) + const temp=compileResult.jsonTemplate + for (let i = 0; i < children.length; i++) { + const child = children[i] + let preNode + if (i > 0) { + preNode = children[i - 1] + } + if (!REGEXP_TEXT.test(child.nodeName)) { + compileResult.jsonTemplate={} + temp.children=temp.children||[] + temp.children.push(compileResult.jsonTemplate) + generate(child, filePath, preNode, relativePath) + } else { + const pos = { + line: child.sourceCodeLocation.startLine, + col: child.sourceCodeLocation.endLine, + } + if (node.nodeName === 'option') { + componentValidator.validateAttr(filePath, 'content', child.value, + compileResult, child.tagName, pos, relativePath) + continue + } + componentValidator.validateAttr(filePath, 'value', child.value, + compileResult, child.tagName, pos, relativePath) + } + } + compileResult.jsonTemplate=temp +} + +module.exports = { parse: parse } diff --git a/ace-loader/plugin/templater/lite_component_map.js b/ace-loader/plugin/templater/lite_component_map.js new file mode 100644 index 000000000..fbe892589 --- /dev/null +++ b/ace-loader/plugin/templater/lite_component_map.js @@ -0,0 +1,385 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ +const isType = require('../lite/lite-utils'); +const rulePath = process.env.RULE_PATH; +const smartvisionTag = { + camera: { + events: ['error'], + }, + video: { + events: [ + 'prepared', + 'start', + 'pause', + 'finish', + 'error', + 'seeking', + 'seeked', + 'timeupdate', + ], + attrs: { + autoplay: { + enum: ['false', 'true'], + }, + controls: { + enum: ['true', 'false'], + }, + muted: { + enum: ['false', 'true'], + }, + src: { checkPath: true }, + }, + }, +}; + +const litewearableTag = { + 'div': {}, + 'canvas': {}, + 'stack': {}, + 'qrcode': { + atomic: true, + selfClosing: true, + uevents: ['click', 'longpress', 'swipe'], + attrs: { + value: { + required: true, + }, + type: { + enum: ['rect', 'circle'], + }, + }, + }, + 'list': { + events: ['scrollend'], + children: ['list-item'], + }, + 'list-item': { + excludeRoot: true, + parents: ['list'], + }, + 'swiper': { + unSupportedChildren: ['list'], + events: ['change'], + attrs: { + index: { + checkFunc: 'number', + }, + loop: { + enum: ['true', 'false'], + }, + duration: { + checkFunc: 'number', + }, + vertical: { + enum: ['false', 'true'], + }, + }, + }, + 'tabs': { + events: ['change'], + children: ['tab-content', 'tab-bar'], + }, + 'tab-bar': { + parents: ['tabs'], + children: ['text'], + attrs: { + mode: { + enum: ['fixed'], + }, + }, + }, + 'tab-content': { + parents: ['tabs'], + children: ['div', 'stack'], // to be checked + }, + 'image-animator': { + atomic: true, + selfClosing: true, + events: ['stop'], + attrs: { + images: { + required: true, + }, + iteration: {}, + reverse: { + enum: ['false', 'true'], + }, + fixedsize: { + enum: ['true', 'false'], + }, + duration: { + required: true, + }, + fillmode: { + enum: ['none', 'forwards'], + }, + }, + }, + 'image': { + alias: ['img'], + atomic: true, + selfClosing: true, + attrs: { + src: { + checkPath: true, + }, + }, + }, + 'progress': { + atomic: true, + selfClosing: true, + attrs: { + type: { + enum: ['horizontal', 'arc'], + }, + percent: { + checkFunc: 'number', + }, + }, + }, + 'text': { + atomic: true, + textContent: true, + attrs: { + type: { + enum: ['text', 'html'], + }, + value: {}, + }, + }, + 'marquee': { + atomic: true, + attrs: { + scrollamount: { + def: 6, + checkFunc: 'number', + }, + }, + }, + 'analog-clock': { + attrs: { + hour: { + checkFunc: 'number', + }, + min: { + checkFunc: 'number', + }, + sec: { + checkFunc: 'number', + }, + }, + }, + 'clock-hand': { + parents: ['analog-clock'], + attrs: { + type: { + enum: ['hour', 'min', 'sec'], + }, + src: { + checkPath: true, + }, + }, + }, + 'chart': { + atomic: true, + selfClosing: true, + attrs: { + type: { + enum: ['line', 'bar'], + }, + datasets: {}, + options: {}, + }, + }, + 'input': { + atomic: true, + selfClosing: true, + events: ['change'], + attrs: { + checked: { + enum: ['false', 'true'], + }, + type: { + enum: ['button', 'checkbox', 'radio'], + }, + name: {}, + value: {}, + }, + }, + 'slider': { + atomic: true, + selfClosing: true, + events: ['change'], + attrs: { + min: { + def: 0, + checkFunc: 'number', + }, + max: { + def: 100, + checkFunc: 'number', + }, + value: { + def: 0, + checkFunc: 'number', + }, + }, + }, + 'switch': { + events: ['change'], + atomic: true, + selfClosing: true, + attrs: { + checked: { + enum: ['false', 'true'], + }, + }, + }, + 'picker-view': { + atomic: true, + selfClosing: true, + uevents: ['change'], + attrs: { + type: { + enum: ['text', 'time'], + }, + range: {}, + selected: {}, + }, + }, +}; + +const liteCommonTag = { + events: [ + 'click', + 'longpress', + 'touchstart', + 'touchmove', + 'touchcancel', + 'touchend', + 'key', + 'swipe', + ], + attrs: { + id: {}, + style: {}, + class: {}, + ref: {}, + if: { + excludeRoot: true, + def: 'true', + }, + elif: { + def: 'true', + }, + else: { + excludeRoot: true, + }, + for: { + excludeRoot: true, + }, + tid: {}, + show: { + excludeRoot: true, + def: 'true', + }, + }, +}; + +/** + * Rules for adapting to different environments. If it is `liteWearable` device type, + * set to this type of verification rule. + * @param {String} deviceType device type. + * @return {Object} Validation rules. + */ +function select(deviceType) { + tag = { + liteWearable: litewearableTag, + smartVision: { ...litewearableTag, ...smartvisionTag }, + }; + return tag[deviceType]; +} +let liteNativeTag = select(process.env.DEVICE_TYPE); + +/** + * Whether the file exists, get customized rules. + */ +(function checkFile() { + if (rulePath) { + const customTag = require(rulePath); + isExtends(customTag); + } +})(); + +/** + * Get the component types supported by the current verification rule. + * @return {Array} Supported component name. + */ +function getKeys() { + const res = []; + const keys = Object.keys(liteNativeTag); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + res.push(key); + } + res.push('attrs'); + return res; +} + +/** + * According to user-defined rules, combine into new verification rules. + * @param {Object} customTag User-defined rule object. + */ +function isExtends(customTag) { + if (customTag.extends == 'recommended') { + const nativekeys = getKeys(); + merge(liteNativeTag, customTag.rules, nativekeys); + } else { + liteNativeTag = customTag.rules; + } +} +/** + * Combine the original rules and user-defined rules. + * @param {Object} object Original rules. + * @param {Object} source user-defined rules. + * @param {Array} nativekeys Supported component name. + * @return {Array} Merged object. + */ +function merge(object, source, nativekeys) { + const keys = Object.keys(source); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const value = source[key]; + let target = object[key]; + if (target != null && !nativekeys.includes(key)) { + console.error( + `\u001b[31mError in .literc.js: \n` + + `Attribute '${key}' already exists and cannot be modified\u001b[39m`, + ); + process.exit(1); + } else if (isType.isObject(value)) { + target = isType.isObject(target) ? target : {}; + object[key] = merge(target, value, nativekeys); + } else if (!(isType.isNull(value) || isType.isUndefined(value))) { + object[key] = value; + } + } + return object; +} + +module.exports = { + liteNativeTag: liteNativeTag, + liteCommonTag: liteCommonTag, +}; diff --git a/ace-loader/plugin/templater/rich_component_map.js b/ace-loader/plugin/templater/rich_component_map.js new file mode 100644 index 000000000..4e14ae10a --- /dev/null +++ b/ace-loader/plugin/templater/rich_component_map.js @@ -0,0 +1,1638 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const richNativeTag = { + 'div': { + events: ['reachstart', 'reachend', 'reachtop', 'reachbottom'], + attrs: {}, + }, + 'a': { + textContent: true, + children: ['span'], + attrs: { + visited: { + enum: ['false', 'true'], + }, + href: {}, + value: {}, + }, + }, + 'button': { + textContent: true, + atomic: true, + selfClosing: true, + attrs: { + type: { + enum: ['capsule', 'circle', 'text', 'arc', 'download'], + }, + value: {}, + icon: {}, + waiting: { + enum: ['false', 'true'], + }, + placement: { + def: 'end', + enum: ['end', 'start', 'top', 'bottom'], + }, + }, + }, + 'text': { + textContent: true, + children: ['a', 'span', 'tspan', 'textpath', 'animate', 'animatetransform'], + attrs: { + value: {}, + fill: {}, + fillOpacity: {}, + stroke: {}, + strokeOpacity: {}, + strokeWidth: {}, + transform: {}, + opacity: {}, + x: {}, + y: {}, + id: {}, + dx: {}, + dy: {}, + rotate: {}, + fontSize: {}, + }, + }, + 'span': { + textContent: true, + children: ['span'], + excludeRoot: true, + parents: ['text', 'span'], + uevents: ['click'], + uattrs: { + id: {}, + style: {}, + class: {}, + ref: {}, + data: {}, + springeffect: { + enum: ['spring-small', 'spring-medium', 'spring-large'], + }, + dir: { + enum: ['auto', 'rtl', 'ltr'], + }, + if: { + excludeRoot: true, + def: 'false', + }, + elif: { + def: 'false', + }, + else: { + excludeRoot: true, + def: 'false', + }, + for: { + excludeRoot: true, + }, + tid: {}, + show: { + excludeRoot: true, + def: 'true', + }, + shareid: {}, + voicelabel: {}, + subscriptlabel: {}, + scenelabel: { + enum: ['video', 'audio', 'page', 'switch', 'common'], + }, + subscriptflag: { + enum: ['auto', 'on', 'off'], + }, + accessibilitygroup: { + enum: ['false', 'true'], + }, + accessibilitytext: {}, + accessibilitydescription: {}, + accessibilityimportance: { + enum: ['auto', 'yes', 'no', 'no-hide-descendants'], + }, + }, + }, + 'richtext': { + textContent: true, + uevents: ['start', 'complete'], + }, + 'image': { + alias: ['img'], + events: ['error', 'complete'], + atomic: true, + selfClosing: true, + attrs: { + src: { + checkPath: true, + }, + alt: { + checkPath: true, + }, + }, + }, + 'image-animator': { + atomic: true, + selfClosing: true, + events: ['start', 'pause', 'stop', 'resume'], + attrs: { + images: { + required: true, + }, + predecode: { + def: 0, + checkFunc: 'number', + }, + iteration: {}, + reverse: { + enum: ['false', 'true'], + }, + fixedsize: { + enum: ['true', 'false'], + }, + duration: { + required: true, + }, + fillmode: { + enum: ['forwards', 'none'], + }, + }, + }, + 'divider': { + atomic: true, + selfClosing: true, + uattrs: { + vertical: { + enum: ['false', 'true'], + }, + id: {}, + style: {}, + class: {}, + ref: {}, + data: {}, + springeffect: { + enum: ['spring-small', 'spring-medium', 'spring-large'], + }, + dir: { + enum: ['auto', 'rtl', 'ltr'], + }, + if: { + excludeRoot: true, + def: 'false', + }, + elif: { + def: 'false', + }, + else: { + excludeRoot: true, + def: 'false', + }, + for: { + excludeRoot: true, + }, + tid: {}, + show: { + excludeRoot: true, + def: 'true', + }, + shareid: {}, + data: {}, + voicelabel: {}, + subscriptlabel: {}, + scenelabel: { + enum: ['video', 'audio', 'page', 'switch', 'common'], + }, + subscriptflag: { + enum: ['auto', 'on', 'off'], + }, + accessibilitygroup: { + enum: ['false', 'true'], + }, + accessibilitytext: {}, + accessibilitydescription: {}, + accessibilityimportance: { + enum: ['auto', 'yes', 'no', 'no-hide-descendants'], + }, + }, + uevents: [], + }, + 'menu': { + uevents: ['selected', 'cancel'], + children: ['option'], + uattrs: { + target: {}, + title: {}, + type: { + enum: ['click', 'longpress'], + }, + id: {}, + class: {}, + style: {}, + data: {}, + springeffect: { + enum: ['spring-small', 'spring-medium', 'spring-large'], + }, + dir: { + enum: ['auto', 'rtl', 'ltr'], + }, + if: { + excludeRoot: true, + def: 'false', + }, + elif: { + def: 'false', + }, + else: { + excludeRoot: true, + def: 'false', + }, + for: { + excludeRoot: true, + }, + show: { + excludeRoot: true, + def: 'true', + }, + tid: {}, + shareid: {}, + voicelabel: {}, + subscriptlabel: {}, + scenelabel: { + enum: ['video', 'audio', 'page', 'switch', 'common'], + }, + subscriptflag: { + enum: ['auto', 'on', 'off'], + }, + accessibilitygroup: { + enum: ['false', 'true'], + }, + accessibilitytext: {}, + accessibilitydescription: {}, + accessibilityimportance: { + enum: ['auto', 'yes', 'no', 'no-hide-descendants'], + }, + }, + }, + 'navigation-bar': { + events: ['backclick', 'startclick', 'endclick'], + uevents: [], + children: ['navigation-menu', 'select', 'tab-bar'], + attrs: { + type: { + enum: ['normal', 'emphasize'], + }, + title: { + required: true, + }, + subtitle: {}, + header: {}, + backenabled: { + enum: ['false', 'true'], + }, + starticon: {}, + endicon: {}, + logo: {}, + }, + }, + 'navigation-menu': { + events: ['selected'], + uevents: [], + children: ['option'], + attrs: {}, + }, + 'calendar': { + atomic: true, + selfClosing: true, + events: ['selectedchange'], + uevents: [], + attrs: { + date: { + checkFunc: 'date', + }, + dateadapter: {}, + startdayofweek: {}, + workdays: {}, + holidays: {}, + }, + }, + 'chart': { + atomic: true, + selfClosing: true, + attrs: { + type: { + enum: ['line', 'bar', 'gauge', 'progress', 'loading', 'rainbow'], + }, + percent: { + def: 0, + checkFunc: 'number', + }, + options: {}, + datasets: {}, + segments: {}, + effects: { + enum: ['true', 'false'], + }, + animationduration: { + def: 3000, + checkFunc: 'number', + }, + }, + }, + 'dialog': { + uevents: ['cancel'], + uattrs: { + id: {}, + style: {}, + class: {}, + ref: {}, + disabled: { + enum: ['false', 'true'], + }, + data: {}, + dir: { + enum: ['auto', 'rtl', 'ltr'], + }, + if: { + excludeRoot: true, + def: 'false', + }, + elif: { + def: 'false', + }, + else: { + excludeRoot: true, + def: 'false', + }, + for: { + excludeRoot: true, + }, + tid: {}, + show: { + excludeRoot: true, + def: 'true', + }, + shareid: {}, + voicelabel: {}, + subscriptlabel: {}, + scenelabel: { + enum: ['video', 'audio', 'page', 'switch', 'common'], + }, + subscriptflag: { + enum: ['auto', 'on', 'off'], + }, + accessibilitygroup: { + enum: ['false', 'true'], + }, + accessibilitytext: {}, + accessibilitydescription: {}, + accessibilityimportance: { + enum: ['auto', 'yes', 'no', 'no-hide-descendants'], + }, + }, + }, + 'slider': { + atomic: true, + selfClosing: true, + events: ['change'], + attrs: { + min: { + def: 0, + checkFunc: 'number', + }, + max: { + def: 100, + checkFunc: 'number', + }, + step: { + def: 1, + checkFunc: 'number', + }, + value: { + def: 0, + checkFunc: 'number', + }, + type: { + def: 'continuous', + enum: ['continuous', 'intermittent'], + }, + mode: { + def: 'outset', + enum: ['outset', 'inset'], + }, + minicon: {}, + maxicon: {}, + showsteps: { + enum: ['false', 'true'], + }, + showtips: { + enum: ['false', 'true'], + }, + }, + }, + 'svg': { + children: ['svg', 'circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect', 'text', 'animate', 'animatetransform', 'animatemotion'], + attrs: { + fill: {}, + fillOpacity: {}, + fillRule: { + enum: ['nonzero', 'evenodd'], + }, + opacity: {}, + stroke: {}, + strokeDasharray: {}, + strokeDashoffset: {}, + strokeLinejoin: { + enum: ['bevel', 'miter', 'round'], + }, + strokeLinecap: { + enum: ['butt', 'round', 'square'], + }, + strokeMiterlimit: {}, + strokeOpacity: {}, + strokeWidth: {}, + transform: {}, + fontSize: {}, + width: {}, + height: {}, + x: {}, + y: {}, + viewbox: {}, + }, + }, + 'tspan': { + uattrs: { + fill: {}, + fillOpacity: {}, + stroke: {}, + strokeOpacity: {}, + strokeWidth: {}, + x: {}, + y: {}, + id: {}, + dx: {}, + dy: {}, + rotate: {}, + transform: {}, + fontSize: {}, + }, + }, + 'textpath': { + children: ['tspan', 'textpath', 'animate', 'animatetransform'], + attrs: { + fill: {}, + fillOpacity: {}, + stroke: {}, + strokeOpacity: {}, + strokeWidth: {}, + startoffset: {}, + id: {}, + fontSize: {}, + path: {}, + startOffset: {}, + }, + }, + 'rect': { + children: ['animate', 'animatetransform', 'animatemotion'], + attrs: { + fill: {}, + fillOpacity: {}, + fillRule: { + enum: ['nonzero', 'evenodd'], + }, + opacity: {}, + stroke: {}, + strokeDasharray: {}, + strokeDashoffset: {}, + strokeLinejoin: { + enum: ['bevel', 'miter', 'round'], + }, + strokeLinecap: { + enum: ['butt', 'round', 'square'], + }, + strokeMiterlimit: {}, + strokeOpacity: {}, + strokeWidth: {}, + transform: {}, + width: {}, + height: {}, + x: {}, + y: {}, + rx: {}, + ry: {}, + }, + }, + 'circle': { + children: ['animate', 'animatetransform', 'animatemotion'], + uattrs: { + fill: {}, + fillOpacity: {}, + fillRule: { + enum: ['nonzero', 'evenodd'], + }, + opacity: {}, + stroke: {}, + strokeDasharray: {}, + strokeDashoffset: {}, + strokeLinejoin: { + enum: ['bevel', 'miter', 'round'], + }, + strokeLinecap: { + enum: ['butt', 'round', 'square'], + }, + strokeMiterlimit: {}, + strokeOpacity: {}, + strokeWidth: {}, + transform: {}, + cx: {}, + cy: {}, + r: {}, + }, + }, + 'ellipse': { + children: ['animate', 'animatetransform', 'animatemotion'], + uattrs: { + fill: {}, + fillOpacity: {}, + fillRule: { + enum: ['nonzero', 'evenodd'], + }, + opacity: {}, + stroke: {}, + strokeDasharray: {}, + strokeDashoffset: {}, + strokeLinejoin: { + enum: ['bevel', 'miter', 'round'], + }, + strokeLinecap: { + enum: ['butt', 'round', 'square'], + }, + strokeMiterlimit: {}, + strokeOpacity: {}, + strokeWidth: {}, + transform: {}, + class: {}, + cx: {}, + cy: {}, + rx: {}, + ry: {}, + }, + }, + 'path': { + children: ['animate', 'animatetransform', 'animatemotion'], + uattrs: { + fill: {}, + fillOpacity: {}, + fillRule: { + enum: ['nonzero', 'evenodd'], + }, + opacity: {}, + stroke: {}, + strokeDasharray: {}, + strokeDashoffset: {}, + strokeLinejoin: { + enum: ['bevel', 'miter', 'round'], + }, + strokeLinecap: { + enum: ['butt', 'round', 'square'], + }, + strokeMiterlimit: {}, + id: {}, + strokeOpacity: {}, + strokeWidth: {}, + transform: {}, + d: {}, + }, + }, + 'line': { + children: ['animate', 'animatetransform', 'animatemotion'], + uattrs: { + fill: {}, + fillOpacity: {}, + fillRule: { + enum: ['nonzero', 'evenodd'], + }, + opacity: {}, + stroke: {}, + strokeDasharray: {}, + strokeDashoffset: {}, + strokeLinejoin: { + enum: ['bevel', 'miter', 'round'], + }, + strokeLinecap: { + enum: ['butt', 'round', 'square'], + }, + strokeMiterlimit: {}, + strokeOpacity: {}, + strokeWidth: {}, + transform: {}, + class: {}, + x1: {}, + y1: {}, + x2: {}, + y2: {}, + }, + }, + 'polyline': { + children: ['animate', 'animatetransform', 'animatemotion'], + uattrs: { + fill: {}, + fillOpacity: {}, + fillRule: { + enum: ['nonzero', 'evenodd'], + }, + opacity: {}, + stroke: {}, + strokeDasharray: {}, + strokeDashoffset: {}, + strokeLinejoin: { + enum: ['bevel', 'miter', 'round'], + }, + strokeLinecap: { + enum: ['butt', 'round', 'square'], + }, + strokeMiterlimit: {}, + strokeOpacity: {}, + strokeWidth: {}, + transform: {}, + points: {}, + }, + }, + 'polygon': { + children: ['animate', 'animatetransform', 'animatemotion'], + uattrs: { + fill: {}, + fillOpacity: { + def: 1, + }, + fillRule: { + enum: ['nonzero', 'evenodd'], + }, + opacity: { + def: 1, + }, + stroke: {}, + strokeDasharray: {}, + strokeDashoffset: {}, + strokeLinejoin: { + enum: ['bevel', 'miter', 'round'], + }, + strokeLinecap: { + enum: ['butt', 'round', 'square'], + }, + strokeMiterlimit: { + def: 4, + }, + strokeOpacity: { + def: 1, + }, + strokeWidth: {}, + class: {}, + transform: {}, + points: {}, + }, + }, + 'animate': { + atomic: true, + uattrs: { + id: {}, + begin: { + def: 0, + checkFunc: 'time', + }, + dur: { + def: 0, + checkFunc: 'time', + }, + end: { + def: 0, + checkFunc: 'time', + }, + fill: { + enum: ['freeze', 'remove'], + }, + keytimes: {}, + keysplines: {}, + repeatcount: {}, + calcmode: {}, + attributename: {}, + from: {}, + to: {}, + values: {}, + }, + }, + 'animatemotion': { + atomic: true, + uattrs: { + begin: { + def: 0, + checkFunc: 'time', + }, + dur: { + def: 0, + checkFunc: 'time', + }, + end: { + def: 0, + checkFunc: 'time', + }, + repeatcount: {}, + fill: { + enum: ['freeze', 'remove'], + }, + calcmode: { + enum: ['discrete', 'linear', 'paced', 'spline'], + }, + keytimes: {}, + keysplines: {}, + from: {}, + to: {}, + keypoints: {}, + path: {}, + rotate: {}, + }, + }, + 'animatetransform': { + atomic: true, + uattrs: { + begin: { + def: 0, + checkFunc: 'time', + }, + dur: { + def: 0, + checkFunc: 'time', + }, + end: { + def: 0, + checkFunc: 'time', + }, + repeatcount: { + def: 1, + checkFunc: ['number','indefinite'], + }, + fill: { + enum: ['freeze', 'remove'], + }, + calcmode: {}, + from: {}, + to: {}, + values: {}, + attributetype: {}, + attributename: {}, + type: {}, + }, + }, + 'list': { + events: ['scroll', 'scrollbottom', 'scrolltop', 'scrollend', 'scrolltouchup', 'requestitem', 'indexerchange', 'rotate'], + children: ['list-item', 'list-item-group'], + attrs: { + scrollpage: { + enum: ['false', 'true'], + }, + cachedcount: { + def: 0, + checkFunc: 'number', + }, + scrollbar: { + enum: ['off', 'auto', 'on'], + }, + scrolleffect: { + enum: ['spring', 'fade', 'no'], + }, + indexer: { + enum: ['false', 'true'], + }, + shapemode: { + enum: ['default', 'rect', 'round'], + }, + itemscale: { + enum: ['true', 'false'], + }, + itemcenter: { + enum: ['false', 'true'], + }, + updateeffect: { + enum: ['false', 'true'], + }, + scrollvibrate: { + enum: ['true', 'false'], + }, + initialindex: { + def: 0, + checkFunc: 'number', + }, + initialoffset: { + def: 0, + checkFunc: 'length', + }, + indexercircle: { + enum: ['false', 'true'], + }, + indexermulti: { + enum: ['false', 'true'], + }, + indexerbubble: { + enum: ['true', 'false'], + }, + divider: { + enum: ['false', 'true'], + }, + chainanimation: { + enum: ['false', 'true'], + }, + selected: {}, + }, + }, + 'list-item': { + excludeRoot: true, + parents: ['list', 'list-item-group'], + events: ['sticky'], + attrs: { + type: {}, + card: { + enum: ['true', 'false'], + }, + primary: { + enum: ['false', 'true'], + }, + section: {}, + sticky: { + enum: ['none', 'normal', 'opacity'], + }, + stickyradius: { + checkFunc: 'length', + }, + clickeffect: { + enum: ['true', 'false'], + }, + }, + }, + 'list-item-group': { + excludeRoot: true, + parents: ['list'], + children: ['list-item'], + events: ['groupclick', 'groupcollapse', 'groupexpand'], + attrs: { + type: {}, + }, + }, + 'block': { + excludeRoot: true, + uattrs: { + for: {}, + tid: {}, + if: { + def: 'false', + }, + elif: { + def: 'false', + }, + else: { + def: 'false', + }, + }, + }, + 'slot': { + atomic: true, + selfClosing: true, + excludeRoot: true, + uattrs: { + content: {}, + }, + }, + 'input': { + atomic: true, + selfClosing: true, + events: ['change', 'enterkeyclick', 'translate', 'share', 'search', 'optionselect', 'selectchange'], + attrs: { + checked: { + enum: ['false', 'true'], + }, + showcounter: { + enum: ['false', 'true'], + }, + type: { + enum: ['text', 'button', 'checkbox', 'email', 'date', 'time', 'number', 'password', 'radio', 'submit', 'reset'], + }, + menuoptions: {}, + name: {}, + value: {}, + placeholder: {}, + enterkeytype: { + enum: ['default', 'next', 'go', 'done', 'send', 'search'], + }, + maxlength: { + checkFunc: 'number', + }, + headericon: {}, + selectedstart: { + def: -1, + checkFunc: 'number', + }, + selectedend: { + def: -1, + checkFunc: 'number', + }, + autofocus: { + enum: ['false', 'true'], + }, + softkeyboardenabled: { + enum: ['true', 'false'], + }, + showpasswordicon: { + enum: ['true', 'false'], + }, + }, + }, + 'marquee': { + atomic: true, + selfClosing: true, + events: ['bounce', 'finish', 'start'], + attrs: { + scrollamount: { + def: 6, + checkFunc: 'number', + }, + loop: { + def: -1, + checkFunc: 'number', + }, + direction: { + enum: ['left', 'right'], + }, + }, + }, + 'refresh': { + uevents: ['refresh', 'pulldown'], + attrs: { + refreshing: { + enum: ['false', 'true'], + }, + offset: { + checkFunc: 'length', + }, + type: { + enum: ['auto', 'pulldown'], + }, + lasttime: { + enum: ['false', 'true'], + }, + timeoffset: { + checkFunc: 'length', + }, + friction: { + checkFunc: 'number', + }, + }, + }, + 'form': { + events: ['submit', 'reset'], + }, + 'swiper': { + unSupportedChildren: ['list'], + events: ['change', 'rotation'], + attrs: { + autoplay: { + enum: ['false', 'true'], + }, + indicator: { + enum: ['true', 'false'], + }, + indicatormask: { + enum: ['false', 'true'], + }, + indicatordisabled: { + enum: ['false', 'true'], + }, + index: { + checkFunc: 'number', + }, + interval: { + checkFunc: 'number', + }, + loop: { + enum: ['true', 'false'], + }, + duration: { + checkFunc: 'number', + }, + vertical: { + enum: ['false', 'true'], + }, + digital: { + enum: ['false', 'true'], + }, + }, + }, + 'search': { + events: ['change', 'submit', 'translate', 'share', 'search', 'optionselect', 'selectchange'], + atomic: true, + selfClosing: true, + attrs: { + icon: {}, + hint: {}, + value: {}, + searchbutton: {}, + menuoptions: {}, + selectedstart: { + checkFunc: 'number', + }, + selectedend: { + checkFunc: 'number', + }, + autofocus: { + enum: ['false', 'true'], + }, + softkeyboardenabled: { + enum: ['false', 'true'], + }, + }, + }, + 'progress': { + atomic: true, + selfClosing: true, + events: [], + attrs: { + type: { + enum: ['horizontal', 'circular', 'ring', 'scale-ring', 'arc', 'eclipse'], + }, + percent: { + def: 0, + checkFunc: 'number', + }, + secondarypercent: { + def: 0, + checkFunc: 'number', + }, + clockwise: { + enum: ['true', 'false'], + }, + }, + }, + 'picker': { + events: ['change', 'columnchange', 'cancel'], + atomic: true, + selfClosing: true, + uevents: ['focus', 'blur', 'longpress', 'key', 'swipe', 'accessibility', 'touchstart', + 'touchmove', 'touchcancel', 'touchend'], + attrs: { + type: { + enum: ['text', 'date', 'time', 'datetime', 'multi-text'], + }, + start: { + checkFunc: 'date', + }, + end: { + checkFunc: 'date', + }, + range: {}, + selected: {}, + value: {}, + containsecond: { + enum: ['false', 'true'], + }, + columns: { + checkFunc: 'number', + }, + lunarswitch: { + enum: ['false', 'true'], + }, + hours: { + enum: ['24', '12'], + }, + lunar: { + enum: ['false', 'true'], + }, + }, + }, + 'picker-view': { + atomic: true, + selfClosing: true, + uevents: ['change', 'columnchange'], + attrs: { + type: { + enum: ['text', 'time', 'date', 'datetime', 'multi-text'], + }, + range: {}, + selected: {}, + indicatorprefix: {}, + indicatorsuffix: {}, + containsecond: { + enum: ['false', 'true'], + }, + start: { + checkFunc: 'date', + }, + end: { + checkFunc: 'date', + }, + lunarswitch: { + enum: ['false', 'true'], + }, + columns: { + checkFunc: 'number', + }, + hours: { + enum: ['24', '12'], + }, + lunar: { + enum: ['false', 'true'], + }, + }, + }, + 'qrcode': { + atomic: true, + events: [], + selfClosing: true, + attrs: { + value: { + required: true, + }, + type: { + enum: ['rect', 'circle'], + }, + }, + }, + 'switch': { + atomic: true, + events: ['change'], + selfClosing: true, + attrs: { + checked: { + enum: ['false', 'true'], + }, + showtext: { + enum: ['false', 'true'], + }, + texton: {}, + textoff: {}, + }, + }, + 'label': { + textContent: true, + atomic: true, + selfClosing: true, + attrs: { + target: {}, + }, + uevents: [], + }, + 'textarea': { + atomic: true, + selfClosing: true, + textContent: true, + events: ['change', 'translate', 'share', 'search', 'optionselect', 'selectchange'], + attrs: { + placeholder: {}, + menuoptions: {}, + value: {}, + maxlength: { + checkFunc: 'number', + }, + headericon: {}, + extend: { + enum: ['false', 'true'], + }, + showcounter: { + enum: ['false', 'true'], + }, + selectedstart: { + def: -1, + checkFunc: 'number', + }, + selectedend: { + def: -1, + checkFunc: 'number', + }, + autofocus: { + enum: ['false', 'true'], + }, + softkeyboardenabled: { + enum: ['true', 'false'], + }, + }, + }, + 'video': { + atomic: true, + selfClosing: true, + events: ['start', 'pause', 'finish', 'stop', 'error', 'prepared', 'fullscreenchange', 'timeupdate', 'seeked', 'seeking'], + attrs: { + autoplay: { + enum: ['false', 'true'], + }, + poster: { + checkPath: true, + }, + src: { + checkPath: true, + }, + muted: { + enum: ['false', 'true'], + }, + controls: { + enum: ['true', 'false'], + }, + loop: { + enum: ['false', 'true'], + }, + starttime: { + def: 0, + checkFunc: 'number', + }, + direction: { + enum: ['auto', 'vertical', 'horizontal', 'adapt'], + }, + speed: { + def: 1.0, + checkFunc: 'number', + } + }, + }, + 'audio': { + atomic: true, + selfClosing: true, + attrs: { + streamType: { + enum: ['music', 'voicecall'], + }, + }, + }, + 'camera': { + atomic: true, + selfClosing: true, + events: ['error'], + attrs: { + deviceposition: { + enum: ['back', 'front'], + }, + flash: { + enum: ['auto', 'on', 'off', 'torch'], + }, + }, + }, + 'canvas': { + atomic: true, + selfClosing: true, + events: [], + attrs: {}, + }, + 'stack': { + events: [], + attrs: {}, + }, + 'tabs': { + events: ['change'], + children: ['tab-content', 'tab-bar'], + attrs: { + index: { + def: 0, + checkFunc: 'number', + }, + vertical: { + enum: ['false', 'true'], + }, + }, + }, + 'tab-content': { + parents: ['tabs'], + attrs: { + scrollable: { + enum: ['true', 'false'], + }, + }, + }, + 'tab-bar': { + parents: ['tabs', 'navigation-bar'], + attrs: { + mode: { + enum: ['fixed', 'scrollable'], + }, + }, + }, + 'popup': { + events: ['visibilitychange'], + attrs: { + target: { + required: true, + }, + placement: { + enum: ['bottom', 'left', 'right', 'top', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'], + }, + keepalive: { + enum: ['false', 'true'], + }, + clickable: { + enum: ['true', 'false'], + }, + arrowoffset: { + checkFunc: 'length', + }, + }, + }, + 'rating': { + atomic: true, + selfClosing: true, + events: ['change'], + attrs: { + numstars: { + checkFunc: 'number', + }, + rating: { + checkFunc: 'number', + }, + stepsize: { + checkFunc: 'number', + }, + indicator: { + enum: ['false', 'true'], + }, + }, + uevents: ['focus', 'blur', 'key', 'swipe', 'accessibility', 'touchstart', 'touchmove', 'touchcancel', 'touchend'], + }, + 'select': { + textContent: true, + events: ['change'], + children: ['option'], + uevents: ['focus', 'blur', 'longpress', 'key', 'swipe', 'accessibility', 'touchstart', + 'touchmove', 'touchcancel', 'touchend'], + }, + 'option': { + atomic: true, + selfClosing: true, + excludeRoot: true, + valueContent: true, + parents: ['select', 'menu', 'navigation-menu'], + uevents: [], + attrs: { + selected: { + enum: ['false', 'true'], + }, + value: { + required: true, + }, + icon: {}, + action: { + enum: ['popup', 'show'], + }, + }, + }, + 'badge': { + attrs: { + placement: { + def: 'rightTop', + enum: ['right', 'rightTop', 'left'], + }, + count: { + def: 0, + checkFunc: 'number', + }, + visible: { + enum: ['false', 'true'], + }, + maxcount: { + def: 99, + checkFunc: 'number', + }, + config: {}, + label: {}, + }, + }, + 'stepper': { + events: ['finish', 'skip', 'change', 'next', 'back'], + children: ['stepper-item'], + attrs: { + index: { + checkFunc: 'number', + }, + }, + }, + 'stepper-item': { + excludeRoot: true, + parents: ['stepper'], + events: ['appear', 'disappear'], + attrs: { + label: {}, + }, + }, + 'panel': { + uevents: ['sizechange'], + uattrs: { + type: { + enum: ['minibar', 'foldable', 'temporary'], + }, + mode: { + enum: ['mini', 'half', 'full'], + }, + dragbar: { + enum: ['true', 'false'], + }, + fullheight: { + checkFunc: 'length', + }, + halfheight: { + checkFunc: 'length', + }, + miniheight: { + checkFunc: 'length', + }, + id: {}, + class: {}, + style: {}, + ref: {}, + data: {}, + tid: {}, + shareid: {}, + voicelabel: {}, + subscriptlabel: {}, + scenelabel: { + enum: ['video', 'audio', 'page', 'switch', 'common'], + }, + subscriptflag: { + enum: ['auto', 'on', 'off'], + }, + accessibilitygroup: { + enum: ['false', 'true'], + }, + accessibilitytext: {}, + accessibilitydescription: {}, + accessibilityimportance: { + enum: ['auto', 'yes', 'no', 'no-hide-descendants'], + }, + }, + }, + 'toolbar': { + uevents: [], + children: ['toolbar-item'], + attrs: {}, + }, + 'toolbar-item': { + excludeRoot: true, + parents: ['toolbar'], + events: [], + attrs: { + value: {}, + icon: {}, + }, + }, + 'piece': { + excludeRoot: true, + events: ['close'], + attrs: { + content: {}, + icon: {}, + closable: { + enum: ['false', 'true'], + }, + }, + }, + 'toggle': { + excludeRoot: true, + events: ['change'], + attrs: { + value: {}, + checked: { + enum: ['false', 'true'], + }, + }, + }, + 'grid-container': { + excludeRoot: true, + children: ['grid-row'], + attrs: { + columns: {}, + sizetype: {}, + gutter: { + checkFunc: 'length', + }, + gridtemplate: { + enum: ['default', 'grid'], + }, + }, + }, + 'grid-row': { + excludeRoot: true, + children: ['grid-col'], + attrs: {}, + }, + 'grid-col': { + excludeRoot: true, + attrs: { + xs: {}, + sm: {}, + md: {}, + lg: {}, + span: { + checkFunc: 'number', + }, + offset: { + checkFunc: 'number', + }, + }, + }, + 'xcomponent': { + atomic: true, + selfClosing: true, + uevents: ['xcomponentinit', 'xcomponentdestroy'], + uattrs: { + name: {}, + type: { + required: true, + }, + libraryname: {}, + id: {}, + ref: {}, + }, + }, + 'web': { + atomic: true, + selfClosing: true, + uattrs: { + src: { + checkPath: true, + }, + id: {}, + }, + uevents: ['pagestart', 'pagefinish', 'error', 'message'], + }, +}; +const richCommonTag = { + events: ['click', 'dragstart', 'drag', 'dragend', 'dragenter', + 'dragover', 'dragleave', 'drop', 'doubleclick', + 'focus', 'blur', 'doubleclick', 'longpress', + 'pinchstart', 'pinchupdate', 'pinchend', 'pinchcancel', + 'touchstart', 'touchmove', 'touchcancel', 'touchend', + 'swipe', 'key', 'accessibility'], + attrs: { + id: {}, + style: {}, + class: {}, + ref: {}, + disabled: { + enum: ['false', 'true'], + }, + focusable: { + enum: ['false', 'true'], + }, + data: {}, + springeffect: { + enum: ['spring-small', 'spring-medium', 'spring-large'], + }, + dir: { + enum: ['auto', 'rtl', 'ltr'], + }, + if: { + excludeRoot: true, + def: 'false', + }, + elif: { + def: 'false', + }, + else: { + excludeRoot: true, + def: 'false', + }, + for: { + excludeRoot: true, + }, + tid: {}, + show: { + excludeRoot: true, + def: 'true', + }, + shareid: {}, + voicelabel: {}, + subscriptlabel: {}, + scenelabel: { + enum: ['video', 'audio', 'page', 'switch', 'common'], + }, + subscriptflag: { + enum: ['auto', 'on', 'off'], + }, + accessibilitygroup: { + enum: ['false', 'true'], + }, + accessibilitytext: {}, + accessibilitydescription: {}, + accessibilityimportance: { + enum: ['auto', 'yes', 'no', 'no-hide-descendants'], + }, + }, + children: ['block', 'slot'], + parents: ['block'], +}; +module.exports = { + richCommonTag: richCommonTag, + richNativeTag: richNativeTag, +}; diff --git a/ace-loader/plugin/theme/customThemeStyles.js b/ace-loader/plugin/theme/customThemeStyles.js new file mode 100644 index 000000000..2085d9e35 --- /dev/null +++ b/ace-loader/plugin/theme/customThemeStyles.js @@ -0,0 +1,452 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const THEME_PROP_GROUPS = { + emui_color_fg: "0", + ohos_color_fg: "0", + emui_color_fg_inverse: "1", + ohos_color_fg_inverse: "1", + emui_color_bg: "3", + ohos_color_bg: "3", + emui_accent: "4", + ohos_accent: "4", + emui_accent_inverse: "5", + ohos_accent_inverse: "5", + emui_functional_red: "6", + ohos_functional_red: "6", + emui_color_warning: "7", + ohos_color_warning: "7", + emui_color_handup: "8", + ohos_color_handup: "8", + emui_color_connected: "9", + ohos_color_connected: "9", + emui_color_control_activated: "50", + ohos_color_control_activated: "50", + emui_control_normal: "51", + ohos_control_normal: "51", + emui_color_divider_horizontal: "52", + ohos_color_divider_horizontal: "52", + emui_color_subheader_divider: "53", + ohos_color_subheader_divider: "53", + emui_color_click_effect_default: "54", + ohos_color_click_effect_default: "54", + emui_fab_icon: "124", + ohos_fab_icon: "124", + emui_fab_bg_normal: "127", + ohos_fab_bg_normal: "127", + emui_card_bg: "135", + ohos_card_bg: "135", + emui_color_tooltips_bg: "137", + ohos_color_tooltips_bg: "137", + emui_activated: "138", + ohos_activated: "138", + emui_color_primary: "200", + ohos_color_primary: "200", + emui_primary_inverse: "201", + ohos_primary_inverse: "201", + emui_color_secondary: "202", + ohos_color_secondary: "202", + emui_color_tertiary: "203", + ohos_color_tertiary: "203", + emui_color_text_primary: "250", + ohos_color_text_primary: "250", + emui_text_primary_inverse: "251", + ohos_text_primary_inverse: "251", + emui_color_text_secondary: "252", + ohos_color_text_secondary: "252", + emui_text_secondary_inverse: "253", + ohos_text_secondary_inverse: "253", + emui_color_text_tertiary: "254", + ohos_color_text_tertiary: "254", + emui_text_tertiary_inverse: "255", + ohos_text_tertiary_inverse: "255", + emui_text_color_alert_dialog_list_item: "256", + ohos_text_color_alert_dialog_list_item: "256", + emui_functional_blue: "257", + ohos_functional_blue: "257", + emui_text_hint: "258", + ohos_text_hint: "258", + emui_text_hint_inverse: "259", + ohos_text_hint_inverse: "259", + emui_functional_blue_inverse: "260", + ohos_functional_blue_inverse: "260", + emui_color_text_highlight: "261", + ohos_color_text_highlight: "261", + emui_text_highlight_inverse: "262", + ohos_text_highlight_inverse: "262", + emui_color_1: "300", + ohos_color_1: "300", + emui_color_2: "301", + ohos_color_2: "301", + emui_color_3: "302", + ohos_color_3: "302", + emui_color_4: "303", + ohos_color_4: "303", + emui_color_5: "304", + ohos_color_5: "304", + emui_color_6: "305", + ohos_color_6: "305", + emui_color_7: "306", + ohos_color_7: "306", + emui_color_8: "307", + ohos_color_8: "307", + emui_color_9: "308", + ohos_color_9: "308", + emui_color_10: "309", + ohos_color_10: "309", + emui_color_11: "310", + ohos_color_11: "310", + emui_color_fg_1: "311", + ohos_color_fg_1: "311", + emui_color_fg_2: "312", + ohos_color_fg_2: "312", + emui_color_fg_3: "313", + ohos_color_fg_3: "313", + emui_color_fg_4: "314", + ohos_color_fg_4: "314", + emui_color_fg_5: "315", + ohos_color_fg_5: "315", + emui_color_fg_6: "316", + ohos_color_fg_6: "316", + emui_color_fg_7: "317", + ohos_color_fg_7: "317", + emui_color_fg_8: "318", + ohos_color_fg_8: "318", + emui_color_fg_9: "319", + ohos_color_fg_9: "319", + emui_color_fg_10: "320", + ohos_color_fg_10: "320", + emui_color_fg_11: "321", + ohos_color_fg_11: "321", + emui_primary_content_alpha: "400", + ohos_primary_content_alpha: "400", + emui_secondary_content_alpha: "401", + ohos_secondary_content_alpha: "401", + emui_tertiary_content_alpha: "402", + ohos_tertiary_content_alpha: "402", + emui_disabled_alpha: "403", + ohos_disabled_alpha: "403", + emui_highlight_bg_alpha: "404", + ohos_highlight_bg_alpha: "404", + emui_normal_bg_alpha: "405", + ohos_normal_bg_alpha: "405", + emui_tips_bg_alpha: "406", + ohos_tips_bg_alpha: "406", + emui_divider_alpha: "407", + ohos_divider_alpha: "407", + emui_text_size_headline1: "500", + ohos_text_size_headline1: "500", + emui_text_size_headline2: "501", + ohos_text_size_headline2: "501", + emui_text_size_headline3: "502", + ohos_text_size_headline3: "502", + emui_text_size_headline4: "503", + ohos_text_size_headline4: "503", + emui_text_size_headline5: "504", + ohos_text_size_headline5: "504", + emui_text_size_headline6: "505", + ohos_text_size_headline6: "505", + emui_text_size_headline7: "506", + ohos_text_size_headline7: "506", + emui_text_size_headline8: "507", + ohos_text_size_headline8: "507", + emui_text_size_subtitle1: "508", + ohos_text_size_subtitle1: "508", + emui_text_size_subtitle2: "509", + ohos_text_size_subtitle2: "509", + emui_text_size_subtitle3: "510", + ohos_text_size_subtitle3: "510", + emui_text_size_button1: "511", + ohos_text_size_button1: "511", + emui_text_size_button2: "512", + ohos_text_size_button2: "512", + emui_text_size_body1: "513", + ohos_text_size_body1: "513", + emui_text_size_body2: "514", + ohos_text_size_body2: "514", + emui_text_size_body3: "515", + ohos_text_size_body3: "515", + emui_text_size_caption: "516", + ohos_text_size_caption: "516", + emui_text_size_caption1: "517", + ohos_text_size_caption1: "517", + emui_text_size_chart1: "518", + ohos_text_size_chart1: "518", + emui_text_size_chart2: "519", + ohos_text_size_chart2: "519", + emui_text_size_overline: "520", + ohos_text_size_overline: "520", + emui_text_font_family_regular: "550", + ohos_text_font_family_regular: "550", + emui_text_font_family_medium: "551", + ohos_text_font_family_medium: "551", + emui_corner_radius_notification: "611", + ohos_corner_radius_notification: "611", + emui_corner_radius_grid: "615", + ohos_corner_radius_grid: "615", + emui_corner_radius_icon: "619", + ohos_corner_radius_icon: "619", + emui_corner_radius_large: "650", + ohos_corner_radius_large: "650", + emui_corner_radius_mediums: "651", + ohos_corner_radius_mediums: "651", + emui_corner_radius_small: "652", + ohos_corner_radius_small: "652", + emui_corner_radius_xsmal: "653", + ohos_corner_radius_xsmal: "653", + emui_dimens_default_start: "700", + ohos_dimens_default_start: "700", + emui_dimens_max_start: "701", + ohos_dimens_max_start: "701", + emui_dimens_default_end: "702", + ohos_dimens_default_end: "702", + emui_dimens_max_end: "703", + ohos_dimens_max_end: "703", + emui_dimens_default_top: "704", + ohos_dimens_default_top: "704", + emui_dimens_default_bottom_flexible: "705", + ohos_dimens_default_bottom_flexible: "705", + emui_dimens_default_bottom_fixed: "706", + ohos_dimens_default_bottom_fixed: "706", + emui_dimens_card_start: "725", + ohos_dimens_card_start: "725", + emui_dimens_card_end: "726", + ohos_dimens_card_end: "726", + emui_dimens_card_middle: "727", + ohos_dimens_card_middle: "727", + emui_dimens_text_vertical: "740", + ohos_dimens_text_vertical: "740", + emui_dimens_text_horizontal: "741", + ohos_dimens_text_horizontal: "741", + emui_dimens_text_margin_primary: "742", + ohos_dimens_text_margin_primary: "742", + emui_dimens_text_margin_secondary: "743", + ohos_dimens_text_margin_secondary: "743", + emui_dimens_text_margin_tertiary: "744", + ohos_dimens_text_margin_tertiary: "744", + emui_dimens_text_margin_fourth: "745", + ohos_dimens_text_margin_fourth: "745", + emui_dimens_text_margin_fifth: "746", + ohos_dimens_text_margin_fifth: "746", + emui_dimens_element_vertical_large: "760", + ohos_dimens_element_vertical_large: "760", + emui_dimens_element_vertical_middle: "761", + ohos_dimens_element_vertical_middle: "761", + emui_dimens_element_horizontal_large: "762", + ohos_dimens_element_horizontal_large: "762", + emui_dimens_element_horizontal_middle: "763", + ohos_dimens_element_horizontal_middle: "763", + emui_text_size_space_short: "780", + ohos_text_size_space_short: "780", + emui_text_size_space_large: "781", + ohos_text_size_space_large: "781", + app_background: "900", + select_clicked_color: "1000", + select_disabled_text_color: "1001", + menu_selected_color: "1002", + select_font_size: "1003", + select_font_color: "1004", + select_triangle_icon_size: "1011", + menu_background_radius: "1012", + menu_min_width: "1015", + button_background_color: "1100", + button_disabled_color: "1102", + button_text_focus_color: "1120", + button_text_color: "1121", + button_text_disabled_color: "1122", + button_text_waiting_color: "1123", + button_text_fontsize: "1124", + button_text_fontsize_min: "1125", + button_text_fontweight: "1126", + button_text_max_lines: "1127", + button_radius: "1140", + button_min_width: "1141", + button_height: "1142", + button_padding_horizontal: "1143", + button_padding_vertical: "1144", + checkbox_foreground_color: "1200", + checkbox_active_color: "1201", + checkbox_inactive_color: "1202", + checkbox_size: "1204", + checkbox_border_radius: "1206", + checkbox_border_width: "1207", + checkbox_stroke_width: "1208", + radio_foreground_color: "1300", + radio_active_color: "1301", + radio_inactive_color: "1302", + radio_size: "1304", + radio_border_width: "1306", + switch_foreground_color: "1400", + switch_active_color: "1401", + switch_inactive_color: "1402", + switch_width: "1404", + switch_height: "1405", + switch_border_width: "1409", + marquee_text_color: "1500", + marquee_font_size: "1501", + progress_color: "1611", + progress_secondary_color: "1600", + progress_bg_color: "1601", + progress_thickness: "1602", + progress_loading_color: "1603", + progress_scale_length: "1604", + progress_scale_width: "1605", + progress_scale_number: "1608", + rating_width: "1700", + rating_height: "1701", + rating_indicator_width: "1702", + rating_indicator_height: "1703", + rating_star_num: "1705", + rating_score: "1706", + rating_indicator_score: "1707", + rating_step_size: "1708", + slider_block_color: "1800", + slider_track_thickness: "1803", + slider_track_selected: "1804", + slider_track_bg: "1805", + text_size: "1900", + dialog_radius: "2000", + dialog_background_color: "2001", + dialog_title_text_color: "2002", + dialog_title_text_fontsize: "2003", + dialog_title_text_fontsize_min: "2004", + dialog_title_text_fontweight: "2005", + dialog_title_text_max_lines: "2006", + dialog_content_text_color: "2007", + dialog_content_text_fontsize: "2008", + dialog_animation_duration_in: "2020", + dialog_animation_duration_out: "2021", + dialog_content_text_fontsize_min: "2032", + popup_padding_horizontal: "2100", + popup_padding_vertical: "2101", + popup_background_color: "2103", + popup_text_color: "2104", + popup_text_fontsize: "2105", + swiper_indicator_normal_color: "2200", + swiper_indicator_selected_color: "2201", + swiper_indicator_size: "2202", + swiper_indicator_selected_size: "2203", + toast_padding_horizontal: "2300", + toast_padding_vertical: "2301", + toast_background_color: "2304", + toast_text_fontweight: "2305", + toast_text_color: "2306", + toast_text_fontsize: "2307", + toast_radius: "2308", + textfield_padding_horizontal: "2400", + textfield_padding_vertical: "2401", + textfield_height: "2402", + textfield_font_size: "2403", + textfield_font_weight: "2404", + textfield_border_radius: "2405", + textfield_background_color: "2407", + textfield_placeholder_color: "2408", + textfield_text_color: "2409", + textfield_focus_background_color: "2410", + textfield_focus_placeholder_color: "2411", + textfield_focus_text_color: "2412", + textfield_cursor_color: "2415", + textfield_icon_size: "2417", + textfield_error_text_color: "2420", + textfield_error_border_color: "2424", + textfield_text_selected_color: "2425", + video_bar_time_text_color: "2615", + video_error_text_color: "2616", + video_bar_background: "2617", + tab_active_indicator_color: "2705", + navigation_bar_title_color: "2900", + navigation_bar_title_font_size: "2901", + navigation_bar_title_font_size_emphasize: "2902", + navigation_bar_subtitle_color: "2903", + navigation_bar_subtitle_font_size: "2904", + navigation_bar_height: "2905", + navigation_bar_height_emphasize: "2906", + navigation_bar_menu_zone_width: "2909", + navigation_bar_menu_icon_width: "2910", + navigation_bar_logo_icon_width: "2911", + navigation_bar_more_zone_width: "2912", + navigation_bar_more_zone_height: "2913", + navigation_bar_more_icon_width: "2914", + navigation_bar_more_icon_height: "2915", + navigation_bar_max_padding_start: "2920", + navigation_bar_max_padding_end: "2921", + navigation_bar_default_padding_start: "2922", + navigation_bar_default_padding_end: "2923", + picker_popup_radius: "3002", + picker_popup_padding: "3003", + picker_button_font_size: "3019", + picker_button_text_color: "3020", + picker_select_option_font_size: "3021", + picker_select_option_text_color: "3022", + picker_normal_option_font_size: "3025", + picker_normal_option_font_color: "3026", + picker_title_font_size: "3028", + picker_title_text_color: "3029", + scroll_bar_background_color: "3304", + scroll_bar_foreground_color: "3305", + refresh_default_progress_diameter: "3404", + search_icon_size: "3600", + search_text_field_padding_left: "3602", + search_text_field_radius: "3603", + search_text_color: "3605", + search_placeholder_color: "3606", + search_close_icon_size: "3607", + search_font_size: "3610", + search_font_weight: "3611", + search_focus_text_color: "3613", + text_overlay_handle_color: "3718", + text_overlay_handle_diameter: "3719", + calendar_week_font_size: "3500", + calendar_day_font_size : "3501", + calendar_lunar_font_size: "3502", + calendar_week_color: "3503", + calendar_day_color: "3504", + calendar_lunar_color: "3505", + calendar_weekend_day_color: "3506", + calendar_weekend_lunar_color: "3507", + calendar_today_day_color: "3508", + calendar_today_lunar_color: "3509", + calendar_non_current_month_day_color: "3510", + calendar_non_current_month_lunar_color: "3511", + calendar_work_day_mark_font_size: "3512", + calendar_off_day_mark_font_size: "3513", + calendar_work_day_mark_color: "3514", + calendar_off_day_mark_color: "3515", + calendar_not_current_month_work_day_mark_color: "3516", + calendar_not_current_month_off_day_mark_color: "3517", + calendar_focused_day_color: "3518", + calendar_focused_lunar_color: "3519", + calendar_focused_area_radius: "3520", + calendar_focused_area_background_color: "3521", + calendar_top_padding: "3522", + calendar_blur_area_background_color : "3523", + calendar_col_space: "3524", + calendar_week_height: "3525", + calendar_day_height: "3526", + calendar_week_width: "3527", + calendar_day_width: "3528", + calendar_week_and_day_row_space: "3529", + calendar_daily_five_row_space: "3530", + calendar_daily_six_row_space: "3531", + calendar_gregorian_calendar_height: "3532", + calendar_work_state_width: "3533", + theme_calendar_day_font_wight: "3534", + theme_calendar_lunar_day_font_wight: "3535", + theme_calendar_work_state_font_wight: "3536", + theme_calendar_work_state_horizontal_moving_distance: "3566", + theme_calendar_work_state_vertical_moving_distance: "3567" +}; + +module.exports = THEME_PROP_GROUPS; diff --git a/ace-loader/plugin/theme/ohosStyles.js b/ace-loader/plugin/theme/ohosStyles.js new file mode 100644 index 000000000..c249d6148 --- /dev/null +++ b/ace-loader/plugin/theme/ohosStyles.js @@ -0,0 +1,684 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const OHOS_THEME_STYLES = { + ic_app: '0', + request_location_reminder_title: '1', + request_location_reminder_content: '2', + theme_light: '3', + theme_dark: '4', + theme_transparent: '5', + id_color_foreground: '6', + id_color_foreground_dark: '7', + id_color_foreground_transparent: '8', + id_color_foreground_contrary: '9', + id_color_foreground_contrary_dark: '10', + id_color_foreground_contrary_transparent: '11', + id_color_foreground_contrary_disable: '12', + id_color_foreground_contrary_disable_dark: '13', + id_color_foreground_contrary_disable_transparent: '14', + id_color_background: '15', + id_color_background_dark: '16', + id_color_background_transparent: '17', + id_color_sub_background: '18', + id_color_sub_background_dark: '19', + id_color_sub_background_transparent: '20', + id_color_emphasize: '21', + id_color_emphasize_dark: '22', + id_color_emphasize_transparent: '23', + id_color_emphasize_contrary: '24', + id_color_emphasize_contrary_dark: '25', + id_color_emphasize_contrary_transparent: '26', + id_color_alert: '27', + id_color_alert_dark: '28', + id_color_alert_transparent: '29', + id_color_warning: '30', + id_color_warning_dark: '31', + id_color_warning_transparent: '32', + id_color_handup: '33', + id_color_handup_dark: '34', + id_color_handup_transparent: '35', + id_color_connected: '36', + id_color_connected_dark: '37', + id_color_connected_transparent: '38', + id_color_component_activated: '39', + id_color_component_activated_dark: '40', + id_color_component_activated_transparent: '41', + id_color_component_normal: '42', + id_color_component_normal_dark: '43', + id_color_component_normal_transparent: '44', + id_color_list_separator: '45', + id_color_list_separator_dark: '46', + id_color_list_separator_transparent: '47', + id_color_subheading_separator: '48', + id_color_subheading_separator_dark: '49', + id_color_subheading_separator_transparent: '50', + id_color_click_effect: '51', + id_color_click_effect_dark: '52', + id_color_click_effect_transparent: '53', + id_color_hover: '54', + id_color_hover_dark: '55', + id_color_hover_transparent: '56', + id_color_focused_content_primary: '57', + id_color_focused_content_primary_dark: '58', + id_color_focused_content_primary_transparent: '59', + id_color_focused_content_second: '60', + id_color_focused_content_second_dark: '61', + id_color_focused_content_second_transparent: '62', + id_color_focused_content_tertiary: '63', + id_color_focused_content_tertiary_dark: '64', + id_color_focused_content_tertiary_transparent: '65', + id_color_focused_outline: '66', + id_color_focused_outline_dark: '67', + id_color_focused_outline_transparent: '68', + id_color_focused_bg: '69', + id_color_focused_bg_dark: '70', + id_color_focused_bg_transparent: '71', + id_color_primary: '72', + id_color_primary_dark: '73', + id_color_primary_transparent: '74', + id_color_primary_contrary: '75', + id_color_primary_contrary_dark: '76', + id_color_primary_contrary_transparent: '77', + id_color_secondary: '78', + id_color_secondary_dark: '79', + id_color_secondary_transparent: '80', + id_color_tertiary: '81', + id_color_tertiary_dark: '82', + id_color_tertiary_transparent: '83', + id_color_fourth: '84', + id_color_fourth_dark: '85', + id_color_fourth_transparent: '86', + id_color_activated: '87', + id_color_activated_dark: '88', + id_color_activated_transparent: '89', + id_color_activated_start: '90', + id_color_activated_start_dark: '91', + id_color_activated_start_transparent: '92', + id_color_activated_end: '93', + id_color_activated_end_dark: '94', + id_color_activated_end_transparent: '95', + id_color_text_primary: '96', + id_color_text_primary_dark: '97', + id_color_text_primary_transparent: '98', + id_color_text_primary_contrary: '99', + id_color_text_primary_contrary_dark: '100', + id_color_text_primary_contrary_transparent: '101', + id_color_text_secondary: '102', + id_color_text_secondary_dark: '103', + id_color_text_secondary_transparent: '104', + id_color_text_secondary_contrary: '105', + id_color_text_secondary_contrary_dark: '106', + id_color_text_secondary_contrary_transparent: '107', + id_color_text_tertiary: '108', + id_color_text_tertiary_dark: '109', + id_color_text_tertiary_transparent: '110', + id_color_text_tertiary_contrary: '111', + id_color_text_tertiary_contrary_dark: '112', + id_color_text_tertiary_contrary_transparent: '113', + id_color_text_primary_activated: '114', + id_color_text_primary_activated_dark: '115', + id_color_text_primary_activated_transparent: '116', + id_color_text_secondary_activated: '117', + id_color_text_secondary_activated_dark: '118', + id_color_text_secondary_activated_transparent: '119', + id_color_text_search_url: '120', + id_color_text_search_url_dark: '121', + id_color_text_search_url_transparent: '122', + id_color_text_hint: '123', + id_color_text_hint_dark: '124', + id_color_text_hint_transparent: '125', + id_color_text_hint_contrary: '126', + id_color_text_hint_contrary_dark: '127', + id_color_text_hint_contrary_transparent: '128', + id_color_text_hyperlink: '129', + id_color_text_hyperlink_dark: '130', + id_color_text_hyperlink_transparent: '131', + id_color_text_hyperlink_contrary: '132', + id_color_text_hyperlink_contrary_dark: '133', + id_color_text_hyperlink_contrary_transparent: '134', + id_color_text_highlight_bg: '135', + id_color_text_highlight_bg_dark: '136', + id_color_text_highlight_bg_transparent: '137', + id_color_text_highlight_bg_contrary: '138', + id_color_text_highlight_bg_contrary_dark: '139', + id_color_text_highlight_bg_contrary_transparent: '140', + id_color_palette1: '141', + id_color_palette1_dark: '142', + id_color_palette1_transparent: '143', + id_color_palette2: '144', + id_color_palette2_dark: '145', + id_color_palette2_transparent: '146', + id_color_palette3: '147', + id_color_palette3_dark: '148', + id_color_palette3_transparent: '149', + id_color_palette4: '150', + id_color_palette4_dark: '151', + id_color_palette4_transparent: '152', + id_color_palette5: '153', + id_color_palette5_dark: '154', + id_color_palette5_transparent: '155', + id_color_palette6: '156', + id_color_palette6_dark: '157', + id_color_palette6_transparent: '158', + id_color_palette7: '159', + id_color_palette7_dark: '160', + id_color_palette7_transparent: '161', + id_color_palette8: '162', + id_color_palette8_dark: '163', + id_color_palette8_transparent: '164', + id_color_palette9: '165', + id_color_palette9_dark: '166', + id_color_palette9_transparent: '167', + id_color_palette10: '168', + id_color_palette10_dark: '169', + id_color_palette10_transparent: '170', + id_color_palette11: '171', + id_color_palette11_dark: '172', + id_color_palette11_transparent: '173', + id_color_palette_aux1: '174', + id_color_palette_aux1_dark: '175', + id_color_palette_aux1_transparent: '176', + id_color_palette_aux2: '177', + id_color_palette_aux2_dark: '178', + id_color_palette_aux2_transparent: '179', + id_color_palette_aux3: '180', + id_color_palette_aux3_dark: '181', + id_color_palette_aux3_transparent: '182', + id_color_palette_aux4: '183', + id_color_palette_aux4_dark: '184', + id_color_palette_aux4_transparent: '185', + id_color_palette_aux5: '186', + id_color_palette_aux5_dark: '187', + id_color_palette_aux5_transparent: '188', + id_color_palette_aux6: '189', + id_color_palette_aux6_dark: '190', + id_color_palette_aux6_transparent: '191', + id_color_palette_aux7: '192', + id_color_palette_aux7_dark: '193', + id_color_palette_aux7_transparent: '194', + id_color_palette_aux8: '195', + id_color_palette_aux8_dark: '196', + id_color_palette_aux8_transparent: '197', + id_color_palette_aux9: '198', + id_color_palette_aux9_dark: '199', + id_color_palette_aux9_transparent: '200', + id_color_palette_aux10: '201', + id_color_palette_aux10_dark: '202', + id_color_palette_aux10_transparent: '203', + id_color_palette_aux11: '204', + id_color_palette_aux11_dark: '205', + id_color_palette_aux11_transparent: '206', + id_color_special1: '207', + id_color_special1_dark: '208', + id_color_special1_transparent: '209', + id_color_special2: '210', + id_color_special2_dark: '211', + id_color_special2_transparent: '212', + id_color_special3: '213', + id_color_special3_dark: '214', + id_color_special3_transparent: '215', + id_color_special4: '216', + id_color_special4_dark: '217', + id_color_special4_transparent: '218', + id_color_special5: '219', + id_color_special5_dark: '220', + id_color_special5_transparent: '221', + id_color_special6: '222', + id_color_special6_dark: '223', + id_color_special6_transparent: '224', + id_color_special7: '225', + id_color_special7_dark: '226', + id_color_special7_transparent: '227', + id_color_special8: '228', + id_color_special8_dark: '229', + id_color_special8_transparent: '230', + id_color_special9: '231', + id_color_special9_dark: '232', + id_color_special9_transparent: '233', + id_color_special10: '234', + id_color_special10_dark: '235', + id_color_special10_transparent: '236', + id_color_special11: '237', + id_color_special11_dark: '238', + id_color_special11_transparent: '239', + id_color_mask_thin: '240', + id_color_mask_thin_dark: '241', + id_color_mask_thin_transparent: '242', + id_color_mask_light: '243', + id_color_mask_light_dark: '244', + id_color_mask_light_transparent: '245', + id_color_mask_regular: '246', + id_color_mask_regular_dark: '247', + id_color_mask_regular_transparent: '248', + id_color_mask_thick: '249', + id_color_mask_thick_dark: '250', + id_color_mask_thick_transparent: '251', + id_alpha_content_primary: '252', + id_alpha_content_primary_dark: '253', + id_alpha_content_primary_transparent: '254', + id_alpha_content_secondary: '255', + id_alpha_content_secondary_dark: '256', + id_alpha_content_secondary_transparent: '257', + id_alpha_content_tertiary: '258', + id_alpha_content_tertiary_dark: '259', + id_alpha_content_tertiary_transparent: '260', + id_alpha_content_fourth: '261', + id_alpha_content_fourth_dark: '262', + id_alpha_content_fourth_transparent: '263', + id_alpha_disabled: '264', + id_alpha_disabled_dark: '265', + id_alpha_disabled_transparent: '266', + id_alpha_highlight_bg: '267', + id_alpha_highlight_bg_dark: '268', + id_alpha_highlight_bg_transparent: '269', + id_alpha_normal_bg: '270', + id_alpha_normal_bg_dark: '271', + id_alpha_normal_bg_transparent: '272', + id_alpha_inapptip_bg: '273', + id_alpha_inapptip_bg_dark: '274', + id_alpha_inapptip_bg_transparent: '275', + id_alpha_separator_line: '276', + id_alpha_separator_line_dark: '277', + id_alpha_separator_line_transparent: '278', + id_color_statusbar_bg: '279', + id_color_statusbar_bg_dark: '280', + id_color_statusbar_bg_transparent: '281', + id_color_navigationbar_bg: '282', + id_color_navigationbar_bg_dark: '283', + id_color_navigationbar_bg_transparent: '284', + id_color_titlebar_icon: '285', + id_color_titlebar_icon_dark: '286', + id_color_titlebar_icon_transparent: '287', + id_color_titlebar_icon_pressed: '288', + id_color_titlebar_icon_pressed_dark: '289', + id_color_titlebar_icon_pressed_transparent: '290', + id_color_titlebar_text: '291', + id_color_titlebar_text_dark: '292', + id_color_titlebar_text_transparent: '293', + id_color_titlebar_text_off: '294', + id_color_titlebar_text_off_dark: '295', + id_color_titlebar_text_off_transparent: '296', + id_color_titlebar_subtitle_text: '297', + id_color_titlebar_subtitle_text_dark: '298', + id_color_titlebar_subtitle_text_transparent: '299', + id_color_titlebar_bg: '300', + id_color_titlebar_bg_dark: '301', + id_color_titlebar_bg_transparent: '302', + id_color_titlebar_sub_bg: '303', + id_color_titlebar_sub_bg_dark: '304', + id_color_titlebar_sub_bg_transparent: '305', + id_color_bottom_tab_icon: '306', + id_color_bottom_tab_icon_dark: '307', + id_color_bottom_tab_icon_transparent: '308', + id_color_bottom_tab_icon_off: '309', + id_color_bottom_tab_icon_off_dark: '310', + id_color_bottom_tab_icon_off_transparent: '311', + id_color_bottom_tab_icon_auxcolor01: '312', + id_color_bottom_tab_icon_auxcolor01_dark: '313', + id_color_bottom_tab_icon_auxcolor01_transparent: '314', + id_color_bottom_tab_icon_auxcolor_off01: '315', + id_color_bottom_tab_icon_auxcolor_off01_dark: '316', + id_color_bottom_tab_icon_auxcolor_off01_transparent: '317', + id_color_bottom_tab_icon_auxcolor02: '318', + id_color_bottom_tab_icon_auxcolor02_dark: '319', + id_color_bottom_tab_icon_auxcolor02_transparent: '320', + id_color_bottom_tab_icon_auxcolor_off02: '321', + id_color_bottom_tab_icon_auxcolor_off02_dark: '322', + id_color_bottom_tab_icon_auxcolor_off02_transparent: '323', + id_color_bottom_tab_text_on: '324', + id_color_bottom_tab_text_on_dark: '325', + id_color_bottom_tab_text_on_transparent: '326', + id_color_bottom_tab_text_off: '327', + id_color_bottom_tab_text_off_dark: '328', + id_color_bottom_tab_text_off_transparent: '329', + id_color_bottom_tab_bg: '330', + id_color_bottom_tab_bg_dark: '331', + id_color_bottom_tab_bg_transparent: '332', + id_color_bottom_tab_bg_blur: '333', + id_color_bottom_tab_bg_blur_dark: '334', + id_color_bottom_tab_bg_blur_transparent: '335', + id_color_bottom_tab_sub_bg: '336', + id_color_bottom_tab_sub_bg_dark: '337', + id_color_bottom_tab_sub_bg_transparent: '338', + id_color_bottom_tab_sub_bg_blur: '339', + id_color_bottom_tab_sub_bg_blur_dark: '340', + id_color_bottom_tab_sub_bg_blur_transparent: '341', + id_color_subtab_text_on: '342', + id_color_subtab_text_on_dark: '343', + id_color_subtab_text_on_transparent: '344', + id_color_subtab_text_off: '345', + id_color_subtab_text_off_dark: '346', + id_color_subtab_text_off_transparent: '347', + id_color_subtab_line_on: '348', + id_color_subtab_line_on_dark: '349', + id_color_subtab_line_on_transparent: '350', + id_color_subtab_bg: '351', + id_color_subtab_bg_dark: '352', + id_color_subtab_bg_transparent: '353', + id_color_toolbar_icon: '354', + id_color_toolbar_icon_dark: '355', + id_color_toolbar_icon_transparent: '356', + id_color_toolbar_icon_actived: '357', + id_color_toolbar_icon_actived_dark: '358', + id_color_toolbar_icon_actived_transparent: '359', + id_color_toolbar_text: '360', + id_color_toolbar_text_dark: '361', + id_color_toolbar_text_transparent: '362', + id_color_toolbar_text_actived: '363', + id_color_toolbar_text_actived_dark: '364', + id_color_toolbar_text_actived_transparent: '365', + id_color_toolbar_bg: '366', + id_color_toolbar_bg_dark: '367', + id_color_toolbar_bg_transparent: '368', + id_color_toolbar_sub_bg: '369', + id_color_toolbar_sub_bg_dark: '370', + id_color_toolbar_sub_bg_transparent: '371', + id_color_text_field_bg: '372', + id_color_text_field_bg_dark: '373', + id_color_text_field_bg_transparent: '374', + id_color_text_field_sub_bg: '375', + id_color_text_field_sub_bg_dark: '376', + id_color_text_field_sub_bg_transparent: '377', + id_color_progress: '378', + id_color_progress_dark: '379', + id_color_progress_transparent: '380', + id_color_spinner_icon: '381', + id_color_spinner_icon_dark: '382', + id_color_spinner_icon_transparent: '383', + id_color_badge: '384', + id_color_badge_dark: '385', + id_color_badge_transparent: '386', + id_color_badge_red: '387', + id_color_badge_red_dark: '388', + id_color_badge_red_transparent: '389', + id_color_dialog_bg: '390', + id_color_dialog_bg_dark: '391', + id_color_dialog_bg_transparent: '392', + id_color_button_normal: '393', + id_color_button_normal_dark: '394', + id_color_button_normal_transparent: '395', + id_color_switch_outline_off: '396', + id_color_switch_outline_off_dark: '397', + id_color_switch_outline_off_transparent: '398', + id_color_switch_bg_off: '399', + id_color_switch_bg_off_dark: '400', + id_color_switch_bg_off_transparent: '401', + id_color_floating_button_icon: '402', + id_color_floating_button_icon_dark: '403', + id_color_floating_button_icon_transparent: '404', + id_color_floating_button_icon_start: '405', + id_color_floating_button_icon_start_dark: '406', + id_color_floating_button_icon_start_transparent: '407', + id_color_floating_button_icon_end: '408', + id_color_floating_button_icon_end_dark: '409', + id_color_floating_button_icon_end_transparent: '410', + id_color_floating_button_bg_normal: '411', + id_color_floating_button_bg_normal_dark: '412', + id_color_floating_button_bg_normal_transparent: '413', + id_color_floating_button_start: '414', + id_color_floating_button_start_dark: '415', + id_color_floating_button_start_transparent: '416', + id_color_floating_button_center: '417', + id_color_floating_button_center_dark: '418', + id_color_floating_button_center_transparent: '419', + id_color_floating_button_end: '420', + id_color_floating_button_end_dark: '421', + id_color_floating_button_end_transparent: '422', + id_color_floating_button_shadow_start: '423', + id_color_floating_button_shadow_start_dark: '424', + id_color_floating_button_shadow_start_transparent: '425', + id_color_floating_button_shadow_end: '426', + id_color_floating_button_shadow_end_dark: '427', + id_color_floating_button_shadow_end_transparent: '428', + id_color_floating_button_bg_pressed: '429', + id_color_floating_button_bg_pressed_dark: '430', + id_color_floating_button_bg_pressed_transparent: '431', + id_color_instant_tip_bg: '432', + id_color_instant_tip_bg_dark: '433', + id_color_instant_tip_bg_transparent: '434', + id_color_panel_bg: '435', + id_color_panel_bg_dark: '436', + id_color_panel_bg_transparent: '437', + id_color_card_bg: '438', + id_color_card_bg_dark: '439', + id_color_card_bg_transparent: '440', + id_color_list_card_bg: '441', + id_color_list_card_bg_dark: '442', + id_color_list_card_bg_transparent: '443', + id_color_tooltip_foreground: '444', + id_color_tooltip_foreground_dark: '445', + id_color_tooltip_foreground_transparent: '446', + id_color_tooltip_background: '447', + id_color_tooltip_background_dark: '448', + id_color_tooltip_background_transparent: '449', + id_color_help_tip_bg: '450', + id_color_help_tip_bg_dark: '451', + id_color_help_tip_bg_transparent: '452', + id_text_size_headline1: '453', + id_text_size_headline2: '454', + id_text_size_headline3: '455', + id_text_size_headline4: '456', + id_text_size_headline5: '457', + id_text_size_headline6: '458', + id_text_size_headline7: '459', + id_text_size_headline8: '460', + id_text_size_headline9: '461', + id_text_size_sub_title1: '462', + id_text_size_sub_title2: '463', + id_text_size_sub_title3: '464', + id_text_size_button1: '465', + id_text_size_button2: '466', + id_text_size_button3: '467', + id_text_size_body1: '468', + id_text_size_body2: '469', + id_text_size_body3: '470', + id_text_size_caption: '471', + id_text_size_caption1: '472', + id_text_size_chart1: '473', + id_text_size_chart2: '474', + id_text_size_over_line: '475', + id_text_font_family_regular: '476', + id_text_font_family_medium: '477', + id_corner_radius_tips_toast: '478', + id_corner_radius_tips_badge: '479', + id_corner_radius_tips_tips: '480', + id_corner_radius_toggle_button: '481', + id_corner_radius_switch: '482', + id_corner_radius_piece: '483', + id_corner_radius_button: '484', + id_corner_radius_small_button: '485', + id_corner_radius_mark: '486', + id_corner_radius_subtab: '487', + id_corner_radius_clicked: '488', + id_corner_radius_panel: '489', + id_corner_radius_notification: '490', + id_corner_radius_card: '491', + id_corner_radius_progress_bar: '492', + id_corner_radius_dialog: '493', + id_corner_radius_grid: '494', + id_corner_radius_check_box: '495', + id_corner_radius_menu: '496', + id_corner_radius_banner: '497', + id_corner_radius_icon: '498', + id_corner_radius_text_field: '499', + id_corner_radius_default_xl: '500', + id_corner_radius_default_l: '501', + id_corner_radius_default_m: '502', + id_corner_radius_default_s: '503', + id_corner_radius_default_xs: '504', + id_default_padding_start: '505', + id_max_padding_start: '506', + id_default_padding_end: '507', + id_max_padding_end: '508', + id_default_padding_top: '509', + id_default_padding_bottom_flexible: '510', + id_default_padding_bottom_fixed: '511', + id_dialog_margin_start: '512', + id_dialog_margin_end: '513', + id_dialog_margin_bottom: '514', + id_notification_margin_start: '515', + id_notification_margin_end: '516', + id_card_margin_start: '517', + id_card_margin_end: '518', + id_card_margin_middle: '519', + id_text_margin_vertical: '520', + id_text_margin_horizontal: '521', + id_text_paragraph_margin_xl: '522', + id_text_paragraph_margin_l: '523', + id_text_paragraph_margin_m: '524', + id_text_paragraph_margin_s: '525', + id_text_paragraph_margin_xs: '526', + id_elements_margin_vertical_l: '527', + id_elements_margin_vertical_m: '528', + id_elements_margin_horizontal_l: '529', + id_elements_margin_horizontal_m: '530', + id_text_line_space_s: '531', + id_text_line_space_l: '532', + button_pattern_light: '533', + button_pattern_dark: '534', + button_pattern_transparent: '535', + button_bg_light: '536', + button_bg_dark: '537', + button_bg_transparent: '538', + button_radius: '539', + checkbox_pattern_light: '540', + checkbox_pattern_dark: '541', + checkbox_pattern_transparent: '542', + radio_pattern_light: '543', + radio_pattern_dark: '544', + radio_pattern_transparent: '545', + switch_pattern_light: '546', + switch_pattern_dark: '547', + switch_pattern_transparent: '548', + swiper_pattern_light: '549', + swiper_pattern_dark: '550', + swiper_pattern_transparent: '551', + data_panel_pattern_light: '552', + data_panel_pattern_dark: '553', + data_panel_pattern_transparent: '554', + toolbar_pattern_light: '555', + toolbar_pattern_dark: '556', + toolbar_pattern_transparent: '557', + toggle_pattern_light: '558', + toggle_pattern_dark: '559', + toggle_pattern_transparent: '560', + theme_hide_title_bar: '561', + emergency_number: '562', + fa_foreground: '563', + fa_foreground_dark: '564', + fa_foreground_contrary: '565', + fa_foreground_contrary_dark: '566', + fa_emphasize: '567', + fa_emphasize_dark: '568', + fa_emphasize_outline: '569', + fa_emphasize_outline_dark: '570', + fa_alert: '571', + fa_alert_dark: '572', + fa_warning: '573', + fa_warning_dark: '574', + fa_handup: '575', + fa_handup_dark: '576', + fa_connected: '577', + fa_connected_dark: '578', + fa_component_normal: '579', + fa_component_normal_dark: '580', + fa_click_effect: '581', + fa_click_effect_dark: '582', + fa_list_separator: '583', + fa_list_separator_dark: '584', + fa_list_card_bg_blur: '585', + fa_list_card_bg_blur_dark: '586', + fa_list_card_bg: '587', + fa_list_card_bg_dark: '588', + fa_background_blur: '589', + fa_background_blur_dark: '590', + fa_background: '591', + fa_background_dark: '592', + fa_sub_background: '593', + fa_sub_background_dark: '594', + fa_text_primary: '595', + fa_text_primary_dark: '596', + fa_text_secondary: '597', + fa_text_secondary_dark: '598', + fa_text_tertiary: '599', + fa_text_tertiary_dark: '600', + fa_text_fourth: '601', + fa_text_fourth_dark: '602', + fa_text_contrary: '603', + fa_text_contrary_dark: '604', + fa_text_activated: '605', + fa_text_activated_dark: '606', + fa_icon_primary: '607', + fa_icon_primary_dark: '608', + fa_icon_secondary: '609', + fa_icon_secondary_dark: '610', + fa_icon_tertiary: '611', + fa_icon_tertiary_dark: '612', + fa_icon_fourth: '613', + fa_icon_fourth_dark: '614', + fa_icon_contrary: '615', + fa_icon_contrary_dark: '616', + fa_activated: '617', + fa_activated_dark: '618', + fa_palette1: '619', + fa_palette1_dark: '620', + fa_palette2: '621', + fa_palette2_dark: '622', + fa_palette3: '623', + fa_palette3_dark: '624', + fa_palette4: '625', + fa_palette4_dark: '626', + fa_palette5: '627', + fa_palette5_dark: '628', + fa_palette6: '629', + fa_palette6_dark: '630', + fa_palette7: '631', + fa_palette7_dark: '632', + fa_palette8: '633', + fa_palette8_dark: '634', + fa_palette9: '635', + fa_palette9_dark: '636', + fa_palette10: '637', + fa_palette10_dark: '638', + fa_palette11: '639', + fa_palette11_dark: '640', + fa_palette12: '641', + fa_palette12_dark: '642', + fa_alpha_content_primary: '643', + fa_alpha_content_primary_dark: '644', + fa_alpha_content_secondary: '645', + fa_alpha_content_secondary_dark: '646', + fa_alpha_content_tertiary: '647', + fa_alpha_content_tertiary_dark: '648', + fa_alpha_content_fourth: '649', + fa_alpha_content_fourth_dark: '650', + fa_alpha_disabled: '651', + fa_alpha_disabled_dark: '652', + fa_alpha_highlight_bg: '653', + fa_alpha_highlight_bg_dark: '654', + fa_corner_radius_card: '655', + fa_corner_radius_list_card_bg: '656', + fa_corner_radius_default_s: '657', + fa_corner_radius_default_xs: '658', + fa_card_background: '659', + fa_card_background_dark: '660', + fa_card_border: '661', + fa_card_border_dark: '662', + fa_card_icon_mask: '663', + id_text_size_dialog_tittle: '664', +}; + + module.exports = OHOS_THEME_STYLES; diff --git a/ace-loader/router/findDev.js b/ace-loader/router/findDev.js new file mode 100644 index 000000000..32d185937 --- /dev/null +++ b/ace-loader/router/findDev.js @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ + +const os = require("os") +const http = require("http"); +const crypto = require('crypto'); + +const localHost = '127.0.0.1' +const uri = '/api/system/deviceinfo' +const timeout = 300 +const IPv4 = 'IPv4' +const SHA256 = 'SHA256' +const hex = 'hex' + +function fliterAlias(alias) { + return alias.family === IPv4 && alias.address !== localHost && !alias.internal +} + +function getIP() { + let IPAdress = []; + Object.values(os.networkInterfaces()).forEach( + iface => iface.filter(fliterAlias).forEach( + alias => { + ip = alias.address.replace(/\.\d+$/, '.1') + !IPAdress.includes(ip) && IPAdress.push(ip) + } + ) + ); + return IPAdress; +} + +async function getName(ip) { + return await new Promise(resolve => { + let req = http.get(`http://${ip}${uri}`, { timeout: timeout }, resp => { + if (resp.statusCode != 200) { + req.destroy(); + resolve(null); + return; + } + + resp.setEncoding('utf8'); + let ret = ""; + resp.on('data', chunk => ret += chunk); + resp.on('end', () => { + try { + const parsedData = JSON.parse(ret) + resolve({ ip, name: parsedData.FriendlyName, udid: crypto.createHash(SHA256).update(parsedData.uuid).digest(hex) }); + } catch (error) { + resolve(null); + } + }); + }); + req.on("error", () => { + req.destroy(); + resolve(null); + }).on("timeout", () => { + req.destroy(); + resolve(null); + }); + }); +} + +async function main() { + let ipArr = getIP(); + let ret = []; + for (let i = 0; i < ipArr.length; i++) { + let route = await getName(ipArr[i]); + route && ret.push(route) + } + console.info("resp : 200"); + console.info(JSON.stringify(ret)); +} + +main(); \ No newline at end of file diff --git a/ace-loader/router/main.product.router.js b/ace-loader/router/main.product.router.js new file mode 100644 index 000000000..c7f67dacb --- /dev/null +++ b/ace-loader/router/main.product.router.js @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ + +const path = require("path"); +const fs = require("fs"); + +let aceModuleRoot = process.env.aceModuleRoot; +const buildPath = process.env.aceModuleBuild; + +const config = path.join(aceModuleRoot, "../../config.json"); +const appJSPath = path.join(aceModuleRoot, "app.js"); +let pluginInfo = {}; + +loadEntryObj(); + +function loadEntryObj() { + const red = "\u001b[31m"; + const reset = "\u001b[39m"; + + if (!fs.existsSync(config)) { + throw Error(red + "ERROR: missing config" + reset).message; + } + + if (!fs.existsSync(appJSPath)) { + throw Error(red + "ERROR: missing app.js" + reset).message; + } + + pluginInfo = JSON.parse(fs.readFileSync(config, { + encoding: "utf-8" + })); + + if (!(pluginInfo && pluginInfo.app && pluginInfo.app.bundleName && pluginInfo.app.version.name)) { + throw Error(red + "ERROR: mainfest context invalid" + JSON.stringify(pluginInfo)).message; + } +} + +module.exports = { + appJSPath, + pluginInfo, + buildPath: buildPath, + projectPath: aceModuleRoot, + manifestFilePath: config, + pkgName: pluginInfo.app.bundleName, + hapName: pluginInfo.app.bundleName + "-" + pluginInfo.app.version.name + "_unsigned", +}; \ No newline at end of file diff --git a/ace-loader/router/module-scipt-router.js b/ace-loader/router/module-scipt-router.js new file mode 100644 index 000000000..d848dc4af --- /dev/null +++ b/ace-loader/router/module-scipt-router.js @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ + +module.exports = function (context) { + if (this.query == undefined || this.query.pkgName == undefined) { + throw Error("custom loader haven't recv the pkgName"); + } + return context.replace( + /import (\w+) from [\'\"]{1}@system\.(\w+)[\'\"]{1}/g, + `var $1 = requireNative('${this.query.pkgName}','$2')` + ); +}; diff --git a/ace-loader/router/push.js b/ace-loader/router/push.js new file mode 100644 index 000000000..11e683987 --- /dev/null +++ b/ace-loader/router/push.js @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ + +const crypto = require("crypto"); +const fs = require("fs"); +const path = require("path"); +const http = require("http"); +const os = require("os"); +const { login, GET, POST, decryptStr2Str } = require("./pushHelper"); + +let localIp = undefined; +let argv = getArgv(); + +checkArgv(); + +let pwd = decryptStr2Str(argv.metePath, argv.session); +if (pwd == undefined) { + finish(12, "incorrect password."); +} + +function constainsKey(array, key) { + for (let i = 0; i < array.length; i++) { + if (array[i].pkgName === key) { + return true; + } + } + return false; +} + +let cnt = 0; +function getErr(data) { + if (cnt == 20) { + POST(`http://${argv.ip}/api/system/user_logout`); + finish(41, "install timeout"); + } + cnt++; + + GET(`http://${argv.ip}/api/hap/all_infos`).then( + allInfos => { + if (constainsKey(allInfos.installedHap, data.pkgName)) { + POST(`http://${argv.ip}/api/system/user_logout`); + finish(31, "install success."); + } + if (constainsKey(allInfos.installingHap, data.pkgName)) { + return; + } + return POST(`http://${argv.ip}/api/acelite/get_err`, data); + } + ).then( + errInfo => { + POST(`http://${argv.ip}/api/system/user_logout`); + if (errInfo.errCode == 404) { + finish(30, "no interface."); + } + finish(errInfo.errCode, "install fail"); + } + ); +} + +login(argv.ip, pwd).then(res => { + if (res == undefined) { + finish(10, "internal error."); + }; + + if (res.err == 0) { + let port = createListen(argv.file); + if (port == null) { + finish(8, "create the file server failed."); + } + + let data = { + pkgName: argv.pkgName, + name: argv.name, + versionName: argv.versionName || "1.0.0", + versionCode: parseInt(argv.versionCode) || 1, + appId: argv.appId || "C" + new Date().getTime(), + downloadUrl: `http://${localIp}:${port}/signed.hap`, + iconUrl: "https://appimg.dbankcdn.com/application/icon144/a02cb676dfdf49ccad87471b421a5276.png", + isDebug: 1, + }; + + POST(`http://${argv.ip}/api/acelite/hap_delete`, data).then( + () => { + return POST(`http://${argv.ip}/api/acelite/hap_debug`, data); + } + ).then( + res => { + if (res.errcode != 0) { + finish(14, "push fail."); + } + setInterval(()=>getErr(data), 3000); + } + ); + } else if ((res.err == 4784230 || res.err == 4784231) && res.waitTime) { + finish(13, "too many errors. Please try again later."); + } else { + finish(9, "login failed."); + } +}).catch(err => { + finish(10, "internal error."); +}); + +if (!argv.file) { + finish(2, "Path is null") +} + +function checkArgv() { + if (!argv.ip || !(localIp = getLocalIp(argv.ip))) { + finish(1, "ip error") + } + if (!argv.file || !fs.existsSync(argv.file)) { + finish(2, "file error.") + } + if (!argv.metePath || !fs.statSync(argv.metePath).isDirectory()) { + finish(3, "metePath error.") + } + if (!argv.session) { + finish(4, "session error.") + } + if (!argv.pkgName) { + finish(5, "pkgName error.") + } + if (!argv.name) { + finish(6, "name error.") + } +} + +function finish(code, msg) { + process.exit(code) +} + +/** + * Listen to external download requirements on random port from 9000 to 9100. + * @param {String} hapPath hap file path. + * @return {Number} service port. + */ +function createListen(hapPath) { + /* Generate a random number 9000~9100. randomBytes() return number is 0~255. */ + let port = 9000 + Math.round(new Uint8Array(crypto.randomBytes(1))[0] * 100 / 255); + + let server = http.createServer(function (req, res) { + res.writeHead(200, { + 'Content-Type': 'application/octet-stream', + 'Content-Disposition': 'attachment; filename=' + path.basename(hapPath), + "Content-Length": fs.statSync(hapPath).size + }); + fs.createReadStream(hapPath).pipe(res); + server.close(); + }).listen(port); + + server.on("error", () => { + finish(8, "create the file server failed."); + }) + + return port; +} + +/** + * Get parameter from command. + * @return {Object} Object of parameter + */ +function getArgv() { + let ret = {}; + process.argv.splice(2).forEach((value, index, array) => { + if (/^--[a-zA-Z]+/.test(value)) { + if (index < array.length - 1 && /[^-]+/.test(array[index + 1])) { + ret[value.substr(2)] = array[index + 1]; + } else { + ret[value.substr(2)] = true; + } + } + }); + return ret; +} + +function getLocalIp(ip) { + let localIp = undefined; + Object.values(os.networkInterfaces()).forEach( + iface => { + iface.forEach( + alias => { + if (alias.address.replace(/\.\d+$/, '.1') == ip) { + localIp = alias.address; + return; + } + } + ); + if (localIp) { + return; + } + } + ); + return localIp; +} diff --git a/ace-loader/router/pushHelper.js b/ace-loader/router/pushHelper.js new file mode 100644 index 000000000..fba0c905c --- /dev/null +++ b/ace-loader/router/pushHelper.js @@ -0,0 +1,320 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ + +var http = require("http"); +const crypto = require("crypto"); +const fs = require("fs"); +const path = require("path"); + +let ip = undefined; +let pwd = undefined; +let csrf = {}; +let globalCookie = ''; + +const defaultHeader = { + 'X-Requested-With': 'XMLHttpRequest', + Accept: 'application/json, text/javascript, */*; q=0.01', + 'Content-Type': 'application/json; charset=utf-8' +} + +module.exports = { decryptStr2Str, login, GET, POST }; + +function login(ipParam, pwdParam) { + return new Promise(async resolve => { + if (!ipParam || pwdParam == undefined) { + resolve(); + } + ip = ipParam; + pwd = pwdParam; + + await GET(`http://${ip}/api/system/deviceinfo`); + + let count = 0; + let proofData = undefined; + do { + let firstNonce = crypto.createHash('sha256').update(crypto.randomBytes(8)).digest("hex"); + let res = await POST(`http://${ip}/api/system/user_login_nonce`, { username: 'admin', firstnonce: firstNonce }) + + if (res.err != 0) { + continue; + } + + proofData = getProofData(res, firstNonce); + } while (!proofData && ++count < 5); + + if (proofData == undefined) { + resolve(); + return; + } + + res = await POST(`http://${ip}/api/system/user_login_proof`, proofData) + resolve(res); + }); +}; + +function getProofData(res, firstNonce) { + if (!res || res.err != 0) { + return undefined; + } + + let iter = res.iterations; + let finalNonce = res.servernonce; + let salt = res.salt; + if (!iter || !finalNonce || !salt) { + return undefined; + } + + let authMsg = firstNonce + "," + finalNonce + "," + finalNonce; + let saltPwd = crypto.pbkdf2Sync(Buffer.from(stringToByte(pwd)), hexStringToByte(salt), iter, 32, "sha256"); + let clientKey = crypto.createHmac("sha256", "Client Key").update(saltPwd).digest(); + let storekey = crypto.createHash("sha256").update(clientKey).digest(); + let clientsignature = crypto.createHmac("sha256", authMsg).update(storekey).digest(); + let len = clientKey.byteLength; + let clientproof = Buffer.alloc(len); + + for (let i = 0; i < len; i++) { + clientproof.writeUInt8(clientKey.readUInt8(i) ^ clientsignature.readUInt8(i), i); + } + + clientproof = clientproof.toString("hex") + + return { + clientproof: clientproof, + finalnonce: finalNonce + } +} + + +function refreshSession(header, ret) { + let cookie = header && header["set-cookie"] && header["set-cookie"][0]; + + cookie && (globalCookie = (cookie.substring(0, cookie.indexOf(";")))); + ret.csrf_param && (csrf.csrf_param = ret.csrf_param); + ret.csrf_token && (csrf.csrf_token = ret.csrf_token); +} + +function POST(url, data) { + return new Promise(resolve => { + let req = http.request(url, { + method: "post", + timeout: 300, + headers: { + ...defaultHeader, + Cookie: globalCookie + } + }, resp => { + if (resp.statusCode != 200) { + resolve({errCode: 404}); + return; + } + + let ret = ""; + resp.on('data', chunk => ret += chunk); + resp.on('end', () => { + try{ + ret = JSON.parse(ret); + }catch(err) { + resolve(null); + return; + } + refreshSession(resp.headers, ret); + resolve(ret); + }); + }); + + req.write(JSON.stringify({ + data, + csrf, + })); + req.end(); + + req.on("error", () => { + req.destroy(); + resolve(null); + }).on("timeout", () => { + req.destroy(); + resolve(null); + }); + }); +} + +function GET(url) { + return new Promise(resolve => { + let req = http.get(url, { + timeout: 300, headers: { + ...defaultHeader, + Cookie: globalCookie + } + }, resp => { + let ret = ""; + resp.on('data', chunk => ret += chunk); + resp.on('end', () => { + ret = JSON.parse(ret); + refreshSession(resp.headers, ret); + resolve(ret); + }); + }); + + req.on("error", () => { + req.destroy(); + resolve(null); + }).on("timeout", () => { + req.destroy(); + resolve(null); + }); + }); +} + + +/** + * fd Root key component directory. + * ac Directory for storing the salt used to generate the final root key in iteration mode. + * ce work key material directory + */ +const comDirs = ["fd", "ac", "ce"]; + +/** + * Root path of key materials. All materials are stored in this path. + */ +const meteDir = "material"; + +/** + * A part of the root key component. It must work with other components to form a root key. + * For details, see the Key Management Security Specifications V1.3. + */ +let COMPONENT = Array.from(new Int8Array([ + 0x31, 0xf3, 0x09, 0x73, 0xd6, 0xaf, 0x5b, 0xb8, + 0xd3, 0xbe, 0xb1, 0x58, 0x65, 0x83, 0xc0, 0x77 +])); + +function decryptStr2Str(rootPath, input) { + let metePath = path.resolve(rootPath, meteDir); + let components = readComponents(metePath); + let saltDir = path.resolve(metePath, comDirs[1]); + let salt = readDirBytes(saltDir); + let rootKey = deriveRootKey(components, salt); + let workMeteDir = path.resolve(metePath, comDirs[2]); + let workMete = readDirBytes(workMeteDir); + let key = decrypt(rootKey, workMete); + let bts = hexStringToByte(input); + + let output = decrypt(key, bts); + return (Buffer.from(output).toString("utf-8")); +} + +function hexStringToByte(str) { + if (!str) { + return new Uint8Array(); + } + + var a = []; + for (var i = 0, len = str.length; i < len; i += 2) { + a.push(parseInt(str.substr(i, 2), 16)); + } + + return new Int8Array(a); +} + +function decrypt(rootKey, workMete) { + if (workMete.length < 32) { + return null; + } + let bodyLength = ((workMete[0] & 0xFF) << 24) | ((workMete[1] & 0xFF) << 16) | ((workMete[2] & 0xFF) << + 8) | ((workMete[3] & 0xFF)); + + let iv = workMete.slice(4, workMete.length - bodyLength); + + let cipher = crypto.createCipheriv("aes-128-gcm", new Int8Array(rootKey), new Int8Array(iv), { + authTagLength: 16 + }); + let encrypted = cipher.update(new Int8Array(workMete.slice(workMete.length - bodyLength))) + cipher.final(); + return new Int8Array(encrypted).slice(0, bodyLength - 16); + +} + +function deriveRootKey(components, salt) { + let fullComponents = components; + fullComponents.push(COMPONENT); + let finalComponent = sortFullComponent(fullComponents); + let key = Array.from(new Int8Array(crypto.pbkdf2Sync(finalComponent, new Int8Array(salt), 10000, 16, "sha256"))); + return key; +} + +function sortFullComponent(fullComponents) { + let ret = fullComponents[0]; + for (let i = 1; i < fullComponents.length; i++) { + ret = xor(ret, fullComponents[i]); + } + return new Int8Array(stringToByte(Buffer.from(ret).toString("utf-8"))); +} + +function stringToByte(str) { + var bytes = new Array(); + var len, c; + len = str.length; + for (var i = 0; i < len; i++) { + c = str.charCodeAt(i); + if (c >= 0x010000 && c <= 0x10FFFF) { + bytes.push(((c >> 18) & 0x07) | 0xF0); + bytes.push(((c >> 12) & 0x3F) | 0x80); + bytes.push(((c >> 6) & 0x3F) | 0x80); + bytes.push((c & 0x3F) | 0x80); + } else if (c >= 0x000800 && c <= 0x00FFFF) { + bytes.push(((c >> 12) & 0x0F) | 0xE0); + bytes.push(((c >> 6) & 0x3F) | 0x80); + bytes.push((c & 0x3F) | 0x80); + } else if (c >= 0x000080 && c <= 0x0007FF) { + bytes.push(((c >> 6) & 0x1F) | 0xC0); + bytes.push((c & 0x3F) | 0x80); + } else { + bytes.push(c & 0xFF); + } + } + return bytes; +} + +function xor(arr1, arr2) { + if (!arr1 || !arr2 || arr1.length != arr2.length) { + return null; + } + + let ret = []; + for (let i = 0; i < arr1.length; i++) { + ret.push(arr1[i] ^ arr2[i]); + } + return ret; +} + +function readDirBytes(dir) { + let files = fs.readdirSync(dir); + if (files.length != 1) { + return null; + } + + return Array.from(new Int8Array(fs.readFileSync(path.resolve(dir, files[0])))); +} + +function readComponents(dir) { + let files = fs.readdirSync(path.resolve(dir, comDirs[0])); + if (files == null || files.length != 3) { + return null; + } + let ret = []; + for (let i = 0; i < files.length; i++) { + ret.push(readDirBytes(path.resolve(dir, comDirs[0], files[i]))); + } + return ret; +} \ No newline at end of file diff --git a/ace-loader/sample/card/i18n/en.json b/ace-loader/sample/card/i18n/en.json new file mode 100644 index 000000000..b965be3c5 --- /dev/null +++ b/ace-loader/sample/card/i18n/en.json @@ -0,0 +1,5 @@ +{ + "message":{ + "hello": "hello world" + } +} diff --git a/ace-loader/sample/card/i18n/zh.json b/ace-loader/sample/card/i18n/zh.json new file mode 100644 index 000000000..909f8ea23 --- /dev/null +++ b/ace-loader/sample/card/i18n/zh.json @@ -0,0 +1,5 @@ +{ + "message": { + "hello": "你好世界" + } +} diff --git a/ace-loader/sample/card/manifest.json b/ace-loader/sample/card/manifest.json new file mode 100644 index 000000000..06dddafca --- /dev/null +++ b/ace-loader/sample/card/manifest.json @@ -0,0 +1,15 @@ +{ + "appID": "com.example.ace.helloworld", + "appName": "HelloAce", + "versionName": "1.0.0", + "versionCode": 1, + "minPlatformVersion": "1.0.1", + "pages": [ + "pages/index/index" + ], + "window": { + "designWidth": 720, + "autoDesignWidth": false + }, + "type": "form" +} diff --git a/ace-loader/sample/card/pages/index/index.css b/ace-loader/sample/card/pages/index/index.css new file mode 100644 index 000000000..9251db380 --- /dev/null +++ b/ace-loader/sample/card/pages/index/index.css @@ -0,0 +1,23 @@ +.container { + justify-content: center; + align-items: center; +} + +.title { + font-size: 50px; +} + +.button-div { + padding-top: 50px; + align-items: center; + justify-content: center; +} + +.text-div { + align-items: center; + justify-content: center; +} + +.button { + font-size: 30px; +} diff --git a/ace-loader/sample/card/pages/index/index.hml b/ace-loader/sample/card/pages/index/index.hml new file mode 100644 index 000000000..65bfbad15 --- /dev/null +++ b/ace-loader/sample/card/pages/index/index.hml @@ -0,0 +1,8 @@ +
+
+ This is the index page. +
+
+
+
diff --git a/ace-loader/sample/card/pages/index/index.json b/ace-loader/sample/card/pages/index/index.json new file mode 100644 index 000000000..5659c09d8 --- /dev/null +++ b/ace-loader/sample/card/pages/index/index.json @@ -0,0 +1,19 @@ +{ + "data": { + "show": true, + "display": false, + "card_name": "weather", + "temperature": "35°", + "city": "SH", + "date": "2020.09.04", + "weather_info": "cloud", + "image_src":"../../common/clouds.png" + }, + "actions": { + "router": { + "action": "router", + "bundleName": "com.example.helloworld", + "bundleAbility": "com.example.helloworld.MainAbility" + } + } +} diff --git a/ace-loader/sample/lite/app.js b/ace-loader/sample/lite/app.js new file mode 100644 index 000000000..bb1f75249 --- /dev/null +++ b/ace-loader/sample/lite/app.js @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info("AceApplication onCreate"); + }, + onDestroy() { + console.info("AceApplication onDestroy"); + } +}; diff --git a/ace-loader/sample/lite/manifest.json b/ace-loader/sample/lite/manifest.json new file mode 100644 index 000000000..a04b74732 --- /dev/null +++ b/ace-loader/sample/lite/manifest.json @@ -0,0 +1,11 @@ +{ + "appID": "com.example.ace.helloworld", + "appName": "HelloAce", + "versionName": "1.0.0", + "versionCode": 1, + "minPlatformVersion": "zsdk 1.0.0", + "pages": [ + "pages/index/index", + "pages/detail/detail" + ] +} diff --git a/ace-loader/sample/lite/pages/detail/detail.css b/ace-loader/sample/lite/pages/detail/detail.css new file mode 100644 index 000000000..ebf2a6519 --- /dev/null +++ b/ace-loader/sample/lite/pages/detail/detail.css @@ -0,0 +1,11 @@ +.commonStyle { + left: 95px; + top: 95px; + width: 200px; + height: 200px; + margin: 10px; + padding: 30px; + border-width: 1px; + border-radius: 10px; + background-color: #ff0000; +} \ No newline at end of file diff --git a/ace-loader/sample/lite/pages/detail/detail.hml b/ace-loader/sample/lite/pages/detail/detail.hml new file mode 100644 index 000000000..c4ed1a334 --- /dev/null +++ b/ace-loader/sample/lite/pages/detail/detail.hml @@ -0,0 +1,11 @@ + + common style +
+ +
\ No newline at end of file diff --git a/ace-loader/sample/lite/pages/detail/detail.js b/ace-loader/sample/lite/pages/detail/detail.js new file mode 100644 index 000000000..d352de55f --- /dev/null +++ b/ace-loader/sample/lite/pages/detail/detail.js @@ -0,0 +1,19 @@ +var router = require('@system.router') +export default { + data: {}, + nextPage () { + router.replace({ uri: 'pages/chart/index' }) + }, + onInit () { + console.log('onInit called...') + }, + onReady () { + console.log('onReady called...') + }, + onShow () { + console.log('onShow called...') + }, + onDestroy () { + console.log('onDestroy called...') + } +} diff --git a/ace-loader/sample/lite/pages/index/index.css b/ace-loader/sample/lite/pages/index/index.css new file mode 100644 index 000000000..b294ca48d --- /dev/null +++ b/ace-loader/sample/lite/pages/index/index.css @@ -0,0 +1,23 @@ +.btn .table { + color: #ff0000; +} +.btn { + height: 33px; +} +.table { + width: 444px; +} +.container { + justify-content: center; + align-items: center; + left: 0px; + top: 0px; + width: 454px; + height: 454px; +} +.title { + font-size: 30px; + text-align: center; + width: 200px; + height: 100px; +} diff --git a/ace-loader/sample/lite/pages/index/index.hml b/ace-loader/sample/lite/pages/index/index.hml new file mode 100644 index 000000000..13eb5dc41 --- /dev/null +++ b/ace-loader/sample/lite/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + Hello {{title}} + +
diff --git a/ace-loader/sample/lite/pages/index/index.js b/ace-loader/sample/lite/pages/index/index.js new file mode 100644 index 000000000..e59972a1a --- /dev/null +++ b/ace-loader/sample/lite/pages/index/index.js @@ -0,0 +1,5 @@ +export default { + data: { + title: 'World' + } +} diff --git a/ace-loader/sample/rich/app.js b/ace-loader/sample/rich/app.js new file mode 100644 index 000000000..d624d9cee --- /dev/null +++ b/ace-loader/sample/rich/app.js @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +} diff --git a/ace-loader/sample/rich/i18n/en.json b/ace-loader/sample/rich/i18n/en.json new file mode 100644 index 000000000..b965be3c5 --- /dev/null +++ b/ace-loader/sample/rich/i18n/en.json @@ -0,0 +1,5 @@ +{ + "message":{ + "hello": "hello world" + } +} diff --git a/ace-loader/sample/rich/i18n/zh.json b/ace-loader/sample/rich/i18n/zh.json new file mode 100644 index 000000000..909f8ea23 --- /dev/null +++ b/ace-loader/sample/rich/i18n/zh.json @@ -0,0 +1,5 @@ +{ + "message": { + "hello": "你好世界" + } +} diff --git a/ace-loader/sample/rich/manifest.json b/ace-loader/sample/rich/manifest.json new file mode 100644 index 000000000..c9c293553 --- /dev/null +++ b/ace-loader/sample/rich/manifest.json @@ -0,0 +1,15 @@ +{ + "appID": "com.example.ace.helloworld", + "appName": "HelloAce", + "versionName": "1.0.0", + "versionCode": 1, + "minPlatformVersion": "1.0.1", + "pages": [ + "pages/index/index", + "pages/detail/detail" + ], + "window": { + "designWidth": 750, + "autoDesignWidth": false + } +} diff --git a/ace-loader/sample/rich/pages/detail/detail.css b/ace-loader/sample/rich/pages/detail/detail.css new file mode 100644 index 000000000..9251db380 --- /dev/null +++ b/ace-loader/sample/rich/pages/detail/detail.css @@ -0,0 +1,23 @@ +.container { + justify-content: center; + align-items: center; +} + +.title { + font-size: 50px; +} + +.button-div { + padding-top: 50px; + align-items: center; + justify-content: center; +} + +.text-div { + align-items: center; + justify-content: center; +} + +.button { + font-size: 30px; +} diff --git a/ace-loader/sample/rich/pages/detail/detail.hml b/ace-loader/sample/rich/pages/detail/detail.hml new file mode 100644 index 000000000..3d20e2314 --- /dev/null +++ b/ace-loader/sample/rich/pages/detail/detail.hml @@ -0,0 +1,8 @@ +
+
+ This is the detail page. +
+
+ +
+
diff --git a/ace-loader/sample/rich/pages/detail/detail.js b/ace-loader/sample/rich/pages/detail/detail.js new file mode 100644 index 000000000..42d99d619 --- /dev/null +++ b/ace-loader/sample/rich/pages/detail/detail.js @@ -0,0 +1,11 @@ +import router from '@system.router' + +export default { + data: { + }, + launch: function() { + router.push ({ + uri:'pages/index/index', + }) + } +} diff --git a/ace-loader/sample/rich/pages/index/index.css b/ace-loader/sample/rich/pages/index/index.css new file mode 100644 index 000000000..9251db380 --- /dev/null +++ b/ace-loader/sample/rich/pages/index/index.css @@ -0,0 +1,23 @@ +.container { + justify-content: center; + align-items: center; +} + +.title { + font-size: 50px; +} + +.button-div { + padding-top: 50px; + align-items: center; + justify-content: center; +} + +.text-div { + align-items: center; + justify-content: center; +} + +.button { + font-size: 30px; +} diff --git a/ace-loader/sample/rich/pages/index/index.hml b/ace-loader/sample/rich/pages/index/index.hml new file mode 100644 index 000000000..e8a103a82 --- /dev/null +++ b/ace-loader/sample/rich/pages/index/index.hml @@ -0,0 +1,8 @@ +
+
+ This is the index page. +
+
+ +
+
diff --git a/ace-loader/sample/rich/pages/index/index.js b/ace-loader/sample/rich/pages/index/index.js new file mode 100644 index 000000000..d236f6fb3 --- /dev/null +++ b/ace-loader/sample/rich/pages/index/index.js @@ -0,0 +1,11 @@ +import router from '@system.router'; + +export default { + data: { + }, + launch: function() { + router.push ({ + uri:'pages/detail/detail', + }) + } +} diff --git a/ace-loader/src/card-loader.js b/ace-loader/src/card-loader.js new file mode 100644 index 000000000..bc2ba3187 --- /dev/null +++ b/ace-loader/src/card-loader.js @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +import path from 'path' +import fs from 'fs' +import { + getRequireString, + jsonLoaders, + logWarn +} +from './util' +import { parseFragment } from './parser' + +function loader(source) { + this.cacheable && this.cacheable() + const options = { + lang: { + sass:['sass-loader'], + scss:['sass-loader'], + less:['less-loader'] + } + } + const customLang = options.lang || {} + const resourcePath = this.resourcePath + const fileName = resourcePath.replace(path.extname(resourcePath).toString(), '') + let output = '' + output = getRequireString(this, jsonLoaders('template'), resourcePath) + const styleInfo = findStyleFile(fileName) + if (styleInfo.extStyle == true) { + output += getRequireString(this, jsonLoaders('style', customLang[styleInfo.type]), styleInfo.styleFileName) + } + output = addJson(this, output, fileName, '') + + const frag = parseFragment(source) + const nameSet = new Set() + if (frag.element) { + frag.element.forEach(item => { + let customElementName + if (!item.src) { + logWarn(this, [{ + reason: `ERROR: The attribute 'src' must be set in the custom element.`, + line: item.node.__location.line, + column: item.node.__location.col + }]) + return + } + if (!item.src.match(/\.hml$/)) { + item.src = item.src.concat('.hml') + } + const compResourcepath = path.join(resourcePath, '..', item.src) + if (!fs.existsSync(compResourcepath)) { + logWarn(this, [{ + reason: `ERROR: The custom element '${compResourcepath}' can not be found.`, + line: item.node.__location.line, + column: item.node.__location.col + }]) + return + } + if (!item.name) { + customElementName = path.parse(item.src).name.toLowerCase() + } else { + customElementName = item.name.toLowerCase() + } + if (nameSet.has(customElementName)) { + logWarn(this, [{ + reason: `ERROR: The custom elements cannot have the same attribute 'name' or file name (case insensitive).`, + line: item.node.__location.line, + column: item.node.__location.col + }]) + return + } else { + nameSet.add(customElementName) + } + const compFileName = compResourcepath.replace(path.extname(compResourcepath).toString(), '') + output += getRequireString(this, jsonLoaders('template'), + compResourcepath + `?${customElementName}#${fileName}`) + const compStyleInfo = findStyleFile(compFileName) + if (compStyleInfo.extStyle == true) { + output += getRequireString(this, jsonLoaders('style', customLang[compStyleInfo.type]), + compStyleInfo.styleFileName + `?${customElementName}#${fileName}`) + } + output = addJson(this, output, compFileName, `?${customElementName}#${fileName}`) + }) + } + return output +} + +function findStyleFile (fileName) { + let extStyle = false + let styleFileName = fileName + '.css' + let type = 'css' + if (fs.existsSync(styleFileName)) { + extStyle = true + type = 'css' + } else { + styleFileName = fileName + '.less' + if (fs.existsSync(styleFileName)) { + extStyle = true + type = 'less' + } else { + styleFileName = fileName + '.sass' + if (fs.existsSync(styleFileName)) { + extStyle = true + type = 'sass' + } else { + styleFileName = fileName + '.scss' + if (fs.existsSync(styleFileName)) { + extStyle = true + type = 'sass' + } else { + extStyle = false + } + } + } + } + return {extStyle: extStyle, styleFileName: styleFileName, type: type} +} + +function addJson(_this, output, fileName, query) { + if (fs.existsSync(fileName + '.json') && !fs.existsSync(fileName + '.js')) { + output += getRequireString(_this, jsonLoaders('json'), fileName + '.json' + query) + } else if (fs.existsSync(fileName + '.js') && !fs.existsSync(fileName + '.json')) { + logWarn(_this, [{ + reason: `WARNING: The JS file '${fileName}.js' will be discarded in future version, ` + + `use the JSON file '${fileName}.json' instead.`, + }]) + output += getRequireString(_this, jsonLoaders('json'), fileName + '.js' + query) + } else if (fs.existsSync(fileName + '.json') && fs.existsSync(fileName + '.js')) { + logWarn(_this, [{ + reason: `WARNING: '${fileName}' cannot have the same name files '.json' and '.js', otherwise '.json' in default.`, + }]) + output += getRequireString(_this, jsonLoaders('json'), fileName + '.json' + query) + } + return output +} + +module.exports = loader diff --git a/ace-loader/src/cardJson-plugin.js b/ace-loader/src/cardJson-plugin.js new file mode 100644 index 000000000..13d251afb --- /dev/null +++ b/ace-loader/src/cardJson-plugin.js @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const fs = require('fs') +const path = require('path') + +let output = '' +const initIndexJSONObject = { "template": {}, "styles": {}, "actions": {},"data":{} } + +function compileJson(compiler, type, filePath, content, contentType, elementType) { + compiler.hooks.done.tap(type + contentType, () => { + if (type === 'init') { + writeFileSync(filePath, initIndexJSONObject) + } else { + writeFileSync(filePath, content, contentType, elementType) + } + }) +} + +function writeFileSync(filePath, content, contentType, elementType) { + if (!fs.existsSync(filePath)) { + fs.writeFileSync(filePath, stringify(content)) + } else { + const fileContent = fs.readFileSync(filePath, {encoding:'utf-8'}) + try { + const jsonContent = JSON.parse(fileContent) + if (contentType && !elementType) { + jsonContent[contentType] = content ? content : {} + fs.writeFileSync(filePath, stringify(jsonContent)) + } else if (contentType && elementType) { + if (!jsonContent[contentType]) { + jsonContent[contentType] = {} + } + jsonContent[contentType][elementType] = content ? content : {} + fs.writeFileSync(filePath, stringify(jsonContent)) + } + } catch (e) { + fs.writeFileSync(filePath, stringify(initIndexJSONObject)) + writeFileSync(filePath, content, contentType) + } + } +} + +function stringify (jsonObect) { + return JSON.stringify(jsonObect, null, 2) +} + +class AfterEmitPlugin { + constructor(output_) { + output = output_ + } + + apply(compiler) { + compiler.hooks.afterEmit.tap('delete', (compilation) => { + const assets = compilation.assets + const keys = Object.keys(assets) + keys.forEach(key => { + if (fs.existsSync(path.resolve(output, key))) { + if (key.indexOf('i18n') !== 0) { + fs.unlinkSync(path.resolve(output, key)) + } + } + }) + }) + } +} + +module.exports = { + compileJson: compileJson, + AfterEmitPlugin: AfterEmitPlugin +} diff --git a/ace-loader/src/compile-plugin.js b/ace-loader/src/compile-plugin.js new file mode 100644 index 000000000..6068be1f1 --- /dev/null +++ b/ace-loader/src/compile-plugin.js @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const Stats = require('webpack/lib/Stats'); +const fs = require('fs'); +const path = require('path'); +const { DEVICE_LEVEL } = require('./lite/lite-enum'); + +const REG = /\([^\)]+\)/; +let mStats; +let mErrorCount = 0; +let mWarningCount = 0; +let isShowError = true; +let isShowWarning = true; +let isShowNote = true; +let warningCount = 0; +let noteCount = 0; +let errorCount = 0; + +class ResultStates { + constructor(options) { + this.options = options; + } + + apply(compiler) { + const buildPath = this.options.build; + compiler.hooks.done.tap('Result States', (stats) => { + mStats = stats; + warningCount = 0; + noteCount = 0; + errorCount = 0; + if (mStats.compilation.errors) { + mErrorCount = mStats.compilation.errors.length; + } + if (mStats.compilation.warnings) { + mWarningCount = mStats.compilation.warnings.length; + } + if (process.env.error === 'false') { + isShowError = false; + } + if (process.env.warning === 'false') { + isShowWarning = false; + } + if (process.env.note === 'false') { + isShowNote = false; + } + printResult(buildPath); + }); + } +} + +const red = '\u001b[31m'; +const yellow = '\u001b[33m'; +const blue = '\u001b[34m'; +const reset = '\u001b[39m'; + +const writeError = (buildPath, content) => { + fs.writeFile(path.resolve(buildPath, 'compile_error.log'), content, (err) => { + if (err) { + return console.error(err); + } + }); +}; + +function printResult(buildPath) { + printWarning(); + printError(buildPath); + if (errorCount + warningCount + noteCount > 0) { + let result; + const resultInfo = {}; + if (errorCount > 0) { + resultInfo.ERROR = errorCount; + result = 'FAIL '; + } else { + result = 'SUCCESS '; + } + if (warningCount > 0) { + resultInfo.WARN = warningCount; + } + + if (noteCount > 0) { + resultInfo.NOTE = noteCount; + } + console.log(blue, 'COMPILE RESULT:' + result + JSON.stringify(resultInfo), reset); + } else { + console.log(blue, 'COMPILE RESULT:SUCCESS ', reset); + } +} + +function printWarning() { + if (mWarningCount > 0) { + const warnings = mStats.compilation.warnings; + const length = warnings.length; + for (let index = 0; index < length; index++) { + let message = warnings[index].message + if (message.match(/noteStart(([\s\S])*)noteEnd/) !== null) { + noteCount++; + if (isShowNote) { + console.info(' ' + message.match(/noteStart(([\s\S])*)noteEnd/)[1].trim(), reset, '\n') + } + } else if (message.match(/warnStart(([\s\S])*)warnEnd/) !== null) { + warningCount++; + if (isShowWarning) { + console.warn(yellow, message.match(/warnStart(([\s\S])*)warnEnd/)[1].trim(), reset, '\n') + } + } + } + if (mWarningCount > length) { + warningCount = warningCount + mWarningCount - length; + } + } +} + +function printError(buildPath) { + if (mErrorCount > 0) { + const errors = mStats.compilation.errors; + const length = errors.length; + if (isShowError) { + let errorContent = ''; + for (let index = 0; index < length; index++) { + if (errors[index]) { + let message = errors[index].message + if (message) { + if (message.match(/errorStart(([\s\S])*)errorEnd/) !== null) { + const errorMessage = message.match(/errorStart(([\s\S])*)errorEnd/)[1]; + console.error(red, errorMessage.trim(), reset, '\n'); + } else { + const messageArrary = message.split('\n') + let logContent = '' + messageArrary.forEach(element => { + if (!(/^at/.test(element.trim()))) { + logContent = logContent + element + '\n' + } + }); + console.error(red, logContent, reset, '\n'); + } + errorCount ++; + errorContent += message + } + } + } + writeError(buildPath, errorContent); + } + } +} + +module.exports = ResultStates; diff --git a/ace-loader/src/extgen.js b/ace-loader/src/extgen.js new file mode 100644 index 000000000..9f14b651f --- /dev/null +++ b/ace-loader/src/extgen.js @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +import loaderUtils from 'loader-utils' +const codegen = require("./codegen/index.js"); + +module.exports = function (source, map) { + this.cacheable && this.cacheable() + const callback = this.async() + + const hmlCss = codegen.genHmlAndCss(source); + const loaderQuery = loaderUtils.getOptions(this) || {} + if (hmlCss.errorType && hmlCss.errorType !== '' && loaderQuery.type === 'template') { + callback(hmlCss.errorType + ' : ' + hmlCss.errorMessage, '') + } else { + if(loaderQuery.type === 'template') { + callback(null, hmlCss.hmlCss.hml, map) + } else { + callback(null, hmlCss.hmlCss.css, map) + } + } +} diff --git a/ace-loader/src/genAbc-plugin.js b/ace-loader/src/genAbc-plugin.js new file mode 100644 index 000000000..364cc55bb --- /dev/null +++ b/ace-loader/src/genAbc-plugin.js @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ + +const fs = require('fs') +const path = require('path') +const process = require('child_process') +const js2abc = path.join(__dirname, '..', 'bin', 'panda', 'build', 'src', 'index.js') +const js2abc_win = path.join(__dirname, '..', 'bin', 'panda', 'build-win', 'src', 'index.js') +const js2abc_mac = path.join(__dirname, '..', 'bin', 'panda', 'build-mac', 'src', 'index.js') +const libraryPath = path.join(__dirname, '..', 'bin', 'panda', 'build', 'panda', 'lib') +const libraryJsonPath = path.join(__dirname, '..', 'bin', 'panda', 'build','lib') + +const forward = '(global.___mainEntry___ = function (globalObjects) {' + '\n' + + ' var define = globalObjects.define;' + '\n' + + ' var require = globalObjects.require;' + '\n' + + ' var bootstrap = globalObjects.bootstrap;' + '\n' + + ' var register = globalObjects.register;' + '\n' + + ' var render = globalObjects.render;' + '\n' + + ' var $app_define$ = globalObjects.$app_define$;' + '\n' + + ' var $app_bootstrap$ = globalObjects.$app_bootstrap$;' + '\n' + + ' var $app_require$ = globalObjects.$app_require$;' + '\n' + + ' var history = globalObjects.history;' + '\n' + + ' var Image = globalObjects.Image;' + '\n' + + ' var OffscreenCanvas = globalObjects.OffscreenCanvas;' + '\n' + + ' (function(global) {' + '\n' + + ' "use strict";' + '\n' +const last = '\n' + '})(this.__appProto__);' + '\n' + '})' +const firstFileEXT = '_.js' +let output +let webpackPath +let isWin = false +let isMac = false +let isDebug = false + +class GenAbcPlugin { + constructor(output_, webpackPath_, isDebug_) { + output = output_ + webpackPath = webpackPath_ + isDebug = isDebug_ + } + apply(compiler) { + if (fs.existsSync(path.resolve(webpackPath, 'panda/build-win'))) { + isWin = true + } else { + if (fs.existsSync(path.resolve(webpackPath, 'panda/build-mac'))) { + isMac = true + } else { + if (!fs.existsSync(path.resolve(webpackPath, 'panda/build'))) { + console.error('\u001b[31m', `find build fail`, '\u001b[39m') + return + } + } + } + + compiler.hooks.emit.tap('GenAbcPlugin', (compilation) => { + const assets = compilation.assets + const keys = Object.keys(assets) + keys.forEach(key => { + // choice *.js + if (output && webpackPath && path.extname(key) === '.js') { + const newContent = forward + assets[key].source() + last + const keyPath = key.replace(/\.js$/, firstFileEXT) + writeFileSync(newContent, path.resolve(output, keyPath), key) + } + }) + }) + } +} + +function writeFileSync(inputString, output, jsBundleFile) { + const parent = path.join(output, '..') + if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) { + mkDir(parent) + } + fs.writeFileSync(output, inputString) + if (fs.existsSync(output)){ + qjscFirst(output) + } else { + console.error('\u001b[31m', `Failed to convert file ${jsBundleFile} to bin. ${output} is lost`, '\u001b[39m') + } +} + +function mkDir(path_) { + const parent = path.join(path_, '..') + if (!(fs.existsSync(parent) && !fs.statSync(parent).isFile())) { + mkDir(parent) + } + fs.mkdirSync(path_) +} + +function qjscFirst(inputPath) { + let param = '-r' + if (isDebug) { + param += ' --debug' + } + let cmd + if (isWin) { + cmd = `node --expose-gc "${js2abc_win}" "${inputPath}" ${param}` + } else if (isMac){ + cmd = `node --expose-gc "${js2abc_mac}" "${inputPath}" ${param}` + } else { + cmd = `export LD_LIBRARY_PATH="${libraryPath}":"${libraryJsonPath}":$LD_LIBRARY_PATH;node --expose-gc "${js2abc}" "${inputPath}" ${param}` + } + try { + process.execSync(cmd) + console.info(cmd) + } catch (e) { + console.error('\u001b[31m', `Failed to convert file ${inputPath} to abc`, '\u001b[39m') + } + if (fs.existsSync(inputPath)) { + fs.unlinkSync(inputPath) + } else { + console.error('\u001b[31m', `Failed to convert file ${inputPath} to abc. ${inputPath} is lost`, '\u001b[39m') + } + let abcFile = inputPath.replace(/\.js$/, '.abc'); + if (fs.existsSync(abcFile)) { + let abcFileNew = abcFile.replace(/\_.abc$/, '.abc'); + fs.renameSync(abcFile, abcFileNew) + } else { + console.error('\u001b[31m', `${abcFile} is lost`, '\u001b[39m') + } +} + +module.exports = GenAbcPlugin diff --git a/ace-loader/src/genBin-plugin.js b/ace-loader/src/genBin-plugin.js new file mode 100644 index 000000000..3ab00e851 --- /dev/null +++ b/ace-loader/src/genBin-plugin.js @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const fs = require('fs') +const path = require('path') +const process = require('child_process') +const qjsc = path.join(__dirname, '..', 'bin', 'qjsc') + +const forward = '(global.___mainEntry___ = function (globalObjects) {' + '\n' + + ' const define = globalObjects.define;' + '\n' + + ' const require = globalObjects.require;' + '\n' + + ' const bootstrap = globalObjects.bootstrap;' + '\n' + + ' const register = globalObjects.register;' + '\n' + + ' const render = globalObjects.render;' + '\n' + + ' const $app_define$ = globalObjects.$app_define$;' + '\n' + + ' const $app_bootstrap$ = globalObjects.$app_bootstrap$;' + '\n' + + ' const $app_require$ = globalObjects.$app_require$;' + '\n' + + ' const history = globalObjects.history;' + '\n' + + ' const Image = globalObjects.Image;' + '\n' + + ' const OffscreenCanvas = globalObjects.OffscreenCanvas;' + '\n' + + ' (function(global) {' + '\n' + + ' "use strict";' + '\n' +const last = '\n' + '})(this.__appProto__);' + '\n' + '})' +const firstFileEXT = '.jtc' +const sencondFileEXT = '.c' +const lastFileEXT = '.bin' +let output +let webpackPath + +class GenBinPlugin { + constructor(output_, webpackPath_) { + output = output_ + webpackPath = webpackPath_ + } + apply(compiler) { + if (!fs.existsSync(path.resolve(webpackPath, 'qjsc.exe')) && !fs.existsSync(path.resolve(webpackPath, 'qjsc'))) { + return + } + compiler.hooks.emit.tap('GenBinPlugin', (compilation) => { + const assets = compilation.assets + const keys = Object.keys(assets) + keys.forEach(key => { + // choice *.js + if (output && webpackPath && path.extname(key) === '.js') { + const newContent = forward + assets[key].source() + last + const keyPath = key.replace(/\.js$/, firstFileEXT) + writeFileSync(newContent, path.resolve(output, keyPath), key) + } + }) + }) + } +} + +function writeFileSync(inputString, output, jsBundleFile) { + const parent = path.join(output, '..') + if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) { + mkDir(parent) + } + fs.writeFileSync(output, inputString) + if (fs.existsSync(output)){ + qjscFirst(output, output.replace(/\.jtc$/, sencondFileEXT)) + } else { + console.error('\u001b[31m', `Failed to convert file ${jsBundleFile} to bin. ${output} is lost`, '\u001b[39m') + } +} + +function mkDir(path_) { + const parent = path.join(path_, '..') + if (!(fs.existsSync(parent) && !fs.statSync(parent).isFile())) { + mkDir(parent) + } + fs.mkdirSync(path_) +} + +function qjscFirst(inputPath, outputPath) { + const cmd = `"${qjsc}" -o "${outputPath}" -N buf -c "${inputPath}"` + try { + process.execSync(cmd) + } catch (e) { + console.error('\u001b[31m', `Failed to convert file ${inputPath} to bin`, '\u001b[39m') + } + if (fs.existsSync(inputPath)) { + fs.unlinkSync(inputPath) + qjscSecond(outputPath) + } else { + console.error('\u001b[31m', `Failed to convert file ${inputPath} to bin. ${inputPath} is lost`, '\u001b[39m') + } +} + +function qjscSecond(filePath) { + let data = fs.readFileSync(filePath, 'utf8') + data = data.substr(data.indexOf('{') + 1, data.indexOf('}') - data.indexOf('{') - 1).trim() + const lastFilePath = filePath.replace(/\.c$/, lastFileEXT) + const parent = path.join(lastFilePath, '..') + if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) { + mkDir(parent) + } + fs.writeFileSync(lastFilePath, toBuffer(data)) + if (fs.existsSync(filePath)) { + fs.unlinkSync(filePath) + } else { + console.error('\u001b[31m', `Failed to clean file ${filePath}.`, '\u001b[39m') + } +} + +function toBuffer(str) { + const bytes = str.split(',') + const b = Buffer.alloc(bytes.length) + for (let i = 0; i < bytes.length; i++) { + b[i] = bytes[i] + } + return b +} + +module.exports = GenBinPlugin \ No newline at end of file diff --git a/ace-loader/src/lite/lite-customize.js b/ace-loader/src/lite/lite-customize.js new file mode 100644 index 000000000..08f18859e --- /dev/null +++ b/ace-loader/src/lite/lite-customize.js @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const path = require('path'); +const fs = require('fs'); +const os = require('os'); +const isType = require('./lite-utils'); +/** + * Check if the custom file exists.If it does not exist, follow the normal process. + * If it exists, get the file content. + */ +function checkFilePath() { + const rulePath = path.resolve(os.userInfo().homedir, '.literc.js'); + if (fs.existsSync(rulePath)) { + process.env.RULE_PATH = rulePath; + const customTag = require(rulePath); + checkContent(customTag); + } +} +/** + * Check if the object thrown by the file is correct. + * @param {Object} customTag User defined custom file content. + */ +function checkContent(customTag) { + throwError( + !isType.isObject(customTag), + `The configuration in the '.literc.js' file is incorrect.(it should be an object.)`, + ); + throwError( + isType.isUndefined(customTag.rules), + `You must write the 'rules' attribute in '.literc.js' file`, + ); + throwError( + !isType.isObject(customTag.rules), + `The value of 'rules' in '.literc.js' file is incorrect.(it should be an object)`, + ); + if (customTag.extends == 'recommended') { + validatorCustomTag(customTag.rules); + } +} + +/** + * Check whether the user-defined rules are correct. + * @param {Object} rules User defined custom file content. + */ +function validatorCustomTag(rules) { + const keys = Object.keys(rules); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const value = rules[key]; + throwError( + !isType.isObject(value), + `The value of '${key}' is incorrect, it should be an object.`, + ); + const childs = Object.keys(value); + for (let j = 0; j < childs.length; j++) { + const child = childs[j]; + throwError( + child != 'attrs', + `'${key}' object can only contain 'attrs' attributes`, + ); + } + } +} +/** + * Tool method, if the condition is true, throw an exception. + * @param {Boolean} condition Analyzing conditions. + * @param {String} reason Output wrong information. + */ +function throwError(condition, reason) { + if (condition) { + throw Error(`\u001b[31mError: ${reason} \u001b[39m`).message; + } +} +exports.checkFilePath = checkFilePath; diff --git a/ace-loader/src/lite/lite-enum.js b/ace-loader/src/lite/lite-enum.js new file mode 100644 index 000000000..6a19d8a1c --- /dev/null +++ b/ace-loader/src/lite/lite-enum.js @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const SPECIAL_STYLE = { + OPACITY: 'opacity', + BORDEROPACITY: 'borderOpacity', + ANIMATION_DELAY: 'animationDelay', + ANIMATION_DURATION: 'animationDuration', + ANIMATION_ITERATION_COUNT: 'animationIterationCount', + BACKGROUND_IMAGE: 'backgroundImage', + BACKGROUND_IMAGE_ACTIVE: 'backgroundImage:active', + BACKGROUND_IMAGE_CHECKED: 'backgroundImage:checked', +}; +const DEVICE_LEVEL = { + RICH: 'rich', + LITE: 'lite', + CARD: 'card', +}; +const DEVICE_TYPE = { + LITEWEARABLE: 'liteWearable', + SMARTVISION: 'smartVision', +}; + +const PLATFORM = { + VERSION3: 'Version3', + VERSION4: 'Version4', + VERSION5: 'Version5', + VERSION6: 'Version6', +}; + +const REGEXP_NUMBER_PX = /^[-+]?[0-9]*\.?[0-9]+(px|cm|em|deg|rad)?$/; +const REGEXP_COLOR = /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/; +const REGEXP_UNIT = /px|cm|em|deg|rad/; +const REGEXP_PNG = /(\.png|\.jpg|\.bmp|\.jpeg|\.BMP|\.JPG|\.PNG|\.JPEG)$/; +const REGXP_QUOTES = /"|'/g; +const REGXP_LANGUAGE = /\$t/; +const REGXP_LANGUAGE_KEY = /_vm\.\$t\([^()]+?\)/g; +const REGXP_FUNC_RETURN = /return(.*)}/g; + +exports.SPECIAL_STYLE = SPECIAL_STYLE; +exports.REGEXP_NUMBER_PX = REGEXP_NUMBER_PX; +exports.REGEXP_COLOR = REGEXP_COLOR; +exports.REGEXP_UNIT = REGEXP_UNIT; +exports.DEVICE_LEVEL = DEVICE_LEVEL; +exports.REGEXP_PNG = REGEXP_PNG; +exports.REGXP_QUOTES = REGXP_QUOTES; +exports.DEVICE_TYPE = DEVICE_TYPE; +exports.REGXP_LANGUAGE = REGXP_LANGUAGE; +exports.REGXP_LANGUAGE_KEY = REGXP_LANGUAGE_KEY; +exports.REGXP_FUNC_RETURN = REGXP_FUNC_RETURN; +exports.PLATFORM = PLATFORM; diff --git a/ace-loader/src/lite/lite-image-coverter-plugin.js b/ace-loader/src/lite/lite-image-coverter-plugin.js new file mode 100644 index 000000000..efd6613a7 --- /dev/null +++ b/ace-loader/src/lite/lite-image-coverter-plugin.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const _path = require('path'); +const fs = require('fs'); +const registerRequireContextHook = require('babel-plugin-require-context-hook/register'); +const { REGEXP_PNG } = require('./lite-enum'); +const iconPath = process.env.iconPath || ''; +const img2bin = require('./lite-image2bin'); + +registerRequireContextHook(); +/** + * Convert picture to bin format. + */ +class ImageCoverterPlugin { + /** + * constructor of the ImageCoverterPlugin class. + * @param {String} options The object of build folder. + */ + constructor(options) { + this.options = options; + } + /** + * Find all image paths in png、jpg、bmp、jpeg format in the directory. + * @param {String} buildPath The path of build folder. + * @return {Array} Image path array. + */ + getDir(buildPath) { + const pngPath = global.__requireContext('', buildPath, true, REGEXP_PNG); + const pathArray = pngPath.keys().map((element) => { + return _path.join(buildPath, element); + }); + return pathArray; + } + /** + * Convert image format asynchronously, return code 0 successfully, otherwise return 1. + * @param {Object} compiler API specification, all configuration information of Webpack environment. + */ + apply(compiler) { + const buildPath = this.options.build; + const getDir = this.getDir; + compiler.hooks.done.tap('image coverter', function(compilation, callback) { + const pathArray = getDir(buildPath); + const writeResult = (content) => { + fs.writeFile(_path.resolve(buildPath, 'image_convert_result.txt'), content, (err) => { + if (err) { + return console.error(err); + } + }); + }; + const totalImageCount = pathArray.length; + if (totalImageCount > 0) { + const promiseArray = pathArray.map((path) => { + return img2bin(path); + }); + Promise.all(promiseArray).then(() => { + writeResult('{exitCode:0}'); + }).catch(() => { + writeResult('{exitCode:1}'); + }); + } else { + writeResult('{exitCode:0}'); + } + if (iconPath !== '') { + const iconArray = getDir(iconPath); + iconArray.forEach((path) => { + img2bin(path); + }); + } + }); + } +} +module.exports = ImageCoverterPlugin; diff --git a/ace-loader/src/lite/lite-image2bin.js b/ace-loader/src/lite/lite-image2bin.js new file mode 100644 index 000000000..5ebf40d63 --- /dev/null +++ b/ace-loader/src/lite/lite-image2bin.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const Jimp = require('jimp'); +const fs = require('fs'); +const _path = require('path'); +/** + * Find all image paths in png、jpg、bmp、jpeg format in the directory. + * @param {String} imgPath The path of build folder. + * @return {Array} Image path array. + */ +async function img2bin(imgPath) { + try { + const image = await Jimp.read(imgPath); + const HEAD_SIZE = 8; + const PIXEL_SIZE = 4;// BRGA + const DATA_SIZE = image.bitmap.width * image.bitmap.height * PIXEL_SIZE; + const binSize = HEAD_SIZE + DATA_SIZE; + const binBuffer = new ArrayBuffer(binSize); + const binView = new DataView(binBuffer); + + const COLOR_MODE = 1 << 8 + 0; + const WIDTH_BIT_OFFSET = 0; + const HEIGHT_BIT_OFFSET = 16; + const header = (image.bitmap.width << WIDTH_BIT_OFFSET) + + (image.bitmap.height << HEIGHT_BIT_OFFSET); + + let binFileOffset = 0; + binView.setUint32(binFileOffset, COLOR_MODE, true); + binFileOffset += 4; + binView.setUint32(binFileOffset, header, true); + binFileOffset += 4; + + image.scan(0, 0, image.bitmap.width, image.bitmap.height, function(x, y, idx) { + // eslint-disable-next-line no-invalid-this + const blue = this.bitmap.data[idx + 2]; + binView.setUint8(binFileOffset, blue, true); + binFileOffset += 1; + + // eslint-disable-next-line no-invalid-this + const green = this.bitmap.data[idx + 1]; + binView.setUint8(binFileOffset, green, true); + binFileOffset += 1; + + // eslint-disable-next-line no-invalid-this + const red = this.bitmap.data[idx + 0]; + binView.setUint8(binFileOffset, red, true); + binFileOffset += 1; + + // eslint-disable-next-line no-invalid-this + const alpha = this.bitmap.data[idx + 3]; + binView.setUint8(binFileOffset, alpha, true); + binFileOffset += 1; + }); + const binPath = imgPath.replace(/(\.png|\.jpg|\.bmp|\.jpeg|\.BMP|\.JPG|\.PNG|\.JPEG)$/, '.bin'); + fs.writeFileSync(binPath, Buffer.from(binBuffer)); + } catch (err) { + const imageName = _path.basename(imgPath); + console.error('\u001b[31m', `Failed to convert image ${imageName}.`, '\u001b[39m'); + throw err; + } +} + +module.exports = img2bin; diff --git a/ace-loader/src/lite/lite-return-exports-plugin.js b/ace-loader/src/lite/lite-return-exports-plugin.js new file mode 100644 index 000000000..33910ce29 --- /dev/null +++ b/ace-loader/src/lite/lite-return-exports-plugin.js @@ -0,0 +1,45 @@ +const pluginName = 'LiteReturnExportsPlugin'; + +/** + * LiteReturnExportsPlugin + */ +class LiteReturnExportsPlugin { + /** + * return exports from runtime + * @param {Object} compiler API specification, all configuration information of Webpack environment. + */ + apply(compiler) { + compiler.hooks.compilation.tap('SourcemapFixer', compilation => { + compilation.hooks.afterProcessAssets.tap('SourcemapFixer', assets => { + Reflect.ownKeys(assets).forEach(key => { + if (key.toString().includes('.map') && assets[key] && assets[key]._value) { + const sourceMapSources = JSON.parse(assets[key]._value).sources; + sourceMapSources.forEach((sourceMapSource, index) => { + sourceMapSource = sourceMapSource.replace(/\\/g,"/") + .replace(/webpack:\/\/\/[A-Z]:/g, function(a){return a.toLowerCase();}); + sourceMapSources[index] = sourceMapSource; + }); + const REG_SOURCES = new RegExp(/"sources":\[.*?\]/); + assets[key]._value = assets[key]._value.toString().replace(REG_SOURCES, + '"sources":' + JSON.stringify(sourceMapSources)); + } + }); + } + ); + }); + + const { returnExportsFromRuntime } = compiler.webpack.RuntimeGlobals; + + compiler.hooks.compilation.tap(pluginName, () => { + compiler.webpack.RuntimeGlobals.returnExportsFromRuntime = '__webpack_exports__'; + }); + + compiler.hooks.afterCompile.tapAsync(pluginName, (_, callback) => { + compiler.webpack.RuntimeGlobals.returnExportsFromRuntime = returnExportsFromRuntime; + callback(); + }); + } +}; + +module.exports = LiteReturnExportsPlugin; + diff --git a/ace-loader/src/lite/lite-snapshot-plugin.js b/ace-loader/src/lite/lite-snapshot-plugin.js new file mode 100644 index 000000000..a85e32e93 --- /dev/null +++ b/ace-loader/src/lite/lite-snapshot-plugin.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const _require = require('child_process'); +const exec = _require.exec; +const _path = require('path'); +const snapshot = _path.join(__dirname, '..', '..', 'bin', 'jerry-snapshot'); +const registerRequireContextHook = require('babel-plugin-require-context-hook/register'); +registerRequireContextHook(); +/** + * Convert Javascript file to snapshot. + */ +class SnapshotPlugin { + /** + * constructor of the SnapshotPlugin class. + * @param {String} options The object of build folder. + */ + constructor(options) { + this.options = options; + } + /** + * Find all javacript file paths in the directory. + * @param {Object} assets the object of javacript file path. + * @param {String} buildPath The path of build folder. + * @return {Array} Image path array. + */ + getDir(assets, buildPath) { + const pathArray = []; + Object.keys(assets).map((item) => { + if (/.js$/.test(item)) { + pathArray.push(_path.join(buildPath, item)); + } + }); + return pathArray; + }; + /** + * Convert javacript file asynchronously. If an error occurs, print an error message. + * @param {Object} compiler API specification, all configuration information of Webpack environment. + */ + apply(compiler) { + const buildPath = this.options.build; + compiler.hooks.done.tap('snapshot coverter', (stats) => { + const pathArray = this.getDir(stats.compilation.assets, buildPath); + pathArray.forEach((element) => { + const bcPath = element.replace('.js', '.bc'); + const fileName = _path.basename(element); + exec(`"${snapshot}" generate -o "${bcPath}" "${element}"`, (error) => { + if (error) { + console.error('\u001b[31m', `Failed to convert the ${fileName} file to a snapshot.`, '\u001b[39m'); + } + }); + }); + }); + } +} +module.exports = SnapshotPlugin; diff --git a/ace-loader/src/lite/lite-transform-style.js b/ace-loader/src/lite/lite-transform-style.js new file mode 100644 index 000000000..048acb07a --- /dev/null +++ b/ace-loader/src/lite/lite-transform-style.js @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +/* + * Customize the compiled style code into a styleSheet object, styleSheet object is divided into two parts, idSelectors + * and classSelectors. There are some detailed rules to explain: + * 1. Remove the "." And "#" symbols in front of the class selector and id selector; + * 2. Convert all numeric strings to numbers, such as:"32px" convert to number 32; "11" convert to number 11; + * 3. Convert all hex color to decimal number; + * 4. Convert all boolean strings to boolean type; + */ +const { SPECIAL_STYLE, REGEXP_NUMBER_PX, REGEXP_COLOR, REGEXP_UNIT, REGXP_QUOTES } = require('./lite-enum'); + +/** + * Split style into id Selectors and classSelectors. + * @param {Obejct} value Preliminary compilation results of css files. + * @return {String} String result stylesheet. + */ +function transformStyle(value) { + const style = Function(`return ${value}`)(); + const idSelectors = {}; + const classSelectors = {}; + const styleSheet = {}; + let res = ''; + const KEYFRAMES = '@KEYFRAMES'; + const keys = Object.keys(style); + for (const key of keys) { + if (key.charAt(0) === '.') { + classSelectors[key.slice(1)] = styleFormat(style[key]); + } else if (key.charAt(0) === '#') { + idSelectors[key.slice(1)] = styleFormat(style[key]); + } else if (key === KEYFRAMES) { + styleSheet['@keyframes'] = keyFrameFormat(style[key]); + } else { + // todo: Label style + } + } + if (style != null && keys.length !== 0) { + if (Object.keys(idSelectors).length !== 0) { + styleSheet['idSelectors'] = idSelectors; + } + if (Object.keys(classSelectors).length !== 0) { + styleSheet['classSelectors'] = classSelectors; + } + } + res = JSON.stringify(styleSheet); + return res; +} +/** + * keyFrame style special compilation. + * @param {Obejct} obj Preliminary compilation results of keyFrame style. + * @return {Obejct} keyFrame style obejct. + */ +function keyFrameFormat(obj) { + for (const key of Object.keys(obj)) { + const value = obj[key]; + for (const styleValue of value) { + for (const styleKey of Object.keys(styleValue)) { + const innerValue = styleValue[styleKey]; + if (REGEXP_COLOR.test(innerValue)) { + styleValue[styleKey] = parseInt(innerValue.slice(1), 16); + } + try { + styleValue[styleKey] = JSON.parse(styleValue[styleKey]); + } catch (e) { + // Values cannot be converted to objects are not processed + } + } + } + } + return obj; +} + +const rules = [ + { + match: function(key, value) { + return key === SPECIAL_STYLE.ANIMATION_DELAY || key === SPECIAL_STYLE.ANIMATION_DURATION; + }, + action: function(obj, key, value) { + obj[key] = value; + }, + }, + { + match: function(key, value) { + return key === SPECIAL_STYLE.ANIMATION_ITERATION_COUNT; + }, + action: function(obj, key, value) { + if (value === -1) { + value = 'infinite'; + } + obj[key] = value.toString(); + }, + }, + { + match: function(key, value) { + return [ + SPECIAL_STYLE.BACKGROUND_IMAGE, + SPECIAL_STYLE.BACKGROUND_IMAGE_ACTIVE, + SPECIAL_STYLE.BACKGROUND_IMAGE_CHECKED, + ].includes(key); + }, + action: function(obj, key, value) { + obj[key] = value.replace(REGXP_QUOTES, ''); + }, + }, + { + match: function(key, value) { + return !isNaN(Number(value)); + }, + action: function(obj, key, value) { + obj[key] = Number(value); + }, + }, + { + match: function(key, value) { + return REGEXP_NUMBER_PX.test(value); + }, + action: function(obj, key, value) { + obj[key] = parseInt(value.replace(REGEXP_UNIT, ''), 10); + }, + }, + { + match: function(key, value) { + return REGEXP_COLOR.test(value); + }, + action: function(obj, key, value) { + obj[key] = parseInt(value.slice(1), 16); + }, + }, + { + match: function(key, value) { + return value === 'true'; + }, + action: function(obj, key, value) { + obj[key] = true; + }, + }, + { + match: function(key, value) { + return value === 'false'; + }, + action: function(obj, key, value) { + obj[key] = false; + }, + }, +]; + +/** + * Loop and format style, There are two rules defined here, types of number+px and color convert to number 16777215. + * @param {Obejct} obj Preliminary compilation results of style object. + * @return {Obejct} style obejct. + */ +function styleFormat(obj) { + let value = ''; + for (const key of Object.keys(obj)) { + value = obj[key]; + for (let i = 0; i < rules.length; i++) { + if (rules[i].match(key, value)) { + rules[i].action(obj, key, value); + break; + } + } + } + return obj; +} + +exports.transformStyle = transformStyle; diff --git a/ace-loader/src/lite/lite-transform-template.js b/ace-loader/src/lite/lite-transform-template.js new file mode 100644 index 000000000..5cc78d2d9 --- /dev/null +++ b/ace-loader/src/lite/lite-transform-template.js @@ -0,0 +1,557 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +/* + * Customize the compiled template code into a render function. There are some detailed rules to explain: + * 1. Convert all numeric strings to numbers, such as:"32px" convert to number 32; "11" convert to number 11; + * 2. Convert all hex color to decimal number; + * 3. Convert all boolean strings to boolean type; + * 4. compile events, the value of event Cannot be enclosed in double quotes; + */ +const { isFunction, isObject, isUndefined } = require('./lite-utils'); +const { + SPECIAL_STYLE, + REGEXP_NUMBER_PX, + REGEXP_COLOR, + REGEXP_UNIT, + REGXP_QUOTES, + REGXP_LANGUAGE, + REGXP_LANGUAGE_KEY, + REGXP_FUNC_RETURN, +} = require('./lite-enum'); +const parameterArray = []; +let parameter1 = ''; +let parameter2 = ''; +let i18nMapping = {}; +const ATTRBUTES = 'attrs'; +const EVENTS_ON_FUNC = 'on'; +const KEY = 'key'; +const AST_KEY = { + ATTR: 'attr', + CLASSLIST: 'classList', + STYLE: 'style', + EVENTS: 'events', + TYPE: 'type', + CHILDREN: 'children', + KEY: 'key', +}; +const EVENT_KEY = [ + 'onBubbleEvents', + 'catchBubbleEvents', + 'onCaptureEvents', + 'catchCaptureEvents', +]; + +const optionRules = { + [AST_KEY.ATTR]: function(dataContent, node, key) { + if (Object.keys(node.attr).length !== 0) { + dataContent += `'${ATTRBUTES}' : ${transformProps(node.attr)},`; + } + return dataContent; + }, + [AST_KEY.CLASSLIST]: function(dataContent, node, key) { + dataContent += sortClass(node[key]); + return dataContent; + }, + [AST_KEY.STYLE]: function(dataContent, node, key) { + dataContent += sortStyle(node[key]); + return dataContent; + }, + [AST_KEY.EVENTS]: function(dataContent, node, key) { + dataContent += `'${EVENTS_ON_FUNC}' : ${transformEvents(node.events)},`; + return dataContent; + }, + [AST_KEY.KEY]: function(dataContent, node, key) { + dataContent += `'${KEY}' : ${node.key},`; + return dataContent; + }, +}; + +const styleRules = [ + { + match: function(key, value) { + return key === SPECIAL_STYLE.ANIMATION_DELAY || key === SPECIAL_STYLE.ANIMATION_DURATION; + }, + action: function(staticStyle, key, value) { + staticStyle += `'${key}' : ${JSON.stringify(value)},`; + return staticStyle; + }, + }, + { + match: function(key, value) { + return key === SPECIAL_STYLE.ANIMATION_ITERATION_COUNT; + }, + action: function(staticStyle, key, value) { + if (value === -1) { + value = 'infinite'; + } + staticStyle += `'${key}' : ${JSON.stringify(value)},`; + return staticStyle; + }, + }, + { + match: function(key, value) { + return key === SPECIAL_STYLE.BACKGROUND_IMAGE; + }, + action: function(staticStyle, key, value) { + staticStyle += `'${key}' : ${checkType(value.replace(REGXP_QUOTES, ''))},`; + return staticStyle; + }, + }, + { + match: function(key, value) { + return true; + }, + action: function(staticStyle, key, value) { + staticStyle += `'${key}' : ${checkType(value)},`; + return staticStyle; + }, + }, +]; + +(function() { + EVENT_KEY.map(function(event) { + optionRules[event] = function(dataContent, node, key) { + dataContent += `'${event}' : ${transformEvents(node[event])},`; + return dataContent; + }; + }); +})(); + +/** + * Compile the ast object into an executable function. + * @param {Obejct} value template object compiled ast. + * @return {String} template string. + */ +function transformTemplate(value) { + const ast = Function(`return ${value}`)(); + let template = isObject(ast) ? transformNode(ast) : `_c('div')`; + template = template.replace(/,$/, ''); + const cachedI18nPushStrings = Object.values(i18nMapping); + const I18nContect = cachedI18nPushStrings.length === 0 ? '' : ` var i18ns = []; ${cachedI18nPushStrings.join(';')};`; + const res = `function (vm) { var _vm = vm || this;${I18nContect} return ${template} }`; + i18nMapping = {}; + return res; +} + +/** + * Divided into if\for\ordinary three kinds node transform. + * @param {Obejct} node template object compiled ast. + * @return {String} template string. + */ +function transformNode(node) { + if (node.repeat && !node.forCompiled) { + return transformFor(node); + } else if (node.shown && !node.ifCompiled) { + return transformIf(node); + } else { + return transformNodeDetail(node); + } +} + +/** + * Divide node into type/child/data three parts and compiled separately. + * @param {Obejct} node ordinary node. + * @return {String} ordinary node string. + */ +function transformNodeDetail(node) { + const type = node.type; + const options = transformOptions(node); + const children = transformChildren(node); + const render = `_c('${type}'${options ? `, ${options} ` : ``}${children ? `, ${children} ` : ``}),`; + return render; +} + +/** + * Compile node all key-value datas. + * @param {Obejct} node ordinary node. + * @return {String} ordinary node attributes string. + */ +function transformOptions(node) { + let dataContent = ''; + parameter2 = parameterArray[parameterArray.length - 1]; + if (node.attr && node.attr.tid && parameter2 !== '') { + node['key'] = `${parameter2}.${node.attr['tid']}`; + delete node.attr.tid; + } + for (const key of Object.keys(node)) { + if (key !== AST_KEY.TYPE && key !== AST_KEY.CHILDREN) { + if (optionRules[key]) { + dataContent = optionRules[key](dataContent, node, key); + } + } + } + if (dataContent === '') { + return null; + } + dataContent = '{' + dataContent.replace(/,$/, '') + '}'; + return dataContent; +} + +/** + * Compile node classList, divided into dynamicClass and staticClass. + * @param {Function|String} classList the object of class list. + * @return {String} class list string. + */ +function sortClass(classList) { + let classStr = ''; + const DYNAMIC_CLASS = 'dynamicClass'; + const STATIC_CLASS = 'staticClass'; + const value = checkType(classList); + // Divid into two parts dynamicClass and staticClass depending on whether it is a method type + if ((isFunction(classList) || isUndefined(classList)) && !REGXP_LANGUAGE.test(classList)) { + classStr += `'${DYNAMIC_CLASS}' : ${formatForFunc(value)},`; + } else { + classStr += `'${STATIC_CLASS}' : ${value},`; + } + return classStr; +} + +/** + * Compile node style, divided into staticStyle and staticStyle. + * @param {Object} props the object of style. + * @return {String} style list string. + */ +function sortStyle(props) { + let staticStyle = ''; + let dynamicStyle = ''; + const STASTIC_STYLE = 'staticStyle'; + const DYNAMIC_STYLE = 'dynamicStyle'; + for (const key of Object.keys(props)) { + const value = props[key]; + // Divid into two parts staticStyle and dynamicStyle depending on whether it is a method type + if (isFunction(value) && !REGXP_LANGUAGE.test(value)) { + dynamicStyle += `'${key}' : ${formatForFunc(value)},`; + } else { + for (let i = 0; i < styleRules.length; i++) { + if (styleRules[i].match(key, value)) { + staticStyle = styleRules[i].action(staticStyle, key, value); + break; + } + } + } + } + if (staticStyle !== '') { + staticStyle = `'${STASTIC_STYLE}' : {${staticStyle.replace(/,$/, '')}}, `; + } + if (dynamicStyle !== '') { + dynamicStyle = `'${DYNAMIC_STYLE}' :{${dynamicStyle.replace(/,$/, '')}},`; + } + return staticStyle + dynamicStyle; +} + +/** + * general method ,judge type and compile, There are some special rules defined here, + * such as:"32px" convert to number 32; "11" convert to number 11; "#ffffff" convert to number 16777215. + * @param {*} value Value to be formatted. + * @return {*} Formatted value. + */ +function checkType(value) { + if (isFunction(value) || isUndefined(value)) { + return formatForFunc(value); + // Use recursive conversion of object type values + } else if (isObject(value)) { + return transformProps(value); + // Convert all numeric strings to numbers + } else if (!isNaN(Number(value))) { + return Number(value); + } else if (REGEXP_NUMBER_PX.test(value)) { + return parseInt(value.replace(REGEXP_UNIT, ''), 10); + // Convert all colors to numbers + } else if (REGEXP_COLOR.test(value)) { + return parseInt(value.slice(1), 16); + // Convert all boolean strings to boolean type + } else if (value === 'true') { + return true; + } else if (value === 'false') { + return false; + } else { + return JSON.stringify(value); + } +} + +/** + * general method, compile data of object type, and compile node attributes. + * apart from The case where key is "value". + * @param {Object} props Value to be formatted. + * @return {String} Formatted value. + */ +function transformProps(props) { + let propContent = ''; + const VALUE = 'value'; + for (const key of Object.keys(props)) { + const propValue = props[key]; + // value is used to display, except for method types, no conversion is required + if (key === VALUE) { + if (isFunction(propValue) || isUndefined(propValue)) { + propContent += `'${key}' : ${formatForFunc(props[key])},`; + } else { + propContent += `'${key}' : ${JSON.stringify(props[key])},`; + } + } else { + propContent += `'${key}' : ${checkType(props[key])},`; + } + } + propContent = `{${propContent.replace(/,$/, '')}}`; + return propContent; +} + +/** + * compile events, divided into two types of conversion methods and string types. + * @param {Object} props Value of events to be formatted. + * @return {String} Formatted Value of events. + */ +function transformEvents(props) { + let eventContent = ''; + for (const key of Object.keys(props)) { + if (isFunction(props[key])) { + /** + * Method contains parameters and will be compiled into a method. + * such as: onclick = "test(value)" => "click": function(evt){this.test(this.value, evt)} + */ + eventContent += `'${key}' : ${formatForFunc(props[key])},`; + } else { + /** + * The method contains no parameters and will be compiled into a string. + * such as: onclick = "test" => "click": "test" + */ + eventContent += `'${key}' : ${formatForString(props[key])},`; + } + } + eventContent = `{${eventContent.replace(/,$/, '')}}`; + return eventContent; +} + +/** + * Compile events of type string, add `_vm.` in front of ordinary events, such as: onclick="test" => "click": "_vm.test" + * do nothing for the data in the `for` loop, such as: onclick="{{$item.click}}" => "click": "$item.click" + * @param {Object} value string type of events to be formatted. + * @return {String} Formatted Value of events. + */ +function formatForString(value) { + let forCompiled = false; + for (const parameter of parameterArray) { + // '$' Needs to be escaped in regular expressions. The parameter in the for instruction may be '$idx' and '$item' + const escape = parameter.charAt(0) === '$' ? '\\' : ''; + const itRE = new RegExp(escape + parameter); + // Match the variable name in the stack, to determine whether it is ordinary event or an event in the for + if (itRE.test(value)) { + forCompiled = true; + break; + } + } + const res = forCompiled ? value : '_vm.' + value; + return res; +} + +/** + * compile "for" direct, return the _l function. + * @param {Object} node node obejct with "for" directive. + * @return {String} string of _l function. + */ +function transformFor(node) { + let exp = node.repeat.exp ? node.repeat.exp : node.repeat; + parameterArray.push(node.repeat.key ? node.repeat.key : '$idx'); + parameterArray.push(node.repeat.value ? node.repeat.value : '$item'); + node.forCompiled = true; + // Set context and stack to convert "this.index" to "index" in the for function + exp = formatForFunc(exp); + const children = transformNode(node).replace(/,$/, ''); + parameter2 = parameterArray[parameterArray.length - 1]; + parameter1 = parameterArray[parameterArray.length - 2]; + const comma = parameter1 !== '' && parameter2 !== '' ? ',' : ''; + parameterArray.pop(); + parameterArray.pop(); + return '_l' + '((' + exp + '),' + 'function(' + parameter2 + comma + parameter1 + '){' + 'return ' + children + '}),'; +} + +/** + * compile "if" direct, return the _i function. + * @param {Object} node node obejct with "if" directive. + * @return {String} string of _i function. + */ +function transformIf(node) { + node.ifCompiled = true; + const children = transformNode(node).replace(/,$/, ''); + return '_i' + '((' + formatForFunc(node.shown) + '),' + 'function(){return ' + children + '}),'; +} + +/** + * convert "this.index" to "index" in the for function. if the element is not in the for function, + * there will be no value in parameterArray + * @param {Object} value Value of function to be formatted. + * @return {String} Formatted Value of events. + */ +function formatForFunc(value) { + let func = value.toString(); + for (const parameter of parameterArray) { + // '$' Needs to be escaped in regular expressions. The parameter in the for instruction may be '$idx' and '$item' + const escape = parameter.charAt(0) === '$' ? '\\' : ''; + const itRE = new RegExp('this.' + escape + parameter + '\\b', 'g'); + /** + * If it is a parameter in the for instruction, remove 'this'. + * such as: {"value": function () {return this.$item.name}} => {"value": function () {return $item.name}} + */ + func = func.replace(itRE, parameter); + } + // Replace all "this" to "_vm" + func = func.replace(/this\./g, '_vm.'); + // Internationalization performance optimization + func = cacheI18nTranslation(func); + return func; +} + +/** + * There is only one $t internationalizations in the processing function. + * @param {String} i18nExpression match the value of $t in the internationalization method. + * @param {Array} cachedI18nExpressions all keys of i18n Mapping object. + * @return {String} treated internationalization method. + */ +function handleLangSingle(i18nExpression, cachedI18nExpressions) { + let res = ''; + if (cachedI18nExpressions.includes(i18nExpression)) { + // The i18nExpression already exists in cachedI18nExpressions + const cachedI18nPushStrings = Object.values(i18nMapping); + const cachedI18nPushString = i18nMapping[i18nExpression]; + res = `i18ns[${cachedI18nPushStrings.lastIndexOf(cachedI18nPushString)}]`; + } else { + // The i18nExpression does not exist in cachedI18nExpressions + i18nMapping[ + i18nExpression + ] = `i18ns.push( ${i18nExpression} )`; + res = `i18ns[${Object.keys(i18nMapping).length - 1}]`; + } + return res; +} + +/** + * There are multiple $t internationalizations in the processing function.. + * @param {Array} i18nExpressions match the value of $t in the internationalization method. + * @param {Array} cachedI18nExpressions all keys of i18n Mapping object. + * @param {String} funcExpression return value in the internationalization method. + * @param {String} func internationalization method. + * @return {String} treated internationalization method. + */ +function handleLangMulti(i18nExpressions, cachedI18nExpressions, funcExpression, func) { + let res = func; + // The funcExpression already exists in cachedI18nExpressions + if (cachedI18nExpressions.includes(funcExpression)) { + const cachedI18nPushStrings = Object.values(i18nMapping); + const cachedI18nPushString = i18nMapping[funcExpression]; + res = `i18ns[${cachedI18nPushStrings.lastIndexOf(cachedI18nPushString)}]`; + // The funcExpression does not exist in cachedI18nExpressions + } else { + for (let i = 0; i < i18nExpressions.length; i++) { + const i18nExpression = i18nExpressions[i]; + // The i18nExpression already exists in cachedI18nExpressions + if (cachedI18nExpressions.includes(i18nExpression)) { + const cachedI18nPushStrings = Object.values(i18nMapping); + const cachedI18nPushString = i18nMapping[i18nExpression]; + res = res.replace( + i18nExpression, + `i18ns[${cachedI18nPushStrings.lastIndexOf(cachedI18nPushString)}]`, + ); + // The i18nExpression does not exists in cachedI18nExpressions + } else { + i18nMapping[ + i18nExpression + ] = `i18ns.push( ${i18nExpression} )`; + res = res.replace( + i18nExpression, + `i18ns[${Object.keys(i18nMapping).length - 1}]`, + ); + } + // For the last $t, replace the func value + if (i === i18nExpressions.length - 1 && !res.includes('_vm.')) { + const funcReturnMatches = REGXP_FUNC_RETURN.exec(res); + REGXP_FUNC_RETURN.lastIndex = 0; + const funcReturnMatch = funcReturnMatches[1].trim(); + i18nMapping[funcExpression] = `i18ns.push( ${funcReturnMatch} )`; + res = `i18ns[${Object.keys(i18nMapping).length - 1}]`; + } + } + } + return res; +} + +/** + * Internationalization performance optimization operation. + * @param {String} func string for globalization method. + * @return {String} Whether to use the parameters in 'for' instruction. + */ +function cacheI18nTranslation(func) { + if (!REGXP_LANGUAGE.test(func)) { + return func; + } + const i18nExpressions = func.match(REGXP_LANGUAGE_KEY); + const cachedI18nExpressions = Object.keys(i18nMapping); + const funcExpressions = REGXP_FUNC_RETURN.exec(func); + REGXP_FUNC_RETURN.lastIndex = 0; + const funcExpression = funcExpressions[1].trim(); + // If the 'for' parameter is used in $t, nothing will be done + if (isUseForInstrucParam(funcExpression)) { + return func; + } + // There is only one $t internationalization in the function. + // such as:function () { return ( _vm.$t('i18n.text.value1')) } + if (i18nExpressions.length === 1 && i18nExpressions[0] === funcExpression) { + const i18nExpression = i18nExpressions[0]; + func = handleLangSingle(i18nExpression, cachedI18nExpressions); + // There are multiple $t internationalization in the function. + // such as: function () { return ( _vm.$t('i18n.text.value1') - _vm.$t('i18n.text.value2')); } + } else { + func = handleLangMulti(i18nExpressions, cachedI18nExpressions, funcExpression, func); + } + return func; +} + +/** + * Determine whether the parameters in the 'for' instruction are used in the globalization method. + * @param {String} value string for globalization method. + * @return {Blooean} Whether to use the parameters in 'for' instruction. + */ +function isUseForInstrucParam(value) { + let isUseParam = false; + for (const parameter of parameterArray) { + const escape = parameter.charAt(0) === '$' ? '\\' : ''; + const itRE = new RegExp(escape + parameter); + // Match the variable name in the stack, to determine whether it is ordinary event or an event in the for + if (itRE.test(value)) { + isUseParam = true; + break; + } + } + return isUseParam; +} + +/** + * compile node children. + * @param {Object} node ordinary node. + * @return {String} ordinary node children string. + */ +function transformChildren(node) { + const children = node.children; + if (!children) { + return null; + } + let childContent = ''; + for (let i = 0; i < children.length; i++) { + childContent += transformNode(children[i]); + } + childContent = '[' + childContent.replace(/,$/, '') + ']'; + return childContent; +} + +exports.transformTemplate = transformTemplate; diff --git a/ace-loader/src/lite/lite-utils.js b/ace-loader/src/lite/lite-utils.js new file mode 100644 index 000000000..9ff2f1886 --- /dev/null +++ b/ace-loader/src/lite/lite-utils.js @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const is = (type) => { + return (source) => Object.prototype.toString.call(source) === `[object ${type}]`; +}; + +exports.isFunction = is('Function'); +exports.isUndefined = is('Undefined'); +exports.isObject = is('Object'); +exports.isArray = is('Array'); +exports.isNull = is('Null'); diff --git a/ace-loader/src/loader-gen.js b/ace-loader/src/loader-gen.js new file mode 100644 index 000000000..255c8d98f --- /dev/null +++ b/ace-loader/src/loader-gen.js @@ -0,0 +1,226 @@ +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved. + */ +import loaderUtils from 'loader-utils' +import path from 'path' +import fs from 'fs' + +import * as legacy from './legacy' +import { + parseFragment +} +from './parser' +import { + getNameByPath, + getRequireString, + stringifyLoaders, + logWarn, + loadBabelModule +} +from './util' +import { isReservedTag } from './templater/component_validator' +import loader from 'sass-loader' + +const { DEVICE_LEVEL } = require('./lite/lite-enum') +const loaderPath = __dirname +const defaultLoaders = { + none: '', + main: path.resolve(loaderPath, 'loader.js'), + template: path.resolve(loaderPath, 'template.js'), + style: path.resolve(loaderPath, 'style.js'), + script: path.resolve(loaderPath, 'script.js'), + json: path.resolve(loaderPath, 'json.js'), + babel: loadBabelModule('babel-loader'), + manifest: path.resolve(loaderPath, 'manifest-loader.js'), + extgen: path.resolve(loaderPath, 'extgen.js') +} + +function getLoaderString (type, config) { + config = config || {} + const customLoader = loadCustomLoader(config) + let loaders + switch (type) { + case 'main': + return mainLoaderString(loaders) + case 'element': + return elementLoaderString(loaders, config) + case 'template': + return templateLoaderString(loaders, config, customLoader) + case 'style': + return styleLoaderString(loaders, config, customLoader) + case 'script': + return scriptLoaderString(loaders, config, customLoader) + case 'config': + return configLoaderString(loaders, config) + case 'data': + return dataLoaderString(loaders, config) + default: + return + } +} + +function loadCustomLoader (config) { + if (config.lang && config.customLang[config.lang]) { + return loadBabelModule(config.customLang[config.lang][0]) + } +} + +function mainLoaderString (loaders) { + loaders = [{ + name: defaultLoaders.main + }] + return stringifyLoaders(loaders) +} + +function elementLoaderString (loaders, config) { + loaders = [{ + name: defaultLoaders.main, + query: { + element: config.source ? undefined : true + } + }] + return stringifyLoaders(loaders) +} + +function templateLoaderString (loaders, config, customLoader) { + loaders = [{ + name: defaultLoaders.json + }, { + name: defaultLoaders.template + }] + if (customLoader) { + loaders = loaders.concat(customLoader) + } + loaders.push({ + name: defaultLoaders.extgen, + query: { + type: 'template' + } + }) + + return stringifyLoaders(loaders) +} + +function styleLoaderString (loaders, config, customLoader) { + loaders = [{ + name: defaultLoaders.json + }, { + name: defaultLoaders.style + }] + if (customLoader) { + loaders = loaders.concat(customLoader) + } + loaders.push({ + name: defaultLoaders.extgen, + query: { + type: 'style' + } + }) + return stringifyLoaders(loaders) +} + +function scriptLoaderString (loaders, config, customLoader) { + loaders = [{ + name: defaultLoaders.script + }] + if (customLoader) { + loaders = loaders.concat(customLoader) + } + else { + loaders.push({ + name: defaultLoaders.babel, + query: { + presets: [loadBabelModule('@babel/preset-env')], + plugins: [loadBabelModule('@babel/plugin-transform-modules-commonjs')], + comments: 'false' + } + }) + } + if (config.app) { + loaders.push({ + name: defaultLoaders.manifest, + query: { + path: config.source + } + }) + } + return stringifyLoaders(loaders) +} + +function configLoaderString (loaders, config) { + loaders = [{ + name: defaultLoaders.json + }] + return stringifyLoaders(loaders) +} + +function dataLoaderString (loaders, config) { + loaders = [{ + name: defaultLoaders.json + }] + return stringifyLoaders(loaders) +} + +function codegenHmlAndCss() { + const options = { + lang: { + sass:['sass-loader'], + scss:['sass-loader'], + less:['less-loader'] + } + } + const customLang = options.lang || {} + const loaderQuery = loaderUtils.getOptions(this) || {} + const isElement = loaderQuery.element + const resourceQuery = this.resourceQuery && loaderUtils.parseQuery(this.resourceQuery) || {} + const isEntry = resourceQuery.entry + let output = '' + let jsFileName = this.resourcePath.replace(process.env.aceSuperVisualPath, process.env.aceModuleRoot) + jsFileName = jsFileName.substr(0, jsFileName.length - 6) + 'js'; + + output = 'var $app_script$ = ' + getRequireString(this, getLoaderString('script', { + customLang, + lang: undefined, + element: undefined, + elementName: undefined, + source: jsFileName + }), jsFileName) + + output += 'var $app_template$ = ' + getRequireString(this, getLoaderString('template', { + customLang, + lang: undefined, + element: isElement, + elementName: undefined, + source: this.resourcePath + }), this.resourcePath) + + output += 'var $app_style$ = ' + getRequireString(this, getLoaderString('style', { + customLang, + lang: undefined, + element: isElement, + elementName: undefined, + source: this.resourcePath + }), this.resourcePath) + + output += ` + $app_define$('@app-component/${getNameByPath(this.resourcePath)}', [], 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$ + ` + ` + }) + ` + + if (isEntry) { + output += `$app_bootstrap$('@app-component/${getNameByPath(this.resourcePath)}'` + ',undefined' + ',undefined' + `)` + } + return output +} + +module.exports = codegenHmlAndCss diff --git a/ace-loader/src/manifest-loader.js b/ace-loader/src/manifest-loader.js new file mode 100644 index 000000000..d67782d45 --- /dev/null +++ b/ace-loader/src/manifest-loader.js @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const utils = require('./util'); +const path = require('path'); + +let projectPath = process.env.aceModuleRoot || process.cwd(); +const manifestFilePath = process.env.aceManifestPath || path.resolve(projectPath, 'manifest.json'); + +function manifestLoader(source) { + const manifestPlugin = utils.stringifyLoaders([{ name: path.resolve(__dirname, 'manifest-plugin.js') }]); + const queryString = utils.getRequireString(this, manifestPlugin, manifestFilePath); + source += ';(exports.default || module.exports).manifest = ' + queryString; + return source; +} +module.exports = manifestLoader; + diff --git a/ace-loader/src/manifest-plugin.js b/ace-loader/src/manifest-plugin.js new file mode 100644 index 000000000..64be0eb9c --- /dev/null +++ b/ace-loader/src/manifest-plugin.js @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const { DEVICE_LEVEL } = require('./lite/lite-enum'); +module.exports = function(source, map) { + this.cacheable && this.cacheable() + const callback = this.async() + + if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE) { + callback(null, JSON.stringify({ 'manifest.json': 'content' }), map) + } else { + callback(null, source, map) + } +}; diff --git a/ace-loader/src/module-script.js b/ace-loader/src/module-script.js new file mode 100644 index 000000000..287f7cb51 --- /dev/null +++ b/ace-loader/src/module-script.js @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +import { + parseRequireModule +} from './util'; + +module.exports = function(source, map) { + source = parseRequireModule(source); + this.cacheable && this.cacheable() + const callback = this.async() + callback(null, source, map) +}; diff --git a/ace-loader/src/resource-plugin.js b/ace-loader/src/resource-plugin.js new file mode 100644 index 000000000..670860f4e --- /dev/null +++ b/ace-loader/src/resource-plugin.js @@ -0,0 +1,233 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const fs = require('fs'); +const path = require('path'); +const SingleEntryPlugin = require('webpack/lib/SingleEntryPlugin'); + +const CUSTOM_THEME_PROP_GROUPS = require('./theme/customThemeStyles'); +const OHOS_THEME_PROP_GROUPS = require('./theme/ohosStyles'); + +const FILE_EXT_NAME = ['.js', '.css', '.jsx', '.less', '.sass', '.scss', '.md', '.DS_Store', '.hml']; +const red = '\u001b[31m'; +const reset = '\u001b[39m'; +let input = ''; +let output = ''; +let manifestFilePath = ''; +let shareThemePath = ''; +let internalThemePath = ''; + +function copyFile(input, output) { + try { + if (fs.existsSync(input)) { + const parent = path.join(output, '..'); + if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) { + mkDir(parent); + } + const pathInfo = path.parse(input); + const entryObj = addPageEntryObj(); + const indexPath = pathInfo.dir + path.sep + pathInfo.name + '.hml?entry'; + for (const key in entryObj) { + if (entryObj[key] === indexPath) { + return; + } + } + if (pathInfo.ext === '.json' && (pathInfo.dir === shareThemePath || + pathInfo.dir === internalThemePath)) { + if (themeFileBuild(input, output)) { + return; + } + } + const readStream = fs.createReadStream(input); + const writeStream = fs.createWriteStream(output); + readStream.pipe(writeStream); + readStream.on('close', function() { + writeStream.end(); + }); + } + } catch (e) { + console.error(red, `Failed to build file ${input}.`, reset); + throw e.message; + } +} + +function mkDir(path_) { + const parent = path.join(path_, '..'); + if (!(fs.existsSync(parent) && !fs.statSync(parent).isFile())) { + mkDir(parent); + } + fs.mkdirSync(path_); +} + +function circularFile(inputPath, outputPath, ext) { + const realPath = path.join(inputPath, ext); + const localI18n = path.join(input, 'i18n') + if (!fs.existsSync(realPath) || realPath === output || realPath === localI18n) { + return; + } + fs.readdirSync(realPath).forEach(function(file_) { + const file = path.join(realPath, file_); + const fileStat = fs.statSync(file); + if (fileStat.isFile()) { + const baseName = path.basename(file); + const extName = path.extname(file); + if (FILE_EXT_NAME.indexOf(extName) < 0 && baseName !== '.DS_Store') { + const outputFile = path.join(outputPath, ext, path.basename(file_)); + if (outputFile === path.join(output, 'manifest.json')) { + return; + } + if (fs.existsSync(outputFile)) { + const outputFileStat = fs.statSync(outputFile); + if (outputFileStat.isFile() && fileStat.size !== outputFileStat.size) { + copyFile(file, outputFile); + } + } else { + copyFile(file, outputFile); + } + } + } else if (fileStat.isDirectory()) { + circularFile(inputPath, outputPath, path.join(ext, file_)); + } + }); +} + +class ResourcePlugin { + constructor(input_, output_, manifestFilePath_) { + input = input_; + output = output_; + manifestFilePath = manifestFilePath_; + shareThemePath = path.join(input_, '../share/resources/styles'); + internalThemePath = path.join(input_, 'resources/styles'); + } + apply(compiler) { + compiler.hooks.beforeCompile.tap('resource Copy', () => { + circularFile(input, output, ''); + circularFile(input, output, '../share'); + }); + compiler.hooks.normalModuleFactory.tap('OtherEntryOptionPlugin', () => { + addPageEntryObj(); + for (const key in entryObj) { + if (!compiler.options.entry[key]) { + const singleEntry = new SingleEntryPlugin('', entryObj[key], key); + singleEntry.apply(compiler); + } + } + }); + compiler.hooks.done.tap('copyManifest', () => { + copyManifest(); + if (fs.existsSync(path.join(output, 'app.js'))) { + fs.utimesSync(path.join(output, 'app.js'), new Date(), new Date()) + } + }); + } +} + +function copyManifest() { + copyFile(manifestFilePath, path.join(output, 'manifest.json')); +} + +let entryObj = {}; + +function addPageEntryObj() { + entryObj = {}; + if (!fs.existsSync(manifestFilePath)) { + throw Error('ERROR: missing manifest').message; + } + const jsonString = fs.readFileSync(manifestFilePath).toString(); + const obj = JSON.parse(jsonString); + const pages = obj.pages; + if (pages === undefined) { + throw Error('ERROR: missing pages').message; + } + pages.forEach((element) => { + const sourcePath = element; + const hmlPath = path.join(input, sourcePath + '.hml') + const aceSuperVisualPath = process.env.aceSuperVisualPath || '' + const visualPath = path.join(aceSuperVisualPath, sourcePath + '.visual') + const isHml = fs.existsSync(hmlPath) + const isVisual = fs.existsSync(visualPath) + if (isHml && isVisual) { + logWarn(this, [{ + reason: 'ERROR: ' + sourcePath + ' cannot both have hml && visual' + }]) + } else if (isHml) { + entryObj['./' + element] = hmlPath + '?entry'; + } else if (isVisual){ + entryObj['./' + element] = visualPath + '?entry'; + } + }); + if (process.env.isPreview !== 'true' && process.env.DEVICE_LEVEL === 'rich') { + loadWorker(entryObj); + } + return entryObj; +} + +function loadWorker(entryObj) { + const workerPath = path.resolve(input, 'workers'); + if (fs.existsSync(workerPath)) { + const workerFiles = []; + readFile(workerPath, workerFiles); + workerFiles.forEach((item) => { + if (/\.js$/.test(item)) { + const relativePath = path.relative(workerPath, item).replace(/\.js$/, ''); + entryObj[`./workers/` + relativePath] = item; + } + }) + } +} + +function readFile(dir, utFiles) { + try { + const files = fs.readdirSync(dir); + files.forEach((element) => { + const filePath = path.join(dir, element); + const status = fs.statSync(filePath); + if (status.isDirectory()) { + readFile(filePath, utFiles); + } else { + utFiles.push(filePath); + } + }) + } catch (e) { + console.error(e.message); + } +} + +function themeFileBuild(customThemePath, customThemeBuild) { + if (fs.existsSync(customThemePath)) { + const themeContent = JSON.parse(fs.readFileSync(customThemePath)); + const newContent = {}; + if (themeContent && themeContent['style']) { + newContent['style'] = {}; + const styleContent = themeContent['style']; + Object.keys(styleContent).forEach(function(key) { + const customKey = CUSTOM_THEME_PROP_GROUPS[key]; + const ohosKey = OHOS_THEME_PROP_GROUPS[key]; + if (ohosKey) { + newContent['style'][ohosKey] = styleContent[key]; + } else if (customKey) { + newContent['style'][customKey] = styleContent[key]; + } else { + newContent['style'][key] = styleContent[key]; + } + }); + fs.writeFileSync(customThemeBuild, JSON.stringify(newContent, null, 2)); + return true; + } + } + return false; +} + +module.exports = ResourcePlugin; diff --git a/ace-loader/src/resource-reference-script.js b/ace-loader/src/resource-reference-script.js new file mode 100644 index 000000000..ff78f2f33 --- /dev/null +++ b/ace-loader/src/resource-reference-script.js @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +const OHOS_THEME_PROP_GROUPS = require('./theme/ohosStyles') +module.exports = function (source) { + let result + // target format: this.$r("ohos.id_color_background") or this.$r('ohos.id_color_background') or + // "this.$r('ohos.id_color_background')" + let ResourceRefReg = /"?this\s*\.\$r\s*\(\s*((['"]ohos\.(?\w+)['"]))\s*\)"?/g + while (result = ResourceRefReg.exec(source)) { + const resourceName = result.groups['resName'] + if (resourceName && OHOS_THEME_PROP_GROUPS[resourceName]) { + const resourceId = "\"@ohos_id_" + OHOS_THEME_PROP_GROUPS[resourceName] + "\"" + source = source.replace(result[0], resourceId) + // update the start position of the next match + ResourceRefReg.lastIndex -= result[0].length - resourceId.length + } + } + + // target format: this.$r("sys.type.id_color_background") or this.$r('sys.type.id_color_background') or + // "this.$r('sys.type.id_color_background')" + // The "type" field can be "float", "color", "string" and so on. + let SysResourceTypeRefReg = /"?this\s*\.\$r\s*\(\s*((['"]sys\.(?\w+)\.(?\w+)['"]))\s*\)"?/g + while (result = SysResourceTypeRefReg.exec(source)) { + const resourceName = result.groups['resName'] + const resourceType = result.groups['resType'] + if (resourceName && resourceType && OHOS_THEME_PROP_GROUPS[resourceName]) { + const resourceId = "\"@sys." + resourceType + "." + OHOS_THEME_PROP_GROUPS[resourceName] + "\"" + source = source.replace(result[0], resourceId) + // update the start position of the next match + SysResourceTypeRefReg.lastIndex -= result[0].length - resourceId.length + } + } + + // target format: this.$r("app.type.developer_defined_color") or this.$r('app.type.developer_defined_color') or + // "this.$r('app.type.developer_defined_color')" + // The "type" field can be "float", "color", "string" and so on. + let AppResourceTypeRefReg = /"?this\s*\.\$r\s*\(\s*((['"]app\.(?\w+)\.(?\w+)['"]))\s*\)"?/g + while (result = AppResourceTypeRefReg.exec(source)) { + const resourceName = result.groups['resName'] + const resourceType = result.groups['resType'] + if (resourceName && resourceType) { + const resourceId = "\"@app." + resourceType + "." + resourceName + "\"" + source = source.replace(result[0], resourceId) + // update the start position of the next match + AppResourceTypeRefReg.lastIndex -= result[0].length - resourceId.length + } + } + + return source +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/commonAttr/commonAttr.json b/ace-loader/test/card/expected/commonAttr/commonAttr.json new file mode 100644 index 000000000..88e30a2f8 --- /dev/null +++ b/ace-loader/test/card/expected/commonAttr/commonAttr.json @@ -0,0 +1,134 @@ +{ + "template": { + "attr": {}, + "type": "div", + "classList": [ + "container" + ], + "children": [ + { + "attr": { + "value": "id_test1" + }, + "type": "div", + "id": "testid" + }, + { + "attr": { + "value": "style_test_1" + }, + "type": "div", + "style": { + "color": "#008000" + } + }, + { + "attr": { + "value": "style_test_2" + }, + "type": "div", + "style": { + "borderTopColor": "{{col}}", + "borderRightColor": "{{col}}", + "borderBottomColor": "{{col}}", + "borderLeftColor": "{{col}}" + } + }, + { + "attr": { + "value": "style_test_2" + }, + "type": "div", + "style": { + "borderTopColor": "{{col}}", + "borderRightColor": "{{col}}", + "borderBottomColor": "{{col}}", + "borderLeftColor": "{{col}}", + "width": "50px" + } + }, + { + "attr": { + "value": "class_test1" + }, + "type": "div", + "classList": [ + "title" + ] + }, + { + "attr": { + "value": "class_test2" + }, + "type": "div", + "classList": [ + "title", + "table" + ] + }, + { + "attr": { + "value": "class_test3" + }, + "type": "div", + "classList": [ + "title", + "table" + ] + }, + { + "attr": { + "value": "class_test4" + }, + "type": "div", + "classList": [ + "{{testclass1}}" + ] + }, + { + "attr": { + "value": "class_test5" + }, + "type": "div", + "classList": [ + "{{testclass1}}", + "{{testclass2}}" + ] + }, + { + "attr": { + "value": "class_test6" + }, + "type": "div", + "classList": [ + "{{testclass1}}", + "{{testclass2}}" + ] + }, + { + "attr": { + "disabled": "{{disabled}}", + "value": "disable_test1" + }, + "type": "div" + } + ] + }, + "styles": {}, + "actions": {}, + "data": { + "testclass1": "testclass1", + "testclass2": "testclass2", + "col": "#008000", + "disabled": true + }, + "apiVersion": { + "5": { + "disabled": false + }, + "6": { + "col": "#808080", + "content": "Hello World!" + } + } +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/event/event.json b/ace-loader/test/card/expected/event/event.json new file mode 100644 index 000000000..429246284 --- /dev/null +++ b/ace-loader/test/card/expected/event/event.json @@ -0,0 +1,37 @@ +{ + "template": { + "type": "div", + "attr": {}, + "children": [ + { + "type": "div", + "attr": {}, + "events": { + "click": "router" + } + }, + { + "type": "div", + "attr": {}, + "events": { + "click": "router" + } + } + ] + }, + "styles": {}, + "actions": { + "click": { + "action": "router", + "bundleName": "com.example.helloworld", + "abilityName": "com.example.helloworld.MainAbility", + "params": { + "day": "$event.day", + "time": "$event.time", + "year": "$event.year" + } + } + }, + "data": {}, + "apiVersion": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/expression/expression.json b/ace-loader/test/card/expected/expression/expression.json new file mode 100644 index 000000000..b3c54e093 --- /dev/null +++ b/ace-loader/test/card/expected/expression/expression.json @@ -0,0 +1,23 @@ +{ + "template": { + "type": "div", + "attr": {}, + "classList": [ + "container" + ], + "children": [ + { + "type": "text", + "attr": { + "value": "{{content}}" + } + } + ] + }, + "actions": {}, + "styles": {}, + "data": { + "content": "Hello World!" + }, + "apiVersion": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/exteriorStyle/exteriorStyle.json b/ace-loader/test/card/expected/exteriorStyle/exteriorStyle.json new file mode 100644 index 000000000..d582c252c --- /dev/null +++ b/ace-loader/test/card/expected/exteriorStyle/exteriorStyle.json @@ -0,0 +1,86 @@ +{ + "template": { + "type": "div", + "attr": { + "value": "exteriorStyle_test" + } + }, + "styles": { + ".a": { + "width": "100%", + "height": "50%" + }, + ".b": { + "width": "100px", + "height": "200px" + }, + ".c": { + "color": "#808080" + }, + ".d": { + "color": "#008000" + }, + ".e": { + "color": "rgba(80,60,150,1)" + }, + ".j": { + "gridTemplateColumns": "50px 40px 80px" + }, + ".l": { + "gridRowStart": 3 + }, + ".m": { + "borderTopWidth": "5px", + "borderRightWidth": "5px", + "borderBottomWidth": "5px", + "borderLeftWidth": "5px", + "borderStyle": "solid", + "borderTopColor": "#808080", + "borderRightColor": "#808080", + "borderBottomColor": "#808080", + "borderLeftColor": "#808080" + }, + ".n": { + "textIndent": "50px" + }, + ".o": { + "backgroundImage": "/common/img/a.jpg" + }, + ".t": { + "startAngle": "240deg" + }, + ".v": { + "paddingTop": "10px", + "paddingRight": "15px", + "paddingBottom": "10px", + "paddingLeft": "15px" + }, + "#w": { + "fontSize": "15px", + "fontFamily": "PingFangSC-Regular" + }, + ".gradient1": { + "background": "{\"values\":[{\"type\":\"linearGradient\",\"directions\":[\"to\",\"bottom\"],\"values\":[\"#ff0000\",\"#00ff00\"]}]}" + }, + ".gradient2": { + "background": "{\"values\":[{\"type\":\"linearGradient\",\"directions\":[\"45deg\"],\"values\":[\"rgb(255,0,0)\",\"rgb(0,255,0)\"]}]}" + }, + ".gradient3": { + "background": "{\"values\":[{\"type\":\"linearGradient\",\"directions\":[\"to\",\"right\"],\"values\":[\"rgb(255,0,0) 90px\",\"rgb(0,0,255) 60%\"]}]}" + }, + ".gradient4": { + "background": "{\"values\":[{\"type\":\"repeatingLinearGradient\",\"directions\":[\"to\",\"right\"],\"values\":[\"rgba(255,255,0,1) 30px\",\"rgba(0,0,255,0.5) 60px\"]}]}" + }, + "@FONT-FACE": [ + { + "fontFamily": "HWfont", + "src": "url(/common/HWfont.ttf)" + } + ], + ".txt": { + "fontFamily": "HWfont" + } + }, + "actions": {}, + "data": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/ifAttr/ifAttr.json b/ace-loader/test/card/expected/ifAttr/ifAttr.json new file mode 100644 index 000000000..673be09e4 --- /dev/null +++ b/ace-loader/test/card/expected/ifAttr/ifAttr.json @@ -0,0 +1,36 @@ +{ + "template": { + "type": "div", + "attr": {}, + "children": [ + { + "type": "text", + "attr": { + "value": "Hello-TV" + }, + "shown": "{{show}}" + }, + { + "type": "text", + "attr": { + "value": "Hello-Wearable" + }, + "shown": "{{display}}&&!{{show}}" + }, + { + "type": "text", + "attr": { + "value": "Hello-World" + }, + "shown": "!{{display}}&&!{{show}}" + } + ] + }, + "styles": {}, + "actions": {}, + "data": { + "show": false, + "display": true + }, + "apiVersion": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/importCSS/importCSS.json b/ace-loader/test/card/expected/importCSS/importCSS.json new file mode 100644 index 000000000..4409b588f --- /dev/null +++ b/ace-loader/test/card/expected/importCSS/importCSS.json @@ -0,0 +1,21 @@ +{ + "template": { + "type": "div", + "attr": { + "value": "importCSS_test" + }, + "classList": [ + "container" + ] + }, + "styles": { + ".title": { + "fontSize": "50px" + }, + ".container": { + "justifyContent": "center" + } + }, + "actions": {}, + "data": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/importLess/importLess.json b/ace-loader/test/card/expected/importLess/importLess.json new file mode 100644 index 000000000..0c6f186d0 --- /dev/null +++ b/ace-loader/test/card/expected/importLess/importLess.json @@ -0,0 +1,18 @@ +{ + "template": { + "type": "div", + "attr": { + "value": "importLess_test" + }, + "classList": [ + "container" + ] + }, + "styles": { + ".container": { + "backgroundColor": "#000000" + } + }, + "actions": {}, + "data": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/inlineStyle/inlineStyle.json b/ace-loader/test/card/expected/inlineStyle/inlineStyle.json new file mode 100644 index 000000000..ecfc1471f --- /dev/null +++ b/ace-loader/test/card/expected/inlineStyle/inlineStyle.json @@ -0,0 +1,145 @@ +{ + "template": { + "type": "div", + "attr": {}, + "classList": [ + "container" + ], + "children": [ + { + "type": "div", + "attr": { + "value": "style_test1" + }, + "style": { + "width": "100%" + } + }, + { + "type": "div", + "attr": { + "value": "style_test2" + }, + "style": { + "height": "{{height}}" + } + }, + { + "type": "div", + "attr": { + "value": "style_test3" + }, + "style": { + "color": "#008000" + } + }, + { + "type": "div", + "attr": { + "value": "style_test4" + }, + "style": { + "color": "#FF0000" + } + }, + { + "type": "div", + "attr": { + "value": "style_test5" + }, + "style": { + "color": "rgba(200,180,120,1)" + } + }, + { + "type": "div", + "attr": { + "value": "style_test10" + }, + "style": { + "gridTemplateColumns": "50px 100px 60px" + } + }, + { + "type": "div", + "attr": { + "value": "style_test11" + }, + "style": { + "gridRowStart": 2 + } + }, + { + "type": "div", + "attr": { + "value": "style_test12" + }, + "style": { + "borderTopWidth": "5px", + "borderRightWidth": "5px", + "borderBottomWidth": "5px", + "borderLeftWidth": "5px", + "borderTopStyle": "solid", + "borderRightStyle": "solid", + "borderBottomStyle": "solid", + "borderLeftStyle": "solid", + "borderTopColor": "#FF0000", + "borderRightColor": "#FF0000", + "borderBottomColor": "#FF0000", + "borderLeftColor": "#FF0000" + } + }, + { + "type": "div", + "attr": { + "value": "style_test13" + }, + "style": { + "textIndent": "50px" + } + }, + { + "type": "div", + "attr": { + "value": "style_test14" + }, + "style": { + "backgroundImage": "/common/img/xmad.jpg" + } + }, + { + "type": "progress", + "attr": { + "value": "style_test19" + }, + "style": { + "startAngle": "240deg" + } + }, + { + "type": "div", + "attr": { + "value": "style_test21" + }, + "style": { + "paddingTop": "10px", + "paddingRight": "15px", + "paddingBottom": "10px", + "paddingLeft": "15px" + } + }, + { + "type": "div", + "attr": { + "value": "style_test23" + }, + "style": { + "backgroundImage": "https://huawei.com/logo.jpg" + } + } + ] + }, + "styles": {}, + "actions": {}, + "data": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/mediaQuery/mediaQuery.json b/ace-loader/test/card/expected/mediaQuery/mediaQuery.json new file mode 100644 index 000000000..4d29fef1a --- /dev/null +++ b/ace-loader/test/card/expected/mediaQuery/mediaQuery.json @@ -0,0 +1,49 @@ +{ + "template": { + "type": "div", + "attr": { + "value": "mediaQuery_test" + } + }, + "styles": { + "@MEDIA": [ + { + "condition": "(dark-mode:true)", + ".header": { + "width": "100%", + "height": "60px", + "fontSize": "16px", + "alignItems": "center", + "justifyContent": "center" + }, + ".footer": { + "width": "100%", + "height": "40px", + "alignItems": "center" + } + }, + { + "condition": "(dark-mode:true)", + ".title": { + "fontSize": "16px", + "color": "#333333", + "alignItems": "center" + }, + ".container": { + "width": "500px", + "height": "500px", + "backgroundColor": "#fa8072" + }, + ".button": { + "paddingTop": "50px", + "fontSize": "16px", + "color": "#666666", + "alignItems": "center", + "justifyContent": "center" + } + } + ] + }, + "actions": {}, + "data": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/privateAttr/privateAttr.json b/ace-loader/test/card/expected/privateAttr/privateAttr.json new file mode 100644 index 000000000..f178bdd94 --- /dev/null +++ b/ace-loader/test/card/expected/privateAttr/privateAttr.json @@ -0,0 +1,61 @@ +{ + "template": { + "type": "div", + "attr": {}, + "classList": [ + "container" + ], + "children": [ + { + "type": "image", + "attr": { + "alt": "img", + "src": "{{src}}" + } + }, + { + "type": "progress", + "attr": { + "type": "horizontal", + "percent": "{{percent}}", + "secondarypercent": "{{secondarypercent}}" + } + }, + { + "type": "progress", + "attr": { + "type": "scale-ring", + "percent": "{{percent}}", + "secondarypercent": "{{secondarypercent}}", + "clockwise": "{{clockwise}}" + } + }, + { + "type": "progress", + "attr": { + "type": "arc", + "percent": "{{percent}}" + } + }, + { + "type": "chart", + "attr": { + "type": "line", + "options": "{{options}}", + "datasets": "{{datasets}}" + } + }, + { + "type": "button", + "attr": { + "type": "capsule", + "value": "{{value}}", + "icon": "{{icon}}" + } + } + ] + }, + "styles": {}, + "actions": {}, + "data": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/expected/showAttr/showAttr.json b/ace-loader/test/card/expected/showAttr/showAttr.json new file mode 100644 index 000000000..087e4f4cb --- /dev/null +++ b/ace-loader/test/card/expected/showAttr/showAttr.json @@ -0,0 +1,31 @@ +{ + "template": { + "type": "div", + "attr": {}, + "classList": [ + "container" + ], + "children": [ + { + "type": "text", + "attr": { + "show": "false", + "value": "Hello World" + } + }, + { + "type": "text", + "attr": { + "show": "{{visible}}", + "value": "Hello World" + } + } + ] + }, + "styles": {}, + "actions": {}, + "data": { + "visible": false + }, + "apiVersion": {} +} \ No newline at end of file diff --git a/ace-loader/test/card/test.js b/ace-loader/test/card/test.js new file mode 100644 index 000000000..bb051b675 --- /dev/null +++ b/ace-loader/test/card/test.js @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +'use strict'; + +const fs = require('fs'); +const path =require('path'); + +const chai = require('chai'); +const sinon = require('sinon'); +const sinonChai = require('sinon-chai'); +const expect = chai.expect; +chai.use(sinonChai); + +function getActualJSON(componentName, filaName) { + const filePath = path.join(__dirname,"testcase/build/pages",`${componentName}`, filaName + `.json`); + if(!fs.existsSync(filePath)){ + return {} + } + const fileContent = fs.readFileSync(filePath, "utf-8"); + const fileString = fileContent.toString(); + return JSON.parse(fileString); +} + +function getExpectJSON(componentName, filaName) { + const filePath = path.join(__dirname, "expected", `${componentName}`, filaName + `.json`); + if(!fs.existsSync(filePath)){ + return {} + } + const expectedContent = fs.readFileSync(filePath, "utf-8"); + const expectedObj = JSON.parse(expectedContent.toString()); + return expectedObj; +} + +describe('build', () => { + it('commonAttr', () => { + const page = 'commonAttr' + expect(getActualJSON(page, 'commonAttr')).eql(getExpectJSON(page, 'commonAttr')); + }); + it('event', () => { + const page = 'event' + expect(getActualJSON(page, 'event')).eql(getExpectJSON(page, 'event')); + }); + it('expression', () => { + const page = 'expression' + expect(getActualJSON(page, 'expression')).eql(getExpectJSON(page, 'expression')); + }); + it('exteriorStyle', () => { + const page = 'exteriorStyle' + expect(getActualJSON(page, 'exteriorStyl')).eql(getExpectJSON(page, 'exteriorStyl')); + }); + it('ifAttr', () => { + const page = 'ifAttr' + expect(getActualJSON(page, 'ifAttr')).eql(getExpectJSON(page, 'ifAttr')); + }); + it('importCSS', () => { + const page = 'importCSS' + expect(getActualJSON(page, 'importCSS')).eql(getExpectJSON(page, 'importCSS')); + }); + it('importLess', () => { + const page = 'importLess' + expect(getActualJSON(page, 'importLess')).eql(getExpectJSON(page, 'importLess')); + }); + it('inlineStyle', () => { + const page = 'inlineStyle' + expect(getActualJSON(page, 'inlineStyle')).eql(getExpectJSON(page, 'inlineStyle')); + }); + it('mediaQuery', () => { + const page = 'mediaQuery' + expect(getActualJSON(page, 'mediaQuer')).eql(getExpectJSON(page, 'mediaQuer')); + }); + it('privateAttr', () => { + const page = 'privateAttr' + expect(getActualJSON(page, 'privateAttr')).eql(getExpectJSON(page, 'privateAttr')); + }); + it('showAttr', () => { + const page = 'showAttr' + expect(getActualJSON(page, 'showAttr')).eql(getExpectJSON(page, 'showAttr')); + }); +}); \ No newline at end of file diff --git a/ace-loader/test/card/testError/common/component/comp/comp.css b/ace-loader/test/card/testError/common/component/comp/comp.css new file mode 100644 index 000000000..99ec9fdf7 --- /dev/null +++ b/ace-loader/test/card/testError/common/component/comp/comp.css @@ -0,0 +1,13 @@ +.item{ + width: 700px; + flex-direction: column; + height: 300px; + align-items: center; + margin-top: 100px; + } + +.text_style { + font-weight:500; + font-family:Courier; + font-size:40px +} diff --git a/ace-loader/test/card/testError/common/component/comp/comp.hml b/ace-loader/test/card/testError/common/component/comp/comp.hml new file mode 100644 index 000000000..c827015a6 --- /dev/null +++ b/ace-loader/test/card/testError/common/component/comp/comp.hml @@ -0,0 +1,5 @@ +
+ + default content form part1 + +
\ No newline at end of file diff --git a/ace-loader/test/card/testError/common/component/comp/comp.js b/ace-loader/test/card/testError/common/component/comp/comp.js new file mode 100644 index 000000000..204bd7b89 --- /dev/null +++ b/ace-loader/test/card/testError/common/component/comp/comp.js @@ -0,0 +1,14 @@ +export default { + props:{ + title: { + default: "title" + } + }, + data: { + show: false, + }, + textClicked () { + this.$emit('textClicked'); + this.show = !this.show; + }, +} diff --git a/ace-loader/test/card/testError/manifest.json b/ace-loader/test/card/testError/manifest.json new file mode 100644 index 000000000..1054a8ba0 --- /dev/null +++ b/ace-loader/test/card/testError/manifest.json @@ -0,0 +1,20 @@ +{ + "appID": "com.example.ace.helloworld", + "appName": "HelloAce", + "versionName": "1.0.0", + "versionCode": 1, + "minPlatformVersion": "1.0.1", + "pages": [ + "pages/for/for", + "pages/element/element", + "pages/pseudoclasses/pseudoclasses", + "pages/selector/selector", + "pages/amimation/amimation", + "pages/transition/transition", + "pages/gradient/gradient" + ], + "window": { + "designWidth": 720, + "autoDesignWidth": false + } +} diff --git a/ace-loader/test/card/testError/pages/amimation/amimation.css b/ace-loader/test/card/testError/pages/amimation/amimation.css new file mode 100644 index 000000000..85769d020 --- /dev/null +++ b/ace-loader/test/card/testError/pages/amimation/amimation.css @@ -0,0 +1,43 @@ +.container { + justify-content: center; + align-items: center; +} + +.title { + font-size: 50px; +} + +.button-div { + padding-top: 50px; + align-items: center; + justify-content: center; +} + +.text-div { + align-items: center; + justify-content: center; +} + +.button { + font-size: 30px; +} + +.animate { + transform-origin: 20% 40%; + transform: translate(0px) ; + animation-name: myfirst; + animation-delay: 2s; + animation-duration: 5s; + animation-iteration-count: infinite; + animation-timing-function: linear; + animation-fill-mode: none; +} +@keyframes Go +{ + from { + transform:translate(0px) rotate(0deg) scale(1.0); + } + to { + transform-style:translate(100px) rotate(180deg) scale(2.0); + } +} \ No newline at end of file diff --git a/ace-loader/test/card/testError/pages/amimation/amimation.hml b/ace-loader/test/card/testError/pages/amimation/amimation.hml new file mode 100644 index 000000000..70bd7e762 --- /dev/null +++ b/ace-loader/test/card/testError/pages/amimation/amimation.hml @@ -0,0 +1,8 @@ +
+
+ amimation_test +
+
+ +
+
diff --git a/ace-loader/test/card/testError/pages/element/element.hml b/ace-loader/test/card/testError/pages/element/element.hml new file mode 100644 index 000000000..4ffe9e953 --- /dev/null +++ b/ace-loader/test/card/testError/pages/element/element.hml @@ -0,0 +1,7 @@ + +
+
+ element_test +
+ +
diff --git a/ace-loader/test/card/testError/pages/for/for.css b/ace-loader/test/card/testError/pages/for/for.css new file mode 100644 index 000000000..55526dbd1 --- /dev/null +++ b/ace-loader/test/card/testError/pages/for/for.css @@ -0,0 +1,17 @@ +.container { + justify-content: center; + align-items: center; +} + +.title { + font-size: 50px; +} + +.text-div { + align-items: center; + justify-content: center; +} + +.button { + font-size: 30px; +} diff --git a/ace-loader/test/card/testError/pages/for/for.hml b/ace-loader/test/card/testError/pages/for/for.hml new file mode 100644 index 000000000..0c1adeae2 --- /dev/null +++ b/ace-loader/test/card/testError/pages/for/for.hml @@ -0,0 +1,15 @@ +
+
+ for列表渲染. +
+ +
+ {{$idx}}.{{$item.name}} +
+
+ {{$idx}}.{{value.name}} +
+
+ {{i}}{{v.name}} +
+
diff --git a/ace-loader/test/card/testError/pages/pseudoclasses/pseudoclasses.css b/ace-loader/test/card/testError/pages/pseudoclasses/pseudoclasses.css new file mode 100644 index 000000000..bcf50fb5a --- /dev/null +++ b/ace-loader/test/card/testError/pages/pseudoclasses/pseudoclasses.css @@ -0,0 +1,3 @@ +.button:active { + background-color: #888888; +} diff --git a/ace-loader/test/card/testError/pages/pseudoclasses/pseudoclasses.hml b/ace-loader/test/card/testError/pages/pseudoclasses/pseudoclasses.hml new file mode 100644 index 000000000..a33b9ecdf --- /dev/null +++ b/ace-loader/test/card/testError/pages/pseudoclasses/pseudoclasses.hml @@ -0,0 +1,8 @@ +
+
+ pseudoclasses_test +
+
+ +
+
diff --git a/ace-loader/test/card/testError/pages/selector/selector.css b/ace-loader/test/card/testError/pages/selector/selector.css new file mode 100644 index 000000000..7e620d2b4 --- /dev/null +++ b/ace-loader/test/card/testError/pages/selector/selector.css @@ -0,0 +1,23 @@ +div { + flex-direction: column; +} + +.title { + font-size: 30px; +} + +#contentId { + font-size: 20px; +} + +.title, .content { + padding: 5px; +} + +.container text { + color: #007dff; +}; + +.container > text { + color: #fa2a2d; +} \ No newline at end of file diff --git a/ace-loader/test/card/testError/pages/selector/selector.hml b/ace-loader/test/card/testError/pages/selector/selector.hml new file mode 100644 index 000000000..e03bf9994 --- /dev/null +++ b/ace-loader/test/card/testError/pages/selector/selector.hml @@ -0,0 +1,7 @@ +
+ selector_test +
+ content +
+
+ diff --git a/ace-loader/test/card/testError/pages/transition/transition.css b/ace-loader/test/card/testError/pages/transition/transition.css new file mode 100644 index 000000000..2a27f8e1f --- /dev/null +++ b/ace-loader/test/card/testError/pages/transition/transition.css @@ -0,0 +1,22 @@ +.a { + shared-transition-effect: exchange; + shared-transition-name: shared-transition; + shared-transition-timing-function: friction; +} +@keyframes shared-transition { + from { + opacity: 0; + transform: translate(0px) rotate(0deg) scale(1.0); + } + to { + opacity: 1; + transform: translate(100px) rotate(180deg) scale(2.0); + } +} + +.s{ + transition-enter: "translate(100px) rotate(180deg) scale(2.0)"; + transition-exit: 'translate(100px) rotate(180deg) scale(2.0)'; + transition-duration: 100ms; + transition-timing-function: friction +} \ No newline at end of file diff --git a/ace-loader/test/card/testError/pages/transition/transition.hml b/ace-loader/test/card/testError/pages/transition/transition.hml new file mode 100644 index 000000000..22e16ee5d --- /dev/null +++ b/ace-loader/test/card/testError/pages/transition/transition.hml @@ -0,0 +1,8 @@ +
+
+ transition_test +
+
+ +
+
diff --git a/ace-loader/test/card/testcase/common/common.css b/ace-loader/test/card/testcase/common/common.css new file mode 100644 index 000000000..755968e4e --- /dev/null +++ b/ace-loader/test/card/testcase/common/common.css @@ -0,0 +1,3 @@ +.title { + font-size: 50px; +} \ No newline at end of file diff --git a/ace-loader/test/card/testcase/common/media.css b/ace-loader/test/card/testcase/common/media.css new file mode 100644 index 000000000..58c0ffe82 --- /dev/null +++ b/ace-loader/test/card/testcase/common/media.css @@ -0,0 +1,15 @@ +@media (dark-mode:true) { + .header { + width: 100%; + height: 60px; + font-size: 16px; + align-items: center; + justify-content: center; + } + + .footer { + width: 100%; + height: 40px; + align-items: center; + } +} \ No newline at end of file diff --git a/ace-loader/test/card/testcase/manifest.json b/ace-loader/test/card/testcase/manifest.json new file mode 100644 index 000000000..da6a73a56 --- /dev/null +++ b/ace-loader/test/card/testcase/manifest.json @@ -0,0 +1,25 @@ +{ + "appID": "com.example.ace.helloworld", + "appName": "HelloAce", + "versionName": "1.0.0", + "versionCode": 1, + "minPlatformVersion": "1.0.1", + "pages": [ + "pages/commonAttr/commonAttr", + "pages/event/event", + "pages/expression/expression", + "pages/exteriorStyle/exteriorStyle", + "pages/ifAttr/ifAttr", + "pages/importCSS/importCSS", + "pages/importLess/importLess", + "pages/inlineStyle/inlineStyle", + "pages/mediaQuery/mediaQuery", + "pages/privateAttr/privateAttr", + "pages/showAttr/showAttr" + ], + "window": { + "designWidth": 720, + "autoDesignWidth": false + }, + "type": "form" +} diff --git a/ace-loader/test/card/testcase/pages/commonAttr/commonAttr.hml b/ace-loader/test/card/testcase/pages/commonAttr/commonAttr.hml new file mode 100644 index 000000000..7390f6896 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/commonAttr/commonAttr.hml @@ -0,0 +1,34 @@ +
+ +
id_test1
+ + +
style_test_1
+ + +
style_test_2
+ + +
style_test_2
+ + +
class_test1
+ + +
class_test2
+ + +
class_test3
+ + +
class_test4
+ + +
class_test5
+ + +
class_test6
+ + +
disable_test1
+
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/commonAttr/commonAttr.json b/ace-loader/test/card/testcase/pages/commonAttr/commonAttr.json new file mode 100644 index 000000000..34952cbe3 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/commonAttr/commonAttr.json @@ -0,0 +1,17 @@ +{ + "data": { + "testclass1": "testclass1", + "testclass2": "testclass2", + "col": "#008000", + "disabled": true + }, + "apiVersion": { + "5": { + "disabled": false + }, + "6": { + "col": "#808080", + "content": "Hello World!" + } + } +} \ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/event/event.hml b/ace-loader/test/card/testcase/pages/event/event.hml new file mode 100644 index 000000000..ff82e4ee3 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/event/event.hml @@ -0,0 +1,6 @@ +
+ +
+ +
+
diff --git a/ace-loader/test/card/testcase/pages/event/event.json b/ace-loader/test/card/testcase/pages/event/event.json new file mode 100644 index 000000000..e735e569a --- /dev/null +++ b/ace-loader/test/card/testcase/pages/event/event.json @@ -0,0 +1,14 @@ +{ + "actions": { + "click":{ + "action":"router", + "bundleName": "com.example.helloworld", + "abilityName": "com.example.helloworld.MainAbility", + "params": { + "day": "$event.day", + "year": "$event.year", + "time": "$event.time" + } + } + } +} diff --git a/ace-loader/test/card/testcase/pages/expression/expression.hml b/ace-loader/test/card/testcase/pages/expression/expression.hml new file mode 100644 index 000000000..60d23f611 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/expression/expression.hml @@ -0,0 +1,4 @@ +
+ + {{content}} +
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/expression/expression.json b/ace-loader/test/card/testcase/pages/expression/expression.json new file mode 100644 index 000000000..990079711 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/expression/expression.json @@ -0,0 +1,5 @@ +{ + "data": { + "content": "Hello World!" + } +} diff --git a/ace-loader/test/card/testcase/pages/exteriorStyle/exteriorStyle.css b/ace-loader/test/card/testcase/pages/exteriorStyle/exteriorStyle.css new file mode 100644 index 000000000..379063e45 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/exteriorStyle/exteriorStyle.css @@ -0,0 +1,98 @@ +/* PERCENTAGE_LENGTH_VALIDATOR_test */ +.a { + width: 100%; + height: 50%; +} + +/* ENGTH_VALIDATOR_test */ +.b { + width: 100px; + height: 200px; +} + +/* COLOR_VALIDATOR_test_1 */ +.c { + color: #808080; +} + +/* COLOR_VALIDATOR_test_2 */ +.d { + color: #008000; +} + +/* COLOR_VALIDATOR_test_3 */ +.e { + color: rgba(80, 60, 150, 1.0); +} + +/* GRID_TEMPLATE_VALIDATOR_test */ +.j { + grid-template-columns: 50px 40px 80px; +} + +/* NUMBER_VALIDATOR_test */ +.l { + grid-row-start: 3; +} + +/* BORDER_VALIDATOR_test */ +.m { + border: 5px solid #808080; +} + +/* TEXT_INDENT_VALIDATOR_test */ +.n { + text-indent: 50px; +} + +/* URL_VALIDATOR_test */ +.o { + background-image: url(/common/img/a.jpg); +} + +/* ANGLE_VALIDATOR_test */ +.t { + start-angle: 240deg; +} + +/* SHORTHAND_LENGTH_VALIDATOR_test */ +.v { + padding: 10px 15px; +} + +#w { + font-size: 15px; + font-family: PingFangSC-Regular; +} + +/* ******************common style******************* */ + +/* gradient_test_1 */ +.gradient1 { + background: linear-gradient(#ff0000, #00ff00); +} + +/* gradient_test_2 */ +.gradient2 { + background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); +} + +/* gradient_test_3 */ +.gradient3 { + background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 0, 255) 60%); +} + +/* gradient_test_4 */ +.gradient4 { + background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); +} + +/* customize font */ +@font-face { + font-family: HWfont; + src: url(/common/HWfont.ttf); +} + +.txt { + font-family: HWfont; +} \ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/exteriorStyle/exteriorStyle.hml b/ace-loader/test/card/testcase/pages/exteriorStyle/exteriorStyle.hml new file mode 100644 index 000000000..ffecb9c6a --- /dev/null +++ b/ace-loader/test/card/testcase/pages/exteriorStyle/exteriorStyle.hml @@ -0,0 +1 @@ +
exteriorStyle_test
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/ifAttr/ifAttr.hml b/ace-loader/test/card/testcase/pages/ifAttr/ifAttr.hml new file mode 100644 index 000000000..71a4f6ddb --- /dev/null +++ b/ace-loader/test/card/testcase/pages/ifAttr/ifAttr.hml @@ -0,0 +1,5 @@ +
+ Hello-TV + Hello-Wearable + Hello-World +
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/ifAttr/ifAttr.json b/ace-loader/test/card/testcase/pages/ifAttr/ifAttr.json new file mode 100644 index 000000000..692074d4e --- /dev/null +++ b/ace-loader/test/card/testcase/pages/ifAttr/ifAttr.json @@ -0,0 +1,6 @@ +{ + "data": { + "show": false, + "display": true + } +} \ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/importCSS/importCSS.css b/ace-loader/test/card/testcase/pages/importCSS/importCSS.css new file mode 100644 index 000000000..57589b1d5 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/importCSS/importCSS.css @@ -0,0 +1,4 @@ +@import '../../common/common.css'; +.container { + justify-content: center; +} \ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/importCSS/importCSS.hml b/ace-loader/test/card/testcase/pages/importCSS/importCSS.hml new file mode 100644 index 000000000..4830f5686 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/importCSS/importCSS.hml @@ -0,0 +1 @@ +
importCSS_test
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/importLess/importLess.hml b/ace-loader/test/card/testcase/pages/importLess/importLess.hml new file mode 100644 index 000000000..6b756bd7e --- /dev/null +++ b/ace-loader/test/card/testcase/pages/importLess/importLess.hml @@ -0,0 +1,2 @@ +
importLess_test
+ diff --git a/ace-loader/test/card/testcase/pages/importLess/importLess.less b/ace-loader/test/card/testcase/pages/importLess/importLess.less new file mode 100644 index 000000000..16d834847 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/importLess/importLess.less @@ -0,0 +1,4 @@ +@colorBackground: #000000; +.container { + background-color: @colorBackground; +} \ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/inlineStyle/inlineStyle.hml b/ace-loader/test/card/testcase/pages/inlineStyle/inlineStyle.hml new file mode 100644 index 000000000..30de093af --- /dev/null +++ b/ace-loader/test/card/testcase/pages/inlineStyle/inlineStyle.hml @@ -0,0 +1,40 @@ +
+ +
style_test1
+ + +
style_test2
+ + +
style_test3
+ + +
style_test4
+ + +
style_test5
+ + +
style_test10
+ + +
style_test11
+ + +
style_test12
+ + +
style_test13
+ + +
style_test14
+ + + style_test19 + + +
style_test21
+ + +
style_test23
+
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/mediaQuery/mediaQuery.css b/ace-loader/test/card/testcase/pages/mediaQuery/mediaQuery.css new file mode 100644 index 000000000..1d346b531 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/mediaQuery/mediaQuery.css @@ -0,0 +1,25 @@ +/* media query import css */ +@import '../../common/media.css'; + +@media (dark-mode:true) { + @import "../../common/common.css"; + .container { + width: 500px; + height: 500px; + background-color: #fa8072; + } + + .title { + font-size: 16px; + color: #333333; + align-items: center; + } + + .button { + padding-top: 50px; + font-size: 16px; + color: #666666; + align-items: center; + justify-content: center; + } +} \ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/mediaQuery/mediaQuery.hml b/ace-loader/test/card/testcase/pages/mediaQuery/mediaQuery.hml new file mode 100644 index 000000000..bf1802627 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/mediaQuery/mediaQuery.hml @@ -0,0 +1 @@ +
mediaQuery_test
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/privateAttr/privateAttr.hml b/ace-loader/test/card/testcase/pages/privateAttr/privateAttr.hml new file mode 100644 index 000000000..65760b911 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/privateAttr/privateAttr.hml @@ -0,0 +1,19 @@ +
+ + img + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/showAttr/showAttr.hml b/ace-loader/test/card/testcase/pages/showAttr/showAttr.hml new file mode 100644 index 000000000..82ac930e1 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/showAttr/showAttr.hml @@ -0,0 +1,7 @@ +
+ + Hello World + + + Hello World +
\ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/showAttr/showAttr.json b/ace-loader/test/card/testcase/pages/showAttr/showAttr.json new file mode 100644 index 000000000..47a8dce95 --- /dev/null +++ b/ace-loader/test/card/testcase/pages/showAttr/showAttr.json @@ -0,0 +1,5 @@ +{ + "data": { + "visible": false + } + } \ No newline at end of file diff --git a/ace-loader/test/lite/commandTest/compile.js b/ace-loader/test/lite/commandTest/compile.js new file mode 100644 index 000000000..893d3975c --- /dev/null +++ b/ace-loader/test/lite/commandTest/compile.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +module.exports = function(argv) { + return new Promise(function(resolve, reject) { + const path = require('path'); + const fs = require('fs'); + process.env.aceModuleRoot = path.resolve(__dirname, '../../../sample/lite'); + const webpack = require('webpack'); + const config = require('../../../webpack.lite.config')({}, argv); + const compiler = webpack(config); + let flag = false; + compiler.run((err, stats) => { + if (err) return void reject(err); + flag = fs.existsSync( + path.resolve(__dirname, '../../../sample/lite/build/app.js.map'), + ); + resolve(flag); + }); + }); +}; diff --git a/ace-loader/test/lite/commandTest/compile.test.js b/ace-loader/test/lite/commandTest/compile.test.js new file mode 100644 index 000000000..b8f71eb78 --- /dev/null +++ b/ace-loader/test/lite/commandTest/compile.test.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const assert = require('chai').assert; +const fn = require('./compile'); +const argv = require('yargs').argv; +const argvSelect = { + key1: {}, + key2: { buildMode: 'release' }, + key3: { buildMode: 'debug' }, + key4: { buildMode: 'develope' }, +}; +const compileResult = { + key1: true, + key2: false, + key3: true, + key4: true, +}; +/** + * Test whether the existence of the sourcemap file is reasonable when different 'buildMode' is passed in. + * Only when the 'buildMode' is 'release', the sourcemap does not exist, otherwise it exists + */ +describe('Compilation result test', () => { + it('sourcemap', (done) => { + const key = argv.buildMode ? argv.buildMode : 'key1'; + fn(argvSelect[key]) + .then((flag) => { + assert.equal(flag, compileResult[key], 'result pass'); + done(); + }) + .catch(done); + }); +}); diff --git a/ace-loader/test/lite/customize.js b/ace-loader/test/lite/customize.js new file mode 100644 index 000000000..b25507069 --- /dev/null +++ b/ace-loader/test/lite/customize.js @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +// Enhance_Compiler_Test_008 +module.exports = []; + +// Enhance_Compiler_Test_009 +module.exports = { rules: 123 }; + +// Enhance_Compiler_Test_010 +module.exports = { + extends: 'recommended', + rules: { + hello: 'String', + }, +}; + +// Enhance_Compiler_Test_011 +module.exports = { + extends: 'recommended', + rules: { + div: { + name: 'jack', + }, + }, +}; + +// Enhance_Compiler_Test_012 +module.exports = { + rules: { + hello: {}, + }, +}; + +// Enhance_Compiler_Test_013 +module.exports = { + extends: 'recommended', + rules: { + example: {}, + }, +}; + +// Enhance_Compiler_Test_014 +module.exports = { + extends: 'recommended', + rules: { + swiper: { + attrs: { + vertical: { + enum: ['change'], + }, + }, + }, + }, +}; + +// Enhance_Compiler_Test_015 +module.exports = { + extends: 'recommended', + rules: { + swiper: { + attrs: { + display: {}, + }, + }, + }, +}; diff --git a/ace-loader/test/lite/expected/attribute.js b/ace-loader/test/lite/expected/attribute.js new file mode 100644 index 000000000..503f1c7cb --- /dev/null +++ b/ace-loader/test/lite/expected/attribute.js @@ -0,0 +1 @@ +{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('slider', {'attrs' : {'max' : 100}} ),_c('image'),_c('div', {'attrs' : {'key' : \"day\",'value' : \"hello\"}} ),_c('text', {'attrs' : {'value' : \"hello\"}} ),_c('text', {'attrs' : {'value' : function () {return _vm.num}}} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/bubble.js b/ace-loader/test/lite/expected/bubble.js new file mode 100644 index 000000000..9a7642f93 --- /dev/null +++ b/ace-loader/test/lite/expected/bubble.js @@ -0,0 +1 @@ +{"render": "function (vm) { var _vm = vm || this; return _c('div', {'staticClass' : [\"container\"]} , [_c('div', {'onBubbleEvents' : {'click' : _vm.test1}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test2}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test3}} ),_c('div', {'catchBubbleEvents' : {'click' : _vm.test4}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test5}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test6}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test7}} ),_c('div', {'catchBubbleEvents' : {'click' : _vm.test8}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test9}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test10}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test11}} ),_c('div', {'catchCaptureEvents' : {'click' : _vm.test12}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe1},'catchCaptureEvents' : {'longpress' : _vm.longpress1}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe2},'onCaptureEvents' : {'longpress' : _vm.longpress2}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe3},'onCaptureEvents' : {'longpress' : _vm.longpress3}} ),_c('div', {'catchBubbleEvents' : {'swipe' : _vm.swipe4},'onCaptureEvents' : {'longpress' : _vm.longpress4}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe5},'catchBubbleEvents' : {'longpress' : _vm.longpress5}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe6,'longpress' : _vm.longpress6}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe7,'longpress' : _vm.longpress7}} ),_c('div', {'catchBubbleEvents' : {'swipe' : _vm.swipe8},'onBubbleEvents' : {'longpress' : _vm.longpress8}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe9},'catchBubbleEvents' : {'longpress' : _vm.longpress9}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe10},'onBubbleEvents' : {'longpress' : _vm.longpress10}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe11},'onBubbleEvents' : {'longpress' : _vm.longpress11}} ),_c('div', {'catchCaptureEvents' : {'swipe' : _vm.swipe12},'onBubbleEvents' : {'longpress' : _vm.longpress12}} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/class.js b/ace-loader/test/lite/expected/class.js new file mode 100644 index 000000000..7651b0d40 --- /dev/null +++ b/ace-loader/test/lite/expected/class.js @@ -0,0 +1 @@ +{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'staticClass' : [\"container\"]} ),_c('div', {'staticClass' : [\"container\",\"table\"]} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/event.js b/ace-loader/test/lite/expected/event.js new file mode 100644 index 000000000..1a678da2e --- /dev/null +++ b/ace-loader/test/lite/expected/event.js @@ -0,0 +1 @@ +{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'onBubbleEvents' : {'click' : _vm.test}} ),_c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(_vm.value,evt)}}} ),_c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(_vm.value,_vm.time,evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(')',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(')',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('kk',_vm.value,'dd',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(_vm.value,_vm.time,'(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',_vm.value,_vm.time,evt)}}} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/expression.js b/ace-loader/test/lite/expected/expression.js new file mode 100644 index 000000000..070d2033f --- /dev/null +++ b/ace-loader/test/lite/expected/expression.js @@ -0,0 +1 @@ +{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('text', {'attrs' : {'value' : function () {return _vm.ti||_vm.subTitle}}} ),_c('text', {'attrs' : {'value' : function () {return _vm.ti&&_vm.subTitle}}} ),_c('div', {'attrs' : {'value' : function () {return _vm.isArrived==='arrived'&&_vm.isTravel===false}}} ),_c('div', {'attrs' : {'value' : function () {return _vm.isArrived==='arrived'||_vm.isTravel===false}}} ),_c('div', {'attrs' : {'value' : function () {return !_vm.flag}}} ),_c('div', {'attrs' : {'value' : function () {return !!_vm.flag}}} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/exteriorStyle.js b/ace-loader/test/lite/expected/exteriorStyle.js new file mode 100644 index 000000000..46afd0fe2 --- /dev/null +++ b/ace-loader/test/lite/expected/exteriorStyle.js @@ -0,0 +1,92 @@ +{ + "render": "function (vm) { var _vm = vm || this; return _c('div') }", + "styleSheet": { + "@keyframes": { + "animationChange": [ + { + "backgroundColor": 16711680, + "time": 0 + }, + { + "backgroundColor": 255, + "time": 100 + } + ], + "animationChange1": [ + { + "time": 0, + "transform": { + "translateX": "120px" + } + }, + { + "time": 100, + "transform": { + "translateX": "170px" + } + } + ], + "animationChange3": [ + { + "time": 0, + "transform": { + "rotate": "0deg" + } + }, + { + "time": 100, + "transform": { + "rotate": "360deg" + } + } + ] + }, + "classSelectors": { + "a": { + "animationDelay": "300ms", + "animationDuration": "900ms", + "animationFillMode": "none", + "animationIterationCount": "1000" + }, + "b": { + "animationIterationCount": "infinite", + "backgroundImage": "url(/common/img/xmad.jpg)" + }, + "c": { + "color": 16776995, + "width": 200 + }, + "d": { + "color": 11674146 + }, + "f": { + "marginBottom": "10%", + "marginLeft": "10%", + "marginRight": "10%", + "marginTop": "10%" + }, + "g": { + "marginBottom": "108%", + "marginLeft": "-8%", + "marginRight": "2%", + "marginTop": "33%" + }, + "h": { + "left": "20%", + "top": "80%" + }, + "i": { + "height": "30%", + "width": "100%" + } + }, + "idSelectors": { + "e": { + "marginBottom": 11, + "marginLeft": 11, + "marginRight": 11, + "marginTop": 11 + } + } + } +} diff --git a/ace-loader/test/lite/expected/forDirective.js b/ace-loader/test/lite/expected/forDirective.js new file mode 100644 index 000000000..656100bc2 --- /dev/null +++ b/ace-loader/test/lite/expected/forDirective.js @@ -0,0 +1 @@ +{"render": "function (vm) { var _vm = vm || this; return _c('div', [_l((function () {return _vm.list}),function($item,$idx){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test($item,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )}),_c('div', [_l((function () {return _vm.list}),function(personItem,$idx){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test($idx,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('-') + (personItem.name) + decodeURI('--') + (personItem.age)}}} )] )}),_c('image', {'attrs' : {'src' : function () {return _vm.personItem}}} )] ),_c('div', [_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return (personIndex) + decodeURI('.') + (personItem.name)}}} )] )}),_c('swiper', {'attrs' : {'index' : function () {return _vm.personIndex},'loop' : function () {return _vm.personItem}}} )] ),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_l((function () {return _vm.menu}),function(item,index){return _c('div', [_c('text', {'attrs' : {'value' : function () {return (personItem.id) + decodeURI('--') + (item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_l((function () {return personItem}),function(item,index){return _c('div', [_c('text', {'attrs' : {'value' : function () {return (index) + decodeURI('--') + (item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_c('div', {'attrs' : {'value' : function () {return (personIndex) + decodeURI('.') + (personItem.name)}},'onBubbleEvents' : {'click' : personItem.click}} )] )}),_l((function () {return value.list}),function(index,value){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(value,evt)}}} , [_c('div', {'attrs' : {'value' : function () {return value.info}},'onBubbleEvents' : {'click' : value.click}} )] )})] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/ifDirective.js b/ace-loader/test/lite/expected/ifDirective.js new file mode 100644 index 000000000..4f82ca83a --- /dev/null +++ b/ace-loader/test/lite/expected/ifDirective.js @@ -0,0 +1 @@ +{"render": "function (vm) { var _vm = vm || this; return _c('div', [_i((function () {return _vm.conditionVar===1}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.if}}} )}),_c('div', {'staticClass' : [\"item-content\"]} , [_i((function () {return _vm.conditionVar===1}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.if}}} )}),_i((function () {return _vm.conditionVar===2&&!(_vm.conditionVar===1)}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.elif}}} )}),_i((function () {return !(_vm.conditionVar===2)&&!(_vm.conditionVar===1)}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.else}}} )})] ),_i((function () {return _vm.showTest}),function(){return _c('div', [_l((function () {return _vm.list}),function($item,$idx){return _c('div', [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function($item,$idx){return _c('div', [_i((function () {return _vm.showTest}),function(){return _c('div', [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', [_i((function () {return personIndex==1}),function(){return _c('div', [_c('text', {'attrs' : {'value' : function () {return personItem.name}}} )] )})] )})] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/importJS.js b/ace-loader/test/lite/expected/importJS.js new file mode 100644 index 000000000..7e94e674c --- /dev/null +++ b/ace-loader/test/lite/expected/importJS.js @@ -0,0 +1,4 @@ +{ + "goHome": "function goHome() {\n _system[\"default\"].replace({\n uri: \"pages/index/index\"\n });\n }", + "render": "function (vm) { var _vm = vm || this; return _c('div', [_c('image')] ) }" +} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/inlineStyle.js b/ace-loader/test/lite/expected/inlineStyle.js new file mode 100644 index 000000000..128e8f01e --- /dev/null +++ b/ace-loader/test/lite/expected/inlineStyle.js @@ -0,0 +1 @@ +{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'staticStyle' : {'width' : 10}, } ),_c('div', {'dynamicStyle' :{'height' : function () {return _vm.num}}} ),_c('text', {'staticStyle' : {'color' : 13047173}, } ),_c('div', {'staticStyle' : {'color' : 14745599}, } ),_c('div', {'staticStyle' : {'animationDelay' : \"900ms\"}, } ),_c('div', {'staticStyle' : {'animationDuration' : \"200ms\"}, } ),_c('div', {'staticStyle' : {'animationIterationCount' : \"infinite\"}, } ),_c('div', {'staticStyle' : {'animationIterationCount' : 1000}, } ),_c('div', {'staticStyle' : {'backgroundImage' : \"url(/common/img/xmad.jpg)\"}, } ),_c('div', {'staticStyle' : {'backgroundImage' : \"url(/common/img/map.jpg)\"}, } )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/music.js b/ace-loader/test/lite/expected/music.js new file mode 100644 index 000000000..d938d28b5 --- /dev/null +++ b/ace-loader/test/lite/expected/music.js @@ -0,0 +1,58 @@ +{ + "data": { + "musics": [ + { + "name": "Song1", + "singer": "player1" + }, + { + "name": "Song2", + "singer": "player2" + }, + { + "name": "Song3", + "singer": "player3" + }, + { + "name": "Song4", + "singer": "player4" + }, + { + "name": "Song5", + "singer": "player5" + }, + { + "name": "Song6", + "singer": "player6" + }, + { + "name": "Song7", + "singer": "player7" + }, + { + "name": "Song8", + "singer": "player8" + } + ] + }, + "render": "function (vm) { var _vm = vm || this; var i18ns = []; i18ns.push( _vm.$t('strings.dizziness') ); return _c('div', {'staticClass' : [\"wrapper\"]} , [_l((function () {return _vm.musics}),function(value,$idx){return _c('div', {'staticClass' : [\"music-list-item\"]} , [_c('div', {'staticStyle' : {'height' : 400,'width' : 454,'flexDirection' : \"column\"}, } , [_c('text', {'attrs' : {'value' : function () {return _vm.$t('value.name')}},'staticClass' : [\"content\"]} ),_c('text', {'attrs' : {'value' : function () {return value.name}},'staticClass' : [\"content\"]} ),_c('text', {'attrs' : {'value' : i18ns[0]},'staticClass' : [\"content\"]} ),_c('text', {'attrs' : {'value' : function () {return value.singer}},'staticClass' : [\"content\"]} )] )] )})] ) }", + "styleSheet": { + "classSelectors": { + "content": { + "fontSize": 30, + "height": 50, + "textAlign": "center", + "width": 454 + }, + "music-list-item": { + "height": 300, + "width": 454 + }, + "wrapper": { + "flexDirection": "column", + "height": 3000, + "width": 454 + } + } + } +} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/sick.js b/ace-loader/test/lite/expected/sick.js new file mode 100644 index 000000000..b83101112 --- /dev/null +++ b/ace-loader/test/lite/expected/sick.js @@ -0,0 +1,44 @@ +{ + "change": "function change() {\n _system[\"default\"].replace({\n uri: 'pages/music/music'\n });\n }", + "data": { + "dizzinessColor": "#F5B041", + "marginLeft": "77px" + }, + "render": "function (vm) { var _vm = vm || this; var i18ns = []; i18ns.push( _vm.$t('strings.choose_body_state') );i18ns.push( _vm.$t('css.measureHome_hand_top') );i18ns.push( _vm.$t('strings.chest_tightness') );i18ns.push( _vm.$t('css.judgeIos_height') );i18ns.push( _vm.$t('strings.dizziness') );i18ns.push( (i18ns[4]) + decodeURI('%20:%E5%A4%B4%E7%97%9B') );i18ns.push( (i18ns[2]) + decodeURI('%20+%20') + (i18ns[4]) ); return _c('list', {'attrs' : {'ref' : \"list\"},'staticClass' : [\"container\"],'onBubbleEvents' : {'swipe' : _vm.touchMove}} , [_c('list-item', {'staticClass' : [\"head_t\"]} , [_c('text', {'attrs' : {'value' : i18ns[0]},'staticClass' : [\"head_t_b\"],'staticStyle' : {'marginTop' : i18ns[1],'color' : 16711680}, 'dynamicStyle' :{'marginLeft' : function () {return _vm.marginLeft}}} )] ),_c('list-item', {'staticClass' : [\"list\"]} , [_c('text', {'attrs' : {'value' : i18ns[2]},'staticClass' : [\"listL\"],'staticStyle' : {'width' : i18ns[3]}, } )] ),_c('list-item', {'staticClass' : [\"list\"]} , [_c('text', {'attrs' : {'value' : i18ns[4]},'staticClass' : [\"listL\"],'staticStyle' : {'width' : i18ns[3]}, 'dynamicStyle' :{'color' : function () {return _vm.dizzinessColor}}} )] ),_c('list-item', {'staticClass' : [\"list\"]} , [_c('text', {'attrs' : {'value' : i18ns[5]},'staticClass' : [\"listL\"],'staticStyle' : {'width' : i18ns[3]}, } )] ),_c('list-item', {'staticClass' : [\"list\"]} , [_c('text', {'attrs' : {'value' : i18ns[6]},'staticClass' : [\"listL\"],'staticStyle' : {'width' : i18ns[3]}, } )] ),_c('list-item', {'staticClass' : [\"buttonContainerStyle\"]} , [_c('input', {'attrs' : {'type' : \"button\",'value' : \"下一页\"},'staticClass' : [\"buttonStyle\"],'onBubbleEvents' : {'click' : _vm.change}} )] )] ) }", + "styleSheet": { + "classSelectors": { + "buttonContainerStyle": { + "height": 80, + "width": 454 + }, + "buttonStyle": { + "height": 60, + "marginLeft": 130, + "width": 200 + }, + "container": { + "height": 454, + "width": 454 + }, + "head_t": { + "flexDirection": "column", + "height": 100, + "width": 454 + }, + "head_t_b": { + "textAlign": "center", + "width": 300 + }, + "list": { + "height": 112, + "justifyContent": "center", + "width": 454 + }, + "listL": { + "fontSize": 38, + "marginTop": 28, + "textAlign": "center" + } + } + } +} \ No newline at end of file diff --git a/ace-loader/test/lite/test.js b/ace-loader/test/lite/test.js new file mode 100644 index 000000000..213f993ea --- /dev/null +++ b/ace-loader/test/lite/test.js @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +"use strict"; + +const fs = require("fs"); +const path = require("path"); +const sinon = require("sinon"); +const { expect } = require('chai'); + +function getJsBundle(componentName) { + const filePath = path.join( + __dirname, + "testcase/build/pages", + `${componentName}`, + `${componentName}.js` + ); + const fileContent = fs.readFileSync(filePath, "utf-8"); + const fileString = fileContent.toString(); + return fileString; +} + +function getExpectedObj(componentName) { + const filepath = path.join(__dirname, "expected", `${componentName}.js`); + const expectedContent = fs.readFileSync(filepath, "utf-8"); + const expectedObj = JSON.parse(expectedContent.toString()); + return expectedObj; +} + +function getActualObj(data) { + const actualString = JSON.stringify(data, function (key, value) { + if (typeof value === "function") { + value = value.toString(); + } + return value; + }); + const actualObj = JSON.parse(actualString); + return actualObj; +} + +describe("build", () => { + let viewModelOptions; + function ViewModel(options) { + viewModelOptions = options; + } + const requireNative = sinon.stub(); + function expectActual(componentName) { + const actualStr = getJsBundle(componentName); + const fn = new Function("ViewModel", "requireNative", actualStr); + fn(ViewModel, requireNative); + expect(getActualObj(viewModelOptions)).eql( + getExpectedObj(componentName) + ); + } + it("attribute test", () => { + expectActual("attribute"); + }); + it("class test", () => { + expectActual("class"); + }); + it("event test", () => { + expectActual("event"); + }); + it("expression test", () => { + expectActual("expression"); + }); + it("exteriorStyle test", () => { + expectActual("exteriorStyle"); + }); + it("for directive", () => { + expectActual("forDirective"); + }); + it("if directive", () => { + expectActual("ifDirective"); + }); + it("importJS test", () => { + expectActual("importJS"); + }); + it("inlineStyle test", () => { + expectActual("inlineStyle"); + }); + it("bubbleEvent test", () => { + expectActual("bubble"); + }); + it("globalization performance optimization music test", () => { + expectActual("music"); + }); + it("globalization performance optimization sick test", () => { + expectActual("sick"); + }); +}); diff --git a/ace-loader/test/lite/testcase/app.js b/ace-loader/test/lite/testcase/app.js new file mode 100644 index 000000000..bb1f75249 --- /dev/null +++ b/ace-loader/test/lite/testcase/app.js @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info("AceApplication onCreate"); + }, + onDestroy() { + console.info("AceApplication onDestroy"); + } +}; diff --git a/ace-loader/test/lite/testcase/i18n/zh-CN.json b/ace-loader/test/lite/testcase/i18n/zh-CN.json new file mode 100644 index 000000000..705a62d6c --- /dev/null +++ b/ace-loader/test/lite/testcase/i18n/zh-CN.json @@ -0,0 +1,15 @@ +{ + "strings": { + "chest_tightness": "胸闷", + "dizziness": "头晕", + "choose_body_state": "选择测量身体状态" + }, + "css": { + "measureHome_hand_top": "50px", + "judgeIos_height": "454px" + }, + "value": { + "name": "日不落", + "singer": "蔡依林" + } +} diff --git a/ace-loader/test/lite/testcase/manifest.json b/ace-loader/test/lite/testcase/manifest.json new file mode 100644 index 000000000..d63b314a1 --- /dev/null +++ b/ace-loader/test/lite/testcase/manifest.json @@ -0,0 +1,21 @@ +{ + "appID": "com.example.ace.helloworld", + "appName": "HelloAce", + "versionName": "1.0.0", + "versionCode": 1, + "minPlatformVersion": "zsdk 1.0.0", + "pages": [ + "pages/attribute/attribute", + "pages/bubble/bubble", + "pages/class/class", + "pages/event/event", + "pages/expression/expression", + "pages/exteriorStyle/exteriorStyle", + "pages/forDirective/forDirective", + "pages/ifDirective/ifDirective", + "pages/importJS/importJS", + "pages/inlineStyle/inlineStyle", + "pages/music/music", + "pages/sick/sick" + ] +} diff --git a/ace-loader/test/lite/testcase/pages/attribute/attribute.hml b/ace-loader/test/lite/testcase/pages/attribute/attribute.hml new file mode 100644 index 000000000..1f6648b29 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/attribute/attribute.hml @@ -0,0 +1,17 @@ +
+ + + + + + + +
hello
+ + + hello + + + {{num}} +
+ diff --git a/ace-loader/test/lite/testcase/pages/bubble/bubble.hml b/ace-loader/test/lite/testcase/pages/bubble/bubble.hml new file mode 100644 index 000000000..1d1f35df7 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/bubble/bubble.hml @@ -0,0 +1,33 @@ +
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/ace-loader/test/lite/testcase/pages/class/class.hml b/ace-loader/test/lite/testcase/pages/class/class.hml new file mode 100644 index 000000000..aa5eb615e --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/class/class.hml @@ -0,0 +1,7 @@ +
+ +
+ + +
+
diff --git a/ace-loader/test/lite/testcase/pages/event/event.hml b/ace-loader/test/lite/testcase/pages/event/event.hml new file mode 100644 index 000000000..3939da89e --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/event/event.hml @@ -0,0 +1,31 @@ +
+ +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
diff --git a/ace-loader/test/lite/testcase/pages/expression/expression.hml b/ace-loader/test/lite/testcase/pages/expression/expression.hml new file mode 100644 index 000000000..cc9fde678 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/expression/expression.hml @@ -0,0 +1,31 @@ +
+ + + {{ti || subTitle}} + + + + + {{ti && subTitle}} + + + +
+ {{isArrived === 'arrived' && isTravel === false}} +
+ + +
+ {{isArrived === 'arrived' || isTravel === false}} +
+ + +
+ {{!flag}} +
+ + +
+ {{!!flag}} +
+
diff --git a/ace-loader/test/lite/testcase/pages/exteriorStyle/exteriorStyle.css b/ace-loader/test/lite/testcase/pages/exteriorStyle/exteriorStyle.css new file mode 100644 index 000000000..80c733b04 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/exteriorStyle/exteriorStyle.css @@ -0,0 +1,84 @@ +/* exteriorStyle_Compiler_Test_001 */ +.a { + animation-delay: 300ms; + animation-iteration-count: 1000; + animation-duration: 900ms; + animation-fill-mode: none; +} + +/* exteriorStyle_Compiler_Test_002 */ +.b { + animation-iteration-count: infinite; + background-image: url(/common/img/xmad.jpg); +} + +/* exteriorStyle_Compiler_Test_003 */ +.c { + width: 200px; + color: #ffff23; +} + +/* exteriorStyle_Compiler_Test_004 */ +.d { + color: firebrick; +} + +/* exteriorStyle_Compiler_Test_005 */ +#e { + margin: 11px; +} + +/* exteriorStyle_Compiler_Test_006 */ +@keyframes animationChange { + from { + background-color: #ff0000; + } + to { + background-color: #0000ff; + } +} + +/* exteriorStyle_Compiler_Test_007 */ +@keyframes animationChange1 { + from { + transform: translateX(120px); + } + to { + transform: translateX(170px); + } +} + +/* exteriorStyle_Compiler_Test_008 */ +@keyframes animationChange3 { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +/* exteriorStyle_Compiler_Test_009 */ +.f { + margin: 10%; +} + +/* exteriorStyle_Compiler_Test_010 */ +.g { + margin-left: -8%; + margin-right: 2%; + margin-top: 33%; + margin-bottom: 108%; +} + +/* exteriorStyle_Compiler_Test_011 */ +.h { + top: 80%; + left: 20%; +} + +/* exteriorStyle_Compiler_Test_012 */ +.i { + height: 30%; + width: 100%; +} diff --git a/ace-loader/test/lite/testcase/pages/exteriorStyle/exteriorStyle.hml b/ace-loader/test/lite/testcase/pages/exteriorStyle/exteriorStyle.hml new file mode 100644 index 000000000..094418b68 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/exteriorStyle/exteriorStyle.hml @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/ace-loader/test/lite/testcase/pages/forDirective/forDirective.hml b/ace-loader/test/lite/testcase/pages/forDirective/forDirective.hml new file mode 100644 index 000000000..9162eee9b --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/forDirective/forDirective.hml @@ -0,0 +1,49 @@ +
+ +
+ {{$idx}}.{{$item.name}} +
+ + +
+
+ {{$idx}}-{{personItem.name}}--{{personItem.age}} +
+ +
+ + +
+
+ {{personIndex}}.{{personItem.name}} +
+ +
+ + +
+
+ {{personItem.id}}--{{item.name}} +
+
+ + +
+
+ {{index}}--{{item.name}} +
+
+ + +
+
+ {{personIndex}}.{{personItem.name}} +
+
+ + +
+
{{value.info}}
+
+
+ diff --git a/ace-loader/test/lite/testcase/pages/ifDirective/ifDirective.hml b/ace-loader/test/lite/testcase/pages/ifDirective/ifDirective.hml new file mode 100644 index 000000000..86bd015a8 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/ifDirective/ifDirective.hml @@ -0,0 +1,32 @@ +
+ + {{componentData.if}} + + +
+ {{componentData.if}} + {{componentData.elif}} + {{componentData.else}} +
+ + +
+
+ {{$idx}}.{{$item.name}} +
+
+ + +
+
+ {{$idx}}.{{$item.name}} +
+
+ + +
+
+ {{personItem.name}} +
+
+
\ No newline at end of file diff --git a/ace-loader/test/lite/testcase/pages/importJS/importJS.hml b/ace-loader/test/lite/testcase/pages/importJS/importJS.hml new file mode 100644 index 000000000..755bbd38c --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/importJS/importJS.hml @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/ace-loader/test/lite/testcase/pages/importJS/importJS.js b/ace-loader/test/lite/testcase/pages/importJS/importJS.js new file mode 100644 index 000000000..7aae1624e --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/importJS/importJS.js @@ -0,0 +1,8 @@ +/* Test import syntax */ +import router from "@system.router"; + +export default { + goHome() { + router.replace({ uri: "pages/index/index" }); + } +} \ No newline at end of file diff --git a/ace-loader/test/lite/testcase/pages/inlineStyle/inlineStyle.hml b/ace-loader/test/lite/testcase/pages/inlineStyle/inlineStyle.hml new file mode 100644 index 000000000..2e6ddf6e4 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/inlineStyle/inlineStyle.hml @@ -0,0 +1,31 @@ +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
diff --git a/ace-loader/test/lite/testcase/pages/music/music.css b/ace-loader/test/lite/testcase/pages/music/music.css new file mode 100644 index 000000000..fa1cf9dbb --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/music/music.css @@ -0,0 +1,16 @@ +.wrapper { + height: 3000px; + width: 454px; + flex-direction: column; +} +.music-list-item { + width: 454px; + height: 300px; +} +.content { + height: 50px; + width: 454px; + text-align: center; + font-size: 30px; +} + diff --git a/ace-loader/test/lite/testcase/pages/music/music.hml b/ace-loader/test/lite/testcase/pages/music/music.hml new file mode 100644 index 000000000..2de193044 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/music/music.hml @@ -0,0 +1,15 @@ +
+
+
+ {{$t('value.name')}} + + {{value.name}} + + {{$t('strings.dizziness')}} + + {{value.singer}} + +
+
+
+ diff --git a/ace-loader/test/lite/testcase/pages/music/music.js b/ace-loader/test/lite/testcase/pages/music/music.js new file mode 100644 index 000000000..41778f450 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/music/music.js @@ -0,0 +1,38 @@ +export default { + data: { + musics: [ + { + name: 'Song1', + singer: 'player1', + }, + { + name: 'Song2', + singer: 'player2', + }, + { + name: 'Song3', + singer: 'player3', + }, + { + name: 'Song4', + singer: 'player4', + }, + { + name: 'Song5', + singer: 'player5', + }, + { + name: 'Song6', + singer: 'player6', + }, + { + name: 'Song7', + singer: 'player7', + }, + { + name: 'Song8', + singer: 'player8', + }, + ], + }, +}; diff --git a/ace-loader/test/lite/testcase/pages/sick/sick.css b/ace-loader/test/lite/testcase/pages/sick/sick.css new file mode 100644 index 000000000..7ca353764 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/sick/sick.css @@ -0,0 +1,34 @@ +.container { + width: 454px; + height: 454px; +} +.head_t { + width: 454px; + height: 100px; + flex-direction: column; +} +.head_t_b { + width: 300px; + text-align: center; +} +.list { + width: 454px; + height: 112px; + justify-content: center; +} +.listL { + margin-top: 28px; + font-size: 38px; + text-align: center; +} + +.buttonContainerStyle { + width: 454px; + height: 80px; +} + +.buttonStyle { + width: 200px; + height: 60px; + margin-left: 130px; +} diff --git a/ace-loader/test/lite/testcase/pages/sick/sick.hml b/ace-loader/test/lite/testcase/pages/sick/sick.hml new file mode 100644 index 000000000..155124736 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/sick/sick.hml @@ -0,0 +1,20 @@ + + + {{$t('strings.choose_body_state')}} + + + {{$t('strings.chest_tightness')}} + + + {{$t('strings.dizziness')}} + + + {{$t('strings.dizziness')}} :头痛 + + + {{$t('strings.chest_tightness')}} + {{$t('strings.dizziness')}} + + + + + diff --git a/ace-loader/test/lite/testcase/pages/sick/sick.js b/ace-loader/test/lite/testcase/pages/sick/sick.js new file mode 100644 index 000000000..b8366edc8 --- /dev/null +++ b/ace-loader/test/lite/testcase/pages/sick/sick.js @@ -0,0 +1,10 @@ +import router from '@system.router'; +export default { + data: { + marginLeft: '77px', + dizzinessColor: '#F5B041', + }, + change() { + router.replace({ uri: 'pages/music/music' }); + }, +}; diff --git a/ace-loader/test/rich/common/css/common.css b/ace-loader/test/rich/common/css/common.css new file mode 100644 index 000000000..984f90249 --- /dev/null +++ b/ace-loader/test/rich/common/css/common.css @@ -0,0 +1,26 @@ +.page-title-wrap { + padding-top: 50px; + padding-bottom: 80px; + justify-content: center; +} +.page-title{ + padding-top: 30px; + padding-bottom: 30px; + padding-left: 40px; + padding-right: 40px; + border-color: #bbbbbb; + color: #bbbbbb; + border-bottom-width: 2px; +} + +.btn { + height: 80px; + text-align: center; + border-radius: 5px; + margin-right: 60px; + margin-left: 60px; + margin-bottom: 50px; + color: #ffffff; + font-size: 30px; + background-color: #0faeff; +} \ No newline at end of file diff --git a/ace-loader/test/rich/common/css/media.css b/ace-loader/test/rich/common/css/media.css new file mode 100644 index 000000000..d458ca082 --- /dev/null +++ b/ace-loader/test/rich/common/css/media.css @@ -0,0 +1,15 @@ +@media screen and (min-width: 600) and (max-width: 1200) { + .header { + width: 100%; + height: 60px; + font-size: 16px; + align-items: center; + justify-content: center; + } + + .footer { + width: 100%; + height: 40px; + align-items: center; + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/class.js b/ace-loader/test/rich/expected/class.js new file mode 100644 index 000000000..98a4c0dc0 --- /dev/null +++ b/ace-loader/test/rich/expected/class.js @@ -0,0 +1,68 @@ +{ + "@app-component/class": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "className": "container", + "debugLine": "pages/class/class:1" + }, + "classList": [ + "container" + ], + "children": [ + { + "type": "div", + "attr": { + "className": "title", + "debugLine": "pages/class/class:3", + "value": "class_test1" + }, + "classList": [ + "title" + ] + }, + { + "type": "div", + "attr": { + "className": "title table", + "debugLine": "pages/class/class:6", + "value": "class_test2" + }, + "classList": [ + "title", + "table" + ] + }, + { + "type": "div", + "attr": { + "className": "{{flag ? 'item' : 'item-selected'}}", + "debugLine": "pages/class/class:9", + "value": "class_test3" + }, + "classList": "function () {return [this.flag?'item':'item-selected']}" + }, + { + "type": "div", + "attr": { + "className": "{{a}} {{c}}", + "debugLine": "pages/class/class:12", + "value": "class_test4" + }, + "classList": "function () {return [this.a, this.c]}" + }, + { + "type": "div", + "attr": { + "className": "{{$idx}}{{d}} + {{$item.id}} aa", + "debugLine": "pages/class/class:15", + "value": "class_test5" + }, + "classList": "function () {return [this.$idx+this.d, '+', this.$item.id, 'aa']}" + } + ] + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/commonAttr.js b/ace-loader/test/rich/expected/commonAttr.js new file mode 100644 index 000000000..9a59e7864 --- /dev/null +++ b/ace-loader/test/rich/expected/commonAttr.js @@ -0,0 +1,124 @@ +{ + "@app-component/commonAttr": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:1", + "className": "container" + }, + "classList": [ + "container" + ], + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:3", + "id": "abc", + "value": "id_test1" + }, + "id": "abc" + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:6", + "id": "function () {return this.aa}", + "value": "id_test2" + }, + "id": "function () {return this.aa}" + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:9", + "ref": "ref", + "value": "ref_test" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:12", + "disabled": "true", + "value": "disabled_test1" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:15", + "disabled": "function () {return this.disabled}", + "value": "disabled_test2" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:18", + "tid": "def", + "value": "tid_test1" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:21", + "tid": "function () {return this.bb}", + "value": "tid_test2" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:24", + "show": "true", + "value": "show_test1" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:27", + "show": "function () {return this.showTest}", + "value": "show_test2" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:30", + "data": "abd", + "value": "data_test1" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:33", + "data": "function () {return this.data}", + "value": "data_test2" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:36", + "focusable": "true", + "value": "focusable_test1" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/commonAttr/commonAttr:39", + "focusable": "function () {return this.focusable}", + "value": "focusable_test2" + } + } + ] + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/event.js b/ace-loader/test/rich/expected/event.js new file mode 100644 index 000000000..a3c8317f4 --- /dev/null +++ b/ace-loader/test/rich/expected/event.js @@ -0,0 +1,176 @@ +{ + "@app-component/event": { + "_descriptor": {}, + "data": {}, + "template": { + "attr": { + "debugLine": "pages/event/event:1" + }, + "children": [ + { + "attr": { + "debugLine": "pages/event/event:3" + }, + "events": { + "click": "test" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/event/event:6" + }, + "events": { + "click": "function (evt) {this.test(this.value,evt)}" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/event/event:9" + }, + "events": { + "click": "function (evt) {this.test(this.value,this.time,evt)}" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/event/event:12" + }, + "events": { + "click": "test" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/event/event:15" + }, + "events": { + "click": "function (evt) {this.test(this.value,evt)}" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/event/event:18" + }, + "events": { + "click": "function (evt) {this.test(this.value,this.time,evt)}" + }, + "type": "div" + }, + { + "type": "input", + "attr": { + "debugLine": "pages/event/event:21" + }, + "events": { + "click": "function (evt) {this.handleInput('(',evt)}" + } + }, + { + "type": "input", + "attr": { + "debugLine": "pages/event/event:24" + }, + "events": { + "click": "function (evt) {this.handleInput(')',evt)}" + } + }, + { + "type": "input", + "attr": { + "debugLine": "pages/event/event:27" + }, + "events": { + "click": "function (evt) {this.handleInput('(',this.value,this.time,evt)}" + } + }, + { + "attr": { + "debugLine": "pages/event/event:30" + }, + "type": "div", + "onBubbleEvents": { + "touchstart": "test1" + } + }, + { + "attr": { + "debugLine": "pages/event/event:31" + }, + "type": "div", + "onBubbleEvents": { + "touchstart": "test2" + } + }, + { + "attr": { + "debugLine": "pages/event/event:32" + }, + "type": "div", + "onBubbleEvents": { + "touchstart": "test3" + } + }, + { + "attr": { + "debugLine": "pages/event/event:33" + }, + "type": "div", + "catchBubbleEvents": { + "touchstart": "test4" + } + }, + { + "attr": { + "debugLine": "pages/event/event:34" + }, + "type": "div", + "onBubbleEvents": { + "touchstart": "test5" + } + }, + { + "attr": { + "debugLine": "pages/event/event:35" + }, + "type": "div", + "onBubbleEvents": { + "touchstart": "test6" + } + }, + { + "attr": { + "debugLine": "pages/event/event:36" + }, + "type": "div", + "catchBubbleEvents": { + "touchstart": "test7" + } + }, + { + "attr": { + "debugLine": "pages/event/event:37" + }, + "type": "div", + "onCaptureEvents": { + "touchstart": "test8" + } + }, + { + "attr": { + "debugLine": "pages/event/event:38" + }, + "type": "div", + "catchCaptureEvents": { + "touchstart": "test9" + } + } + ], + "type": "div" + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/expression.js b/ace-loader/test/rich/expected/expression.js new file mode 100644 index 000000000..5c6f7464f --- /dev/null +++ b/ace-loader/test/rich/expected/expression.js @@ -0,0 +1,381 @@ +{ + "@app-component/expression": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "debugLine": "pages/expression/expression:1" + }, + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:3", + "value": "function () {return this.ti||this.subTitle}" + } + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:8", + "value": "function () {return this.ti&&this.subTitle}" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/expression/expression:13", + "value": "function () {return this.isArrived==='arrived'&&this.isTravel===false}" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/expression/expression:18", + "value": "function () {return this.isArrived==='arrived'||this.isTravel===false}" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/expression/expression:23", + "value": "function () {return !this.flag}" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/expression/expression:28", + "value": "function () {return !!this.flag}" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/expression/expression:33", + "className": "container" + }, + "classList": [ + "container" + ], + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:34", + "className": "text-text", + "value": "function () {return false?0:4}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:35", + "className": "text-text", + "value": "function () {return this.a}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:36", + "className": "text-text", + "value": "function () {return false?0:this.b}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:37", + "className": "text-text", + "value": "function () {return false?0:null}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:38", + "className": "{{this.a}}{{Math.PI}}" + }, + "classList": "function () {return [this.a+Math.PI]}" + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:39", + "className": "text-text", + "value": "function () {return 1>this.b?this.v>4?this.a:6:7}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "text", + "attr": { + "className": "text-text", + "debugLine": "pages/expression/expression:40", + "value": "function () {return false?0:7}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "text", + "attr": { + "className": "text-text", + "debugLine": "pages/expression/expression:41", + "value": "function () {return false?0:7}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "text", + "attr": { + "className": "text-text", + "debugLine": "pages/expression/expression:42", + "value": "function () {return typeof 1}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "text", + "attr": { + "className": "text-text", + "debugLine": "pages/expression/expression:43", + "value": "function () {return new RegExp('123')}" + }, + "classList": [ + "text-text" + ] + }, + { + "type": "input", + "attr": { + "debugLine": "pages/expression/expression:44", + "value": "function () {return 'ABCDEFG'.toLowerCase()}" + } + }, + { + "type": "input", + "attr": { + "debugLine": "pages/expression/expression:45", + "value": "function () {return this.ns[1]}" + } + }, + { + "type": "input", + "attr": { + "debugLine": "pages/expression/expression:46", + "value": "function () {return this.a.b.c.d}" + } + }, + { + "type": "input", + "attr": { + "debugLine": "pages/expression/expression:47", + "value": "function () {return this.a.b.c[1]}" + } + }, + { + "type": "input", + "attr": { + "debugLine": "pages/expression/expression:48", + "value": "function () {return this.a.b.c[1]}" + } + }, + { + "type": "text", + "attr": { + "className": "tab-text", + "debugLine": "pages/expression/expression:49", + "value": "function () {return this.$t('strings.home.tabsData')[this.$item].name}" + }, + "classList": [ + "tab-text" + ], + "repeat": "function () {return this.tabsContent}" + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:50", + "value": "a" + }, + "shown": "function () {return this.showauto}" + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:51", + "value": "b" + }, + "shown": "function () {return !this.showauto}" + }, + { + "type": "button", + "attr": { + "className": "button_menu", + "debugLine": "pages/expression/expression:52", + "value": "go to demo ability" + }, + "classList": [ + "button_menu" + ], + "events": { + "click": "function (evt) {this.startAbility('com.example.showcases','ShowcasesAbility',{origin:'showcases'},evt)}" + } + }, + { + "type": "div", + "attr": { + "className": "item-content", + "debugLine": "pages/expression/expression:53" + }, + "classList": [ + "item-content" + ], + "children": [ + { + "type": "picker", + "attr": { + "className": "picker", + "debugLine": "pages/expression/expression:54", + "type": "multi-text", + "range": "function () {return this.range1.arr}", + "value": "function () {return this.curDate}", + "selected": "function () {return this.lastSelected}", + "id": "picker1" + }, + "classList": [ + "picker" + ], + "events": { + "change": "getDate", + "cancel": "cancel" + }, + "id": "picker1" + } + ] + }, + { + "type": "div", + "attr": { + "className": "content_for", + "debugLine": "pages/expression/expression:57" + }, + "classList": [ + "content_for" + ], + "children": [ + { + "type": "text", + "attr": { + "className": "topic", + "debugLine": "pages/expression/expression:58", + "value": "测试show,if,for渲染属性" + }, + "classList": [ + "topic" + ] + }, + { + "type": "text", + "attr": { + "className": "text_large", + "debugLine": "pages/expression/expression:59", + "tid": "id", + "value": "function () {return (this.$idx) + decodeURI('+') + (this.$item.id)}" + }, + "classList": [ + "text_large" + ], + "repeat": "function () {return this.list}" + }, + { + "type": "text", + "attr": { + "className": "text_large", + "debugLine": "pages/expression/expression:60", + "value": "点击显示的文本,点击此处显示show文本" + }, + "classList": [ + "text_large" + ], + "shown": "function () {return this.click}", + "events": { + "click": "change_showon" + } + }, + { + "type": "text", + "attr": { + "className": "text_large", + "debugLine": "pages/expression/expression:61", + "value": "长按显示的文本,点击此处隐藏show文本" + }, + "classList": [ + "text_large" + ], + "shown": "function () {return this.longpress&&!this.click}", + "events": { + "longpress": "change_showoff" + } + }, + { + "type": "text", + "attr": { + "debugLine": "pages/expression/expression:62", + "value": "默认显示的文本" + }, + "shown": "function () {return !this.longpress&&!this.click}" + }, + { + "type": "text", + "attr": { + "className": "text", + "debugLine": "pages/expression/expression:63", + "show": "function () {return this.showTest}", + "value": "show显示的文本" + }, + "classList": [ + "text" + ] + } + ] + }, + { + "type": "text", + "attr": { + "className": "remain_day_number", + "debugLine": "pages/expression/expression:65", + "value": "function () {return this.$t('strings.remain_days',{year:this.currentYear,day:this.countDownDays})}" + }, + "classList": [ + "remain_day_number" + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/exteriorStyle.js b/ace-loader/test/rich/expected/exteriorStyle.js new file mode 100644 index 000000000..3c085d5f6 --- /dev/null +++ b/ace-loader/test/rich/expected/exteriorStyle.js @@ -0,0 +1,268 @@ +{ + "@app-component/exteriorStyle": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "debugLine": "pages/exteriorStyle/exteriorStyle:1", + "value": "exteriorStyle_test" + } + }, + "style": { + ".a": { + "width": "100%", + "height": "50%" + }, + ".b": { + "width": "100px", + "height": "200px" + }, + ".c": { + "color": "#808080" + }, + ".d": { + "color": "#008000" + }, + ".e": { + "color": "rgba(80,60,150,1)" + }, + ".f": { + "animationDuration": "500ms", + "animationDelay": "100ms" + }, + ".g": { + "animationIterationCount": 3 + }, + ".h": { + "animationTimingFunction": "linear" + }, + ".h-steps": { + "animationTimingFunction": "steps(9,start)" + }, + ".i": { + "animationFillMode": "forwards" + }, + ".j": { + "gridTemplateColumns": "50px 40px 80px", + "gridTemplateRows": "auto-fill 20px" + }, + ".l": { + "gridRowStart": 3 + }, + ".m": { + "borderTopWidth": "5px", + "borderRightWidth": "5px", + "borderBottomWidth": "5px", + "borderLeftWidth": "5px", + "borderTopStyle": "solid", + "borderRightStyle": "solid", + "borderBottomStyle": "solid", + "borderLeftStyle": "solid", + "borderTopColor": "#808080", + "borderRightColor": "#808080", + "borderBottomColor": "#808080", + "borderLeftColor": "#808080" + }, + ".n": { + "textIndent": "50px" + }, + ".o": { + "backgroundImage": "/common/img/a.jpg" + }, + "@TRANSITION": { + ".p": { + "property": "width" + }, + ".q": { + "duration": "5s" + } + }, + ".p": { + "transitionProperty": "width" + }, + ".q": { + "transitionDuration": "5s" + }, + ".r": { + "transform": "{\"translate\":\"50% 50%\"}" + }, + ".s": { + "transformOrigin": "20% 40%" + }, + ".t": { + "startAngle": "240deg" + }, + ".u": { + "selectedFontFamily": "PingFangSC-Regular" + }, + ".v": { + "paddingTop": "10px", + "paddingRight": "15px", + "paddingBottom": "10px", + "paddingLeft": "15px" + }, + "#w": { + "fontSize": "15px", + "fontFamily": "PingFangSC-Regular" + }, + "@KEYFRAMES": { + "animation1": [ + { + "backgroundColor": "#808080", + "time": 0 + }, + { + "backgroundColor": "#000000", + "time": "50" + }, + { + "backgroundColor": "#000fff", + "time": 100 + } + ], + "animation2": [ + { + "transform": "{\"translateX\":\"90px\"}", + "time": 0 + }, + { + "transform": "{\"translateX\":\"130px\"}", + "time": "50" + }, + { + "transform": "{\"translateX\":\"200px\"}", + "time": 100 + } + ], + "animation3": [ + { + "transform": "{\"rotate\":\"90deg\"}", + "time": 0 + }, + { + "transform": "{\"rotate\":\"150deg\"}", + "time": "50" + }, + { + "transform": "{\"rotate\":\"260deg\"}", + "time": 100 + } + ], + "animation4": [ + { + "transform": "{\"rotate\":\"0.25turn\"}", + "time": 0 + }, + { + "transform": "{\"rotate\":\"57deg\"}", + "time": "50" + }, + { + "transform": "{\"rotate\":\"400grad\"}", + "time": 100 + } + ], + "shared-transition": [ + { + "opacity": 0, + "time": 0 + }, + { + "opacity": 1, + "time": 100 + } + ] + }, + ".gradient1": { + "background": "{\"values\":[{\"type\":\"linearGradient\",\"directions\":[\"to\",\"bottom\"],\"values\":[\"#ff0000\",\"#00ff00\"]}]}" + }, + ".gradient2": { + "background": "{\"values\":[{\"type\":\"linearGradient\",\"directions\":[\"45deg\"],\"values\":[\"rgb(255,0,0)\",\"rgb(0,255,0)\"]}]}" + }, + ".gradient3": { + "background": "{\"values\":[{\"type\":\"linearGradient\",\"directions\":[\"to\",\"right\"],\"values\":[\"rgb(255,0,0) 90px\",\"rgb(0,0,255) 60%\"]}]}" + }, + ".gradient4": { + "background": "{\"values\":[{\"type\":\"repeatingLinearGradient\",\"directions\":[\"to\",\"right\"],\"values\":[\"rgba(255,255,0,1) 30px\",\"rgba(0,0,255,0.5) 60px\"]}]}" + }, + ".shared-transition-style": { + "sharedTransitionEffect": "static", + "sharedTransitionName": "shared-transition" + }, + "@FONT-FACE": [ + { + "fontFamily": "HWfont", + "src": "url(/common/HWfont.ttf)" + } + ], + ".txt": { + "fontFamily": "HWfont" + }, + ".shadow": { + "boxShadowBlur": "30px", + "boxShadowColor": "#888888", + "boxShadowH": "100px", + "boxShadowSpread": "40px", + "boxShadowV": "100px" + }, + ".transform-origin-style1":{ + "transformOrigin": "left" + }, + ".transform-origin-style2":{ + "transformOrigin": "left bottom" + }, + ".transform-origin-style3":{ + "transformOrigin": "right 90px" + }, + ".transform-style1":{ + "transform": "{\"translate3d\":\"1px 2px 3px\"}" + }, + ".transform-style2":{ + "transform": "{\"matrix\":\"1 2 3 4 5 6\"}" + }, + ".transform-style3":{ + "transform": "{\"matrix3d\":\"1 0 0 0 0 1 6 0 0 0 1 0 50 100 0 1.1\"}" + }, + ".transform-style4":{ + "transform": "{}" + }, + ".transform-style5":{ + "transform": "{\"rotate3d\":\"1 1 1 30deg\",\"translate3d\":\"1px 2px 3px\",\"scale3d\":\"1.5 1.5 1.5\",\"perspective\":\"800px\"}" + }, + ".simple-animation1":{ + "animationDuration": "3s", + "animationTimingFunction": "ease-in", + "animationDelay": "1s", + "animationIterationCount": 2, + "animationDirection": "reverse", + "animationFillMode": "both", + "animationPlayState": "paused", + "animationName": "slidein" + }, + ".simple-animation2":{ + "animationDuration": "3s", + "animationTimingFunction": "linear", + "animationDelay": "1s", + "animationDirection": "normal", + "animationPlayState": "running", + "animationIterationCount": 1, + "animationFillMode": "none", + "animationName": "test_05" + }, + ".simple-animation3":{ + "animationDuration": "3s", + "animationDelay": "0ms", + "animationDirection": "normal", + "animationTimingFunction": "ease", + "animationPlayState": "running", + "animationIterationCount": 1, + "animationFillMode": "none", + "animationName": "sliding-vertically" + }, + ".mask-image-url1": { + "maskImage": "common/mask.svg" + } + } + } +} diff --git a/ace-loader/test/rich/expected/forDirective.js b/ace-loader/test/rich/expected/forDirective.js new file mode 100644 index 000000000..6ad146185 --- /dev/null +++ b/ace-loader/test/rich/expected/forDirective.js @@ -0,0 +1,260 @@ +{ + "@app-component/forDirective": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "debugLine": "pages/forDirective/forDirective:1" + }, + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/forDirective/forDirective:3" + }, + "repeat": "function () {return this.list}", + "events": { + "click": "function (evt) {this.test(this.$item,evt)}" + }, + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/forDirective/forDirective:4", + "value": "function () {return (this.$idx) + decodeURI('.') + (this.$item.name)}" + } + } + ] + }, + { + "type": "div", + "attr": { + "debugLine": "pages/forDirective/forDirective:8" + }, + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/forDirective/forDirective:9" + }, + "repeat": { + "exp": "function () {return this.list}", + "value": "personItem" + }, + "events": { + "click": "function (evt) {this.test(this.$idx,evt)}" + }, + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/forDirective/forDirective:10", + "value": "function () {return (this.$idx) + decodeURI('-') + (this.personItem.name) + decodeURI('--') + (this.personItem.age)}" + } + } + ] + }, + { + "type": "image", + "attr": { + "debugLine": "pages/forDirective/forDirective:12", + "src": "function () {return this.personItem}" + } + } + ] + }, + { + "type": "div", + "attr": { + "debugLine": "pages/forDirective/forDirective:16" + }, + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/forDirective/forDirective:17" + }, + "repeat": { + "exp": "function () {return this.flexShrinkClass}", + "value": "shrinkClass", + "exp": "function () {return this.list}", + "key": "personIndex", + "value": "personItem" + }, + "events": { + "click": "function (evt) {this.test(this.personItem,evt)}" + }, + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/forDirective/forDirective:18", + "value": "function () {return (this.personIndex) + decodeURI('.') + (this.personItem.name)}" + } + } + ] + }, + { + "type": "swiper", + "attr": { + "debugLine": "pages/forDirective/forDirective:20", + "index": "function () {return this.personIndex}", + "loop": "function () {return this.personItem}" + } + } + ] + }, + { + "attr": { + "debugLine": "pages/forDirective/forDirective:24" + }, + "children": [ + { + "attr": { + "debugLine": "pages/forDirective/forDirective:25" + }, + "children": [ + { + "attr": { + "debugLine": "pages/forDirective/forDirective:26", + "value": "function () {return (this.personItem.id) + decodeURI('--') + (this.item.name)}" + }, + "type": "text" + } + ], + "repeat": { + "exp": "function () {return this.menu}", + "key": "index", + "value": "item" + }, + "type": "div" + } + ], + "events": { + "click": "function (evt) {this.test(this.personItem,evt)}" + }, + "repeat": { + "exp": "function () {return this.list}", + "key": "personIndex", + "value": "personItem" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/forDirective/forDirective:31" + }, + "children": [ + { + "attr": { + "debugLine": "pages/forDirective/forDirective:32" + }, + "children": [ + { + "attr": { + "debugLine": "pages/forDirective/forDirective:33", + "value": "function () {return (this.index) + decodeURI('--') + (this.item.name)}" + }, + "type": "text" + } + ], + "repeat": { + "exp": "function () {return this.personItem}", + "key": "index", + "value": "item" + }, + "type": "div" + } + ], + "events": { + "click": "function (evt) {this.test(this.personItem,evt)}" + }, + "repeat": { + "exp": "function () {return this.list}", + "key": "personIndex", + "value": "personItem" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/forDirective/forDirective:39" + }, + "children": [ + { + "attr": { + "debugLine": "pages/forDirective/forDirective:40", + "value": "function () {return (this.personIndex) + decodeURI('.') + (this.personItem.name)}" + }, + "events": { + "click": "personItem.click" + }, + "type": "div" + } + ], + "events": { + "click": "function (evt) {this.test(this.personItem,evt)}" + }, + "repeat": { + "exp": "function () {return this.list}", + "key": "personIndex", + "value": "personItem" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/forDirective/forDirective:46" + }, + "children": [ + { + "attr": { + "debugLine": "pages/forDirective/forDirective:47", + "value": "function () {return this.value.info}" + }, + "events": { + "click": "value.click" + }, + "type": "div" + } + ], + "events": { + "click": "function (evt) {this.test(this.value,evt)}" + }, + "repeat": { + "exp": "function () {return this.value.list}", + "key": "value", + "value": "index" + }, + "type": "div" + }, + { + "attr": { + "debugLine": "pages/forDirective/forDirective:51" + }, + "children": [ + { + "attr": { + "debugLine": "pages/forDirective/forDirective:52", + "value": "function () {return this.value.info}" + }, + "events": { + "click": "value.click" + }, + "type": "div" + } + ], + "events": { + "click": "function (evt) {this.test(this.value,evt)}" + }, + "repeat": { + "exp": "function () {return this.flexShrinkClass}", + "value": "shrinkClass" + }, + "type": "div" + } + ] + } + } +} diff --git a/ace-loader/test/rich/expected/ifDirective.js b/ace-loader/test/rich/expected/ifDirective.js new file mode 100644 index 000000000..7938f03bd --- /dev/null +++ b/ace-loader/test/rich/expected/ifDirective.js @@ -0,0 +1,154 @@ +{ + "@app-component/ifDirective": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:1" + }, + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:3", + "value": "function () {return this.componentData.if}" + }, + "shown": "function () {return this.conditionVar===1}" + }, + { + "type": "div", + "attr": { + "className": "item-content", + "debugLine": "pages/ifDirective/ifDirective:6" + }, + "classList": [ + "item-content" + ], + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:7", + "value": "function () {return this.componentData.if}" + }, + "shown": "function () {return this.conditionVar===1}" + }, + { + "type": "text", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:8", + "value": "function () {return this.componentData.elif}" + }, + "shown": "function () {return this.conditionVar===2&&!(this.conditionVar===1)}" + }, + { + "type": "text", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:9", + "value": "function () {return this.componentData.else}" + }, + "shown": "function () {return !(this.conditionVar===2)&&!(this.conditionVar===1)}" + } + ] + }, + { + "type": "div", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:13" + }, + "shown": "function () {return this.showTest}", + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:14" + }, + "repeat": "function () {return this.list}", + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:15", + "value": "function () {return (this.$idx) + decodeURI('.') + (this.$item.name)}" + } + } + ] + } + ] + }, + { + "type": "div", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:20" + }, + "repeat": "function () {return this.list}", + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:21" + }, + "shown": "function () {return !this.showTest}", + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:22", + "value": "function () {return (this.$idx) + decodeURI('.') + (this.$item.name)}" + } + } + ] + } + ] + }, + { + "type": "div", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:27" + }, + "repeat": { + "exp": "function () {return this.list}", + "key": "personIndex", + "value": "personItem" + }, + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:28" + }, + "shown": "function () {return this.personIndex==1}", + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:29", + "value": "function () {return this.personItem.name}" + } + } + ] + } + ] + }, + { + "type": "div", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:34" + }, + "shown": "function () {return this.num1>this.num2?this.true_value:this.false_value}", + "children": [ + { + "type": "text", + "attr": { + "debugLine": "pages/ifDirective/ifDirective:35", + "value": "function () {return this.true_value}" + } + } + ] + } + ] + } + } + +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/importCSS.js b/ace-loader/test/rich/expected/importCSS.js new file mode 100644 index 000000000..1af384c73 --- /dev/null +++ b/ace-loader/test/rich/expected/importCSS.js @@ -0,0 +1,63 @@ +{ + "@app-component/importCSS": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "debugLine": "pages/importCSS/importCSS:1", + "value": "importCSS_test" + } + }, + "style": { + ".page-title-wrap": { + "paddingTop": "50px", + "paddingBottom": "80px", + "justifyContent": "center" + }, + ".page-title": { + "paddingTop": "30px", + "paddingBottom": "30px", + "paddingLeft": "40px", + "paddingRight": "40px", + "borderTopColor": "#bbbbbb", + "borderRightColor": "#bbbbbb", + "borderBottomColor": "#bbbbbb", + "borderLeftColor": "#bbbbbb", + "color": "#bbbbbb", + "borderBottomWidth": "2px" + }, + ".btn": { + "height": "80px", + "textAlign": "center", + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "marginRight": "60px", + "marginLeft": "60px", + "marginBottom": "50px", + "color": "#ffffff", + "fontSize": "30px", + "backgroundColor": "#0faeff" + }, + ".container": { + "justifyContent": "center", + "alignItems": "center" + }, + ".title": { + "color": "#333333", + "fontSize": "16px" + }, + ".title span": { + "color": "#FF0000" + }, + "#button": { + "fontSize": "16px", + "paddingTop": "50px", + "alignItems": "center", + "justifyContent": "center" + } + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/importJS.js b/ace-loader/test/rich/expected/importJS.js new file mode 100644 index 000000000..0a916f781 --- /dev/null +++ b/ace-loader/test/rich/expected/importJS.js @@ -0,0 +1,44 @@ +{ + "@app-component/importJS": { + "_descriptor": {}, + "back": "function back() {\n _system[\"default\"].back();\n }", + "data": {}, + "template": { + "attr": { + "className": "back_container", + "debugLine": "pages/importJS/importJS:1" + }, + "children": [ + { + "attr": { + "className": "image_back", + "debugLine": "pages/importJS/importJS:2", + "src": "/common/image/back.png" + }, + "classList": [ + "image_back" + ], + "type": "image" + }, + { + "attr": { + "className": "text_back", + "debugLine": "pages/importJS/importJS:3", + "value": "返回" + }, + "classList": [ + "text_back" + ], + "type": "text" + } + ], + "classList": [ + "back_container" + ], + "events": { + "click": "back" + }, + "type": "div" + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/inlineStyle.js b/ace-loader/test/rich/expected/inlineStyle.js new file mode 100644 index 000000000..16bd91a21 --- /dev/null +++ b/ace-loader/test/rich/expected/inlineStyle.js @@ -0,0 +1,262 @@ +{ + "@app-component/inlineStyle": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "className": "container", + "debugLine": "pages/inlineStyle/inlineStyle:1" + }, + "classList": [ + "container" + ], + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:3", + "value": "style_test1" + }, + "style": { + "width": "100%" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:6", + "value": "style_test2" + }, + "style": { + "height": "function () {return this.height}" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:9", + "value": "style_test3" + }, + "style": { + "color": "#008000" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:12", + "value": "style_test4" + }, + "style": { + "color": "#FF0000" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:15", + "value": "style_test5" + }, + "style": { + "color": "rgba(200,180,120,1)" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:18", + "value": "style_test6" + }, + "style": { + "animationDuration": "400ms" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:21", + "value": "style_test7" + }, + "style": { + "animationIterationCount": 4 + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:24", + "value": "style_test8" + }, + "style": { + "animationTimingFunction": "linear" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:27", + "value": "style_test9" + }, + "style": { + "animationFillMode": "forwards" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:30", + "value": "style_test10" + }, + "style": { + "gridTemplateColumns": "50px 100px 60px" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:33", + "value": "style_test11" + }, + "style": { + "gridRowStart": 2 + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:36", + "value": "style_test12" + }, + "style": { + "borderTopWidth": "5px", + "borderRightWidth": "5px", + "borderBottomWidth": "5px", + "borderLeftWidth": "5px", + "borderTopStyle": "solid", + "borderRightStyle": "solid", + "borderBottomStyle": "solid", + "borderLeftStyle": "solid", + "borderTopColor": "#FF0000", + "borderRightColor": "#FF0000", + "borderBottomColor": "#FF0000", + "borderLeftColor": "#FF0000" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:39", + "value": "style_test13" + }, + "style": { + "textIndent": "50px" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:42", + "value": "style_test14" + }, + "style": { + "backgroundImage": "/common/img/xmad.jpg" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:45", + "value": "style_test15" + }, + "style": { + "transitionProperty": "width" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:48", + "value": "style_test16" + }, + "style": { + "transitionDuration": "5s" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:51", + "value": "style_test17" + }, + "style": { + "transform": "{\"rotate\":\"7deg\"}" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:54", + "value": "style_test18" + }, + "style": { + "transformOrigin": "20% 40%" + } + }, + { + "type": "progress", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:57", + "value": "style_test19" + }, + "style": { + "startAngle": "240deg" + } + }, + { + "type": "picker-view", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:60", + "value": "style_test20" + }, + "style": { + "selectedFontFamily": "PingFangSC-Regular" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:63", + "value": "style_test21" + }, + "style": { + "paddingTop": "10px", + "paddingRight": "15px", + "paddingBottom": "10px", + "paddingLeft": "15px" + } + }, + { + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:66", + "value": "style_test22" + }, + "style": { + "display": "function () {return this.isFullWindow?'flex':'none'}" + }, + "type": "div" + }, + { + "type": "div", + "attr": { + "debugLine": "pages/inlineStyle/inlineStyle:69", + "value": "style_test23" + }, + "style": { + "backgroundImage": "https://huawei.com/logo.jpg" + } + } + ] + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/mediaQuery.js b/ace-loader/test/rich/expected/mediaQuery.js new file mode 100644 index 000000000..c026b3abb --- /dev/null +++ b/ace-loader/test/rich/expected/mediaQuery.js @@ -0,0 +1,83 @@ +{ + "@app-component/mediaQuery": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "debugLine": "pages/mediaQuery/mediaQuery:1", + "value": "mediaQuery_test" + } + }, + "style": { + "@MEDIA": [ + { + "condition": "screen and (min-width: 600) and (max-width: 1200)", + ".header": { + "width": "100%", + "height": "60px", + "fontSize": "16px", + "alignItems": "center", + "justifyContent": "center" + }, + ".footer": { + "width": "100%", + "height": "40px", + "alignItems": "center" + } + }, + { + "condition": "(device-type: tv)", + ".page-title-wrap": { + "paddingTop": "50px", + "paddingBottom": "80px", + "justifyContent": "center" + }, + ".page-title": { + "paddingTop": "30px", + "paddingBottom": "30px", + "paddingLeft": "40px", + "paddingRight": "40px", + "borderTopColor": "#bbbbbb", + "borderRightColor": "#bbbbbb", + "borderBottomColor": "#bbbbbb", + "borderLeftColor": "#bbbbbb", + "color": "#bbbbbb", + "borderBottomWidth": "2px" + }, + ".btn": { + "height": "80px", + "textAlign": "center", + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "marginRight": "60px", + "marginLeft": "60px", + "marginBottom": "50px", + "color": "#ffffff", + "fontSize": "30px", + "backgroundColor": "#0faeff" + }, + ".container": { + "width": "500px", + "height": "500px", + "backgroundColor": "#fa8072" + }, + ".title": { + "fontSize": "16px", + "color": "#333333", + "alignItems": "center" + }, + ".button": { + "paddingTop": "50px", + "fontSize": "16px", + "color": "#666666", + "alignItems": "center", + "justifyContent": "center" + } + } + ] + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/privateAttr.js b/ace-loader/test/rich/expected/privateAttr.js new file mode 100644 index 000000000..e42325879 --- /dev/null +++ b/ace-loader/test/rich/expected/privateAttr.js @@ -0,0 +1,472 @@ +{ + "@app-component/privateAttr": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "className": "container", + "debugLine": "pages/privateAttr/privateAttr:1" + }, + "classList": [ + "container" + ], + "children": [ + { + "type": "list", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:3", + "scrollpage": "function () {return this.scrollpage}", + "cachedcount": "function () {return this.cachedcount}", + "scrollbar": "function () {return this.scrollbar}", + "scrolleffect": "function () {return this.scrolleffect}", + "indexer": "function () {return this.indexer}", + "shapemode": "function () {return this.shapemode}", + "updateeffect": "function () {return this.updateeffect}", + "initialindex": "function () {return this.initialindex}", + "initialoffset": "function () {return this.initialoffset}" + }, + "children": [ + { + "type": "list-item-group", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:5", + "type": "function () {return this.type}" + } + }, + { + "type": "list-item", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:6", + "type": "function () {return this.type}", + "primary": "function () {return this.primary}", + "section": "function () {return this.section}", + "sticky": "function () {return this.sticky}", + "stickyradius": "function () {return this.stickyradius}", + "clickeffect": "function () {return this.clickeffect}" + } + } + ] + }, + { + "type": "swiper", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:10", + "index": "function () {return this.index}", + "autoplay": "function () {return this.autoplay}", + "interval": "function () {return this.interval}", + "indicator": "function () {return this.indicator}", + "digital": "function () {return this.digital}", + "loop": "function () {return this.loop}", + "duration": "function () {return this.duration}", + "vertical": "function () {return this.vertical}", + "indicatordisabled": "true" + } + }, + { + "type": "tabs", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:15", + "index": "function () {return this.index}", + "vertical": "function () {return this.vertical}" + }, + "children": [ + { + "type": "tab-bar", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:16", + "mode": "function () {return this.mode}" + } + }, + { + "type": "tab-content", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:17", + "scrollable": "function () {return this.scrollable}" + } + } + ] + }, + { + "type": "popup", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:21", + "target": "title", + "placement": "function () {return this.placement}", + "keepalive": "true", + "clickable": "false", + "arrowoffset": "20px" + } + }, + { + "type": "refresh", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:24", + "offset": "function () {return this.offset}", + "refreshing": "function () {return this.refreshing}", + "type": "auto", + "lasttime": "function () {return this.lasttime}", + "friction": "function () {return this.friction}" + } + }, + { + "type": "image", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:27", + "alt": "img", + "src": "function () {return this.src}" + } + }, + { + "type": "image-animator", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:30", + "images": "function () {return this.images}", + "iteration": "function () {return this.iteration}", + "reverse": "function () {return this.reverse}", + "fixedsize": "function () {return this.fixedsize}", + "duration": "function () {return this.duration}" + } + }, + { + "type": "progress", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:33", + "type": "horizontal", + "percent": "function () {return this.percent}", + "secondarypercent": "function () {return this.secondarypercent}" + } + }, + { + "type": "progress", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:36", + "type": "scale-ring", + "percent": "function () {return this.percent}", + "secondarypercent": "function () {return this.secondarypercent}", + "clockwise": "function () {return this.clockwise}" + } + }, + { + "type": "progress", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:39", + "type": "arc", + "percent": "function () {return this.percent}" + } + }, + { + "type": "rating", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:42", + "numstars": "function () {return this.numstars}", + "rating": "function () {return this.rating}", + "stepsize": "function () {return this.stepsize}", + "indicator": "function () {return this.indicator}" + } + }, + { + "type": "marquee", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:45", + "scrollamount": "function () {return this.scrollamount}", + "loop": "function () {return this.loop}", + "direction": "function () {return this.direction}" + } + }, + { + "type": "divider", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:48", + "vertical": "function () {return this.vertical}" + } + }, + { + "type": "search", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:51", + "icon": "function () {return this.icon}", + "hint": "function () {return this.hint}", + "value": "function () {return this.value}", + "searchbutton": "content" + } + }, + { + "type": "menu", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:54", + "target": "function () {return this.target}", + "type": "function () {return this.type}", + "title": "function () {return this.title}" + } + }, + { + "type": "chart", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:57", + "type": "line", + "options": "function () {return this.options}", + "datasets": "function () {return this.datasets}" + } + }, + { + "type": "input", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:60", + "type": "time", + "checked": "function () {return this.checked}", + "name": "function () {return this.name}", + "value": "function () {return this.value}", + "placeholder": "function () {return this.placeholder}", + "maxlength": "function () {return this.maxlength}", + "enterkeytype": "default", + "headericon": "function () {return this.headericon}", + "showcounter": "true" + } + }, + { + "type": "button", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:65", + "type": "capsule", + "value": "function () {return this.value}", + "icon": "function () {return this.icon}" + } + }, + { + "type": "label", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:68", + "target": "function () {return this.target}" + } + }, + { + "type": "select", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:71" + }, + "children": [ + { + "type": "option", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:72", + "selected": "function () {return this.selected}", + "value": "function () {return this.value}", + "icon": "function () {return this.icon}", + "action": "show", + "focusable": "function () {return this.focusable}", + "disabled": "true" + } + } + ] + }, + { + "type": "slider", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:76", + "min": "function () {return this.min}", + "max": "function () {return this.max}", + "step": "function () {return this.step}", + "value": "function () {return this.value}", + "type": "continuous", + "minicon": "function () {return this.minicon}", + "maxicon": "function () {return this.maxicon}" + } + }, + { + "type": "switch", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:79", + "checked": "function () {return this.checked}", + "showtext": "function () {return this.showtext}", + "texton": "function () {return this.texton}", + "textoff": "function () {return this.textoff}" + } + }, + { + "type": "textarea", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:82", + "placeholder": "function () {return this.placeholder}", + "maxlength": "function () {return this.maxlength}", + "headericon": "function () {return this.headericon}", + "extend": "function () {return this.extend}", + "showcounter": "true" + } + }, + { + "type": "picker", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:85", + "type": "text", + "range": "function () {return this.range}", + "selected": "function () {return this.selected}", + "value": "function () {return this.value}" + } + }, + { + "type": "picker", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:88", + "type": "date", + "start": "function () {return this.start}", + "end": "function () {return this.end}", + "selected": "function () {return this.selected}", + "value": "function () {return this.value}", + "lunar": "function () {return this.lunar}", + "lunarswitch": "function () {return this.lunarswitch}" + } + }, + { + "type": "picker", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:91", + "type": "time", + "containsecond": "function () {return this.containsecond}", + "selected": "function () {return this.selected}", + "value": "function () {return this.value}", + "hours": "function () {return this.hours}" + } + }, + { + "type": "picker", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:94", + "type": "datetime", + "selected": "function () {return this.selected}", + "value": "function () {return this.value}", + "hours": "function () {return this.hours}", + "lunar": "function () {return this.lunar}", + "lunarswitch": "function () {return this.lunarswitch}" + } + }, + { + "type": "picker", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:97", + "type": "multi-text", + "columns": "function () {return this.columns}", + "range": "function () {return this.range}", + "selected": "function () {return this.selected}", + "value": "function () {return this.value}" + } + }, + { + "type": "picker-view", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:100", + "type": "text", + "range": "function () {return this.range}", + "selected": "function () {return this.selected}", + "indicatorprefix": "function () {return this.indicatorprefix}", + "indicatorsuffix": "function () {return this.indicatorsuffix}" + } + }, + { + "type": "picker-view", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:103", + "type": "date", + "start": "function () {return this.start}", + "end": "function () {return this.end}", + "selected": "function () {return this.selected}", + "lunar": "function () {return this.lunar}", + "lunarswitch": "function () {return this.lunarswitch}" + } + }, + { + "type": "picker-view", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:106", + "type": "time", + "containsecond": "function () {return this.containsecond}", + "selected": "function () {return this.selected}", + "hours": "function () {return this.hours}" + } + }, + { + "type": "picker-view", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:109", + "type": "datetime", + "selected": "function () {return this.selected}", + "hours": "function () {return this.hours}", + "lunar": "function () {return this.lunar}", + "lunarswitch": "function () {return this.lunarswitch}" + } + }, + { + "type": "picker-view", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:112", + "type": "multi-text", + "columns": "function () {return this.columns}", + "range": "function () {return this.range}", + "selected": "function () {return this.selected}" + } + }, + { + "type": "qrcode", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:115", + "value": "function () {return this.value}", + "type": "rect" + } + }, + { + "type": "video", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:118", + "muted": "function () {return this.muted}", + "src": "function () {return this.src}", + "autoplay": "function () {return this.autoplay}", + "poster": "function () {return this.poster}", + "controls": "function () {return this.controls}" + } + }, + { + "type": "badge", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:121", + "placement": "right", + "count": "2", + "visible": "true", + "maxcount": "90" + } + }, + { + "type": "panel", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:124", + "type": "foldable", + "mode": "mini", + "dragbar": "true", + "miniheight": "300px" + } + }, + { + "type": "stepper", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:127", + "index": "1" + } + }, + { + "type": "xcomponent", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:130", + "name": "function () {return this.name}", + "type": "texture" + } + }, + { + "type": "web", + "attr": { + "debugLine": "pages/privateAttr/privateAttr:133", + "src": "function () {return this.src}" + } + } + ] + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/expected/uncommonAttr.js b/ace-loader/test/rich/expected/uncommonAttr.js new file mode 100644 index 000000000..a2201f2ea --- /dev/null +++ b/ace-loader/test/rich/expected/uncommonAttr.js @@ -0,0 +1,106 @@ +{ + "@app-component/uncommonAttr": { + "_descriptor": {}, + "data": {}, + "template": { + "type": "div", + "attr": { + "debugLine": "pages/uncommonAttr/uncommonAttr:1", + "className": "container" + }, + "classList": [ + "container" + ], + "children": [ + { + "type": "div", + "attr": { + "debugLine": "pages/uncommonAttr/uncommonAttr:3", + "shareid": "abc", + "value": "shareid_test1" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/uncommonAttr/uncommonAttr:6", + "shareid": "function () {return this.aa}", + "value": "shareid_test2" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/uncommonAttr/uncommonAttr:9", + "voicelabel": "fff", + "value": "voicelabel_test" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/uncommonAttr/uncommonAttr:12", + "subscriptlabel": "aaa", + "value": "subscriptlabel_test" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/uncommonAttr/uncommonAttr:15", + "scenelabel": "video", + "value": "scenelabel_test" + } + }, + { + "type": "div", + "attr": { + "debugLine": "pages/uncommonAttr/uncommonAttr:18", + "subscriptflag": "auto", + "value": "subscriptflag_test" + } + }, + { + "type": "div", + "attr": { + "accessibilitygroup": "true", + "debugLine": "pages/uncommonAttr/uncommonAttr:21", + "value": "accessibilitygroup_test1" + } + }, + { + "type": "div", + "attr": { + "accessibilitygroup": "function () {return this.accessibilitygroup}", + "debugLine": "pages/uncommonAttr/uncommonAttr:24", + "value": "accessibilitygroup_test2" + } + }, + { + "type": "div", + "attr": { + "accessibilitydescription": "bbb", + "debugLine": "pages/uncommonAttr/uncommonAttr:27", + "value": "accessibilitydescription_test" + } + }, + { + "type": "div", + "attr": { + "accessibilitytext": "ccc", + "debugLine": "pages/uncommonAttr/uncommonAttr:30", + "value": "accessibilitytext_test" + } + }, + { + "type": "div", + "attr": { + "accessibilityimportance": "auto", + "debugLine": "pages/uncommonAttr/uncommonAttr:33", + "value": "accessibilityimportance_test" + } + } + ] + } + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/test.js b/ace-loader/test/rich/test.js new file mode 100644 index 000000000..b746cdf40 --- /dev/null +++ b/ace-loader/test/rich/test.js @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +'use strict'; + +const fs = require('fs'); +const path =require('path'); + +const chai = require('chai'); +const sinon = require('sinon'); +const sinonChai = require('sinon-chai'); +const expect = chai.expect; +chai.use(sinonChai); + +function getActualString(componentName) { + const filePath = path.join(__dirname, 'testcase/build/pages', `${componentName}`, `${componentName}.js`); + const fileContent = fs.readFileSync(filePath, 'utf-8'); + const fileString = fileContent.toString(); + return fileString; +} + +function getExpectJSON(componentName) { + const filepath = path.join(__dirname, 'expected', `${componentName}.js`); + const expectedContent = fs.readFileSync(filepath, 'utf-8'); + const expectedObj = JSON.parse(expectedContent.toString()); + return expectedObj; +} + +function stringifyActual(json) { + return JSON.stringify(json, function(key, value) { + if (typeof value === 'function') { + value = value.toString(); + } + return value; + }, ' '); +} + +describe('build', () => { + let $app_define$; + let $app_bootstrap$; + let components; + let requireStub; + let bootstrapStub; + + function expectActual(name) { + const actualStr = getActualString(name); + const fn = new Function('$app_define$', '$app_bootstrap$', actualStr); + fn($app_define$, $app_bootstrap$); + const expectJSON = getExpectJSON(name); + expect(JSON.parse(stringifyActual(components))).eql(expectJSON); + expect(components).to.include.keys($app_bootstrap$.firstCall.args[0]); + return actualStr; + } + + beforeEach(() => { + components = {}; + requireStub = sinon.stub(); + bootstrapStub = sinon.stub(); + + $app_define$ = function(componentName, deps, factory) { + if (components[componentName]) { + throw new Error(`${componentName} is defined repeatly`); + } + + let $app_require$ = requireStub; + let $app_exports$ = {}; + let $app_module$ = {exports : $app_exports$}; + + factory($app_require$, $app_exports$, $app_module$); + components[componentName] = $app_module$.exports; + } + + $app_bootstrap$ = bootstrapStub; + }); + + it('class', () => { + expectActual('class'); + }); + it('event', () => { + expectActual('event'); + }); + it('expression', () => { + expectActual('expression'); + }); + it('commonAttr', () => { + expectActual('commonAttr'); + }); + it('uncommonAttr', () => { + expectActual('uncommonAttr'); + }); + it('privateAttr', () => { + expectActual('privateAttr'); + }); + it('forDirective', () => { + expectActual('forDirective'); + }); + it('ifDirective', () => { + expectActual('ifDirective'); + }); + it('importJS', () => { + expectActual('importJS'); + }); + it('inlineStyle', () => { + expectActual('inlineStyle'); + }); + it('exteriorStyle', () => { + expectActual('exteriorStyle'); + }); + it('importCSS', () => { + expectActual('importCSS'); + }); + it('mediaQuery', () => { + expectActual('mediaQuery'); + }); +}); \ No newline at end of file diff --git a/ace-loader/test/rich/testcase/app.js b/ace-loader/test/rich/testcase/app.js new file mode 100644 index 000000000..bb1f75249 --- /dev/null +++ b/ace-loader/test/rich/testcase/app.js @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info("AceApplication onCreate"); + }, + onDestroy() { + console.info("AceApplication onDestroy"); + } +}; diff --git a/ace-loader/test/rich/testcase/manifest.json b/ace-loader/test/rich/testcase/manifest.json new file mode 100644 index 000000000..47c51b62b --- /dev/null +++ b/ace-loader/test/rich/testcase/manifest.json @@ -0,0 +1,22 @@ +{ + "appID": "com.example.ace.helloworld", + "appName": "HelloAce", + "versionName": "1.0.0", + "versionCode": 1, + "minPlatformVersion": "5.0.0", + "pages": [ + "pages/class/class", + "pages/event/event", + "pages/expression/expression", + "pages/commonAttr/commonAttr", + "pages/uncommonAttr/uncommonAttr", + "pages/privateAttr/privateAttr", + "pages/ifDirective/ifDirective", + "pages/forDirective/forDirective", + "pages/importJS/importJS", + "pages/inlineStyle/inlineStyle", + "pages/exteriorStyle/exteriorStyle", + "pages/importCSS/importCSS", + "pages/mediaQuery/mediaQuery" + ] +} \ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/class/class.hml b/ace-loader/test/rich/testcase/pages/class/class.hml new file mode 100644 index 000000000..3c47a8180 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/class/class.hml @@ -0,0 +1,16 @@ +
+ +
class_test1
+ + +
class_test2
+ + +
class_test3
+ + +
class_test4
+ + +
class_test5
+
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/class/class.js b/ace-loader/test/rich/testcase/pages/class/class.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/commonAttr/commonAttr.hml b/ace-loader/test/rich/testcase/pages/commonAttr/commonAttr.hml new file mode 100644 index 000000000..1b90eea63 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/commonAttr/commonAttr.hml @@ -0,0 +1,40 @@ +
+ +
id_test1
+ + +
id_test2
+ + +
ref_test
+ + +
disabled_test1
+ + +
disabled_test2
+ + +
tid_test1
+ + +
tid_test2
+ + +
show_test1
+ + +
show_test2
+ + +
data_test1
+ + +
data_test2
+ + +
focusable_test1
+ + +
focusable_test2
+
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/commonAttr/commonAttr.js b/ace-loader/test/rich/testcase/pages/commonAttr/commonAttr.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/event/event.hml b/ace-loader/test/rich/testcase/pages/event/event.hml new file mode 100644 index 000000000..c0c9ad903 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/event/event.hml @@ -0,0 +1,39 @@ +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
diff --git a/ace-loader/test/rich/testcase/pages/event/event.js b/ace-loader/test/rich/testcase/pages/event/event.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/expression/expression.hml b/ace-loader/test/rich/testcase/pages/expression/expression.hml new file mode 100644 index 000000000..31a73f02e --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/expression/expression.hml @@ -0,0 +1,67 @@ +
+ + + {{ti || subTitle}} + + + + + {{ti && subTitle}} + + + +
+ {{isArrived === 'arrived' && isTravel === false}} +
+ + +
+ {{isArrived === 'arrived' || isTravel === false}} +
+ + +
+ {{!flag}} +
+ + +
+ {{!!flag}} +
+ + +
+ {{1>2?3:4}} + {{a}} + {{1>2?a:b}} + {{1>2?true:null}} + + {{1>b?(v>4?a:6):7}} + {{1>2?(3==4?"刘":"王"):7}} + {{3<3?(3>3?'刘':'王'):7}} + {{typeof 1}} + {{new RegExp('123')}} + + + + + + {{$t('strings.home.tabsData')[$item].name}} + a + b + +
+ +
+
+ 测试show,if,for渲染属性 + {{$idx}}+{{$item.id}} + 点击显示的文本,点击此处显示show文本 + 长按显示的文本,点击此处隐藏show文本 + 默认显示的文本 + show显示的文本 +
+ {{ $t('strings.remain_days', {year: currentYear, day: countDownDays}) }} +
+
diff --git a/ace-loader/test/rich/testcase/pages/expression/expression.js b/ace-loader/test/rich/testcase/pages/expression/expression.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.css b/ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.css new file mode 100644 index 000000000..6223ccc0a --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.css @@ -0,0 +1,276 @@ +/* PERCENTAGE_LENGTH_VALIDATOR_test */ +.a { + width: 100%; + height: 50%; +} + +/* ENGTH_VALIDATOR_test */ +.b { + width: 100px; + height: 200px; +} + +/* COLOR_VALIDATOR_test_1 */ +.c { + color: #808080; +} + +/* COLOR_VALIDATOR_test_2 */ +.d { + color: green; +} + +/* COLOR_VALIDATOR_test_3 */ +.e { + color: rgba(80, 60, 150, 1.0); +} + +/* TIME_VALIDATOR_test */ +.f { + animation-duration: 500ms; + animation-delay: 100ms; +} + +/* ITERATIONCOUNT_VALIDATOR_test */ +.g { + animation-iteration-count: 3; +} + +/* TRANSITION_TIMING_FUNCTION_VALIDATOR_test */ +.h { + animation-timing-function: linear; +} + +.h-steps { + animation-timing-function: steps(9, start); +} + +/* EnumValidator_test */ +.i { + animation-fill-mode: forwards; +} + +/* GRID_TEMPLATE_VALIDATOR_test */ +.j { + grid-template-columns: 50px 40px 80px; + grid-template-rows: repeat(auto-fill, 20px); +} + +/* NUMBER_VALIDATOR_test */ +.l { + grid-row-start: 3; +} + +/* BORDER_VALIDATOR_test */ +.m { + border: 5px solid #808080; +} + +/* TEXT_INDENT_VALIDATOR_test */ +.n { + text-indent: 50px; +} + +/* URL_VALIDATOR_test */ +.o { + background-image: url(/common/img/a.jpg); +} + +/* TRANSITION_PROPERTY_VALIDATOR_test */ +.p { + transition-property: width; +} + +/* TRANSITION_INTERVAL_VALIDATOR_test */ +.q { + transition-duration: 5s; +} + +/* TRANSFORM_VALIDATOR_test */ +.r { + transform: translate(50%, 50%); +} + +/* TRANSFORM_ORIGIN_VALIDATOR_test */ +.s { + transform-origin: 20% 40%; +} + +/* ANGLE_VALIDATOR_test */ +.t { + start-angle: 240deg; +} + +/* ANYTHING_VALIDATOR_test */ +.u { + selected-font-family: PingFangSC-Regular; +} + +/* SHORTHAND_LENGTH_VALIDATOR_test */ +.v { + padding: 10px 15px; +} + +#w { + font-size: 15px; + font-family: PingFangSC-Regular; +} + +/* ******************common style******************* */ + +/* keyframes_test_1 */ +@keyframes animation1 { + from { + background-color: #808080; + } + 50% { + background-color: #000000; + } + to { + background-color: #000fff; + } +} + +/* keyframes_test_2 */ +@keyframes animation2 { + from { + transform: translateX(90px); + } + 50% { + transform: translateX(130px); + } + to { + transform: translateX(200px); + } +} + +/* keyframes_test_3 */ +@keyframes animation3 { + from { + transform: rotate(90deg); + } + 50% { + transform: rotate(150deg); + } + to { + transform: rotate(260deg); + } +} + +/* keyframes_test_4 */ +@keyframes animation4 { + from { + transform: rotate(0.25turn); + } + 50% { + transform: rotate(1rad); + } + to { + transform: rotate(400grad); + } +} + +/* gradient_test_1 */ +.gradient1 { + background: linear-gradient(#ff0000, #00ff00); +} + +/* gradient_test_2 */ +.gradient2 { + background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); +} + +/* gradient_test_3 */ +.gradient3 { + background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 0, 255) 60%); +} + +/* gradient_test_4 */ +.gradient4 { + background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); +} + +/* shared-transition_test */ +.shared-transition-style { + shared-transition-effect: static; + shared-transition-name: shared-transition; +} + +@keyframes shared-transition { + from { opacity: 0; } + to { opacity: 1; } +} + +/* customize font */ +@font-face { + font-family: HWfont; + src: url(/common/HWfont.ttf); +} + +.txt { + font-family: HWfont; +} + +.shadow { + box-shadow: 100px 100px 30px 40px #888888; +} + +/* transform-origin_test_1 */ +.transform-origin-style1 { + transform-origin: left; +} + +/* transform-origin_test_2 */ +.transform-origin-style2 { + transform-origin: left bottom; +} + +/* transform-origin_test_3 */ +.transform-origin-style3 { + transform-origin: right 90px; +} + +/* transform_test_1 */ +.transform-style1 { + transform: translate3d(1px, 2px, 3px); +} + +/* transform_test_2 */ +.transform-style2 { + transform: matrix(1,2,3,4,5,6); +} + +/* transform_test_3 */ +.transform-style3 { + transform: matrix3d(1,0,0,0,0,1,6,0,0,0,1,0,50,100,0,1.1); +} + +/* transform_test_4 */ +.transform-style4 { + transform: none; +} + +/* transform_test_5 */ +.transform-style5 { + transform: rotate3d(1, 1, 1, 30deg) translate3d(1px, 2px, 3px) scale3d(1.5, 1.5, 1.5) perspective(800px); +} + +/* simple animation test: @keyframes duration | easing-function | delay | + * iteration-count | direction | fill-mode | play-state | name*/ +.simple-animation1 { + animation: 3s ease-in 1s 2 reverse both paused slidein; +} + +/* simple animation test: @keyframes name | duration | easing-function | delay */ +.simple-animation2 { + animation: test_05 3s linear 1s; +} + +/* simple animation test: @keyframes name | duration */ +.simple-animation3 { + animation: sliding-vertically 3s; +} + +.mask-image-url1 { + mask-image: url(common/mask.svg); +} \ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.hml b/ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.hml new file mode 100644 index 000000000..ffecb9c6a --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.hml @@ -0,0 +1 @@ +
exteriorStyle_test
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.js b/ace-loader/test/rich/testcase/pages/exteriorStyle/exteriorStyle.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/forDirective/forDirective.hml b/ace-loader/test/rich/testcase/pages/forDirective/forDirective.hml new file mode 100644 index 000000000..427c71a28 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/forDirective/forDirective.hml @@ -0,0 +1,54 @@ +
+ +
+ {{$idx}}.{{$item.name}} +
+ + +
+
+ {{$idx}}-{{personItem.name}}--{{personItem.age}} +
+ +
+ + +
+
+ {{personIndex}}.{{personItem.name}} +
+ +
+ + +
+
+ {{personItem.id}}--{{item.name}} +
+
+ + +
+
+ {{index}}--{{item.name}} +
+
+ + + +
+
+ {{personIndex}}.{{personItem.name}} +
+
+ + +
+
{{value.info}}
+
+ + +
+
{{value.info}}
+
+
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/forDirective/forDirective.js b/ace-loader/test/rich/testcase/pages/forDirective/forDirective.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/ifDirective/ifDirective.hml b/ace-loader/test/rich/testcase/pages/ifDirective/ifDirective.hml new file mode 100644 index 000000000..fe4ebf251 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/ifDirective/ifDirective.hml @@ -0,0 +1,38 @@ +
+ + {{componentData.if}} + + +
+ {{componentData.if}} + {{componentData.elif}} + {{componentData.else}} +
+ + +
+
+ {{$idx}}.{{$item.name}} +
+
+ + +
+
+ {{$idx}}.{{$item.name}} +
+
+ + +
+
+ {{personItem.name}} +
+
+ + +
+ {{true_value}} +
+ +
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/ifDirective/ifDirective.js b/ace-loader/test/rich/testcase/pages/ifDirective/ifDirective.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/importCSS/importCSS.css b/ace-loader/test/rich/testcase/pages/importCSS/importCSS.css new file mode 100644 index 000000000..69d19073e --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/importCSS/importCSS.css @@ -0,0 +1,23 @@ +/* common import css */ +@import "../../../common/css/common.css"; + +.container { + justify-content: center; + align-items: center; +} + +.title { + color: #333333; + font-size: 16px; +} + +.title span { + color: red; +} + +#button { + font-size: 16px; + padding-top: 50px; + align-items: center; + justify-content: center; +} \ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/importCSS/importCSS.hml b/ace-loader/test/rich/testcase/pages/importCSS/importCSS.hml new file mode 100644 index 000000000..073501ca8 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/importCSS/importCSS.hml @@ -0,0 +1 @@ +
importCSS_test
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/importCSS/importCSS.js b/ace-loader/test/rich/testcase/pages/importCSS/importCSS.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/importJS/importJS.hml b/ace-loader/test/rich/testcase/pages/importJS/importJS.hml new file mode 100644 index 000000000..7d2401f73 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/importJS/importJS.hml @@ -0,0 +1,4 @@ +
+ + 返回 +
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/importJS/importJS.js b/ace-loader/test/rich/testcase/pages/importJS/importJS.js new file mode 100644 index 000000000..839766255 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/importJS/importJS.js @@ -0,0 +1,8 @@ +/* Test import syntax */ +import router from "@system.router"; + +export default { + back() { + router.back(); + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/inlineStyle/inlineStyle.hml b/ace-loader/test/rich/testcase/pages/inlineStyle/inlineStyle.hml new file mode 100644 index 000000000..26b9fe0d0 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/inlineStyle/inlineStyle.hml @@ -0,0 +1,70 @@ +
+ +
style_test1
+ + +
style_test2
+ + +
style_test3
+ + +
style_test4
+ + +
style_test5
+ + +
style_test6
+ + +
style_test7
+ + +
style_test8
+ + +
style_test9
+ + +
style_test10
+ + +
style_test11
+ + +
style_test12
+ + +
style_test13
+ + +
style_test14
+ + +
style_test15
+ + +
style_test16
+ + +
style_test17
+ + +
style_test18
+ + + style_test19 + + + style_test20 + + +
style_test21
+ + +
style_test22
+ + +
style_test23
+
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/inlineStyle/inlineStyle.js b/ace-loader/test/rich/testcase/pages/inlineStyle/inlineStyle.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.css b/ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.css new file mode 100644 index 000000000..8e80e5023 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.css @@ -0,0 +1,25 @@ +/* media query import css */ +@import '../../../common/css/media.css'; + +@media (device-type: tv) { + @import "../../../common/css/common.css"; + .container { + width: 500px; + height: 500px; + background-color: #fa8072; + } + + .title { + font-size: 16px; + color: #333333; + align-items: center; + } + + .button { + padding-top: 50px; + font-size: 16px; + color: #666666; + align-items: center; + justify-content: center; + } +} \ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.hml b/ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.hml new file mode 100644 index 000000000..bf1802627 --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.hml @@ -0,0 +1 @@ +
mediaQuery_test
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.js b/ace-loader/test/rich/testcase/pages/mediaQuery/mediaQuery.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/privateAttr/privateAttr.hml b/ace-loader/test/rich/testcase/pages/privateAttr/privateAttr.hml new file mode 100644 index 000000000..701d117ca --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/privateAttr/privateAttr.hml @@ -0,0 +1,134 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + img + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/privateAttr/privateAttr.js b/ace-loader/test/rich/testcase/pages/privateAttr/privateAttr.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/test/rich/testcase/pages/uncommonAttr/uncommonAttr.hml b/ace-loader/test/rich/testcase/pages/uncommonAttr/uncommonAttr.hml new file mode 100644 index 000000000..fd69e742b --- /dev/null +++ b/ace-loader/test/rich/testcase/pages/uncommonAttr/uncommonAttr.hml @@ -0,0 +1,34 @@ +
+ +
shareid_test1
+ + +
shareid_test2
+ + +
voicelabel_test
+ + +
subscriptlabel_test
+ + +
scenelabel_test
+ + +
subscriptflag_test
+ + +
accessibilitygroup_test1
+ + +
accessibilitygroup_test2
+ + +
accessibilitydescription_test
+ + +
accessibilitytext_test
+ + +
accessibilityimportance_test
+
\ No newline at end of file diff --git a/ace-loader/test/rich/testcase/pages/uncommonAttr/uncommonAttr.js b/ace-loader/test/rich/testcase/pages/uncommonAttr/uncommonAttr.js new file mode 100644 index 000000000..e69de29bb diff --git a/ace-loader/uglify-source.js b/ace-loader/uglify-source.js new file mode 100644 index 000000000..0823ead66 --- /dev/null +++ b/ace-loader/uglify-source.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const fs = require('fs') +const path = require('path') +const uglifyJS = require('uglify-es') + +readCode(process.argv[2]) + +function readCode(inputPath) { + if (fs.existsSync(inputPath)) { + const files = fs.readdirSync(inputPath) + files.forEach(function(file) { + const filePath = path.join(inputPath, file) + if (fs.existsSync(filePath)) { + const fileStat = fs.statSync(filePath) + if (fileStat.isFile()) { + const code = fs.readFileSync(filePath, 'utf-8') + uglifyCode(code,filePath) + } + if (fileStat.isDirectory()) { + readCode(filePath) + } + } + }) + } +} + +function uglifyCode(code, outPath) { + const uglifyCode = uglifyJS.minify(code).code + fs.writeFileSync(outPath, uglifyCode) +} diff --git a/ace-loader/webpack.lite.config.js b/ace-loader/webpack.lite.config.js new file mode 100644 index 000000000..2f903b7b6 --- /dev/null +++ b/ace-loader/webpack.lite.config.js @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const path = require('path'); +const fs = require('fs'); +const webpack = require('webpack'); +const TerserPlugin = require('terser-webpack-plugin'); +const SnapshotPlugin = require('./lib/lite/lite-snapshot-plugin'); +const ImageCoverterPlugin = require('./lib/lite/lite-image-coverter-plugin'); +const ReturnExportsPlugin = require('./lib/lite/lite-return-exports-plugin'); +const ResourcePlugin = require('./lib/resource-plugin'); +const ResultStates = require('./lib/compile-plugin'); +const { checkFilePath } = require('./lib/lite/lite-customize'); +const CopyPlugin = require("copy-webpack-plugin"); + +process.env.DEVICE_LEVEL = 'lite'; +process.env.DEVICE_TYPE = 'smartVision'; + +const watchMode = (process.env.watchMode && process.env.watchMode === 'true') || false; +const pictrueSwitch = process.env.img2bin !== 'false'; +const util = require('./lib/util'); +const { PLATFORM }= require('./lib/lite/lite-enum'); +const { deleteFolderRecursive, readManifest, loadEntryObj } = require('./main.product'); + +const webpackConfig = { + target: ['web', 'es5'], + cache: { + type: 'filesystem' + }, + watch: watchMode, + watchOptions: { + aggregateTimeout: 10, + poll: false, + ignored: /node_modules/, + }, + output: { + filename: '[name].js', + devtoolModuleFilenameTemplate: 'webpack:///[absolute-resource-path]' + }, + devtool: 'nosources-source-map', + mode: 'development', + module: { + rules: [ + { + test: /(\.hml|app\.js)(\?[^?]+)?$/, + use: [{ + loader: path.resolve(__dirname, './index.js') + }] + }, + { + test: /\.png$/, + use: [{ + loader: 'file-loader', + options: { + name: '[name].[ext]', outputPath: 'common' + } + }] + }, + { + test: /\.css$/, + use: [{ + loader: 'css-loader' + }] + }, + { + test: /\.less$/, + use: [{ + loader: 'less-loader' + }] + }, + { + test: /\.(scss|sass)$/, + use: [{ + loader: 'style-loader!css-loader!sass-loader' + }] + }, + { + test: /\.jsx?$/, + use: [ + { + loader: path.resolve(__dirname, 'lib/module-script.js'), + }, + { + loader: util.loadBabelModule('babel-loader'), + options: { + presets: [util.loadBabelModule('@babel/preset-env')], + plugins: [util.loadBabelModule('@babel/plugin-transform-modules-commonjs'), + util.loadBabelModule('@babel/plugin-proposal-class-properties')], + }, + }, + ] + } + ] + }, + node: { + global: false, + }, + resolve: { + modules: [path.join(__dirname, 'node_modules'), './node_modules'], + }, + stats: 'none', +}; + +function setConfigs(env) { + process.env.error = env.error === undefined ? true : env.error + process.env.warning = env.warning === undefined ? true : env.warning + process.env.note = env.note === undefined ? true : env.note + process.env.buildMode = env.buildMode || 'debug' + process.env.logLevel = env.logLevel || '1' + process.env.projectPath = env.aceModuleRoot || process.env.aceModuleRoot || process.cwd(); + process.env.buildPath = env.aceModuleBuild || process.env.aceModuleBuild || path.resolve(process.env.projectPath, 'build'); + process.env.aceManifestPath = process.env.aceManifestPath || path.resolve(process.env.projectPath, 'manifest.json'); + const manifest = readManifest(process.env.aceManifestPath) + process.env.PLATFORM_VERSION = PLATFORM.VERSION6; + const version = parseInt(manifest.minPlatformVersion); + if (version == 5) { + process.env.PLATFORM_VERSION = PLATFORM.VERSION5; + } + if (version <= 4) { + process.env.PLATFORM_VERSION = PLATFORM.VERSION3; + } +} + +module.exports = (env) => { + setConfigs(env) + deleteFolderRecursive(process.env.buildPath); + webpackConfig.entry = loadEntryObj(readManifest(process.env.aceManifestPath), process.env.projectPath, process.env.DEVICE_LEVEL) + webpackConfig.output.path = path.resolve(__dirname, process.env.buildPath) + webpackConfig.plugins = [ + new ResourcePlugin(process.env.projectPath, process.env.buildPath, process.env.aceManifestPath), + new ResultStates({ + build: process.env.buildPath + }), + new ReturnExportsPlugin(), + ] + + if (fs.existsSync(path.resolve(process.env.projectPath, 'i18n'))) { + webpackConfig.plugins.push(new CopyPlugin({ + patterns: [ + { + from: path.resolve(process.env.projectPath, 'i18n'), + to: path.resolve(process.env.buildPath, 'i18n'), + noErrorOnMissing: true + } + ] + })) + } + + if (process.env.hapMode && process.env.hapMode === 'true') { + webpackConfig.optimization = { + minimize: true, + minimizer: [new TerserPlugin({ + terserOptions: { + compress: false, + mangle: true, + }, + }, + )], + }; + } + + if (pictrueSwitch) { + webpackConfig.plugins.push( + new ImageCoverterPlugin({ build: process.env.buildPath }), + ); + } + + if (env.deviceType) { + const deviceArr = env.deviceType.split(/,/); + if (deviceArr.includes('liteWearable')) { + process.env.DEVICE_TYPE = 'liteWearable'; + } + } + + if (env.sourceMap === 'none') { + webpackConfig.devtool = false + } + if (env.buildMode === 'release') { + webpackConfig.devtool = 'source-map' + webpackConfig.mode = 'production'; + webpackConfig.plugins.push( + new SnapshotPlugin({ build: process.env.buildPath }) + ); + webpackConfig.output.sourceMapFilename = '_releaseMap/[name].js.map' + } + checkFilePath(); + return webpackConfig; +}; diff --git a/ace-loader/webpack.rich.config.js b/ace-loader/webpack.rich.config.js new file mode 100644 index 000000000..b0e75f338 --- /dev/null +++ b/ace-loader/webpack.rich.config.js @@ -0,0 +1,245 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +var path = require('path') +var fs = require('fs') + +var ResourcePlugin = require('./lib/resource-plugin') +var ResultStates = require('./lib/compile-plugin') +var GenBinPlugin = require('./lib/genBin-plugin') +var GenAbcPlugin = require('./lib/genAbc-plugin') +var AfterEmitPlugin = require('./lib/cardJson-plugin').AfterEmitPlugin + +const { PLATFORM }= require('./lib/lite/lite-enum') +const util = require('./lib/util') +const TerserPlugin = require('terser-webpack-plugin') +const CopyPlugin = require("copy-webpack-plugin") +const watchMode = (process.env.watchMode && process.env.watchMode === 'true') || false + +const { deleteFolderRecursive, readManifest, loadEntryObj } = require('./main.product') + +const richModule = { + rules: [ + { + test: /\.visual$/, + use: [{ + loader: path.resolve(__dirname, './lib/loader-gen.js') + }] + }, + { + test: /(\.hml|app\.js)(\?[^?]+)?$/, + use: [{ + loader: path.resolve(__dirname, './index.js') + }] + }, + { + test: /\.png$/, + use: [{ + loader: 'file-loader', + options: { + name: '[name].[ext]', + outputPath: 'common' + } + }] + }, + { + test: /\.css$/, + use: [{ + loader: 'css-loader' + }] + }, + { + test: /\.less$/, + use: [{ + loader: 'less-loader' + }] + }, + { + test: /\.(scss|sass)$/, + use: [{ + loader: 'style-loader!css-loader!sass-loader' + }] + }, + { + test: /\.jsx?$/, + use: [ + { + loader: path.resolve(__dirname, 'lib/module-script.js') + }, + { + loader: util.loadBabelModule('babel-loader'), + options: { + presets: [util.loadBabelModule('@babel/preset-env')], + plugins: [util.loadBabelModule('@babel/plugin-transform-modules-commonjs'), + util.loadBabelModule('@babel/plugin-proposal-class-properties')] + } + } + ] + } + ] +} + +const cardModule = { + rules: [ + { + test: /\.hml$/, + use: [{ + loader: path.resolve(__dirname, './lib/card-loader.js') + }] + }, + { + test: /\.css$/, + use: [{ + loader: 'css-loader' + }] + }, + { + test: /\.less$/, + use: [{ + loader: 'less-loader' + }] + }, + { + test: /\.(scss|sass)$/, + use: [{ + loader: 'css-loader!sass-loader' + }] + } + ] +} + +let config = { + cache: { + type: 'filesystem' + }, + watch: watchMode, + watchOptions: { + aggregateTimeout: 10, + poll: false, + ignored: /node_modules/ + }, + output: { + filename: '[name].js', + devtoolModuleFilenameTemplate: 'webpack:///[absolute-resource-path]' + }, + devtool: 'nosources-source-map', + mode: 'development', + module: richModule, + node: { + global: false + }, + resolve: { + modules: [path.join(__dirname, 'node_modules'), './node_modules'] + }, + stats: 'none' +} + +function setConfigs(env) { + process.env.error = env.error === undefined ? true : env.error + process.env.warning = env.warning === undefined ? true : env.warning + process.env.note = env.note === undefined ? true : env.note + process.env.buildMode = env.buildMode || 'debug' + process.env.logLevel = env.logLevel || '1' + process.env.isPreview = env.isPreview || false + process.env.projectPath = env.aceModuleRoot || process.env.aceModuleRoot || process.cwd(); + process.env.buildPath = env.aceModuleBuild || process.env.aceModuleBuild || path.resolve(process.env.projectPath, 'build'); + process.env.aceManifestPath = process.env.aceManifestPath || path.resolve(process.env.projectPath, 'manifest.json'); + const manifest = readManifest(process.env.aceManifestPath) + process.env.DEVICE_LEVEL = manifest.type === 'form' ? 'card' : 'rich' + process.env.PLATFORM_VERSION = PLATFORM.VERSION6; + const version = parseInt(manifest.minPlatformVersion); + if (version == 5) { + process.env.PLATFORM_VERSION = PLATFORM.VERSION5; + } + if (version <= 4) { + process.env.PLATFORM_VERSION = PLATFORM.VERSION3; + } +} + + +module.exports = (env) => { + setConfigs(env) + deleteFolderRecursive(process.env.buildPath); + config.entry = loadEntryObj(readManifest(process.env.aceManifestPath), process.env.projectPath, process.env.DEVICE_LEVEL) + config.output.path = path.resolve(__dirname, process.env.buildPath) + config.plugins = [ + new ResourcePlugin(process.env.projectPath, process.env.buildPath, process.env.aceManifestPath), + new ResultStates({ + build: process.env.buildPath + }) + ] + if (fs.existsSync(path.resolve(process.env.projectPath, 'i18n'))) { + config.plugins.push(new CopyPlugin({ + patterns: [ + { + from: path.resolve(process.env.projectPath, 'i18n'), + to: path.resolve(process.env.buildPath, 'i18n'), + noErrorOnMissing: true + } + ] + })) + } + if (process.env.DEVICE_LEVEL === 'card') { + config.module = cardModule + config.plugins.push(new AfterEmitPlugin(process.env.buildPath)) + delete config.cache + } else { + if (env.isPreview !== "true") { + if (env.compilerType && env.compilerType === 'ark') { + config.plugins.push(new GenAbcPlugin(process.env.buildPath, path.join(__dirname, 'bin'), env.buildMode === 'debug')) + } else { + if (env.deviceType) { + let deviceArr = env.deviceType.split(/,/) + let isDefault = deviceArr.indexOf('tv') >= 0 || deviceArr.indexOf('wearable') >= 0 ? true : false + if (isDefault) { + config.plugins.push(new GenBinPlugin(process.env.buildPath, path.join(__dirname, 'bin'))) + } + } + } + } + if (env.sourceMap === 'none') { + config.devtool = false + } + if (env.buildMode === 'release') { + config.mode = 'production' + config.optimization = { + minimize: true, + minimizer: [ + new TerserPlugin({ + terserOptions: { + keep_fnames: true + }, + minify: (file, sourceMap) => { + const uglifyEsOptions = { + compress: { + unused: true + }, + sourceMap: { + content: sourceMap + } + }; + if (process.env.DEVICE_LEVEL === 'rich' && /\/workers\//.test(Object.keys(file)[0])) { + uglifyEsOptions.compress.unused = false; + } + return require('uglify-es').minify(file, uglifyEsOptions); + }, + }) + ] + } + config.output.sourceMapFilename = '_releaseMap/[name].js.map' + } + } + return config +} diff --git a/ace-loader/webpack.router.config.js b/ace-loader/webpack.router.config.js new file mode 100644 index 000000000..a833ee3f2 --- /dev/null +++ b/ace-loader/webpack.router.config.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ + +const main = require("./router/main.product.router.js"); +const path = require("path"); + +module.exports = { + entry: main.appJSPath, + output: { + path: main.buildPath, + filename: "app.js", + libraryTarget: "this", + library: main.pkgName, + libraryExport: "default", + }, + target: "node", + mode: "production", + module: { + rules: [{ + test: /\.js$/, + use: [{ + loader: path.resolve(__dirname, "node_modules/babel-loader"), + options: { + presets: [ + path.resolve(__dirname, "node_modules/@babel/preset-env"), + ], + configFile: false + }, + }, + { + loader: path.resolve(__dirname, "router/module-scipt-router.js"), + options: { + pkgName: main.pkgName, + }, + }, + ], + }], + }, +}; \ No newline at end of file diff --git a/build_ace_loader_library.py b/build_ace_loader_library.py new file mode 100644 index 000000000..da5d89bbf --- /dev/null +++ b/build_ace_loader_library.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Huawei Device Co., Ltd. +# 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. + +import os +import sys +import subprocess +import argparse + +sys.path.append( + os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, + os.pardir, os.pardir, 'build')) +from maple.java.util import build_utils # noqa: E402 + + +def parse_args(): + + parser = argparse.ArgumentParser() + build_utils.add_depfile_option(parser) + + parser.add_argument('--node', help='path to nodejs exetuable') + parser.add_argument('--babel-js', help='path to babel.js') + parser.add_argument("--weex-loader-src-dir", + help='path to weex-loader/src') + parser.add_argument('--ace-loader-src-dir', help='path to ace-loader/src') + parser.add_argument('--babel-config-js', help='path babel.config.js') + parser.add_argument('--module-source-js', help='path module-source.js') + parser.add_argument('--uglify-source-js', help='path uglify-source.js') + parser.add_argument('--output-dir', help='path to output') + + options = parser.parse_args() + return options + + +def do_build(build_cmd, copy_cmd, uglify_cmd): + for cmd in [build_cmd, copy_cmd, uglify_cmd]: + build_utils.check_output(cmd) + + +def main(): + options = parse_args() + build_cmd = [ + options.node, options.babel_js, options.weex_loader_src_dir, + options.ace_loader_src_dir + ] + build_cmd.extend(['--out-dir', options.output_dir]) + build_cmd.extend(['--config-file', options.babel_config_js]) + depfile_deps = [options.node, options.babel_js, options.babel_config_js] + depfile_deps.extend(build_utils.get_all_files(options.weex_loader_src_dir)) + depfile_deps.extend(build_utils.get_all_files(options.ace_loader_src_dir)) + + copy_cmd = [options.node, options.module_source_js, options.output_dir] + depfile_deps.append(options.module_source_js) + + uglify_cmd = [options.node, options.uglify_source_js, options.output_dir] + depfile_deps.append(options.uglify_source_js) + + build_utils.call_and_write_depfile_if_stale( + lambda: do_build(build_cmd, copy_cmd, uglify_cmd), + options, + depfile_deps=depfile_deps, + input_paths=depfile_deps, + output_paths=([options.output_dir])) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/prebuilts/babel.config.js b/prebuilts/babel.config.js new file mode 100644 index 000000000..c56c70303 --- /dev/null +++ b/prebuilts/babel.config.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +module.exports = function(api) { + api.cache(true); + + const presets = ['@babel/preset-env']; + const plugins = [ + '@babel/plugin-transform-modules-commonjs', + '@babel/plugin-proposal-class-properties', + '@babel/plugin-transform-runtime', + [ + '@babel/plugin-transform-arrow-functions', + { + spec: true, + }, + ], + ]; + + return { + presets, + plugins, + }; +}; diff --git a/prebuilts/uglify-source.js b/prebuilts/uglify-source.js new file mode 100644 index 000000000..0823ead66 --- /dev/null +++ b/prebuilts/uglify-source.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * 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. + */ + +const fs = require('fs') +const path = require('path') +const uglifyJS = require('uglify-es') + +readCode(process.argv[2]) + +function readCode(inputPath) { + if (fs.existsSync(inputPath)) { + const files = fs.readdirSync(inputPath) + files.forEach(function(file) { + const filePath = path.join(inputPath, file) + if (fs.existsSync(filePath)) { + const fileStat = fs.statSync(filePath) + if (fileStat.isFile()) { + const code = fs.readFileSync(filePath, 'utf-8') + uglifyCode(code,filePath) + } + if (fileStat.isDirectory()) { + readCode(filePath) + } + } + }) + } +} + +function uglifyCode(code, outPath) { + const uglifyCode = uglifyJS.minify(code).code + fs.writeFileSync(outPath, uglifyCode) +} -- Gitee