diff --git a/.gitignore b/.gitignore
index be86ad3ae7ee6ac4cb439f8ea20ca5098811621a..91cc1be145fe9ad2ef03870ad25d1a4d7e46692c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
-./vscode
+.vscode/
compiler/node_modules/
compiler/lib/
compiler/declarations/
compiler/sample/build/
compiler/component_config.json
-compiler/syntax_parser/dist
+compiler/syntax_parser/dist/
\ No newline at end of file
diff --git a/BUILD.gn b/BUILD.gn
index 0535ce60da5f4a838483b6f64b57ef30be3d1522..aa407906fea48084d2d6cc008bf91abc612c43f0 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -28,6 +28,10 @@ ets_sysResource = get_label_info(":build_ets_sysResource", "target_out_dir") +
"/sysResource.js"
action("build_ets_loader_library") {
+ deps = [
+ ":components",
+ ":server",
+ ]
script = "build_ets_loader_library.py"
depfile = "$target_gen_dir/$target_name.d"
outputs = [
@@ -111,7 +115,11 @@ action("build_ets_loader_library") {
}
action("build_ets_sysResource") {
- script = "//foundation/ace/huawei_proprietary/tools/ets-loader/generateSysResource.py"
+ if (is_standard_system) {
+ script = "//developtools/ace-ets2bundle/generateSysResource.py"
+ } else {
+ script = "//foundation/ace/huawei_proprietary/tools/ets-loader/generateSysResource.py"
+ }
outputs = [ ets_sysResource ]
_id_defined_json =
@@ -141,6 +149,7 @@ ohos_copy("ets_loader") {
deps += [ ":build_ets_sysResource" ]
sources += [ ets_sysResource ]
}
+
outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ]
module_source_dir = target_out_dir + "/$target_name"
module_install_name = ""
@@ -162,6 +171,20 @@ ohos_copy("ets_loader_syntax") {
module_install_name = ""
}
+ohos_copy("components") {
+ sources = [ "compiler/components" ]
+ outputs = [ target_out_dir + "/$target_name" ]
+ module_source_dir = target_out_dir + "/$target_name"
+ module_install_name = ""
+}
+
+ohos_copy("server") {
+ sources = [ "compiler/server" ]
+ outputs = [ target_out_dir + "/$target_name" ]
+ module_source_dir = target_out_dir + "/$target_name"
+ module_install_name = ""
+}
+
ohos_copy("ets_loader_declaration") {
deps = [ ":build_ets_loader_library" ]
sources = [ ets_loader_declarations_dir ]
diff --git a/LICENSE b/LICENSE
index e6bb7bad3615a7c236d2933bc946e2f74b6c59d6..f433b1a53f5b830a205fd2df78e2b34974656c7b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
diff --git a/OAT.xml b/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..98c053c178e35fd341ea526e128f1ca0203a1823
--- /dev/null
+++ b/OAT.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build_ets_loader_library.py b/build_ets_loader_library.py
index 4511664c59452f44ab5dde52368c2355986d0e51..592f315525ed01e13654fc531b3626d6b1ce6c8e 100755
--- a/build_ets_loader_library.py
+++ b/build_ets_loader_library.py
@@ -83,7 +83,7 @@ def main():
depfile_deps.append(options.uglify_source_js)
syntax_cmd = [options.node, options.build_parser_js,
- options.output_syntax_dir]
+ options.output_syntax_dir, options.ets_loader_src_dir]
depfile_deps.append(options.build_parser_js)
build_declarations_file_cmd = [options.node,
diff --git a/compiler/README.md b/compiler/README.md
index ed7654a890ada7250afe7ea3557cbfca27189603..9031b6e435e01cfd7ab82b3e3bf19fa9e3cf3f78 100644
--- a/compiler/README.md
+++ b/compiler/README.md
@@ -21,7 +21,7 @@ First, check whether your node version is 12.x or later;
Secondly, config npm proxy and run `npm install` again.
```
npm config set strict-ssl false
-npm config set registry http://registry.npm.taobao.org
+npm config set registry https://registry.npm.taobao.org
```
### 2. Quick Start
diff --git a/compiler/build_declarations_file.js b/compiler/build_declarations_file.js
index 3b016b6364c1156db00f9cf6294c343c4d89e383..ff95fb8ebc910e56e46ee2fd1e6f792a9e0977bf 100644
--- a/compiler/build_declarations_file.js
+++ b/compiler/build_declarations_file.js
@@ -49,7 +49,6 @@ function generateTargetFile(filePath, output) {
fs.writeFile(fileName, newContent, err => {
if (err) {
console.error(err);
- return;
}
});
});
diff --git a/compiler/build_parser.js b/compiler/build_parser.js
index 03f79ad7d7173eeb323902306daa322f3fff5a52..fd83200ec341749a810a4c06618868b7b39bdcca 100644
--- a/compiler/build_parser.js
+++ b/compiler/build_parser.js
@@ -25,7 +25,7 @@ function generateSyntaxParser(inputFile, nodePath) {
const catalogPath = path.resolve(inputFile, '..');
const catalogSubFiles = fs.readdirSync(catalogPath)
const parserPath = path.resolve(__dirname, './node_modules/pegjs/bin/pegjs');
-
+
if (catalogSubFiles.includes('dist')) {
exec('rm -rf ' + catalogPath + '/dist/*.js');
} else {
diff --git a/compiler/components/ability_component.json b/compiler/components/ability_component.json
new file mode 100644
index 0000000000000000000000000000000000000000..544e737967a82f02553eb87e02b0b75ee8cfb456
--- /dev/null
+++ b/compiler/components/ability_component.json
@@ -0,0 +1,4 @@
+{
+ "name": "AbilityComponent",
+ "attrs": ["onReady", "onDestroy", "onAbilityCreated", "onAbilityMoveToFront", "onAbilityWillRemove"]
+}
\ No newline at end of file
diff --git a/compiler/components/action_sheet.json b/compiler/components/action_sheet.json
new file mode 100644
index 0000000000000000000000000000000000000000..f4152ea9e2afbb1126c2fa4e78f8e102f0218639
--- /dev/null
+++ b/compiler/components/action_sheet.json
@@ -0,0 +1,4 @@
+{
+ "name": "ActionSheet",
+ "attrs": ["show"]
+}
\ No newline at end of file
diff --git a/compiler/components/alphabet_indexer.json b/compiler/components/alphabet_indexer.json
new file mode 100644
index 0000000000000000000000000000000000000000..40be388027b3606c097e7771a4149a36a4a38894
--- /dev/null
+++ b/compiler/components/alphabet_indexer.json
@@ -0,0 +1,7 @@
+{
+ "name": "AlphabetIndexer",
+ "attrs": [
+ "onSelected", "selectedColor", "popupColor", "selectedBackgroundColor", "popupBackground", "usingPopup",
+ "selectedFont", "popupFont", "itemSize", "font", "color", "alignStyle"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/animator.json b/compiler/components/animator.json
new file mode 100644
index 0000000000000000000000000000000000000000..091ccb03314f3e8bad80da5888c1b8d08ec28381
--- /dev/null
+++ b/compiler/components/animator.json
@@ -0,0 +1,9 @@
+{
+ "name": "Animator",
+ "atomic": true,
+ "noDebugLine": true,
+ "attrs": [
+ "state", "duration", "curve", "delay", "fillMode", "iterations", "playMode", "motion",
+ "onStart", "onPause", "onRepeat", "onCancel", "onFinish", "onFrame"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/badge.json b/compiler/components/badge.json
new file mode 100644
index 0000000000000000000000000000000000000000..b4b3bc6b2d64b84a04bc5d64557690a42d3f82d4
--- /dev/null
+++ b/compiler/components/badge.json
@@ -0,0 +1,5 @@
+{
+ "name": "Badge",
+ "atomics": true,
+ "attrs": []
+}
\ No newline at end of file
diff --git a/compiler/components/blank.json b/compiler/components/blank.json
new file mode 100644
index 0000000000000000000000000000000000000000..9fe088f444585a56b0753c8c44ce76a81b7ebfb9
--- /dev/null
+++ b/compiler/components/blank.json
@@ -0,0 +1,6 @@
+{
+ "name": "Blank",
+ "parents": ["Row", "Column"],
+ "atomic": true,
+ "attrs": ["color"]
+}
\ No newline at end of file
diff --git a/compiler/components/button.json b/compiler/components/button.json
new file mode 100644
index 0000000000000000000000000000000000000000..385a0d9f44b1b3e71040bbf9f143f2a3c15a7b47
--- /dev/null
+++ b/compiler/components/button.json
@@ -0,0 +1,4 @@
+{
+ "name": "Button",
+ "attrs": ["type", "stateEffect", "fontColor", "fontSize", "fontWeight", "fontStyle", "fontFamily"]
+}
\ No newline at end of file
diff --git a/compiler/components/calendar.json b/compiler/components/calendar.json
new file mode 100644
index 0000000000000000000000000000000000000000..a24b65df31f6d68d4fa5fd64acc706058c4c4ab4
--- /dev/null
+++ b/compiler/components/calendar.json
@@ -0,0 +1,8 @@
+{
+ "name": "Calendar",
+ "attrs": [
+ "date", "showLunar", "startOfWeek", "offDays", "onSelectChange", "onRequestData",
+ "currentData", "preData", "nextData", "needSlide", "showHoliday", "direction",
+ "currentDayStyle", "nonCurrentDayStyle", "todayStyle", "weekStyle", "workStateStyle"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/camera.json b/compiler/components/camera.json
new file mode 100644
index 0000000000000000000000000000000000000000..4e2068bd4dc0d2aa37c78e6217a7a8b559521d5e
--- /dev/null
+++ b/compiler/components/camera.json
@@ -0,0 +1,5 @@
+{
+ "name": "Camera",
+ "atomic": true,
+ "attrs": ["devicePosition"]
+}
\ No newline at end of file
diff --git a/compiler/components/canvas.json b/compiler/components/canvas.json
new file mode 100644
index 0000000000000000000000000000000000000000..f0a8ba6e67ac73cdf6bf8c0b9b8119820a6edb98
--- /dev/null
+++ b/compiler/components/canvas.json
@@ -0,0 +1,6 @@
+{
+ "name": "Canvas",
+ "attrs": [
+ "onReady"
+ ]
+}
diff --git a/compiler/components/circle.json b/compiler/components/circle.json
new file mode 100644
index 0000000000000000000000000000000000000000..85a8ffe8103d62e81b39ba47a915d66ae4d207cb
--- /dev/null
+++ b/compiler/components/circle.json
@@ -0,0 +1,4 @@
+{
+ "name": "Circle",
+ "atomic": true
+}
\ No newline at end of file
diff --git a/compiler/components/colorPicker.json b/compiler/components/colorPicker.json
new file mode 100644
index 0000000000000000000000000000000000000000..1490cf3f5ab9d4b0b14a651ced31db9b7ce977a5
--- /dev/null
+++ b/compiler/components/colorPicker.json
@@ -0,0 +1,4 @@
+{
+ "name": "ColorPicker",
+ "attrs": ["colors", "onSelect", "setAlignment", "setColunms", "setRows"]
+}
diff --git a/compiler/components/colorPickerDialog.json b/compiler/components/colorPickerDialog.json
new file mode 100644
index 0000000000000000000000000000000000000000..fc76c9d8c0224643e8ecd0d18ca63ddec18130ae
--- /dev/null
+++ b/compiler/components/colorPickerDialog.json
@@ -0,0 +1,4 @@
+{
+ "name": "ColorPickerDialog",
+ "attrs": ["show"]
+}
\ No newline at end of file
diff --git a/compiler/components/column.json b/compiler/components/column.json
new file mode 100644
index 0000000000000000000000000000000000000000..6f6312a84e78af501dfa67493c7d69723cd8de8d
--- /dev/null
+++ b/compiler/components/column.json
@@ -0,0 +1,4 @@
+{
+ "name": "Column",
+ "attrs": ["alignItems"]
+}
\ No newline at end of file
diff --git a/compiler/components/column_split.json b/compiler/components/column_split.json
new file mode 100644
index 0000000000000000000000000000000000000000..cfa1e52bca635bcefa1b8e93b8ea3ddd9451538f
--- /dev/null
+++ b/compiler/components/column_split.json
@@ -0,0 +1,4 @@
+{
+ "name": "ColumnSplit",
+ "attrs": ["resizeable"]
+}
\ No newline at end of file
diff --git a/compiler/components/common_attrs.json b/compiler/components/common_attrs.json
new file mode 100644
index 0000000000000000000000000000000000000000..c5970d43b818295c0eb74373b0426fda5a4ce4e7
--- /dev/null
+++ b/compiler/components/common_attrs.json
@@ -0,0 +1,24 @@
+{
+ "attrs": [
+ "width", "height", "size", "constraintSize", "layoutPriority", "layoutWeight",
+ "padding", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom",
+ "margin", "marginLeft", "marginRight", "marginTop", "marginBottom",
+ "border", "borderStyle", "borderWidth", "borderColor", "borderRadius",
+ "backgroundColor", "backgroundImage", "backgroundImageSize", "backgroundImagePosition",
+ "opacity", "animation", "transition", "stateStyles",
+ "onClick", "onTouch", "touchable", "onKeyEvent", "onHover","onAreaChange",
+ "blur", "backdropBlur", "windowBlur", "translate", "rotate", "scale", "transform",
+ "onAppear", "onDisAppear", "visibility", "flexBasis", "flexShrink", "flexGrow", "alignSelf",
+ "useAlign", "zIndex", "sharedTransition", "direction", "align", "position", "markAnchor",
+ "offset", "enabled", "aspectRatio", "displayPriority",
+ "onDrag", "onDragEnter", "onDragMove", "onDragLeave", "onDrop",
+ "overlay", "linearGradient", "sweepGradient", "radialGradient",
+ "gridOffset", "gridSpan", "useSizeType",
+ "motionPath", "clip", "shadow", "mask", "key",
+ "accessibilityGroup", "accessibilityText", "accessibilityDescription",
+ "accessibilityImportance", "onAccessibility", "grayscale", "brightness", "contrast",
+ "saturate", "geometryTransition",
+ "bindPopup", "colorBlend", "invert", "sepia", "hueRotate", "bindMenu", "hoverEffect",
+ "onFocus", "onBlur", "onFocusMove", "focusable", "responseRegion"
+ ]
+}
diff --git a/compiler/components/counter.json b/compiler/components/counter.json
new file mode 100644
index 0000000000000000000000000000000000000000..34746f606a00e9581c46c91d51a1b69b01003165
--- /dev/null
+++ b/compiler/components/counter.json
@@ -0,0 +1,7 @@
+{
+ "name": "Counter",
+ "attrs": [
+ "onStateChange", "onInc",
+ "onDec", "height", "width"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/datapanel.json b/compiler/components/datapanel.json
new file mode 100644
index 0000000000000000000000000000000000000000..3128924d62d40428cb66ee82379bbc215f2c274e
--- /dev/null
+++ b/compiler/components/datapanel.json
@@ -0,0 +1,5 @@
+{
+ "name": "DataPanel",
+ "atomic": false,
+ "attrs": ["closeEffect"]
+}
\ No newline at end of file
diff --git a/compiler/components/datePicker.json b/compiler/components/datePicker.json
new file mode 100644
index 0000000000000000000000000000000000000000..e5a60b207e9ac19898e4e152c81956ccda15d3d5
--- /dev/null
+++ b/compiler/components/datePicker.json
@@ -0,0 +1,4 @@
+{
+ "name": "DatePicker",
+ "attrs": ["lunar", "onChange", "useMilitaryTime"]
+}
\ No newline at end of file
diff --git a/compiler/components/divider.json b/compiler/components/divider.json
new file mode 100644
index 0000000000000000000000000000000000000000..75728fd5c2b94639c25a30b958c73e65155b5200
--- /dev/null
+++ b/compiler/components/divider.json
@@ -0,0 +1,5 @@
+{
+ "name": "Divider",
+ "atomic": true,
+ "attrs": ["color", "vertical", "strokeWidth", "lineCap"]
+}
\ No newline at end of file
diff --git a/compiler/components/ellipse.json b/compiler/components/ellipse.json
new file mode 100644
index 0000000000000000000000000000000000000000..0f4a225bcdf388626c32fa2dd200e8b69996990a
--- /dev/null
+++ b/compiler/components/ellipse.json
@@ -0,0 +1,4 @@
+{
+ "name": "Ellipse",
+ "atomic": true
+}
\ No newline at end of file
diff --git a/compiler/components/flex.json b/compiler/components/flex.json
new file mode 100644
index 0000000000000000000000000000000000000000..32cee03f48dcd3b07fc6888c95470897f9b48d9d
--- /dev/null
+++ b/compiler/components/flex.json
@@ -0,0 +1,4 @@
+{
+ "name": "Flex",
+ "attrs": []
+}
\ No newline at end of file
diff --git a/compiler/components/form_component.json b/compiler/components/form_component.json
new file mode 100644
index 0000000000000000000000000000000000000000..5532c7f5a9effb104127bc5bb840837c6822c50b
--- /dev/null
+++ b/compiler/components/form_component.json
@@ -0,0 +1,8 @@
+{
+ "name": "FormComponent",
+ "atomic": true,
+ "attrs": [
+ "size", "moduleName", "dimension", "allowUpdate", "visibility",
+ "onAcquired", "onError", "onRouter"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/friction_motion.json b/compiler/components/friction_motion.json
new file mode 100644
index 0000000000000000000000000000000000000000..d87b5bbbc7550a8f5b252ca058ba02e73d75d215
--- /dev/null
+++ b/compiler/components/friction_motion.json
@@ -0,0 +1,4 @@
+{
+ "name": "FrictionMotion",
+ "atomic": true
+}
\ No newline at end of file
diff --git a/compiler/components/gauge.json b/compiler/components/gauge.json
new file mode 100644
index 0000000000000000000000000000000000000000..3e262ca495c929b3e8a55ce4e856abba19d1fecb
--- /dev/null
+++ b/compiler/components/gauge.json
@@ -0,0 +1,7 @@
+{
+ "name": "Gauge",
+ "atomic": true,
+ "attrs": [
+ "value", "startAngle", "endAngle", "colors", "strokeWidth", "labelConfig"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/geometryView.json b/compiler/components/geometryView.json
new file mode 100644
index 0000000000000000000000000000000000000000..d9dfd5cef4f637f2449a4ca566b4eee43ba588a2
--- /dev/null
+++ b/compiler/components/geometryView.json
@@ -0,0 +1,4 @@
+{
+ "name": "GeometryView",
+ "atomic": true
+}
\ No newline at end of file
diff --git a/compiler/components/grid.json b/compiler/components/grid.json
new file mode 100644
index 0000000000000000000000000000000000000000..4d82c84ddee39fdd161e79d88906358dc9eb7e09
--- /dev/null
+++ b/compiler/components/grid.json
@@ -0,0 +1,8 @@
+{
+ "name": "Grid",
+ "children": ["GridItem"],
+ "attrs": [
+ "columnsTemplate", "rowsTemplate", "columnsGap", "rowsGap", "scrollBar", "scrollBarWidth",
+ "scrollBarColor"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/gridItem.json b/compiler/components/gridItem.json
new file mode 100644
index 0000000000000000000000000000000000000000..be369c12d26a48835ea56667657ee433b229f5ee
--- /dev/null
+++ b/compiler/components/gridItem.json
@@ -0,0 +1,6 @@
+{
+ "name": "GridItem",
+ "parents": ["Grid"],
+ "single": true,
+ "attrs": ["rowStart", "rowEnd", "columnStart", "columnEnd", "forceRebuild"]
+}
\ No newline at end of file
diff --git a/compiler/components/grid_container.json b/compiler/components/grid_container.json
new file mode 100644
index 0000000000000000000000000000000000000000..0d067c274e6727fda7583d415034e8ad404db322
--- /dev/null
+++ b/compiler/components/grid_container.json
@@ -0,0 +1,4 @@
+{
+ "name": "GridContainer",
+ "attrs": ["columns", "sizeType", "gutter", "margin"]
+}
\ No newline at end of file
diff --git a/compiler/components/hyperlink.json b/compiler/components/hyperlink.json
new file mode 100644
index 0000000000000000000000000000000000000000..990662d80eff4ef0a2b82ea946c4abcccd1ebffe
--- /dev/null
+++ b/compiler/components/hyperlink.json
@@ -0,0 +1,4 @@
+{
+ "name": "Hyperlink",
+ "attrs": ["color"]
+}
\ No newline at end of file
diff --git a/compiler/components/image.json b/compiler/components/image.json
new file mode 100644
index 0000000000000000000000000000000000000000..d2a738158734a9cf2b3dd830120175e499a63b51
--- /dev/null
+++ b/compiler/components/image.json
@@ -0,0 +1,9 @@
+{
+ "name": "Image",
+ "atomic": true,
+ "attrs": [
+ "alt", "objectFit", "matchTextDirection", "fitOriginalSize", "objectRepeat", "renderMode",
+ "interpolation", "onComplete", "onError", "onFinish", "sourceSize", "fillColor", "autoResize",
+ "syncLoad"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/image_animator.json b/compiler/components/image_animator.json
new file mode 100644
index 0000000000000000000000000000000000000000..73208d2cbadc745952aa9ad6ccea1a5bc23c3e5d
--- /dev/null
+++ b/compiler/components/image_animator.json
@@ -0,0 +1,8 @@
+{
+ "name": "ImageAnimator",
+ "atomic": true,
+ "attrs": [
+ "images", "state", "duration", "reverse", "fixedSize", "preDecode", "fillMode", "iterations",
+ "onStart", "onPause", "onRepeat", "onCancel", "onFinish"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/line.json b/compiler/components/line.json
new file mode 100644
index 0000000000000000000000000000000000000000..bb5340aeca8f0e129138861f1daa9dd3663ede67
--- /dev/null
+++ b/compiler/components/line.json
@@ -0,0 +1,7 @@
+{
+ "name": "Line",
+ "atomic": true,
+ "attrs": [
+ "startPoint","endPoint"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/list.json b/compiler/components/list.json
new file mode 100644
index 0000000000000000000000000000000000000000..acf726d39b4e4969a55a0f2edff1cd55c20beea0
--- /dev/null
+++ b/compiler/components/list.json
@@ -0,0 +1,9 @@
+{
+ "name": "List",
+ "children": ["ListItem", "Section"],
+ "attrs": [
+ "listDirection", "scrollBar", "edgeEffect", "divider", "editMode", "cachedCount",
+ "chainAnimation", "onScroll", "onReachStart", "onReachEnd", "onScrollStop", "onItemDelete",
+ "onItemMove", "onItemDragStart", "onItemDragEnter", "onItemDragMove", "onItemDragLeave", "onItemDrop"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/listItem.json b/compiler/components/listItem.json
new file mode 100644
index 0000000000000000000000000000000000000000..467c66e2319d98091a3b8daf82042d6c07499633
--- /dev/null
+++ b/compiler/components/listItem.json
@@ -0,0 +1,6 @@
+{
+ "name": "ListItem",
+ "parents": ["List"],
+ "single": true,
+ "attrs": ["sticky", "editable"]
+}
\ No newline at end of file
diff --git a/compiler/components/loadingProgress.json b/compiler/components/loadingProgress.json
new file mode 100644
index 0000000000000000000000000000000000000000..08d1a29aae1162213bb146648b10e3db93f90734
--- /dev/null
+++ b/compiler/components/loadingProgress.json
@@ -0,0 +1,5 @@
+{
+ "name": "LoadingProgress",
+ "atomic": true,
+ "attrs": ["color"]
+}
\ No newline at end of file
diff --git a/compiler/components/marquee.json b/compiler/components/marquee.json
new file mode 100644
index 0000000000000000000000000000000000000000..b29b9651edcaebd50c466aa82bbf59d7d45e7b24
--- /dev/null
+++ b/compiler/components/marquee.json
@@ -0,0 +1,7 @@
+{
+ "name": "Marquee",
+ "attrs": [
+ "fontColor", "fontSize", "allowScale", "fontWeight", "fontFamily", "onStart",
+ "onBounce", "onFinish"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/menu.json b/compiler/components/menu.json
new file mode 100644
index 0000000000000000000000000000000000000000..2db5287ec32a1546fe7c122fc08d37bf56e89168
--- /dev/null
+++ b/compiler/components/menu.json
@@ -0,0 +1,5 @@
+{
+ "name": "Menu",
+ "children": ["Option"],
+ "attrs": ["show", "showPosition", "fontColor", "fontSize", "fontWeight", "fontFamily"]
+}
\ No newline at end of file
diff --git a/compiler/components/navigation.json b/compiler/components/navigation.json
new file mode 100644
index 0000000000000000000000000000000000000000..15e9b56a7c20dec6fd9f88d3cf92cc1526d14fea
--- /dev/null
+++ b/compiler/components/navigation.json
@@ -0,0 +1,5 @@
+{
+ "name": "Navigation",
+ "attrs": ["title", "subTitle", "hideTitleBar", "hideBackButton", "titleMode", "menus",
+ "toolBar", "hideToolBar", "onTitleModeChanged"]
+}
\ No newline at end of file
diff --git a/compiler/components/navigator.json b/compiler/components/navigator.json
new file mode 100644
index 0000000000000000000000000000000000000000..8ca4c9404fe62e9214417fb1bbec5543c3843fd8
--- /dev/null
+++ b/compiler/components/navigator.json
@@ -0,0 +1,5 @@
+{
+ "name": "Navigator",
+ "single": true,
+ "attrs": ["target", "type", "params", "active"]
+}
\ No newline at end of file
diff --git a/compiler/components/option.json b/compiler/components/option.json
new file mode 100644
index 0000000000000000000000000000000000000000..7cdad7d91a7cf88ebc1f6120ad8fac701f5b00c9
--- /dev/null
+++ b/compiler/components/option.json
@@ -0,0 +1,5 @@
+{
+ "name": "Option",
+ "parents": ["Menu"],
+ "attrs": ["fontColor", "fontSize", "fontWeight", "fontFamily"]
+}
\ No newline at end of file
diff --git a/compiler/components/pageTransition_enter.json b/compiler/components/pageTransition_enter.json
new file mode 100644
index 0000000000000000000000000000000000000000..d0d84825d2999a0bd857a0e116dcb5dc035f38d2
--- /dev/null
+++ b/compiler/components/pageTransition_enter.json
@@ -0,0 +1,6 @@
+{
+ "name": "PageTransitionEnter",
+ "atomic": true,
+ "noDebugLine": true,
+ "attrs": ["onEnter"]
+}
\ No newline at end of file
diff --git a/compiler/components/pageTransition_exit.json b/compiler/components/pageTransition_exit.json
new file mode 100644
index 0000000000000000000000000000000000000000..24716df5a9546d63ba7e7e55a2ffad58eda17c29
--- /dev/null
+++ b/compiler/components/pageTransition_exit.json
@@ -0,0 +1,6 @@
+{
+ "name": "PageTransitionExit",
+ "atomic": true,
+ "noDebugLine": true,
+ "attrs": ["onExit"]
+}
\ No newline at end of file
diff --git a/compiler/components/panel.json b/compiler/components/panel.json
new file mode 100644
index 0000000000000000000000000000000000000000..636ee17d4b70b5fc1e8487c9e07a6eb38e1e206d
--- /dev/null
+++ b/compiler/components/panel.json
@@ -0,0 +1,7 @@
+{
+ "name": "Panel",
+ "attrs": [
+ "type", "mode", "dragBar", "fullHeight",
+ "halfHeight", "miniHeight", "show", "onChange"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/path.json b/compiler/components/path.json
new file mode 100644
index 0000000000000000000000000000000000000000..7e3efd76b66434c830a612ca2228dd1324be8f2a
--- /dev/null
+++ b/compiler/components/path.json
@@ -0,0 +1,7 @@
+{
+ "name": "Path",
+ "atomic": true,
+ "attrs": [
+ "commands"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/piece.json b/compiler/components/piece.json
new file mode 100644
index 0000000000000000000000000000000000000000..ff54f790a183d23de9916086ef76d770ab762e9a
--- /dev/null
+++ b/compiler/components/piece.json
@@ -0,0 +1,5 @@
+{
+ "name": "Piece",
+ "attrs": ["iconPosition", "fontColor", "fontSize", "fontStyle",
+ "fontWeight","fontFamily", "showDelete", "onClose"]
+}
\ No newline at end of file
diff --git a/compiler/components/polygon.json b/compiler/components/polygon.json
new file mode 100644
index 0000000000000000000000000000000000000000..bc0b1033b30c51dca975d42b7cc4fe80ccb0d9be
--- /dev/null
+++ b/compiler/components/polygon.json
@@ -0,0 +1,5 @@
+{
+ "name": "Polygon",
+ "atomic": true,
+ "attrs": ["points"]
+}
\ No newline at end of file
diff --git a/compiler/components/polyline.json b/compiler/components/polyline.json
new file mode 100644
index 0000000000000000000000000000000000000000..5f5862ba767a0bfe6c9edcbe51eeb4f0f1499d54
--- /dev/null
+++ b/compiler/components/polyline.json
@@ -0,0 +1,5 @@
+{
+ "name": "Polyline",
+ "atomic": true,
+ "attrs": ["points"]
+}
\ No newline at end of file
diff --git a/compiler/components/progress.json b/compiler/components/progress.json
new file mode 100644
index 0000000000000000000000000000000000000000..027e80dbd253c775c45a254e90eccfe8508ec468
--- /dev/null
+++ b/compiler/components/progress.json
@@ -0,0 +1,7 @@
+{
+ "name": "Progress",
+ "atomic": true,
+ "attrs": [
+ "value", "color", "cricularStyle", "circularStyle"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/qrcode.json b/compiler/components/qrcode.json
new file mode 100644
index 0000000000000000000000000000000000000000..eda56a4b739275e9b01d909b918682be0c90ec06
--- /dev/null
+++ b/compiler/components/qrcode.json
@@ -0,0 +1,4 @@
+{
+ "name": "QRCode",
+ "attrs": ["color", "backgroundColor"]
+}
\ No newline at end of file
diff --git a/compiler/components/radio.json b/compiler/components/radio.json
new file mode 100644
index 0000000000000000000000000000000000000000..ae90392d7e30aaa1d571e94ebc5802677224fbbe
--- /dev/null
+++ b/compiler/components/radio.json
@@ -0,0 +1,5 @@
+{
+ "name": "Radio",
+ "atomic": true,
+ "attrs": ["checked", "onChange"]
+}
\ No newline at end of file
diff --git a/compiler/components/rating.json b/compiler/components/rating.json
new file mode 100644
index 0000000000000000000000000000000000000000..ec43a7a37987ca2cc47eef8da378b514b5c12ab0
--- /dev/null
+++ b/compiler/components/rating.json
@@ -0,0 +1,4 @@
+{
+ "name": "Rating",
+ "attrs": ["stars", "stepSize", "starStyle", "onChange"]
+}
\ No newline at end of file
diff --git a/compiler/components/rect.json b/compiler/components/rect.json
new file mode 100644
index 0000000000000000000000000000000000000000..fce921d52d640848b48cd8b6aa36b7da57ab777e
--- /dev/null
+++ b/compiler/components/rect.json
@@ -0,0 +1,7 @@
+{
+ "name": "Rect",
+ "atomic": true,
+ "attrs": [
+ "radiusWidth", "radiusHeight", "radius"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/refresh.json b/compiler/components/refresh.json
new file mode 100644
index 0000000000000000000000000000000000000000..6346ca41ed76a280d0c930dbd17ffaf91ae561a1
--- /dev/null
+++ b/compiler/components/refresh.json
@@ -0,0 +1,7 @@
+{
+ "name": "Refresh",
+ "single": true,
+ "attrs": [
+ "refreshing", "offset", "friction", "onStateChange", "onRefreshing"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/row.json b/compiler/components/row.json
new file mode 100644
index 0000000000000000000000000000000000000000..556b560aefbeb5c3b8aa4dfa66e6e7da6994b6b7
--- /dev/null
+++ b/compiler/components/row.json
@@ -0,0 +1,4 @@
+{
+ "name": "Row",
+ "attrs": ["alignItems"]
+}
\ No newline at end of file
diff --git a/compiler/components/row_split.json b/compiler/components/row_split.json
new file mode 100644
index 0000000000000000000000000000000000000000..da1c9182dda0fa21c46783e07952be9081075a6b
--- /dev/null
+++ b/compiler/components/row_split.json
@@ -0,0 +1,4 @@
+{
+ "name": "RowSplit",
+ "attrs": ["resizeable"]
+}
\ No newline at end of file
diff --git a/compiler/components/scroll.json b/compiler/components/scroll.json
new file mode 100644
index 0000000000000000000000000000000000000000..8c9a9ece75eedaff83f8ac7c3e24ada9a193fe19
--- /dev/null
+++ b/compiler/components/scroll.json
@@ -0,0 +1,7 @@
+{
+ "name": "Scroll",
+ "attrs": [
+ "scrollable", "onScroll", "onScrollEdge", "onScrollEnd", "scrollBar", "scrollBarColor",
+ "scrollBarWidth", "edgeEffect"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/scroll_bar.json b/compiler/components/scroll_bar.json
new file mode 100644
index 0000000000000000000000000000000000000000..7ab2f67c3cd2292111f6b382f7208cb5e0e8ab8f
--- /dev/null
+++ b/compiler/components/scroll_bar.json
@@ -0,0 +1,6 @@
+{
+ "name": "ScrollBar",
+ "attrs": [],
+ "atomic": false,
+ "single": true
+}
\ No newline at end of file
diff --git a/compiler/components/scroll_motion.json b/compiler/components/scroll_motion.json
new file mode 100644
index 0000000000000000000000000000000000000000..bd2b26a91a52cd6f5991c2b70ddad678b47a03e2
--- /dev/null
+++ b/compiler/components/scroll_motion.json
@@ -0,0 +1,4 @@
+{
+ "name": "ScrollMotion",
+ "atomic": true
+}
\ No newline at end of file
diff --git a/compiler/components/search.json b/compiler/components/search.json
new file mode 100644
index 0000000000000000000000000000000000000000..89d7fad27b2a59c527641d356f07a7d9d91359bd
--- /dev/null
+++ b/compiler/components/search.json
@@ -0,0 +1,8 @@
+{
+ "name": "Search",
+ "atomic": true,
+ "attrs": [
+ "searchButton", "placeholderColor", "placeholderFont", "textFont", "onSubmit", "onChange",
+ "onCopy", "OnCut", "OnPaste"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/section.json b/compiler/components/section.json
new file mode 100644
index 0000000000000000000000000000000000000000..97bc13f1db94ca57a1dba9cab369f8691ac0837d
--- /dev/null
+++ b/compiler/components/section.json
@@ -0,0 +1,4 @@
+{
+ "name": "Section",
+ "attrs": []
+}
\ No newline at end of file
diff --git a/compiler/components/shape.json b/compiler/components/shape.json
new file mode 100644
index 0000000000000000000000000000000000000000..51c1cfeb51e6bf1afa916e0077cfc6236114bc0a
--- /dev/null
+++ b/compiler/components/shape.json
@@ -0,0 +1,13 @@
+{
+ "name": "Shape",
+ "children": [
+ "Rect", "Path", "Circle", "Ellipse", "Shape", "Polyline", "Polygon", "Image", "Text", "Column",
+ "Row"
+ ],
+ "attrs": [
+ "stroke", "fill", "strokeDashOffset", "strokeLineCap",
+ "strokeLineJoin", "strokeMiterLimit", "strokeOpacity",
+ "fillOpacity", "strokeWidth", "antiAlias", "strokeDashArray",
+ "viewPort", "mesh"
+ ]
+}
diff --git a/compiler/components/sheet.json b/compiler/components/sheet.json
new file mode 100644
index 0000000000000000000000000000000000000000..f180d0ce32ff2465670965a32270c33fe506a8aa
--- /dev/null
+++ b/compiler/components/sheet.json
@@ -0,0 +1,5 @@
+{
+ "name": "sheet",
+ "children": ["Section"],
+ "attrs": []
+}
\ No newline at end of file
diff --git a/compiler/components/sideBar_container.json b/compiler/components/sideBar_container.json
new file mode 100644
index 0000000000000000000000000000000000000000..ec9f98925bc867432065617b52fa6404544122f1
--- /dev/null
+++ b/compiler/components/sideBar_container.json
@@ -0,0 +1,6 @@
+{
+ "name": "SideBarContainer",
+ "attrs": [
+ "showControlButton", "onChange"
+ ]
+ }
\ No newline at end of file
diff --git a/compiler/components/slider.json b/compiler/components/slider.json
new file mode 100644
index 0000000000000000000000000000000000000000..61982642c1bd0fab646a3c3f0a1980c2ab0bf106
--- /dev/null
+++ b/compiler/components/slider.json
@@ -0,0 +1,8 @@
+{
+ "name": "Slider",
+ "atomic": true,
+ "attrs": [
+ "blockColor", "trackColor", "selectedColor", "minLabel", "maxLabel", "showSteps", "showTips",
+ "onChange"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/span.json b/compiler/components/span.json
new file mode 100644
index 0000000000000000000000000000000000000000..d8467e61b34bee0b840773b3032dca9a6c2778aa
--- /dev/null
+++ b/compiler/components/span.json
@@ -0,0 +1,8 @@
+{
+ "name": "Span",
+ "atomic": true,
+ "attrs": [
+ "fontColor", "fontSize", "fontStyle", "fontFamily", "fontWeight", "decoration", "letterSpacing",
+ "textCase"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/spring_motion.json b/compiler/components/spring_motion.json
new file mode 100644
index 0000000000000000000000000000000000000000..abb415f4c8bab4ce7bc3a4cdcb64463821268a3d
--- /dev/null
+++ b/compiler/components/spring_motion.json
@@ -0,0 +1,4 @@
+{
+ "name": "SpringMotion",
+ "atomic": true
+}
\ No newline at end of file
diff --git a/compiler/components/spring_prop.json b/compiler/components/spring_prop.json
new file mode 100644
index 0000000000000000000000000000000000000000..9c53c7bdd278d9d8a5fa13ee5a37549181ef65b1
--- /dev/null
+++ b/compiler/components/spring_prop.json
@@ -0,0 +1,4 @@
+{
+ "name": "SpringProp",
+ "atomic": true
+}
\ No newline at end of file
diff --git a/compiler/components/stack.json b/compiler/components/stack.json
new file mode 100644
index 0000000000000000000000000000000000000000..7007a9f8cb487052c73022aaaaf57e13ad257b3c
--- /dev/null
+++ b/compiler/components/stack.json
@@ -0,0 +1,4 @@
+{
+ "name": "Stack",
+ "attrs": ["alignContent"]
+}
\ No newline at end of file
diff --git a/compiler/components/stepper.json b/compiler/components/stepper.json
new file mode 100644
index 0000000000000000000000000000000000000000..50484fe4d98216b7a963b3a47b0543b226a4245b
--- /dev/null
+++ b/compiler/components/stepper.json
@@ -0,0 +1,7 @@
+{
+ "name": "Stepper",
+ "children": ["StepperItem"],
+ "attrs": [
+ "onFinish", "onSkip", "onChange", "onNext", "onPrevious"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/stepperItem.json b/compiler/components/stepperItem.json
new file mode 100644
index 0000000000000000000000000000000000000000..4a38a78a5001991003f08d20c1108632fe5936e8
--- /dev/null
+++ b/compiler/components/stepperItem.json
@@ -0,0 +1,6 @@
+{
+ "name": "StepperItem",
+ "parents": ["Stepper"],
+ "single": true,
+ "attrs": ["prevLabel", "nextLabel", "status"]
+}
\ No newline at end of file
diff --git a/compiler/components/swiper.json b/compiler/components/swiper.json
new file mode 100644
index 0000000000000000000000000000000000000000..6164d4b43a15b5307c547e75c5557b95e6465291
--- /dev/null
+++ b/compiler/components/swiper.json
@@ -0,0 +1,7 @@
+{
+ "name": "Swiper",
+ "attrs": [
+ "index", "autoPlay", "interval", "indicator", "loop", "duration", "vertical", "itemSpace",
+ "cachedCount", "displayMode", "displayCount", "effectMode", "disableSwipe", "onChange"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/tab_content.json b/compiler/components/tab_content.json
new file mode 100644
index 0000000000000000000000000000000000000000..e0beff067eea43fd90f106bb3d7cbb08e479c0d6
--- /dev/null
+++ b/compiler/components/tab_content.json
@@ -0,0 +1,5 @@
+{
+ "name": "TabContent",
+ "parents": ["Tabs"],
+ "attrs": ["tabBar"]
+}
\ No newline at end of file
diff --git a/compiler/components/tabs.json b/compiler/components/tabs.json
new file mode 100644
index 0000000000000000000000000000000000000000..68369496ce721d6054180066b7b70eaf80363fb2
--- /dev/null
+++ b/compiler/components/tabs.json
@@ -0,0 +1,8 @@
+{
+ "name": "Tabs",
+ "children": ["TabContent"],
+ "attrs": [
+ "vertical", "scrollable", "barMode", "barWidth", "barHeight", "animationDuration",
+ "onChange"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/text.json b/compiler/components/text.json
new file mode 100644
index 0000000000000000000000000000000000000000..9d8d8eff53bf81c070f4356f699004765d744853
--- /dev/null
+++ b/compiler/components/text.json
@@ -0,0 +1,9 @@
+{
+ "name": "Text",
+ "children": ["Span"],
+ "attrs": [
+ "fontColor", "fontSize", "fontStyle", "fontWeight", "textAlign", "lineHeight", "textOverflow",
+ "maxLines", "decoration", "letterSpacing", "textCase", "baselineOffset", "minFontSize",
+ "maxFontSize"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/textPicker.json b/compiler/components/textPicker.json
new file mode 100644
index 0000000000000000000000000000000000000000..2e3cb114e76c5e9de9f0c2e491931ae2a3cab110
--- /dev/null
+++ b/compiler/components/textPicker.json
@@ -0,0 +1,4 @@
+{
+ "name": "TextPicker",
+ "attrs": ["defaultPickerItemHeight", "onAccept", "onCancel", "onChange"]
+}
\ No newline at end of file
diff --git a/compiler/components/textarea.json b/compiler/components/textarea.json
new file mode 100644
index 0000000000000000000000000000000000000000..60f93d5ebb73089111d7da4390601b1721ee5282
--- /dev/null
+++ b/compiler/components/textarea.json
@@ -0,0 +1,8 @@
+{
+ "name": "TextArea",
+ "atomic": true,
+ "attrs": [
+ "placeholderColor", "placeholderFont", "textAlign", "caretColor", "onChange",
+ "onCopy", "OnCut", "OnPaste", "fontSize", "fontColor", "fontStyle", "fontWeight", "fontFamily"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/textinput.json b/compiler/components/textinput.json
new file mode 100644
index 0000000000000000000000000000000000000000..a876382bf273e7e4302452d33591f204f0202a86
--- /dev/null
+++ b/compiler/components/textinput.json
@@ -0,0 +1,9 @@
+{
+ "name": "TextInput",
+ "atomic": true,
+ "attrs": [
+ "type", "placeholderColor", "placeholderFont", "enterKeyType", "caretColor", "maxLength",
+ "onEditChanged", "onSubmit", "onChange", "onCopy", "OnCut", "OnPaste", "fontSize",
+ "fontColor", "fontStyle", "fontWeight", "fontFamily"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/toggle.json b/compiler/components/toggle.json
new file mode 100644
index 0000000000000000000000000000000000000000..fbee0bfff6168bb120e8f6fcfcc9dd2d0e6c9017
--- /dev/null
+++ b/compiler/components/toggle.json
@@ -0,0 +1,4 @@
+{
+ "name": "Toggle",
+ "attrs": ["onChange", "selectedColor", "switchPointColor"]
+}
\ No newline at end of file
diff --git a/compiler/components/video.json b/compiler/components/video.json
new file mode 100644
index 0000000000000000000000000000000000000000..3a9e18ca32cd887415bbd97f4a5ca20971d5127c
--- /dev/null
+++ b/compiler/components/video.json
@@ -0,0 +1,8 @@
+{
+ "name": "Video",
+ "atomic": true,
+ "attrs": [
+ "muted", "autoPlay", "controls", "loop", "objectFit", "onSeeking", "onFullscreenChange",
+ "onStart", "onPause", "onPrepared", "onFinish", "onSeeked", "onUpdate", "onError"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/components/web.json b/compiler/components/web.json
new file mode 100644
index 0000000000000000000000000000000000000000..80a3b77372363aca208a71cd3c1c68c067935b12
--- /dev/null
+++ b/compiler/components/web.json
@@ -0,0 +1,5 @@
+{
+ "name": "Web",
+ "atomic": true,
+ "attrs": ["onPagestart", "onPagefinish", "onError","onMessage"]
+}
\ No newline at end of file
diff --git a/compiler/components/xcomponent.json b/compiler/components/xcomponent.json
new file mode 100644
index 0000000000000000000000000000000000000000..43582fe31db6fa880f44f4266ac1f317e963aea7
--- /dev/null
+++ b/compiler/components/xcomponent.json
@@ -0,0 +1,7 @@
+{
+ "name": "XComponent",
+ "atomic": true,
+ "attrs": [
+ "id", "type", "libraryname", "source", "onLoad", "onDestroy"
+ ]
+}
\ No newline at end of file
diff --git a/compiler/main.js b/compiler/main.js
index b356e486be063ca3316d967a42b04b09c7d03675..de983dc7581a61f47c5d48d8c0dc97b453e43a4d 100644
--- a/compiler/main.js
+++ b/compiler/main.js
@@ -49,6 +49,7 @@ function initProjectConfig(projectConfig) {
path.resolve(projectConfig.projectPath, 'build');
projectConfig.manifestFilePath = projectConfig.manifestFilePath || process.env.aceManifestPath ||
path.join(projectConfig.projectPath, 'manifest.json');
+ projectConfig.aceConfigPath = projectConfig.aceConfigPath || process.env.aceConfigPath;
}
function loadEntryObj(projectConfig) {
@@ -60,11 +61,14 @@ function loadEntryObj(projectConfig) {
staticPreviewPage + '.ets?entry';
} else if (abilityConfig.abilityType === 'page') {
let manifest = {};
- try {
+ if (fs.existsSync(projectConfig.manifestFilePath)) {
const jsonString = fs.readFileSync(projectConfig.manifestFilePath).toString();
manifest = JSON.parse(jsonString);
- } catch (error) {
- throw Error(`\u001b[31m ERROR: the manifest file '${projectConfig.manifestFilePath}' is lost or format is invalid. \u001b[39m`).message;
+ } else if (process.env.aceConfigPath && fs.existsSync( projectConfig.aceConfigPath)) {
+ buildManifest(manifest, projectConfig.aceConfigPath);
+ } else {
+ throw Error('\u001b[31m ERROR: the manifest file ' + projectConfig.manifestFilePath +
+ ' or config.json is lost or format is invalid. \u001b[39m').message;
}
if (manifest.pages) {
const pages = manifest.pages;
@@ -77,7 +81,49 @@ function loadEntryObj(projectConfig) {
}
});
} else {
- throw Error(`\u001b[31m ERROR: missing pages attribute in '${projectConfig.manifestFilePath}'. \u001b[39m`).message;
+ throw Error('\u001b[31m ERROR: missing pages attribute in ' + projectConfig.manifestFilePath +
+ '. \u001b[39m').message;
+ }
+ }
+}
+
+function buildManifest(manifest, aceConfigPath) {
+ try {
+ const configJson = JSON.parse(fs.readFileSync(aceConfigPath).toString());
+ const srcPath = process.env.srcPath;
+ manifest.type = process.env.abilityType;
+ if (configJson.module && configJson.module.abilities) {
+ manifest.pages = getPages(configJson, srcPath);
+ } else {
+ throw Error('\u001b[31m'+
+ 'EERROR: the config.json file miss keyword module || module[abilities].' +
+ '\u001b[39m').message;
+ }
+ manifest.minPlatformVersion = configJson.app.apiVersion.compatible;
+ } catch (e) {
+ throw Error("\x1B[31m" + 'ERROR: the config.json file is lost or format is invalid.' +
+ "\x1B[39m").message;
+ }
+}
+
+function getPages(configJson, srcPath) {
+ const pages = []
+ for (const ability of configJson.module.abilities){
+ if (ability.srcPath === srcPath) {
+ readPages(ability, pages, configJson)
+ break;
+ }
+ }
+ return pages;
+}
+
+function readPages(ability, pages, configJson) {
+ for (const js of configJson.module.js){
+ if (ability.name === js.name) {
+ js.pages.forEach(page => {
+ pages.push(page)
+ })
+ break;
}
}
}
diff --git a/compiler/package-lock.json b/compiler/package-lock.json
index 8b3288c9d2105b40baf981b70833f10a804ee5ac..ee76599bde7186b7a37efe798ea916b5a7bc246f 100644
--- a/compiler/package-lock.json
+++ b/compiler/package-lock.json
@@ -29,13 +29,13 @@
},
"slash": {
"version": "2.0.0",
- "resolved": "https://registry.nlark.com/slash/download/slash-2.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/slash/download/slash-2.0.0.tgz?cache=0&sync_timestamp=1618384508676&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fslash%2Fdownload%2Fslash-2.0.0.tgz",
"integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=",
"dev": true
},
"source-map": {
"version": "0.5.7",
- "resolved": "https://registry.nlark.com/source-map/download/source-map-0.5.7.tgz",
+ "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
}
@@ -52,7 +52,7 @@
},
"@babel/compat-data": {
"version": "7.16.4",
- "resolved": "https://registry.npmmirror.com/@babel/compat-data/download/@babel/compat-data-7.16.4.tgz?cache=0&sync_timestamp=1637102873430&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fcompat-data%2Fdownload%2F%40babel%2Fcompat-data-7.16.4.tgz",
+ "resolved": "https://registry.npmmirror.com/@babel/compat-data/download/@babel/compat-data-7.16.4.tgz?cache=0&sync_timestamp=1637102977873&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fcompat-data%2Fdownload%2F%40babel%2Fcompat-data-7.16.4.tgz",
"integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==",
"dev": true
},
@@ -81,13 +81,13 @@
"dependencies": {
"semver": {
"version": "6.3.0",
- "resolved": "https://registry.nlark.com/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
},
"source-map": {
"version": "0.5.7",
- "resolved": "https://registry.nlark.com/source-map/download/source-map-0.5.7.tgz",
+ "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
}
@@ -106,7 +106,7 @@
"dependencies": {
"source-map": {
"version": "0.5.7",
- "resolved": "https://registry.nlark.com/source-map/download/source-map-0.5.7.tgz",
+ "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
}
@@ -133,7 +133,7 @@
},
"@babel/helper-compilation-targets": {
"version": "7.16.3",
- "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.16.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.16.3.tgz?cache=0&sync_timestamp=1636495250177&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fhelper-compilation-targets%2Fdownload%2F%40babel%2Fhelper-compilation-targets-7.16.3.tgz",
"integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==",
"dev": true,
"requires": {
@@ -145,7 +145,7 @@
"dependencies": {
"semver": {
"version": "6.3.0",
- "resolved": "https://registry.nlark.com/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
}
@@ -178,7 +178,7 @@
},
"@babel/helper-define-polyfill-provider": {
"version": "0.3.0",
- "resolved": "https://registry.npmmirror.com/@babel/helper-define-polyfill-provider/download/@babel/helper-define-polyfill-provider-0.3.0.tgz?cache=0&sync_timestamp=1636799963185&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fhelper-define-polyfill-provider%2Fdownload%2F%40babel%2Fhelper-define-polyfill-provider-0.3.0.tgz",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-define-polyfill-provider/download/@babel/helper-define-polyfill-provider-0.3.0.tgz?cache=0&sync_timestamp=1636799771768&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fhelper-define-polyfill-provider%2Fdownload%2F%40babel%2Fhelper-define-polyfill-provider-0.3.0.tgz",
"integrity": "sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==",
"dev": true,
"requires": {
@@ -194,7 +194,7 @@
"dependencies": {
"semver": {
"version": "6.3.0",
- "resolved": "https://registry.nlark.com/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
}
@@ -415,7 +415,7 @@
},
"color-convert": {
"version": "1.9.3",
- "resolved": "https://registry.nlark.com/color-convert/download/color-convert-1.9.3.tgz",
+ "resolved": "https://registry.npmmirror.com/color-convert/download/color-convert-1.9.3.tgz",
"integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
"dev": true,
"requires": {
@@ -424,7 +424,7 @@
},
"color-name": {
"version": "1.1.3",
- "resolved": "https://registry.nlark.com/color-name/download/color-name-1.1.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
@@ -631,7 +631,7 @@
},
"@babel/plugin-syntax-async-generators": {
"version": "7.8.4",
- "resolved": "https://registry.nlark.com/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz?cache=0&sync_timestamp=1600349131060&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-async-generators%2Fdownload%2F%40babel%2Fplugin-syntax-async-generators-7.8.4.tgz",
"integrity": "sha1-qYP7Gusuw/btBCohD2QOkOeG/g0=",
"dev": true,
"requires": {
@@ -658,7 +658,7 @@
},
"@babel/plugin-syntax-dynamic-import": {
"version": "7.8.3",
- "resolved": "https://registry.nlark.com/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz?cache=0&sync_timestamp=1599827954750&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-dynamic-import%2Fdownload%2F%40babel%2Fplugin-syntax-dynamic-import-7.8.3.tgz",
"integrity": "sha1-Yr+Ysto80h1iYVT8lu5bPLaOrLM=",
"dev": true,
"requires": {
@@ -667,7 +667,7 @@
},
"@babel/plugin-syntax-export-namespace-from": {
"version": "7.8.3",
- "resolved": "https://registry.nlark.com/@babel/plugin-syntax-export-namespace-from/download/@babel/plugin-syntax-export-namespace-from-7.8.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-export-namespace-from/download/@babel/plugin-syntax-export-namespace-from-7.8.3.tgz",
"integrity": "sha1-AolkqbqA28CUyRXEh618TnpmRlo=",
"dev": true,
"requires": {
@@ -685,7 +685,7 @@
},
"@babel/plugin-syntax-logical-assignment-operators": {
"version": "7.10.4",
- "resolved": "https://registry.nlark.com/@babel/plugin-syntax-logical-assignment-operators/download/@babel/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-logical-assignment-operators/download/@babel/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
"integrity": "sha1-ypHvRjA1MESLkGZSusLp/plB9pk=",
"dev": true,
"requires": {
@@ -694,7 +694,7 @@
},
"@babel/plugin-syntax-nullish-coalescing-operator": {
"version": "7.8.3",
- "resolved": "https://registry.nlark.com/@babel/plugin-syntax-nullish-coalescing-operator/download/@babel/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-nullish-coalescing-operator/download/@babel/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
"integrity": "sha1-Fn7XA2iIYIH3S1w2xlqIwDtm0ak=",
"dev": true,
"requires": {
@@ -703,7 +703,7 @@
},
"@babel/plugin-syntax-numeric-separator": {
"version": "7.10.4",
- "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-numeric-separator/download/@babel/plugin-syntax-numeric-separator-7.10.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-numeric-separator/download/@babel/plugin-syntax-numeric-separator-7.10.4.tgz",
"integrity": "sha1-ubBws+M1cM2f0Hun+pHA3Te5r5c=",
"dev": true,
"requires": {
@@ -712,7 +712,7 @@
},
"@babel/plugin-syntax-object-rest-spread": {
"version": "7.8.3",
- "resolved": "https://registry.nlark.com/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz",
"integrity": "sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE=",
"dev": true,
"requires": {
@@ -1172,7 +1172,7 @@
"dependencies": {
"semver": {
"version": "6.3.0",
- "resolved": "https://registry.nlark.com/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
}
@@ -1291,7 +1291,7 @@
},
"@humanwhocodes/config-array": {
"version": "0.5.0",
- "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/download/@humanwhocodes/config-array-0.5.0.tgz",
+ "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/download/@humanwhocodes/config-array-0.5.0.tgz?cache=0&sync_timestamp=1635880863762&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40humanwhocodes%2Fconfig-array%2Fdownload%2F%40humanwhocodes%2Fconfig-array-0.5.0.tgz",
"integrity": "sha1-FAeWfUxu7Nc4j4Os8er00Mbljvk=",
"dev": true,
"requires": {
@@ -1302,20 +1302,20 @@
},
"@humanwhocodes/object-schema": {
"version": "1.2.1",
- "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/download/@humanwhocodes/object-schema-1.2.1.tgz",
+ "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/download/@humanwhocodes/object-schema-1.2.1.tgz?cache=0&sync_timestamp=1635879961525&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40humanwhocodes%2Fobject-schema%2Fdownload%2F%40humanwhocodes%2Fobject-schema-1.2.1.tgz",
"integrity": "sha1-tSBSnsIdjllFoYUd/Rwy6U45/0U=",
"dev": true
},
"@nicolo-ribaudo/chokidar-2": {
"version": "2.1.8-no-fsevents.3",
- "resolved": "https://registry.nlark.com/@nicolo-ribaudo/chokidar-2/download/@nicolo-ribaudo/chokidar-2-2.1.8-no-fsevents.3.tgz",
+ "resolved": "https://registry.nlark.com/@nicolo-ribaudo/chokidar-2/download/@nicolo-ribaudo/chokidar-2-2.1.8-no-fsevents.3.tgz?cache=0&sync_timestamp=1631881482082&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nicolo-ribaudo%2Fchokidar-2%2Fdownload%2F%40nicolo-ribaudo%2Fchokidar-2-2.1.8-no-fsevents.3.tgz",
"integrity": "sha1-Mj1y3SUQPQxPvc6J2t9XSnh7H5s=",
"dev": true,
"optional": true
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
- "resolved": "https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz?cache=0&sync_timestamp=1622792718463&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.scandir%2Fdownload%2F%40nodelib%2Ffs.scandir-2.1.5.tgz",
+ "resolved": "https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz",
"integrity": "sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=",
"requires": {
"@nodelib/fs.stat": "2.0.5",
@@ -1329,7 +1329,7 @@
},
"@nodelib/fs.walk": {
"version": "1.2.8",
- "resolved": "https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.8.tgz?cache=0&sync_timestamp=1625770050780&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.walk%2Fdownload%2F%40nodelib%2Ffs.walk-1.2.8.tgz",
+ "resolved": "https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.8.tgz",
"integrity": "sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=",
"requires": {
"@nodelib/fs.scandir": "2.1.5",
@@ -1356,12 +1356,12 @@
},
"@types/estree": {
"version": "0.0.50",
- "resolved": "https://registry.npmmirror.com/@types/estree/download/@types/estree-0.0.50.tgz?cache=0&sync_timestamp=1637266061438&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Festree%2Fdownload%2F%40types%2Festree-0.0.50.tgz",
+ "resolved": "https://registry.npmmirror.com/@types/estree/download/@types/estree-0.0.50.tgz?cache=0&sync_timestamp=1637263662156&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Festree%2Fdownload%2F%40types%2Festree-0.0.50.tgz",
"integrity": "sha1-Hgyqk2TT/M0pMcPtlv2+ql1MyoM="
},
"@types/glob": {
"version": "7.2.0",
- "resolved": "https://registry.npmmirror.com/@types/glob/download/@types/glob-7.2.0.tgz?cache=0&sync_timestamp=1637265668380&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fglob%2Fdownload%2F%40types%2Fglob-7.2.0.tgz",
+ "resolved": "https://registry.npmmirror.com/@types/glob/download/@types/glob-7.2.0.tgz",
"integrity": "sha1-vBtb86qS8lvV3TnzXFc2G9zlsus=",
"requires": {
"@types/minimatch": "*",
@@ -1370,18 +1370,18 @@
},
"@types/json-schema": {
"version": "7.0.9",
- "resolved": "https://registry.npmmirror.com/@types/json-schema/download/@types/json-schema-7.0.9.tgz?cache=0&sync_timestamp=1637265456183&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fjson-schema%2Fdownload%2F%40types%2Fjson-schema-7.0.9.tgz",
+ "resolved": "https://registry.npmmirror.com/@types/json-schema/download/@types/json-schema-7.0.9.tgz",
"integrity": "sha1-l+3JA36gw4WFMgsolk3eOznkZg0="
},
"@types/minimatch": {
"version": "3.0.5",
- "resolved": "https://registry.npmmirror.com/@types/minimatch/download/@types/minimatch-3.0.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fminimatch%2Fdownload%2F%40types%2Fminimatch-3.0.5.tgz",
+ "resolved": "https://registry.npmmirror.com/@types/minimatch/download/@types/minimatch-3.0.5.tgz?cache=0&sync_timestamp=1637267467935&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fminimatch%2Fdownload%2F%40types%2Fminimatch-3.0.5.tgz",
"integrity": "sha1-EAHMXmo3BLg8I2An538vWOoBD0A="
},
"@types/node": {
- "version": "17.0.1",
- "resolved": "https://registry.npmmirror.com/@types/node/download/@types/node-17.0.1.tgz",
- "integrity": "sha512-NXKvBVUzIbs6ylBwmOwHFkZS2EXCcjnqr8ZCRNaXBkHAf+3mn/rPcJxwrzuc6movh8fxQAsUUfYklJ/EG+hZqQ=="
+ "version": "17.0.2",
+ "resolved": "https://registry.npmmirror.com/@types/node/download/@types/node-17.0.2.tgz",
+ "integrity": "sha512-JepeIUPFDARgIs0zD/SKPgFsJEAF0X5/qO80llx59gOxFTboS9Amv3S+QfB7lqBId5sFXJ99BN0J6zFRvL9dDA=="
},
"@types/source-list-map": {
"version": "0.1.2",
@@ -1390,12 +1390,12 @@
},
"@types/tapable": {
"version": "1.0.8",
- "resolved": "https://registry.npmmirror.com/@types/tapable/download/@types/tapable-1.0.8.tgz",
+ "resolved": "https://registry.npmmirror.com/@types/tapable/download/@types/tapable-1.0.8.tgz?cache=0&sync_timestamp=1637271209655&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Ftapable%2Fdownload%2F%40types%2Ftapable-1.0.8.tgz",
"integrity": "sha1-uUpDkchWZse3Mpn9OtedT6pDUxA="
},
"@types/uglify-js": {
"version": "3.13.1",
- "resolved": "https://registry.npmmirror.com/@types/uglify-js/download/@types/uglify-js-3.13.1.tgz?cache=0&sync_timestamp=1637270388794&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fuglify-js%2Fdownload%2F%40types%2Fuglify-js-3.13.1.tgz",
+ "resolved": "https://registry.npmmirror.com/@types/uglify-js/download/@types/uglify-js-3.13.1.tgz",
"integrity": "sha1-XoienoHpQkXHW2RQYA4cXqKHiuo=",
"requires": {
"source-map": "^0.6.1"
@@ -1426,7 +1426,7 @@
"dependencies": {
"source-map": {
"version": "0.7.3",
- "resolved": "https://registry.nlark.com/source-map/download/source-map-0.7.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.7.3.tgz",
"integrity": "sha1-UwL4FpAxc1ImVECS5kmB91F1A4M="
}
}
@@ -1476,7 +1476,7 @@
"dependencies": {
"array-union": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/array-union/download/array-union-2.1.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-2.1.0.tgz?cache=0&sync_timestamp=1614624302839&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-union%2Fdownload%2Farray-union-2.1.0.tgz",
"integrity": "sha1-t5hCCtvrHego2ErNii4j0+/oXo0=",
"dev": true
},
@@ -1538,7 +1538,7 @@
},
"@webassemblyjs/helper-numbers": {
"version": "1.11.1",
- "resolved": "https://registry.nlark.com/@webassemblyjs/helper-numbers/download/@webassemblyjs/helper-numbers-1.11.1.tgz?cache=0&sync_timestamp=1625473485159&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40webassemblyjs%2Fhelper-numbers%2Fdownload%2F%40webassemblyjs%2Fhelper-numbers-1.11.1.tgz",
+ "resolved": "https://registry.nlark.com/@webassemblyjs/helper-numbers/download/@webassemblyjs/helper-numbers-1.11.1.tgz",
"integrity": "sha1-ZNgdohn7u6HjvRv8dPboxOEKYq4=",
"requires": {
"@webassemblyjs/floating-point-hex-parser": "1.11.1",
@@ -1623,7 +1623,7 @@
},
"@webassemblyjs/wasm-parser": {
"version": "1.11.1",
- "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/download/@webassemblyjs/wasm-parser-1.11.1.tgz",
+ "resolved": "https://registry.nlark.com/@webassemblyjs/wasm-parser/download/@webassemblyjs/wasm-parser-1.11.1.tgz?cache=0&sync_timestamp=1625473464593&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40webassemblyjs%2Fwasm-parser%2Fdownload%2F%40webassemblyjs%2Fwasm-parser-1.11.1.tgz",
"integrity": "sha1-hspzRTT0F+m9PGfHocddi+QfsZk=",
"requires": {
"@webassemblyjs/ast": "1.11.1",
@@ -1645,12 +1645,12 @@
},
"@webpack-cli/configtest": {
"version": "1.1.0",
- "resolved": "https://registry.npmmirror.com/@webpack-cli/configtest/download/@webpack-cli/configtest-1.1.0.tgz?cache=0&sync_timestamp=1633553239176&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40webpack-cli%2Fconfigtest%2Fdownload%2F%40webpack-cli%2Fconfigtest-1.1.0.tgz",
+ "resolved": "https://registry.npmmirror.com/@webpack-cli/configtest/download/@webpack-cli/configtest-1.1.0.tgz",
"integrity": "sha1-g0K+8Lrft9/TtXbyV0q4DHJb4EM="
},
"@webpack-cli/info": {
"version": "1.4.0",
- "resolved": "https://registry.npmmirror.com/@webpack-cli/info/download/@webpack-cli/info-1.4.0.tgz?cache=0&sync_timestamp=1633553269200&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40webpack-cli%2Finfo%2Fdownload%2F%40webpack-cli%2Finfo-1.4.0.tgz",
+ "resolved": "https://registry.npmmirror.com/@webpack-cli/info/download/@webpack-cli/info-1.4.0.tgz",
"integrity": "sha1-uRecMierCcu7FJqnM0dfz5lDAiM=",
"requires": {
"envinfo": "^7.7.3"
@@ -1658,32 +1658,32 @@
},
"@webpack-cli/serve": {
"version": "1.6.0",
- "resolved": "https://registry.npmmirror.com/@webpack-cli/serve/download/@webpack-cli/serve-1.6.0.tgz?cache=0&sync_timestamp=1633553365700&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40webpack-cli%2Fserve%2Fdownload%2F%40webpack-cli%2Fserve-1.6.0.tgz",
+ "resolved": "https://registry.npmmirror.com/@webpack-cli/serve/download/@webpack-cli/serve-1.6.0.tgz",
"integrity": "sha1-LCdaoFyJXszrv8NM+yI8bovVkaI="
},
"@xtuc/ieee754": {
"version": "1.2.0",
- "resolved": "https://registry.nlark.com/@xtuc/ieee754/download/@xtuc/ieee754-1.2.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/@xtuc/ieee754/download/@xtuc/ieee754-1.2.0.tgz",
"integrity": "sha1-7vAUoxRa5Hehy8AM0eVSM23Ot5A="
},
"@xtuc/long": {
"version": "4.2.2",
- "resolved": "https://registry.nlark.com/@xtuc/long/download/@xtuc/long-4.2.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/@xtuc/long/download/@xtuc/long-4.2.2.tgz",
"integrity": "sha1-0pHGpOl5ibXGHZrPOWrk/hM6cY0="
},
"acorn": {
"version": "8.6.0",
- "resolved": "https://registry.npmmirror.com/acorn/download/acorn-8.6.0.tgz?cache=0&sync_timestamp=1637225522161&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Facorn%2Fdownload%2Facorn-8.6.0.tgz",
+ "resolved": "https://registry.npmmirror.com/acorn/download/acorn-8.6.0.tgz?cache=0&sync_timestamp=1637225499069&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Facorn%2Fdownload%2Facorn-8.6.0.tgz",
"integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw=="
},
"acorn-import-assertions": {
"version": "1.8.0",
- "resolved": "https://registry.npmmirror.com/acorn-import-assertions/download/acorn-import-assertions-1.8.0.tgz?cache=0&sync_timestamp=1633349660084&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Facorn-import-assertions%2Fdownload%2Facorn-import-assertions-1.8.0.tgz",
+ "resolved": "https://registry.npmmirror.com/acorn-import-assertions/download/acorn-import-assertions-1.8.0.tgz?cache=0&sync_timestamp=1633349370678&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Facorn-import-assertions%2Fdownload%2Facorn-import-assertions-1.8.0.tgz",
"integrity": "sha1-uitZOc5iwjjbbZPYHJsRGym4Vek="
},
"acorn-jsx": {
"version": "5.3.2",
- "resolved": "https://registry.nlark.com/acorn-jsx/download/acorn-jsx-5.3.2.tgz?cache=0&sync_timestamp=1625793240297&other_urls=https%3A%2F%2Fregistry.nlark.com%2Facorn-jsx%2Fdownload%2Facorn-jsx-5.3.2.tgz",
+ "resolved": "https://registry.nlark.com/acorn-jsx/download/acorn-jsx-5.3.2.tgz?cache=0&sync_timestamp=1625793705701&other_urls=https%3A%2F%2Fregistry.nlark.com%2Facorn-jsx%2Fdownload%2Facorn-jsx-5.3.2.tgz",
"integrity": "sha1-ftW7VZCLOy8bxVxq8WU7rafweTc=",
"dev": true
},
@@ -1700,7 +1700,7 @@
},
"ajv-keywords": {
"version": "3.5.2",
- "resolved": "https://registry.npmmirror.com/ajv-keywords/download/ajv-keywords-3.5.2.tgz?cache=0&sync_timestamp=1637524372087&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fajv-keywords%2Fdownload%2Fajv-keywords-3.5.2.tgz",
+ "resolved": "https://registry.npmmirror.com/ajv-keywords/download/ajv-keywords-3.5.2.tgz",
"integrity": "sha1-MfKdpatuANHC0yms97WSlhTVAU0="
},
"ansi-colors": {
@@ -1725,7 +1725,7 @@
},
"anymatch": {
"version": "3.1.2",
- "resolved": "https://registry.nlark.com/anymatch/download/anymatch-3.1.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.2.tgz?cache=0&sync_timestamp=1617747494189&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fanymatch%2Fdownload%2Fanymatch-3.1.2.tgz",
"integrity": "sha1-wFV8CWrzLxBhmPT04qODU343hxY=",
"requires": {
"normalize-path": "^3.0.0",
@@ -1734,13 +1734,13 @@
},
"arg": {
"version": "4.1.3",
- "resolved": "https://registry.nlark.com/arg/download/arg-4.1.3.tgz?cache=0&sync_timestamp=1629166537485&other_urls=https%3A%2F%2Fregistry.nlark.com%2Farg%2Fdownload%2Farg-4.1.3.tgz",
- "integrity": "sha1-Jp/HrVuOQstjyJbVZmAXJhwUQIk=",
+ "resolved": "https://registry.npmmirror.com/arg/download/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"dev": true
},
"argparse": {
"version": "1.0.10",
- "resolved": "https://registry.nlark.com/argparse/download/argparse-1.0.10.tgz",
+ "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz",
"integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=",
"dev": true,
"requires": {
@@ -1749,7 +1749,7 @@
},
"array-union": {
"version": "1.0.2",
- "resolved": "https://registry.nlark.com/array-union/download/array-union-1.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz?cache=0&sync_timestamp=1614624302839&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-union%2Fdownload%2Farray-union-1.0.2.tgz",
"integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
"requires": {
"array-uniq": "^1.0.1"
@@ -1757,7 +1757,7 @@
},
"array-uniq": {
"version": "1.0.3",
- "resolved": "https://registry.nlark.com/array-uniq/download/array-uniq-1.0.3.tgz?cache=0&sync_timestamp=1622605321175&other_urls=https%3A%2F%2Fregistry.nlark.com%2Farray-uniq%2Fdownload%2Farray-uniq-1.0.3.tgz",
+ "resolved": "https://registry.nlark.com/array-uniq/download/array-uniq-1.0.3.tgz",
"integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY="
},
"assertion-error": {
@@ -1774,7 +1774,7 @@
},
"babel-plugin-dynamic-import-node": {
"version": "2.3.3",
- "resolved": "https://registry.nlark.com/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.3.tgz?cache=0&sync_timestamp=1587495874530&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-plugin-dynamic-import-node%2Fdownload%2Fbabel-plugin-dynamic-import-node-2.3.3.tgz",
"integrity": "sha1-hP2hnJduxcbe/vV/lCez3vZuF6M=",
"dev": true,
"requires": {
@@ -1783,7 +1783,7 @@
},
"babel-plugin-polyfill-corejs2": {
"version": "0.3.0",
- "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-corejs2/download/babel-plugin-polyfill-corejs2-0.3.0.tgz?cache=0&sync_timestamp=1636800035591&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fbabel-plugin-polyfill-corejs2%2Fdownload%2Fbabel-plugin-polyfill-corejs2-0.3.0.tgz",
+ "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-corejs2/download/babel-plugin-polyfill-corejs2-0.3.0.tgz?cache=0&sync_timestamp=1636799770195&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fbabel-plugin-polyfill-corejs2%2Fdownload%2Fbabel-plugin-polyfill-corejs2-0.3.0.tgz",
"integrity": "sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA==",
"dev": true,
"requires": {
@@ -1794,7 +1794,7 @@
"dependencies": {
"semver": {
"version": "6.3.0",
- "resolved": "https://registry.nlark.com/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
}
@@ -1802,7 +1802,7 @@
},
"babel-plugin-polyfill-corejs3": {
"version": "0.4.0",
- "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-corejs3/download/babel-plugin-polyfill-corejs3-0.4.0.tgz?cache=0&sync_timestamp=1636800035753&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fbabel-plugin-polyfill-corejs3%2Fdownload%2Fbabel-plugin-polyfill-corejs3-0.4.0.tgz",
+ "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-corejs3/download/babel-plugin-polyfill-corejs3-0.4.0.tgz?cache=0&sync_timestamp=1636799770316&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fbabel-plugin-polyfill-corejs3%2Fdownload%2Fbabel-plugin-polyfill-corejs3-0.4.0.tgz",
"integrity": "sha512-YxFreYwUfglYKdLUGvIF2nJEsGwj+RhWSX/ije3D2vQPOXuyMLMtg/cCGMDpOA7Nd+MwlNdnGODbd2EwUZPlsw==",
"dev": true,
"requires": {
@@ -1812,7 +1812,7 @@
},
"babel-plugin-polyfill-regenerator": {
"version": "0.3.0",
- "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-regenerator/download/babel-plugin-polyfill-regenerator-0.3.0.tgz?cache=0&sync_timestamp=1636800035395&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fbabel-plugin-polyfill-regenerator%2Fdownload%2Fbabel-plugin-polyfill-regenerator-0.3.0.tgz",
+ "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-regenerator/download/babel-plugin-polyfill-regenerator-0.3.0.tgz?cache=0&sync_timestamp=1636799770450&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fbabel-plugin-polyfill-regenerator%2Fdownload%2Fbabel-plugin-polyfill-regenerator-0.3.0.tgz",
"integrity": "sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg==",
"dev": true,
"requires": {
@@ -1821,7 +1821,7 @@
},
"balanced-match": {
"version": "1.0.2",
- "resolved": "https://registry.nlark.com/balanced-match/download/balanced-match-1.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz",
"integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4="
},
"big.js": {
@@ -1831,13 +1831,13 @@
},
"binary-extensions": {
"version": "2.2.0",
- "resolved": "https://registry.nlark.com/binary-extensions/download/binary-extensions-2.2.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.2.0.tgz?cache=0&sync_timestamp=1610299293319&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbinary-extensions%2Fdownload%2Fbinary-extensions-2.2.0.tgz",
"integrity": "sha1-dfUC7q+f/eQvyYgpZFvk6na9ni0=",
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
- "resolved": "https://registry.nlark.com/brace-expansion/download/brace-expansion-1.1.11.tgz",
+ "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz",
"integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=",
"requires": {
"balanced-match": "^1.0.0",
@@ -1846,7 +1846,7 @@
},
"braces": {
"version": "3.0.2",
- "resolved": "https://registry.nlark.com/braces/download/braces-3.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz",
"integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=",
"requires": {
"fill-range": "^7.0.1"
@@ -1877,7 +1877,7 @@
},
"call-bind": {
"version": "1.0.2",
- "resolved": "https://registry.nlark.com/call-bind/download/call-bind-1.0.2.tgz?cache=0&sync_timestamp=1622604538146&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcall-bind%2Fdownload%2Fcall-bind-1.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/call-bind/download/call-bind-1.0.2.tgz?cache=0&sync_timestamp=1610403007655&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcall-bind%2Fdownload%2Fcall-bind-1.0.2.tgz",
"integrity": "sha1-sdTonmiBGcPJqQOtMKuy9qkZvjw=",
"dev": true,
"requires": {
@@ -1893,7 +1893,7 @@
},
"camelcase": {
"version": "6.2.1",
- "resolved": "https://registry.npmmirror.com/camelcase/download/camelcase-6.2.1.tgz?cache=0&sync_timestamp=1636945122112&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcamelcase%2Fdownload%2Fcamelcase-6.2.1.tgz",
+ "resolved": "https://registry.npmmirror.com/camelcase/download/camelcase-6.2.1.tgz?cache=0&sync_timestamp=1636945198738&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcamelcase%2Fdownload%2Fcamelcase-6.2.1.tgz",
"integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==",
"dev": true
},
@@ -1904,7 +1904,7 @@
},
"chai": {
"version": "4.3.4",
- "resolved": "https://registry.nlark.com/chai/download/chai-4.3.4.tgz",
+ "resolved": "https://registry.nlark.com/chai/download/chai-4.3.4.tgz?cache=0&sync_timestamp=1624607982671&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchai%2Fdownload%2Fchai-4.3.4.tgz",
"integrity": "sha1-tV5lWzHh6scJm+TAjCGWT84ubEk=",
"dev": true,
"requires": {
@@ -1950,12 +1950,12 @@
},
"chrome-trace-event": {
"version": "1.0.3",
- "resolved": "https://registry.nlark.com/chrome-trace-event/download/chrome-trace-event-1.0.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/chrome-trace-event/download/chrome-trace-event-1.0.3.tgz?cache=0&sync_timestamp=1617905925551&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchrome-trace-event%2Fdownload%2Fchrome-trace-event-1.0.3.tgz",
"integrity": "sha1-EBXs7UdB4V0GZkqVfbv1DQQeJqw="
},
"clean-webpack-plugin": {
"version": "3.0.0",
- "resolved": "https://registry.nlark.com/clean-webpack-plugin/download/clean-webpack-plugin-3.0.0.tgz",
+ "resolved": "https://registry.nlark.com/clean-webpack-plugin/download/clean-webpack-plugin-3.0.0.tgz?cache=0&sync_timestamp=1630504808165&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fclean-webpack-plugin%2Fdownload%2Fclean-webpack-plugin-3.0.0.tgz",
"integrity": "sha1-qZ2Ow0wcYopFQVZ6p7RXRGRgxis=",
"requires": {
"@types/webpack": "^4.4.31",
@@ -1964,7 +1964,7 @@
},
"cliui": {
"version": "7.0.4",
- "resolved": "https://registry.nlark.com/cliui/download/cliui-7.0.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-7.0.4.tgz?cache=0&sync_timestamp=1604880267387&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-7.0.4.tgz",
"integrity": "sha1-oCZe5lVHb8gHrqnfPfjfd4OAi08=",
"dev": true,
"requires": {
@@ -1985,7 +1985,7 @@
},
"color-convert": {
"version": "2.0.1",
- "resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz",
+ "resolved": "https://registry.npmmirror.com/color-convert/download/color-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"requires": {
"color-name": "~1.1.4"
@@ -1993,12 +1993,12 @@
},
"color-name": {
"version": "1.1.4",
- "resolved": "https://registry.nlark.com/color-name/download/color-name-1.1.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI="
},
"colorette": {
"version": "2.0.16",
- "resolved": "https://registry.npmmirror.com/colorette/download/colorette-2.0.16.tgz",
+ "resolved": "https://registry.npmmirror.com/colorette/download/colorette-2.0.16.tgz?cache=0&sync_timestamp=1633673060735&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcolorette%2Fdownload%2Fcolorette-2.0.16.tgz",
"integrity": "sha1-cTua+E/bAAE58EVGvUqT9ipQhdo="
},
"commander": {
@@ -2008,7 +2008,7 @@
},
"concat-map": {
"version": "0.0.1",
- "resolved": "https://registry.nlark.com/concat-map/download/concat-map-0.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"convert-source-map": {
@@ -2022,7 +2022,7 @@
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
- "resolved": "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.1.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1600349129929&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz",
"integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=",
"dev": true
}
@@ -2044,7 +2044,7 @@
"dependencies": {
"array-union": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/array-union/download/array-union-2.1.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-2.1.0.tgz?cache=0&sync_timestamp=1614624302839&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-union%2Fdownload%2Farray-union-2.1.0.tgz",
"integrity": "sha1-t5hCCtvrHego2ErNii4j0+/oXo0="
},
"globby": {
@@ -2074,7 +2074,7 @@
"dependencies": {
"semver": {
"version": "7.0.0",
- "resolved": "https://registry.nlark.com/semver/download/semver-7.0.0.tgz?cache=0&sync_timestamp=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-7.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.0.0.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.0.0.tgz",
"integrity": "sha1-XzyjV2HkfgWyBsba/yz4FPAxa44=",
"dev": true
}
@@ -2093,7 +2093,7 @@
},
"cross-spawn": {
"version": "7.0.3",
- "resolved": "https://registry.nlark.com/cross-spawn/download/cross-spawn-7.0.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz",
"integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=",
"requires": {
"path-key": "^3.1.0",
@@ -2121,9 +2121,9 @@
"dev": true
},
"deccjsunit": {
- "version": "1.0.3",
- "resolved": "https://registry.npmmirror.com/deccjsunit/download/deccjsunit-1.0.3.tgz",
- "integrity": "sha1-AcMxIKje4SsaoQiZGE14pszfiKI="
+ "version": "1.0.4",
+ "resolved": "https://registry.npmmirror.com/deccjsunit/download/deccjsunit-1.0.4.tgz?cache=0&sync_timestamp=1633677367443&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fdeccjsunit%2Fdownload%2Fdeccjsunit-1.0.4.tgz",
+ "integrity": "sha1-3rxuTBf46KBVtONr81JQnC/KKqQ="
},
"deep-eql": {
"version": "3.0.1",
@@ -2136,13 +2136,13 @@
},
"deep-is": {
"version": "0.1.4",
- "resolved": "https://registry.nlark.com/deep-is/download/deep-is-0.1.4.tgz",
+ "resolved": "https://registry.nlark.com/deep-is/download/deep-is-0.1.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdeep-is%2Fdownload%2Fdeep-is-0.1.4.tgz",
"integrity": "sha1-pvLc5hL63S7x9Rm3NVHxfoUZmDE=",
"dev": true
},
"define-properties": {
"version": "1.1.3",
- "resolved": "https://registry.nlark.com/define-properties/download/define-properties-1.1.3.tgz?cache=0&sync_timestamp=1622604538602&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdefine-properties%2Fdownload%2Fdefine-properties-1.1.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz",
"integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=",
"dev": true,
"requires": {
@@ -2165,13 +2165,13 @@
},
"diff": {
"version": "5.0.0",
- "resolved": "https://registry.nlark.com/diff/download/diff-5.0.0.tgz?cache=0&sync_timestamp=1622605328812&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdiff%2Fdownload%2Fdiff-5.0.0.tgz",
+ "resolved": "https://registry.nlark.com/diff/download/diff-5.0.0.tgz?cache=0&sync_timestamp=1624608104914&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdiff%2Fdownload%2Fdiff-5.0.0.tgz",
"integrity": "sha1-ftatdthZ0DB4fsNYVfWx2vMdhSs=",
"dev": true
},
"dir-glob": {
"version": "3.0.1",
- "resolved": "https://registry.nlark.com/dir-glob/download/dir-glob-3.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/dir-glob/download/dir-glob-3.0.1.tgz",
"integrity": "sha1-Vtv3PZkqSpO6FYT0U0Bj/S5BcX8=",
"requires": {
"path-type": "^4.0.0"
@@ -2187,19 +2187,19 @@
}
},
"electron-to-chromium": {
- "version": "1.4.24",
- "resolved": "https://registry.npmmirror.com/electron-to-chromium/download/electron-to-chromium-1.4.24.tgz",
- "integrity": "sha512-erwx5r69B/WFfFuF2jcNN0817BfDBdC4765kQ6WltOMuwsimlQo3JTEq0Cle+wpHralwdeX3OfAtw/mHxPK0Wg=="
+ "version": "1.4.25",
+ "resolved": "https://registry.npmmirror.com/electron-to-chromium/download/electron-to-chromium-1.4.25.tgz",
+ "integrity": "sha512-bTwub9Y/76EiNmfaiJih+hAy6xn7Ns95S4KvI2NuKNOz8TEEKKQUu44xuy0PYMudjM9zdjKRS1bitsUvHTfuUg=="
},
"emoji-regex": {
"version": "8.0.0",
- "resolved": "https://registry.npmmirror.com/emoji-regex/download/emoji-regex-8.0.0.tgz?cache=0&sync_timestamp=1632811716250&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Femoji-regex%2Fdownload%2Femoji-regex-8.0.0.tgz",
+ "resolved": "https://registry.npmmirror.com/emoji-regex/download/emoji-regex-8.0.0.tgz",
"integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=",
"dev": true
},
"emojis-list": {
"version": "3.0.0",
- "resolved": "https://registry.nlark.com/emojis-list/download/emojis-list-3.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz",
"integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang="
},
"enhanced-resolve": {
@@ -2228,7 +2228,7 @@
},
"errno": {
"version": "0.1.8",
- "resolved": "https://registry.nlark.com/errno/download/errno-0.1.8.tgz",
+ "resolved": "https://registry.npm.taobao.org/errno/download/errno-0.1.8.tgz?cache=0&sync_timestamp=1608121636522&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ferrno%2Fdownload%2Ferrno-0.1.8.tgz",
"integrity": "sha1-i7Ppx9Rjvkl2/4iPdrSAnrwugR8=",
"requires": {
"prr": "~1.0.1"
@@ -2236,17 +2236,17 @@
},
"es-module-lexer": {
"version": "0.9.3",
- "resolved": "https://registry.npmmirror.com/es-module-lexer/download/es-module-lexer-0.9.3.tgz?cache=0&sync_timestamp=1633645560577&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fes-module-lexer%2Fdownload%2Fes-module-lexer-0.9.3.tgz",
+ "resolved": "https://registry.npmmirror.com/es-module-lexer/download/es-module-lexer-0.9.3.tgz?cache=0&sync_timestamp=1633646060412&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fes-module-lexer%2Fdownload%2Fes-module-lexer-0.9.3.tgz",
"integrity": "sha1-bxPbAMw4QXE32vdDZvU1yOtDjxk="
},
"escalade": {
"version": "3.1.1",
- "resolved": "https://registry.nlark.com/escalade/download/escalade-3.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz?cache=0&sync_timestamp=1602567230854&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.1.1.tgz",
"integrity": "sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA="
},
"escape-string-regexp": {
"version": "1.0.5",
- "resolved": "https://registry.nlark.com/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz",
+ "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
@@ -2309,7 +2309,7 @@
},
"escape-string-regexp": {
"version": "4.0.0",
- "resolved": "https://registry.nlark.com/escape-string-regexp/download/escape-string-regexp-4.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-4.0.0.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-4.0.0.tgz",
"integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=",
"dev": true
},
@@ -2332,7 +2332,7 @@
},
"eslint-scope": {
"version": "5.1.1",
- "resolved": "https://registry.npmmirror.com/eslint-scope/download/eslint-scope-5.1.1.tgz?cache=0&sync_timestamp=1637466831846&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-scope%2Fdownload%2Feslint-scope-5.1.1.tgz",
+ "resolved": "https://registry.npmmirror.com/eslint-scope/download/eslint-scope-5.1.1.tgz?cache=0&sync_timestamp=1637466963861&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-scope%2Fdownload%2Feslint-scope-5.1.1.tgz",
"integrity": "sha1-54blmmbLkrP2wfsNUIqrF0hI9Iw=",
"requires": {
"esrecurse": "^4.3.0",
@@ -2341,7 +2341,7 @@
},
"eslint-utils": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/eslint-utils/download/eslint-utils-2.1.0.tgz?cache=0&sync_timestamp=1622605293603&other_urls=https%3A%2F%2Fregistry.nlark.com%2Feslint-utils%2Fdownload%2Feslint-utils-2.1.0.tgz",
+ "resolved": "https://registry.nlark.com/eslint-utils/download/eslint-utils-2.1.0.tgz?cache=0&sync_timestamp=1624608042629&other_urls=https%3A%2F%2Fregistry.nlark.com%2Feslint-utils%2Fdownload%2Feslint-utils-2.1.0.tgz",
"integrity": "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc=",
"dev": true,
"requires": {
@@ -2350,7 +2350,7 @@
"dependencies": {
"eslint-visitor-keys": {
"version": "1.3.0",
- "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz?cache=0&sync_timestamp=1636378395014&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.3.0.tgz",
+ "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz?cache=0&sync_timestamp=1636378420914&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.3.0.tgz",
"integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=",
"dev": true
}
@@ -2358,7 +2358,7 @@
},
"eslint-visitor-keys": {
"version": "2.1.0",
- "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/download/eslint-visitor-keys-2.1.0.tgz?cache=0&sync_timestamp=1636378395014&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-2.1.0.tgz",
+ "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/download/eslint-visitor-keys-2.1.0.tgz?cache=0&sync_timestamp=1636378420914&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-2.1.0.tgz",
"integrity": "sha1-9lMoJZMFknOSyTjtROsKXJsr0wM=",
"dev": true
},
@@ -2375,13 +2375,13 @@
"dependencies": {
"acorn": {
"version": "7.4.1",
- "resolved": "https://registry.npmmirror.com/acorn/download/acorn-7.4.1.tgz?cache=0&sync_timestamp=1637225522161&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Facorn%2Fdownload%2Facorn-7.4.1.tgz",
+ "resolved": "https://registry.npmmirror.com/acorn/download/acorn-7.4.1.tgz?cache=0&sync_timestamp=1637225499069&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Facorn%2Fdownload%2Facorn-7.4.1.tgz",
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
"dev": true
},
"eslint-visitor-keys": {
"version": "1.3.0",
- "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz?cache=0&sync_timestamp=1636378395014&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.3.0.tgz",
+ "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz?cache=0&sync_timestamp=1636378420914&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.3.0.tgz",
"integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=",
"dev": true
}
@@ -2389,7 +2389,7 @@
},
"esprima": {
"version": "4.0.1",
- "resolved": "https://registry.nlark.com/esprima/download/esprima-4.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz",
"integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=",
"dev": true
},
@@ -2412,7 +2412,7 @@
},
"esrecurse": {
"version": "4.3.0",
- "resolved": "https://registry.nlark.com/esrecurse/download/esrecurse-4.3.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.3.0.tgz?cache=0&sync_timestamp=1598898247102&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesrecurse%2Fdownload%2Fesrecurse-4.3.0.tgz",
"integrity": "sha1-eteWTWeauyi+5yzsY3WLHF0smSE=",
"requires": {
"estraverse": "^5.2.0"
@@ -2432,7 +2432,7 @@
},
"esutils": {
"version": "2.0.3",
- "resolved": "https://registry.nlark.com/esutils/download/esutils-2.0.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz",
"integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=",
"dev": true
},
@@ -2443,7 +2443,7 @@
},
"execa": {
"version": "5.1.1",
- "resolved": "https://registry.npmmirror.com/execa/download/execa-5.1.1.tgz?cache=0&sync_timestamp=1637147236741&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fexeca%2Fdownload%2Fexeca-5.1.1.tgz",
+ "resolved": "https://registry.npmmirror.com/execa/download/execa-5.1.1.tgz?cache=0&sync_timestamp=1637147199964&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fexeca%2Fdownload%2Fexeca-5.1.1.tgz",
"integrity": "sha1-+ArZy/Qpj3vR1MlVXCHpN0HEEd0=",
"requires": {
"cross-spawn": "^7.0.3",
@@ -2459,12 +2459,12 @@
},
"fast-deep-equal": {
"version": "3.1.3",
- "resolved": "https://registry.nlark.com/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz",
"integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU="
},
"fast-glob": {
"version": "3.2.7",
- "resolved": "https://registry.npmmirror.com/fast-glob/download/fast-glob-3.2.7.tgz",
+ "resolved": "https://registry.nlark.com/fast-glob/download/fast-glob-3.2.7.tgz",
"integrity": "sha1-/Wy3otfpqnp4RhEehaGW1rL3ZqE=",
"requires": {
"@nodelib/fs.stat": "^2.0.2",
@@ -2476,7 +2476,7 @@
},
"fast-json-stable-stringify": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz?cache=0&sync_timestamp=1576340291001&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-json-stable-stringify%2Fdownload%2Ffast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM="
},
"fast-levenshtein": {
@@ -2487,12 +2487,12 @@
},
"fastest-levenshtein": {
"version": "1.0.12",
- "resolved": "https://registry.npmmirror.com/fastest-levenshtein/download/fastest-levenshtein-1.0.12.tgz",
+ "resolved": "https://registry.nlark.com/fastest-levenshtein/download/fastest-levenshtein-1.0.12.tgz",
"integrity": "sha1-mZD306iMxan/0fF0V0UlFwDUl+I="
},
"fastq": {
"version": "1.13.0",
- "resolved": "https://registry.nlark.com/fastq/download/fastq-1.13.0.tgz",
+ "resolved": "https://registry.nlark.com/fastq/download/fastq-1.13.0.tgz?cache=0&sync_timestamp=1631609698424&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffastq%2Fdownload%2Ffastq-1.13.0.tgz",
"integrity": "sha1-YWdg+Ip1Jr38WWt8q4wYk4w2uYw=",
"requires": {
"reusify": "^1.0.4"
@@ -2509,7 +2509,7 @@
},
"fill-range": {
"version": "7.0.1",
- "resolved": "https://registry.nlark.com/fill-range/download/fill-range-7.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz",
"integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=",
"requires": {
"to-regex-range": "^5.0.1"
@@ -2532,7 +2532,7 @@
},
"flat-cache": {
"version": "3.0.4",
- "resolved": "https://registry.nlark.com/flat-cache/download/flat-cache-3.0.4.tgz?cache=0&sync_timestamp=1622604531509&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fflat-cache%2Fdownload%2Fflat-cache-3.0.4.tgz",
+ "resolved": "https://registry.nlark.com/flat-cache/download/flat-cache-3.0.4.tgz",
"integrity": "sha1-YbAzgwKy/p+Vfcwy/CqH8cMEixE=",
"dev": true,
"requires": {
@@ -2542,7 +2542,7 @@
"dependencies": {
"flatted": {
"version": "3.2.4",
- "resolved": "https://registry.npmmirror.com/flatted/download/flatted-3.2.4.tgz?cache=0&sync_timestamp=1636473813364&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fflatted%2Fdownload%2Fflatted-3.2.4.tgz",
+ "resolved": "https://registry.npmmirror.com/flatted/download/flatted-3.2.4.tgz?cache=0&sync_timestamp=1636473923308&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fflatted%2Fdownload%2Fflatted-3.2.4.tgz",
"integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==",
"dev": true
},
@@ -2559,12 +2559,12 @@
},
"flatted": {
"version": "2.0.2",
- "resolved": "https://registry.npmmirror.com/flatted/download/flatted-2.0.2.tgz?cache=0&sync_timestamp=1636473813364&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fflatted%2Fdownload%2Fflatted-2.0.2.tgz",
+ "resolved": "https://registry.npmmirror.com/flatted/download/flatted-2.0.2.tgz?cache=0&sync_timestamp=1636473923308&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fflatted%2Fdownload%2Fflatted-2.0.2.tgz",
"integrity": "sha1-RXWyHivO50NKqb5mL0t7X5wrUTg="
},
"fs-extra": {
"version": "8.1.0",
- "resolved": "https://registry.nlark.com/fs-extra/download/fs-extra-8.1.0.tgz?cache=0&sync_timestamp=1622604476909&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffs-extra%2Fdownload%2Ffs-extra-8.1.0.tgz",
+ "resolved": "https://registry.nlark.com/fs-extra/download/fs-extra-8.1.0.tgz",
"integrity": "sha1-SdQ8RaiM2Wd2aMt74bRu/bjS4cA=",
"requires": {
"graceful-fs": "^4.2.0",
@@ -2580,7 +2580,7 @@
},
"fs.realpath": {
"version": "1.0.0",
- "resolved": "https://registry.nlark.com/fs.realpath/download/fs.realpath-1.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
@@ -2592,12 +2592,12 @@
},
"function-bind": {
"version": "1.1.1",
- "resolved": "https://registry.nlark.com/function-bind/download/function-bind-1.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz",
"integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0="
},
"functional-red-black-tree": {
"version": "1.0.1",
- "resolved": "https://registry.nlark.com/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz?cache=0&sync_timestamp=1622605293770&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffunctional-red-black-tree%2Fdownload%2Ffunctional-red-black-tree-1.0.1.tgz",
+ "resolved": "https://registry.nlark.com/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz",
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
@@ -2609,19 +2609,19 @@
},
"get-caller-file": {
"version": "2.0.5",
- "resolved": "https://registry.nlark.com/get-caller-file/download/get-caller-file-2.0.5.tgz",
+ "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz",
"integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=",
"dev": true
},
"get-func-name": {
"version": "2.0.0",
- "resolved": "https://registry.nlark.com/get-func-name/download/get-func-name-2.0.0.tgz",
+ "resolved": "https://registry.nlark.com/get-func-name/download/get-func-name-2.0.0.tgz?cache=0&sync_timestamp=1624607980603&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fget-func-name%2Fdownload%2Fget-func-name-2.0.0.tgz",
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
"dev": true
},
"get-intrinsic": {
"version": "1.1.1",
- "resolved": "https://registry.nlark.com/get-intrinsic/download/get-intrinsic-1.1.1.tgz?cache=0&sync_timestamp=1622604540833&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fget-intrinsic%2Fdownload%2Fget-intrinsic-1.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/get-intrinsic/download/get-intrinsic-1.1.1.tgz",
"integrity": "sha1-FfWfN2+FXERpY5SPDSTNNje0q8Y=",
"dev": true,
"requires": {
@@ -2632,13 +2632,13 @@
},
"get-stream": {
"version": "6.0.1",
- "resolved": "https://registry.nlark.com/get-stream/download/get-stream-6.0.1.tgz?cache=0&sync_timestamp=1622604564806&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fget-stream%2Fdownload%2Fget-stream-6.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-6.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stream%2Fdownload%2Fget-stream-6.0.1.tgz",
"integrity": "sha1-omLY7vZ6ztV8KFKtYWdSakPL97c="
},
"glob": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/glob/download/glob-7.2.0.tgz",
- "integrity": "sha1-0VU1r3cy4C6Uj0xBYovZECk/YCM=",
+ "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -2699,7 +2699,7 @@
},
"has": {
"version": "1.0.3",
- "resolved": "https://registry.nlark.com/has/download/has-1.0.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz",
"integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=",
"requires": {
"function-bind": "^1.1.1"
@@ -2712,13 +2712,13 @@
},
"has-symbols": {
"version": "1.0.2",
- "resolved": "https://registry.nlark.com/has-symbols/download/has-symbols-1.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.2.tgz",
"integrity": "sha1-Fl0wcMADCXUqEjakeTMeOsVvFCM=",
"dev": true
},
"he": {
"version": "1.2.0",
- "resolved": "https://registry.nlark.com/he/download/he-1.2.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz",
"integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=",
"dev": true
},
@@ -2734,7 +2734,7 @@
},
"import-fresh": {
"version": "3.3.0",
- "resolved": "https://registry.nlark.com/import-fresh/download/import-fresh-3.3.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.3.0.tgz?cache=0&sync_timestamp=1608469485280&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.3.0.tgz",
"integrity": "sha1-NxYsJfy566oublPVtNiM4X2eDCs=",
"dev": true,
"requires": {
@@ -2744,7 +2744,7 @@
"dependencies": {
"resolve-from": {
"version": "4.0.0",
- "resolved": "https://registry.nlark.com/resolve-from/download/resolve-from-4.0.0.tgz?cache=0&sync_timestamp=1622605305717&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fresolve-from%2Fdownload%2Fresolve-from-4.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-4.0.0.tgz",
"integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=",
"dev": true
}
@@ -2761,13 +2761,13 @@
},
"imurmurhash": {
"version": "0.1.4",
- "resolved": "https://registry.nlark.com/imurmurhash/download/imurmurhash-0.1.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz",
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
"dev": true
},
"inflight": {
"version": "1.0.6",
- "resolved": "https://registry.nlark.com/inflight/download/inflight-1.0.6.tgz",
+ "resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
@@ -2776,17 +2776,17 @@
},
"inherits": {
"version": "2.0.4",
- "resolved": "https://registry.nlark.com/inherits/download/inherits-2.0.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz",
"integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w="
},
"interpret": {
"version": "2.2.0",
- "resolved": "https://registry.nlark.com/interpret/download/interpret-2.2.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/interpret/download/interpret-2.2.0.tgz?cache=0&sync_timestamp=1591167206134&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finterpret%2Fdownload%2Finterpret-2.2.0.tgz",
"integrity": "sha1-GnigtZZcQKVBbQB61vUK0nxBffk="
},
"is-binary-path": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/is-binary-path/download/is-binary-path-2.1.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz",
"integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=",
"dev": true,
"requires": {
@@ -2803,12 +2803,12 @@
},
"is-extglob": {
"version": "2.1.1",
- "resolved": "https://registry.nlark.com/is-extglob/download/is-extglob-2.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz",
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-fullwidth-code-point": {
"version": "3.0.0",
- "resolved": "https://registry.nlark.com/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=",
"dev": true
},
@@ -2822,7 +2822,7 @@
},
"is-number": {
"version": "7.0.0",
- "resolved": "https://registry.nlark.com/is-number/download/is-number-7.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz",
"integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss="
},
"is-path-cwd": {
@@ -2840,7 +2840,7 @@
},
"is-path-inside": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/is-path-inside/download/is-path-inside-2.1.0.tgz",
+ "resolved": "https://registry.nlark.com/is-path-inside/download/is-path-inside-2.1.0.tgz?cache=0&sync_timestamp=1620046845369&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-path-inside%2Fdownload%2Fis-path-inside-2.1.0.tgz",
"integrity": "sha1-fJgQWH1lmkDSe8201WFuqwWUlLI=",
"requires": {
"path-is-inside": "^1.0.2"
@@ -2848,13 +2848,13 @@
},
"is-plain-obj": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/is-plain-obj/download/is-plain-obj-2.1.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-2.1.0.tgz?cache=0&sync_timestamp=1618600535482&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-obj%2Fdownload%2Fis-plain-obj-2.1.0.tgz",
"integrity": "sha1-ReQuN/zPH0Dajl927iFRWEDAkoc=",
"dev": true
},
"is-plain-object": {
"version": "2.0.4",
- "resolved": "https://registry.nlark.com/is-plain-object/download/is-plain-object-2.0.4.tgz?cache=0&sync_timestamp=1622605338713&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-plain-object%2Fdownload%2Fis-plain-object-2.0.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz?cache=0&sync_timestamp=1599667247216&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-object%2Fdownload%2Fis-plain-object-2.0.4.tgz",
"integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=",
"requires": {
"isobject": "^3.0.1"
@@ -2867,17 +2867,17 @@
},
"isarray": {
"version": "1.0.0",
- "resolved": "https://registry.nlark.com/isarray/download/isarray-1.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isexe": {
"version": "2.0.0",
- "resolved": "https://registry.nlark.com/isexe/download/isexe-2.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"isobject": {
"version": "3.0.1",
- "resolved": "https://registry.nlark.com/isobject/download/isobject-3.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz",
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"jest-worker": {
@@ -2908,7 +2908,7 @@
},
"js-yaml": {
"version": "3.14.1",
- "resolved": "https://registry.nlark.com/js-yaml/download/js-yaml-3.14.1.tgz?cache=0&sync_timestamp=1622604474266&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/js-yaml/download/js-yaml-3.14.1.tgz?cache=0&sync_timestamp=1618435004368&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.1.tgz",
"integrity": "sha1-2ugS/bOCX6MGYJqHFzg8UMNqBTc=",
"dev": true,
"requires": {
@@ -2918,18 +2918,18 @@
},
"jsesc": {
"version": "2.5.2",
- "resolved": "https://registry.nlark.com/jsesc/download/jsesc-2.5.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz?cache=0&sync_timestamp=1603891198638&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-2.5.2.tgz",
"integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=",
"dev": true
},
"json-parse-better-errors": {
"version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz",
"integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk="
},
"json-schema-traverse": {
"version": "0.4.1",
- "resolved": "https://registry.nlark.com/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz",
"integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA="
},
"json-stable-stringify-without-jsonify": {
@@ -2940,7 +2940,7 @@
},
"json5": {
"version": "2.2.0",
- "resolved": "https://registry.nlark.com/json5/download/json5-2.2.0.tgz?cache=0&sync_timestamp=1622604475200&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjson5%2Fdownload%2Fjson5-2.2.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/json5/download/json5-2.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-2.2.0.tgz",
"integrity": "sha1-Lf7+cgxrpSXZ69kJlQ8FFTFsiaM=",
"requires": {
"minimist": "^1.2.5"
@@ -2948,7 +2948,7 @@
},
"jsonfile": {
"version": "4.0.0",
- "resolved": "https://registry.nlark.com/jsonfile/download/jsonfile-4.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz?cache=0&sync_timestamp=1604161917513&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsonfile%2Fdownload%2Fjsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"requires": {
"graceful-fs": "^4.1.6"
@@ -2956,7 +2956,7 @@
},
"kind-of": {
"version": "6.0.3",
- "resolved": "https://registry.nlark.com/kind-of/download/kind-of-6.0.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz",
"integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0="
},
"levn": {
@@ -2986,7 +2986,7 @@
},
"locate-path": {
"version": "5.0.0",
- "resolved": "https://registry.nlark.com/locate-path/download/locate-path-5.0.0.tgz?cache=0&sync_timestamp=1629895724478&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flocate-path%2Fdownload%2Flocate-path-5.0.0.tgz",
+ "resolved": "https://registry.nlark.com/locate-path/download/locate-path-5.0.0.tgz?cache=0&sync_timestamp=1629895618224&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flocate-path%2Fdownload%2Flocate-path-5.0.0.tgz",
"integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=",
"requires": {
"p-locate": "^4.1.0"
@@ -3033,7 +3033,7 @@
},
"lru-cache": {
"version": "6.0.0",
- "resolved": "https://registry.nlark.com/lru-cache/download/lru-cache-6.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz",
"integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=",
"requires": {
"yallist": "^4.0.0"
@@ -3041,7 +3041,7 @@
},
"make-dir": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/make-dir/download/make-dir-2.1.0.tgz?cache=0&sync_timestamp=1622604552755&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmake-dir%2Fdownload%2Fmake-dir-2.1.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz",
"integrity": "sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU=",
"dev": true,
"requires": {
@@ -3051,7 +3051,7 @@
"dependencies": {
"semver": {
"version": "5.7.1",
- "resolved": "https://registry.nlark.com/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz",
"integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=",
"dev": true
}
@@ -3074,17 +3074,17 @@
},
"merge-stream": {
"version": "2.0.0",
- "resolved": "https://registry.nlark.com/merge-stream/download/merge-stream-2.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz",
"integrity": "sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A="
},
"merge2": {
"version": "1.4.1",
- "resolved": "https://registry.nlark.com/merge2/download/merge2-1.4.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/merge2/download/merge2-1.4.1.tgz",
"integrity": "sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4="
},
"micromatch": {
"version": "4.0.4",
- "resolved": "https://registry.nlark.com/micromatch/download/micromatch-4.0.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/micromatch/download/micromatch-4.0.4.tgz?cache=0&sync_timestamp=1618054842871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmicromatch%2Fdownload%2Fmicromatch-4.0.4.tgz",
"integrity": "sha1-iW1Rnf6dsl/OlM63pQCRm/iB6/k=",
"requires": {
"braces": "^3.0.1",
@@ -3093,12 +3093,12 @@
},
"mime-db": {
"version": "1.51.0",
- "resolved": "https://registry.npmmirror.com/mime-db/download/mime-db-1.51.0.tgz",
+ "resolved": "https://registry.npmmirror.com/mime-db/download/mime-db-1.51.0.tgz?cache=0&sync_timestamp=1636426033377&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fmime-db%2Fdownload%2Fmime-db-1.51.0.tgz",
"integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g=="
},
"mime-types": {
"version": "2.1.34",
- "resolved": "https://registry.npmmirror.com/mime-types/download/mime-types-2.1.34.tgz?cache=0&sync_timestamp=1636432311385&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fmime-types%2Fdownload%2Fmime-types-2.1.34.tgz",
+ "resolved": "https://registry.npmmirror.com/mime-types/download/mime-types-2.1.34.tgz?cache=0&sync_timestamp=1636432373429&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fmime-types%2Fdownload%2Fmime-types-2.1.34.tgz",
"integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
"requires": {
"mime-db": "1.51.0"
@@ -3106,12 +3106,12 @@
},
"mimic-fn": {
"version": "2.1.0",
- "resolved": "https://registry.npmmirror.com/mimic-fn/download/mimic-fn-2.1.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz",
"integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs="
},
"minimatch": {
"version": "3.0.4",
- "resolved": "https://registry.nlark.com/minimatch/download/minimatch-3.0.4.tgz?cache=0&sync_timestamp=1622604477105&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fminimatch%2Fdownload%2Fminimatch-3.0.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"requires": {
"brace-expansion": "^1.1.7"
@@ -3119,7 +3119,7 @@
},
"minimist": {
"version": "1.2.5",
- "resolved": "https://registry.nlark.com/minimist/download/minimist-1.2.5.tgz",
+ "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz",
"integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI="
},
"mocha": {
@@ -3157,7 +3157,7 @@
"dependencies": {
"argparse": {
"version": "2.0.1",
- "resolved": "https://registry.nlark.com/argparse/download/argparse-2.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-2.0.1.tgz",
"integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=",
"dev": true
},
@@ -3196,7 +3196,7 @@
},
"escape-string-regexp": {
"version": "4.0.0",
- "resolved": "https://registry.nlark.com/escape-string-regexp/download/escape-string-regexp-4.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-4.0.0.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-4.0.0.tgz",
"integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=",
"dev": true
},
@@ -3213,7 +3213,7 @@
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmmirror.com/glob/download/glob-7.1.6.tgz",
- "integrity": "sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY=",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -3226,7 +3226,7 @@
},
"js-yaml": {
"version": "4.0.0",
- "resolved": "https://registry.nlark.com/js-yaml/download/js-yaml-4.0.0.tgz?cache=0&sync_timestamp=1622604474266&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjs-yaml%2Fdownload%2Fjs-yaml-4.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/js-yaml/download/js-yaml-4.0.0.tgz?cache=0&sync_timestamp=1618435004368&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-yaml%2Fdownload%2Fjs-yaml-4.0.0.tgz",
"integrity": "sha1-9Ca8D/S0BRkmzViMcRExg0CaEh8=",
"dev": true,
"requires": {
@@ -3235,7 +3235,7 @@
},
"locate-path": {
"version": "6.0.0",
- "resolved": "https://registry.nlark.com/locate-path/download/locate-path-6.0.0.tgz?cache=0&sync_timestamp=1629895724478&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flocate-path%2Fdownload%2Flocate-path-6.0.0.tgz",
+ "resolved": "https://registry.nlark.com/locate-path/download/locate-path-6.0.0.tgz?cache=0&sync_timestamp=1629895618224&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flocate-path%2Fdownload%2Flocate-path-6.0.0.tgz",
"integrity": "sha1-VTIeswn+u8WcSAHZMackUqaB0oY=",
"dev": true,
"requires": {
@@ -3259,7 +3259,7 @@
},
"readdirp": {
"version": "3.5.0",
- "resolved": "https://registry.nlark.com/readdirp/download/readdirp-3.5.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-3.5.0.tgz",
"integrity": "sha1-m6dMAZsV02UnjS6Ru4xI17TULJ4=",
"dev": true,
"requires": {
@@ -3277,6 +3277,12 @@
}
}
},
+ "mocha-context": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmmirror.com/mocha-context/download/mocha-context-0.1.5.tgz",
+ "integrity": "sha1-pklrXXjmdZXtscRn1Y910S/5IdE=",
+ "dev": true
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/download/ms-2.1.2.tgz",
@@ -3290,13 +3296,13 @@
},
"natural-compare": {
"version": "1.4.0",
- "resolved": "https://registry.nlark.com/natural-compare/download/natural-compare-1.4.0.tgz",
+ "resolved": "https://registry.nlark.com/natural-compare/download/natural-compare-1.4.0.tgz?cache=0&sync_timestamp=1624608011507&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnatural-compare%2Fdownload%2Fnatural-compare-1.4.0.tgz",
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
"neo-async": {
"version": "2.6.2",
- "resolved": "https://registry.nlark.com/neo-async/download/neo-async-2.6.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/neo-async/download/neo-async-2.6.2.tgz?cache=0&sync_timestamp=1594317361810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fneo-async%2Fdownload%2Fneo-async-2.6.2.tgz",
"integrity": "sha1-tKr7k+OustgXTKU88WOrfXMIMF8="
},
"node-releases": {
@@ -3306,7 +3312,7 @@
},
"normalize-path": {
"version": "3.0.0",
- "resolved": "https://registry.nlark.com/normalize-path/download/normalize-path-3.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz",
"integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU="
},
"npm-run-path": {
@@ -3319,18 +3325,18 @@
},
"object-assign": {
"version": "4.1.1",
- "resolved": "https://registry.nlark.com/object-assign/download/object-assign-4.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-keys": {
"version": "1.1.1",
- "resolved": "https://registry.nlark.com/object-keys/download/object-keys-1.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz",
"integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=",
"dev": true
},
"object.assign": {
"version": "4.1.2",
- "resolved": "https://registry.nlark.com/object.assign/download/object.assign-4.1.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/object.assign/download/object.assign-4.1.2.tgz?cache=0&sync_timestamp=1604115104654&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject.assign%2Fdownload%2Fobject.assign-4.1.2.tgz",
"integrity": "sha1-DtVKNC7Os3s4/3brgxoOeIy2OUA=",
"dev": true,
"requires": {
@@ -3342,7 +3348,7 @@
},
"once": {
"version": "1.4.0",
- "resolved": "https://registry.nlark.com/once/download/once-1.4.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
@@ -3350,7 +3356,7 @@
},
"onetime": {
"version": "5.1.2",
- "resolved": "https://registry.nlark.com/onetime/download/onetime-5.1.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-5.1.2.tgz",
"integrity": "sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4=",
"requires": {
"mimic-fn": "^2.1.0"
@@ -3422,17 +3428,17 @@
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": "https://registry.nlark.com/path-is-absolute/download/path-is-absolute-1.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-is-inside": {
"version": "1.0.2",
- "resolved": "https://registry.nlark.com/path-is-inside/download/path-is-inside-1.0.2.tgz?cache=0&sync_timestamp=1622604553837&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpath-is-inside%2Fdownload%2Fpath-is-inside-1.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz",
"integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM="
},
"path-key": {
"version": "3.1.1",
- "resolved": "https://registry.nlark.com/path-key/download/path-key-3.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz?cache=0&sync_timestamp=1617971675964&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-key%2Fdownload%2Fpath-key-3.1.1.tgz",
"integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U="
},
"path-parse": {
@@ -3442,19 +3448,20 @@
},
"path-type": {
"version": "4.0.0",
- "resolved": "https://registry.nlark.com/path-type/download/path-type-4.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/path-type/download/path-type-4.0.0.tgz?cache=0&sync_timestamp=1611752107592&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-type%2Fdownload%2Fpath-type-4.0.0.tgz",
"integrity": "sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs="
},
"pathval": {
"version": "1.1.1",
- "resolved": "https://registry.npmmirror.com/pathval/download/pathval-1.1.1.tgz",
+ "resolved": "https://registry.nlark.com/pathval/download/pathval-1.1.1.tgz",
"integrity": "sha1-hTTnenfOesWiUS6iHg/bj89sPY0=",
"dev": true
},
"pegjs": {
"version": "0.10.0",
- "resolved": "https://registry.npmmirror.com/pegjs/download/pegjs-0.10.0.tgz",
- "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0="
+ "resolved": "https://registry.nlark.com/pegjs/download/pegjs-0.10.0.tgz",
+ "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=",
+ "dev": true
},
"picocolors": {
"version": "1.0.0",
@@ -3463,7 +3470,7 @@
},
"picomatch": {
"version": "2.3.0",
- "resolved": "https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz",
+ "resolved": "https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz?cache=0&sync_timestamp=1621648246651&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpicomatch%2Fdownload%2Fpicomatch-2.3.0.tgz",
"integrity": "sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI="
},
"pify": {
@@ -3473,12 +3480,12 @@
},
"pinkie": {
"version": "2.0.4",
- "resolved": "https://registry.nlark.com/pinkie/download/pinkie-2.0.4.tgz",
+ "resolved": "https://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz",
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
},
"pinkie-promise": {
"version": "2.0.1",
- "resolved": "https://registry.nlark.com/pinkie-promise/download/pinkie-promise-2.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz",
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"requires": {
"pinkie": "^2.0.0"
@@ -3500,23 +3507,23 @@
},
"process-nextick-args": {
"version": "2.0.1",
- "resolved": "https://registry.nlark.com/process-nextick-args/download/process-nextick-args-2.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz",
"integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I="
},
"progress": {
"version": "2.0.3",
- "resolved": "https://registry.nlark.com/progress/download/progress-2.0.3.tgz",
+ "resolved": "https://registry.nlark.com/progress/download/progress-2.0.3.tgz?cache=0&sync_timestamp=1624607996383&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprogress%2Fdownload%2Fprogress-2.0.3.tgz",
"integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=",
"dev": true
},
"prr": {
"version": "1.0.1",
- "resolved": "https://registry.nlark.com/prr/download/prr-1.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY="
},
"punycode": {
"version": "2.1.1",
- "resolved": "https://registry.nlark.com/punycode/download/punycode-2.1.1.tgz?cache=0&sync_timestamp=1622604519710&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpunycode%2Fdownload%2Fpunycode-2.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz",
"integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew="
},
"queue-microtask": {
@@ -3526,7 +3533,7 @@
},
"randombytes": {
"version": "2.1.0",
- "resolved": "https://registry.nlark.com/randombytes/download/randombytes-2.1.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz",
"integrity": "sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo=",
"requires": {
"safe-buffer": "^5.1.0"
@@ -3534,7 +3541,7 @@
},
"readable-stream": {
"version": "2.3.7",
- "resolved": "https://registry.npmmirror.com/readable-stream/download/readable-stream-2.3.7.tgz",
+ "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz",
"integrity": "sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c=",
"requires": {
"core-util-is": "~1.0.0",
@@ -3548,14 +3555,14 @@
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
- "resolved": "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.1.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1600349129929&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz",
"integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
}
}
},
"readdirp": {
"version": "3.6.0",
- "resolved": "https://registry.nlark.com/readdirp/download/readdirp-3.6.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.6.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-3.6.0.tgz",
"integrity": "sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=",
"dev": true,
"optional": true,
@@ -3573,13 +3580,13 @@
},
"regenerate": {
"version": "1.4.2",
- "resolved": "https://registry.nlark.com/regenerate/download/regenerate-1.4.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.2.tgz",
"integrity": "sha1-uTRtiCfo9aMve6KWN9OYtpAUhIo=",
"dev": true
},
"regenerate-unicode-properties": {
"version": "9.0.0",
- "resolved": "https://registry.npmmirror.com/regenerate-unicode-properties/download/regenerate-unicode-properties-9.0.0.tgz",
+ "resolved": "https://registry.nlark.com/regenerate-unicode-properties/download/regenerate-unicode-properties-9.0.0.tgz?cache=0&sync_timestamp=1631617161322&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregenerate-unicode-properties%2Fdownload%2Fregenerate-unicode-properties-9.0.0.tgz",
"integrity": "sha1-VNCccRXh9T3CMUqXSzLBw0Tv4yY=",
"dev": true,
"requires": {
@@ -3603,7 +3610,7 @@
},
"regexpp": {
"version": "3.2.0",
- "resolved": "https://registry.nlark.com/regexpp/download/regexpp-3.2.0.tgz?cache=0&sync_timestamp=1623669331185&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregexpp%2Fdownload%2Fregexpp-3.2.0.tgz",
+ "resolved": "https://registry.nlark.com/regexpp/download/regexpp-3.2.0.tgz",
"integrity": "sha1-BCWido2PI7rXDKS5BGH6LxIT4bI=",
"dev": true
},
@@ -3638,7 +3645,7 @@
"dependencies": {
"jsesc": {
"version": "0.5.0",
- "resolved": "https://registry.nlark.com/jsesc/download/jsesc-0.5.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz?cache=0&sync_timestamp=1603891198638&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true
}
@@ -3646,19 +3653,19 @@
},
"require-directory": {
"version": "2.1.1",
- "resolved": "https://registry.nlark.com/require-directory/download/require-directory-2.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
},
"require-from-string": {
"version": "2.0.2",
- "resolved": "https://registry.nlark.com/require-from-string/download/require-from-string-2.0.2.tgz?cache=0&sync_timestamp=1622605305570&other_urls=https%3A%2F%2Fregistry.nlark.com%2Frequire-from-string%2Fdownload%2Frequire-from-string-2.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/require-from-string/download/require-from-string-2.0.2.tgz",
"integrity": "sha1-iaf92TgmEmcxjq/hT5wy5ZjDaQk=",
"dev": true
},
"resolve": {
"version": "1.20.0",
- "resolved": "https://registry.nlark.com/resolve/download/resolve-1.20.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.20.0.tgz?cache=0&sync_timestamp=1613055280179&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.20.0.tgz",
"integrity": "sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=",
"requires": {
"is-core-module": "^2.2.0",
@@ -3667,7 +3674,7 @@
},
"resolve-cwd": {
"version": "3.0.0",
- "resolved": "https://registry.nlark.com/resolve-cwd/download/resolve-cwd-3.0.0.tgz?cache=0&sync_timestamp=1622605314261&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fresolve-cwd%2Fdownload%2Fresolve-cwd-3.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-3.0.0.tgz",
"integrity": "sha1-DwB18bslRHZs9zumpuKt/ryxPy0=",
"requires": {
"resolve-from": "^5.0.0"
@@ -3675,7 +3682,7 @@
},
"resolve-from": {
"version": "5.0.0",
- "resolved": "https://registry.nlark.com/resolve-from/download/resolve-from-5.0.0.tgz?cache=0&sync_timestamp=1622605305717&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fresolve-from%2Fdownload%2Fresolve-from-5.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-5.0.0.tgz",
"integrity": "sha1-w1IlhD3493bfIcV1V7wIfp39/Gk="
},
"reusify": {
@@ -3706,12 +3713,12 @@
},
"safe-buffer": {
"version": "5.2.1",
- "resolved": "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.2.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz?cache=0&sync_timestamp=1600349129929&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.2.1.tgz",
"integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY="
},
"schema-utils": {
"version": "3.1.1",
- "resolved": "https://registry.npmmirror.com/schema-utils/download/schema-utils-3.1.1.tgz?cache=0&sync_timestamp=1637075894281&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fschema-utils%2Fdownload%2Fschema-utils-3.1.1.tgz",
+ "resolved": "https://registry.npmmirror.com/schema-utils/download/schema-utils-3.1.1.tgz?cache=0&sync_timestamp=1637075967293&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fschema-utils%2Fdownload%2Fschema-utils-3.1.1.tgz",
"integrity": "sha1-vHTEtraZXB2I92qLd76nIZ4MgoE=",
"requires": {
"@types/json-schema": "^7.0.8",
@@ -3721,7 +3728,7 @@
},
"semver": {
"version": "7.3.5",
- "resolved": "https://registry.nlark.com/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1622604551741&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz",
+ "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz",
"integrity": "sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=",
"requires": {
"lru-cache": "^6.0.0"
@@ -3745,7 +3752,7 @@
},
"shebang-command": {
"version": "2.0.0",
- "resolved": "https://registry.nlark.com/shebang-command/download/shebang-command-2.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz",
"integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=",
"requires": {
"shebang-regex": "^3.0.0"
@@ -3763,12 +3770,12 @@
},
"slash": {
"version": "3.0.0",
- "resolved": "https://registry.nlark.com/slash/download/slash-3.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/slash/download/slash-3.0.0.tgz?cache=0&sync_timestamp=1618384508676&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fslash%2Fdownload%2Fslash-3.0.0.tgz",
"integrity": "sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ="
},
"slice-ansi": {
"version": "4.0.0",
- "resolved": "https://registry.nlark.com/slice-ansi/download/slice-ansi-4.0.0.tgz?cache=0&sync_timestamp=1622604533654&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fslice-ansi%2Fdownload%2Fslice-ansi-4.0.0.tgz",
+ "resolved": "https://registry.nlark.com/slice-ansi/download/slice-ansi-4.0.0.tgz",
"integrity": "sha1-UA6N0P1VsFgVCGJVsxla3ypF/ms=",
"dev": true,
"requires": {
@@ -3779,12 +3786,12 @@
},
"source-map": {
"version": "0.6.1",
- "resolved": "https://registry.nlark.com/source-map/download/source-map-0.6.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM="
},
"source-map-support": {
"version": "0.5.21",
- "resolved": "https://registry.npmmirror.com/source-map-support/download/source-map-support-0.5.21.tgz?cache=0&sync_timestamp=1637322679144&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.21.tgz",
+ "resolved": "https://registry.npmmirror.com/source-map-support/download/source-map-support-0.5.21.tgz?cache=0&sync_timestamp=1637320256759&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.21.tgz",
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"requires": {
"buffer-from": "^1.0.0",
@@ -3793,7 +3800,7 @@
},
"sprintf-js": {
"version": "1.0.3",
- "resolved": "https://registry.nlark.com/sprintf-js/download/sprintf-js-1.0.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
@@ -3827,7 +3834,7 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": "https://registry.nlark.com/string_decoder/download/string_decoder-1.1.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz",
"integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
"requires": {
"safe-buffer": "~5.1.0"
@@ -3835,7 +3842,7 @@
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
- "resolved": "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.1.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1600349129929&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz",
"integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
}
}
@@ -3856,7 +3863,7 @@
},
"strip-json-comments": {
"version": "3.1.1",
- "resolved": "https://registry.nlark.com/strip-json-comments/download/strip-json-comments-3.1.1.tgz?cache=0&sync_timestamp=1629397119136&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fstrip-json-comments%2Fdownload%2Fstrip-json-comments-3.1.1.tgz",
+ "resolved": "https://registry.nlark.com/strip-json-comments/download/strip-json-comments-3.1.1.tgz",
"integrity": "sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY=",
"dev": true
},
@@ -3895,7 +3902,7 @@
},
"json-schema-traverse": {
"version": "1.0.0",
- "resolved": "https://registry.nlark.com/json-schema-traverse/download/json-schema-traverse-1.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-1.0.0.tgz",
"integrity": "sha1-rnvLNlard6c7pcSb9lTzjmtoYOI=",
"dev": true
}
@@ -3908,7 +3915,7 @@
},
"terser": {
"version": "5.10.0",
- "resolved": "https://registry.npmmirror.com/terser/download/terser-5.10.0.tgz?cache=0&sync_timestamp=1636988253279&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fterser%2Fdownload%2Fterser-5.10.0.tgz",
+ "resolved": "https://registry.npmmirror.com/terser/download/terser-5.10.0.tgz?cache=0&sync_timestamp=1636988176283&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fterser%2Fdownload%2Fterser-5.10.0.tgz",
"integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==",
"requires": {
"commander": "^2.20.0",
@@ -3918,7 +3925,7 @@
"dependencies": {
"source-map": {
"version": "0.7.3",
- "resolved": "https://registry.nlark.com/source-map/download/source-map-0.7.3.tgz",
+ "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.7.3.tgz",
"integrity": "sha1-UwL4FpAxc1ImVECS5kmB91F1A4M="
}
}
@@ -3959,7 +3966,7 @@
},
"to-regex-range": {
"version": "5.0.1",
- "resolved": "https://registry.nlark.com/to-regex-range/download/to-regex-range-5.0.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz",
"integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=",
"requires": {
"is-number": "^7.0.0"
@@ -3967,7 +3974,7 @@
},
"ts-loader": {
"version": "8.3.0",
- "resolved": "https://registry.nlark.com/ts-loader/download/ts-loader-8.3.0.tgz?cache=0&sync_timestamp=1632169134951&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fts-loader%2Fdownload%2Fts-loader-8.3.0.tgz",
+ "resolved": "https://registry.nlark.com/ts-loader/download/ts-loader-8.3.0.tgz?cache=0&sync_timestamp=1632169470976&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fts-loader%2Fdownload%2Fts-loader-8.3.0.tgz",
"integrity": "sha1-gzYEltb4AE+rNYJSeRMsk0Eu3zM=",
"requires": {
"chalk": "^4.1.0",
@@ -3993,7 +4000,7 @@
"dependencies": {
"diff": {
"version": "4.0.2",
- "resolved": "https://registry.nlark.com/diff/download/diff-4.0.2.tgz?cache=0&sync_timestamp=1622605328812&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdiff%2Fdownload%2Fdiff-4.0.2.tgz",
+ "resolved": "https://registry.nlark.com/diff/download/diff-4.0.2.tgz?cache=0&sync_timestamp=1624608104914&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdiff%2Fdownload%2Fdiff-4.0.2.tgz",
"integrity": "sha1-YPOuy4nV+uUgwRqhnvwruYKq3n0=",
"dev": true
}
@@ -4001,13 +4008,13 @@
},
"tslib": {
"version": "1.14.1",
- "resolved": "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz",
+ "resolved": "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz?cache=0&sync_timestamp=1628722556410&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz",
"integrity": "sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=",
"dev": true
},
"tsutils": {
"version": "3.21.0",
- "resolved": "https://registry.nlark.com/tsutils/download/tsutils-3.21.0.tgz?cache=0&sync_timestamp=1622604538827&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftsutils%2Fdownload%2Ftsutils-3.21.0.tgz",
+ "resolved": "https://registry.nlark.com/tsutils/download/tsutils-3.21.0.tgz",
"integrity": "sha1-tIcX05TOpsHglpg+7Vjp1hcVtiM=",
"dev": true,
"requires": {
@@ -4025,7 +4032,7 @@
},
"type-detect": {
"version": "4.0.8",
- "resolved": "https://registry.nlark.com/type-detect/download/type-detect-4.0.8.tgz",
+ "resolved": "https://registry.npm.taobao.org/type-detect/download/type-detect-4.0.8.tgz",
"integrity": "sha1-dkb7XxiHHPu3dJ5pvTmmOI63RQw=",
"dev": true
},
@@ -4040,6 +4047,12 @@
"resolved": "https://registry.npmmirror.com/typescript/download/typescript-4.5.4.tgz",
"integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg=="
},
+ "uglify-js": {
+ "version": "3.14.5",
+ "resolved": "https://registry.npmmirror.com/uglify-js/download/uglify-js-3.14.5.tgz",
+ "integrity": "sha512-qZukoSxOG0urUTvjc2ERMTcAy+BiFh3weWAkeurLwjrCba73poHmG3E36XEjd/JGukMzwTL7uCxZiAexj8ppvQ==",
+ "dev": true
+ },
"unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.nlark.com/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
@@ -4070,12 +4083,12 @@
},
"universalify": {
"version": "0.1.2",
- "resolved": "https://registry.nlark.com/universalify/download/universalify-0.1.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz?cache=0&sync_timestamp=1603180080276&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funiversalify%2Fdownload%2Funiversalify-0.1.2.tgz",
"integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY="
},
"uri-js": {
"version": "4.4.1",
- "resolved": "https://registry.nlark.com/uri-js/download/uri-js-4.4.1.tgz",
+ "resolved": "https://registry.npm.taobao.org/uri-js/download/uri-js-4.4.1.tgz",
"integrity": "sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34=",
"requires": {
"punycode": "^2.1.0"
@@ -4083,7 +4096,7 @@
},
"util-deprecate": {
"version": "1.0.2",
- "resolved": "https://registry.nlark.com/util-deprecate/download/util-deprecate-1.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"v8-compile-cache": {
@@ -4176,7 +4189,7 @@
},
"webpack-merge": {
"version": "5.8.0",
- "resolved": "https://registry.npmmirror.com/webpack-merge/download/webpack-merge-5.8.0.tgz",
+ "resolved": "https://registry.nlark.com/webpack-merge/download/webpack-merge-5.8.0.tgz",
"integrity": "sha1-Kznb8ir4d3atdEw5AiNzHTCmj2E=",
"requires": {
"clone-deep": "^4.0.1",
@@ -4185,12 +4198,12 @@
},
"webpack-sources": {
"version": "3.2.2",
- "resolved": "https://registry.npmmirror.com/webpack-sources/download/webpack-sources-3.2.2.tgz?cache=0&sync_timestamp=1636982699200&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fwebpack-sources%2Fdownload%2Fwebpack-sources-3.2.2.tgz",
+ "resolved": "https://registry.npmmirror.com/webpack-sources/download/webpack-sources-3.2.2.tgz?cache=0&sync_timestamp=1636982763649&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fwebpack-sources%2Fdownload%2Fwebpack-sources-3.2.2.tgz",
"integrity": "sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw=="
},
"which": {
"version": "2.0.2",
- "resolved": "https://registry.nlark.com/which/download/which-2.0.2.tgz",
+ "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz",
"integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=",
"requires": {
"isexe": "^2.0.0"
@@ -4213,7 +4226,7 @@
},
"is-fullwidth-code-point": {
"version": "2.0.0",
- "resolved": "https://registry.nlark.com/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
@@ -4268,18 +4281,23 @@
},
"wrappy": {
"version": "1.0.2",
- "resolved": "https://registry.nlark.com/wrappy/download/wrappy-1.0.2.tgz",
+ "resolved": "https://registry.nlark.com/wrappy/download/wrappy-1.0.2.tgz?cache=0&sync_timestamp=1619133505879&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fwrappy%2Fdownload%2Fwrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
+ "ws": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmmirror.com/ws/download/ws-8.4.0.tgz",
+ "integrity": "sha512-IHVsKe2pjajSUIl4KYMQOdlyliovpEPquKkqbwswulszzI7r0SfQrxnXdWAEqOlDCLrVSJzo+O1hAwdog2sKSQ=="
+ },
"y18n": {
"version": "5.0.8",
- "resolved": "https://registry.nlark.com/y18n/download/y18n-5.0.8.tgz",
+ "resolved": "https://registry.npm.taobao.org/y18n/download/y18n-5.0.8.tgz",
"integrity": "sha1-f0k00PfKjFb5UxSTndzS3ZHOHVU=",
"dev": true
},
"yallist": {
"version": "4.0.0",
- "resolved": "https://registry.nlark.com/yallist/download/yallist-4.0.0.tgz?cache=0&sync_timestamp=1622604530774&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyallist%2Fdownload%2Fyallist-4.0.0.tgz",
+ "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz",
"integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI="
},
"yargs": {
@@ -4299,7 +4317,7 @@
},
"yargs-parser": {
"version": "20.2.4",
- "resolved": "https://registry.npmmirror.com/yargs-parser/download/yargs-parser-20.2.4.tgz?cache=0&sync_timestamp=1637031023704&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fyargs-parser%2Fdownload%2Fyargs-parser-20.2.4.tgz",
+ "resolved": "https://registry.npmmirror.com/yargs-parser/download/yargs-parser-20.2.4.tgz?cache=0&sync_timestamp=1637031074828&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fyargs-parser%2Fdownload%2Fyargs-parser-20.2.4.tgz",
"integrity": "sha1-tCiQ8UVmeW+Fro46JSkNIF8VSlQ=",
"dev": true
},
@@ -4317,13 +4335,13 @@
},
"yn": {
"version": "3.1.1",
- "resolved": "https://registry.nlark.com/yn/download/yn-3.1.1.tgz?cache=0&sync_timestamp=1628974846240&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyn%2Fdownload%2Fyn-3.1.1.tgz",
+ "resolved": "https://registry.nlark.com/yn/download/yn-3.1.1.tgz",
"integrity": "sha1-HodAGgnXZ8HV6rJqbkwYUYLS61A=",
"dev": true
},
"yocto-queue": {
"version": "0.1.0",
- "resolved": "https://registry.nlark.com/yocto-queue/download/yocto-queue-0.1.0.tgz",
+ "resolved": "https://registry.nlark.com/yocto-queue/download/yocto-queue-0.1.0.tgz?cache=0&sync_timestamp=1628812679256&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyocto-queue%2Fdownload%2Fyocto-queue-0.1.0.tgz",
"integrity": "sha1-ApTrPe4FAo0x7hpfosVWpqrxChs="
}
}
diff --git a/compiler/package.json b/compiler/package.json
index fe0cde3312bf028000ac92f25c389d3b8c551a7b..b3b92f1887435a072e4a0479d13b7c7a5e4b1605 100644
--- a/compiler/package.json
+++ b/compiler/package.json
@@ -10,10 +10,10 @@
],
"scripts": {
"lint": "eslint --fix ./src --ext .ts",
- "build": "npm run generateSyntaxParser && npm run generateDeclarations && ./node_modules/.bin/babel ./src --out-dir lib --extensions .ts",
+ "build": "npm run generateSyntaxParser && npm run generateDeclarations && ./node_modules/.bin/babel ./src --out-dir lib --extensions .ts && node uglify-source.js lib",
"create": "node ./lib/create.js --env projectName",
"compile": "webpack --config webpack.config.js --env buildMode=debug projectName",
- "test": "npm run build && mocha -r ts-node/register test/test.ts",
+ "test": "npm run build && mocha -r mocha-context/register test/test.js",
"generateDeclarations": "node ./build_declarations_file.js ../../../interface/sdk-js/api/@internal/component/ets ./declarations ./lib",
"generateSyntaxParser": "node build_parser.js ./syntax_parser/dist",
"postinstall": "node npm-install.js"
@@ -29,18 +29,20 @@
"chai": "^4.2.0",
"eslint": "^7.16.0",
"mocha": "^8.2.1",
+ "mocha-context": "^0.1.5",
"ts-node": "^9.1.1",
- "uglify-es": "^3.3.10"
+ "uglify-js": "^3.13.0",
+ "pegjs": "^0.10.0"
},
"dependencies": {
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^8.1.0",
- "deccjsunit": "1.0.3",
+ "deccjsunit": "1.0.4",
"log4js": "^6.3.0",
- "pegjs": "^0.10.0",
"ts-loader": "^8.0.12",
"typescript": "^4.1.3",
"webpack": "^5.48.0",
- "webpack-cli": "^4.2.0"
+ "webpack-cli": "^4.2.0",
+ "ws": "^8.3.0"
}
}
diff --git a/compiler/sample/manifest.json b/compiler/sample/manifest.json
index 97155b8f143765351882027299247ca8d540f117..8895c323c4334213b6c65aee5d1df094454ea760 100644
--- a/compiler/sample/manifest.json
+++ b/compiler/sample/manifest.json
@@ -1,5 +1,5 @@
{
- "appID": "com.huawei.ace.helloworld",
+ "appID": "com.example.ace.helloworld",
"appName": "HelloAce",
"versionName": "1.0.0",
"versionCode": 1,
diff --git a/compiler/sample/pages/home_preview.ets b/compiler/sample/pages/home_preview.ets
index c11cf63193c1db258160c16ba6792c4069454a8f..c4352e7190d2e6d4d5118477317f5a3e62c79b21 100644
--- a/compiler/sample/pages/home_preview.ets
+++ b/compiler/sample/pages/home_preview.ets
@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
@Entry
@Component
struct HomePreviewComponent {
diff --git a/compiler/sample/pages/testcases/expected/component-01-expected.js b/compiler/sample/pages/testcases/expected/component-01-expected.js
index eda0bbd2193add331685b560314985f47c646fdd..45b082ae6bef4e0ff44458116a98a8c3ef4babf1 100644
--- a/compiler/sample/pages/testcases/expected/component-01-expected.js
+++ b/compiler/sample/pages/testcases/expected/component-01-expected.js
@@ -15,7 +15,7 @@
class MyComponent extends View {
constructor() {
- super();
+ super();
this.value1 = value1;
this.value2 = value2;
this.value3 = value3;
diff --git a/compiler/sample/pages/testcases/showcaseCovid19.ets b/compiler/sample/pages/testcases/showcaseCovid19.ets
index 01a058645b6bd5327e49a350d80f541b7752ce05..bd4dd5887fa0c485b78f4bc8f43fd6c9ed6b1646 100644
--- a/compiler/sample/pages/testcases/showcaseCovid19.ets
+++ b/compiler/sample/pages/testcases/showcaseCovid19.ets
@@ -21,7 +21,6 @@
*
* ACE @ Web Helsinki
*
-
*/
const enum FlexAlign {
diff --git a/compiler/sample/pages/todo.ets b/compiler/sample/pages/todo.ets
index e3cbe4b4cb71587c69214dfbb2643645b4399c4f..6b0089d3fe48e5904dad917b6121d89173645c1f 100644
--- a/compiler/sample/pages/todo.ets
+++ b/compiler/sample/pages/todo.ets
@@ -24,7 +24,7 @@
* https://rnd-gitlab-eu-c.huawei.com/zidanehbs/ace/ace/-/blob/fin-hmf-dev-ace-diff-clean/samples/common/res/hi_topapp/assets/js/default/acediff/todoListForEach.js
* This is the ouput the eDSL transpiler should generate.
*/
-
+
let tasks: Array = [
{ label: "Wash the car" },
{ label: "Buy some milk" },
diff --git a/compiler/server/build_pipe_server.js b/compiler/server/build_pipe_server.js
new file mode 100644
index 0000000000000000000000000000000000000000..a087c32a7c9cc6ae2d8727d1e390f89ee6e15216
--- /dev/null
+++ b/compiler/server/build_pipe_server.js
@@ -0,0 +1,72 @@
+/*
+ * 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 WebSocket = require('ws');
+const ts = require('typescript');
+
+const { processComponentChild } = require('../lib/process_component_build');
+
+const WebSocketServer = WebSocket.Server;
+
+let pluginSocket = '';
+
+const pluginCommandChannelMessageHandlers = {
+ 'compileComponent': handlePluginCompileComponent,
+ 'default': () => {}
+};
+
+function init(port) {
+ const wss = new WebSocketServer({port: port});
+ wss.on('connection', function(ws) {
+ pluginSocket = ws;
+ handlePluginConnect(ws);
+ });
+}
+
+function handlePluginConnect(ws) {
+ ws.on('message', function(message) {
+ const jsonData = JSON.parse(message);
+ handlePluginCommand(jsonData);
+ });
+}
+
+function handlePluginCommand(jsonData) {
+ pluginCommandChannelMessageHandlers[jsonData.command]
+ ? pluginCommandChannelMessageHandlers[jsonData.command](jsonData)
+ : pluginCommandChannelMessageHandlers['default'](jsonData);
+}
+
+function handlePluginCompileComponent(jsonData) {
+ const receivedMsg = jsonData;
+ const sourceNode = ts.createSourceFile
+ ('preview.ts', receivedMsg.data.script, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
+ const previewStatements = [];
+ processComponentChild(sourceNode, previewStatements, []);
+ const newSource = ts.factory.updateSourceFile(sourceNode, previewStatements);
+ const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
+ const result = printer.printNode(ts.EmitHint.Unspecified, newSource, newSource);
+ receivedMsg.data.script = result;
+ if (pluginSocket.readyState === WebSocket.OPEN){
+ responseToPlugin(receivedMsg);
+ }
+}
+
+function responseToPlugin(jsonData) {
+ pluginSocket.send(JSON.stringify(jsonData), (err) => {});
+}
+
+module.exports = {
+ init
+};
diff --git a/compiler/src/compile_info.ts b/compiler/src/compile_info.ts
index 41693a1752eee6d107b41cd255bcc1b03558f1bc..97faaa76d758412b487afc4ddca904733e352124 100644
--- a/compiler/src/compile_info.ts
+++ b/compiler/src/compile_info.ts
@@ -15,15 +15,22 @@
import Stats from 'webpack/lib/Stats';
import Compiler from 'webpack/lib/Compiler';
+import Compilation from 'webpack/lib/Compilation';
+import JavascriptModulesPlugin from 'webpack/lib/javascript/JavascriptModulesPlugin';
import {
configure,
getLogger
} from 'log4js';
import RawSource from 'webpack-sources/lib/RawSource';
+import path from 'path';
+import fs from 'fs';
+import CachedSource from 'webpack-sources/lib/CachedSource';
+import ConcatSource from 'webpack-sources/lib/ConcatSource';
import {
BUILDIN_STYLE_NAMES,
- EXTEND_ATTRIBUTE
+ EXTEND_ATTRIBUTE,
+ STYLES_ATTRIBUTE
} from './component_map';
import { transformLog } from './process_ui_syntax';
import {
@@ -34,6 +41,8 @@ import {
import { decoratorParamSet } from './process_component_member';
import { appComponentCollection } from './process_component_build';
import { projectConfig } from '../main';
+import { circularFile } from './utils';
+import { MODULE_SHARE_PATH, BUILD_SHARE_PATH } from './pre_define';
configure({
appenders: { 'ETS': {type: 'stderr', layout: {type: 'messagePassThrough'}}},
@@ -42,6 +51,13 @@ configure({
export const logger = getLogger('ETS');
const props: string[] = [];
+const GLOBAL_COMMON_MODULE_CACHE: string = `
+globalThis["__common_module_cache__"] = globalThis["__common_module_cache__"] || {};
+globalThis["webpackChunkcompilier"].forEach((item)=> {
+ Object.keys(item[1]).forEach((element) => {
+ globalThis["__common_module_cache__"][element] = null;
+ })
+});`;
interface Info {
message?: string;
@@ -62,6 +78,7 @@ export class ResultStates {
private yellow: string = '\u001b[33m';
private blue: string = '\u001b[34m';
private reset: string = '\u001b[39m';
+ private modulePaths: Set = new Set([]);
public apply(compiler: Compiler): void {
compiler.hooks.compilation.tap('SourcemapFixer', compilation => {
@@ -73,6 +90,52 @@ export class ResultStates {
});
}
);
+
+ compilation.hooks.buildModule.tap("findModule", (module) => {
+ if (/node_modules/.test(module.context)) {
+ const modulePath: string =
+ path.resolve(module.resourceResolveData.descriptionFileRoot, MODULE_SHARE_PATH);
+ if (fs.existsSync(modulePath)) {
+ this.modulePaths.add(modulePath);
+ }
+ }
+ });
+ });
+
+ compiler.hooks.afterCompile.tap('copyFindModule', () => {
+ this.modulePaths.forEach(modulePath => {
+ circularFile(modulePath, path.resolve(projectConfig.buildPath, BUILD_SHARE_PATH));
+ });
+ });
+
+ compiler.hooks.compilation.tap('CommonAsset', compilation => {
+ compilation.hooks.processAssets.tap(
+ {
+ name: 'GLOBAL_COMMON_MODULE_CACHE',
+ stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,
+ },
+ (assets) => {
+ if (assets['commons.js']) {
+ assets['commons.js'] = new CachedSource(
+ new ConcatSource(assets['commons.js'], GLOBAL_COMMON_MODULE_CACHE));
+ } else if (assets['vendors.js']) {
+ assets['vendors.js'] = new CachedSource(
+ new ConcatSource(assets['vendors.js'], GLOBAL_COMMON_MODULE_CACHE));
+ }
+ });
+ });
+
+ compiler.hooks.compilation.tap('Require', compilation => {
+ JavascriptModulesPlugin.getCompilationHooks(compilation).renderRequire.tap('renderRequire',
+ (source) => {
+ return `var commonCachedModule = globalThis["__common_module_cache__"] ? ` +
+ `globalThis["__common_module_cache__"][moduleId]: null;\n` +
+ `if (commonCachedModule) { return commonCachedModule.exports; }\n` +
+ source.replace('// Execute the module function',
+ `if (globalThis["__common_module_cache__"] && moduleId.indexOf("?name=") < 0 && ` +
+ `Object.keys(globalThis["__common_module_cache__"]).indexOf(moduleId) >= 0) {\n` +
+ ` globalThis["__common_module_cache__"][moduleId] = module;\n}`);
+ });
});
compiler.hooks.done.tap('Result States', (stats: Stats) => {
@@ -192,11 +255,13 @@ export class ResultStates {
const propInfoReg: RegExp = /Cannot find name\s*'(\$?[_a-zA-Z0-9]+)'/;
const componentNameReg: RegExp = /'typeof\s*(\$?[_a-zA-Z0-9]+)' is not callable/;
const stateInfoReg: RegExp = /Property\s*'(\$[_a-zA-Z0-9]+)' does not exist on type/;
- const extendInfoReg: RegExp = /Property\s*'([_a-zA-Z0-9]+)' does not exist on type\s*'([_a-zA-Z0-9]+)'\./;
+ const extendInfoReg: RegExp =
+ /Property\s*'([_a-zA-Z0-9]+)' does not exist on type\s*'([_a-zA-Z0-9]+)'\./;
if (this.matchMessage(message, props, propInfoReg) ||
this.matchMessage(message, [...componentCollection.customComponents], componentNameReg) ||
this.matchMessage(message, props, stateInfoReg) ||
- this.matchMessage(message, EXTEND_ATTRIBUTE, extendInfoReg, true)) {
+ this.matchMessage(message, EXTEND_ATTRIBUTE, extendInfoReg, true) ||
+ this.matchMessage(message, [...STYLES_ATTRIBUTE], extendInfoReg)) {
return false;
}
return true;
diff --git a/compiler/src/component_map.ts b/compiler/src/component_map.ts
index bb64266fd0ee8f62e67e216a6705aea60db207f2..79f1974da619a55bd559ec7ba642d92321043d90 100644
--- a/compiler/src/component_map.ts
+++ b/compiler/src/component_map.ts
@@ -13,382 +13,33 @@
* limitations under the License.
*/
-export const COMPONENT_MAP: any = {
- Search: {
- atomic: true,
- attrs: [
- 'searchButton', 'placeholderColor', 'placeholderFont', 'onSubmit', 'onChange'
- ]
- },
- FormComponent: {
- atomic: true,
- attrs: [
- 'size', 'moduleName', 'dimension', 'allowUpdate', 'visibility',
- 'onAcquired', 'onError', 'onRouter'
- ]
- },
- Image: {
- atomic: true,
- attrs: [
- 'alt', 'objectFit', 'matchTextDirection', 'fitOriginalSize', 'objectRepeat', 'renderMode', 'interpolation',
- 'onComplete', 'onError', 'onFinish', 'sourceSize', 'fillColor', 'autoResize'
- ]
- },
- ImageAnimator: {
- atomic: true,
- attrs: [
- 'images', 'state', 'duration', 'reverse', 'fixedSize', 'preDecode', 'fillMode', 'iterations', 'onStart',
- 'onPause', 'onRepeat', 'onCancel', 'onFinish'
- ]
- },
- Animator: {
- atomic: true,
- noDebugLine: true,
- attrs: [
- 'state', 'duration', 'curve', 'delay', 'fillMode', 'iterations', 'playMode', 'motion', 'onStart',
- 'onPause', 'onRepeat', 'onCancel', 'onFinish', 'onFrame'
- ]
- },
- Refresh: {
- single: true,
- attrs: [
- 'refreshing', 'offset', 'friction',
- 'onStateChange', 'onRefreshing'
- ]
- },
- SpringProp: {
- atomic: true
- },
- SpringMotion: {
- atomic: true
- },
- FrictionMotion: {
- atomic: true
- },
- ScrollMotion: {
- atomic: true
- },
- Text: {
- children: ['Span'],
- attrs: [
- 'fontColor', 'fontSize', 'fontStyle', 'fontWeight', 'textAlign', 'lineHeight', 'textOverflow', 'maxLines',
- 'decoration', 'letterSpacing', 'textCase', 'baselineOffset', 'minFontSize', 'maxFontSize'
- ]
- },
- TextPicker: {
- atomic: true,
- attrs: ['defaultPickerItemHeight', 'onAccept', 'onCancel', 'onChange']
- },
- DatePicker: {
- atomic: true,
- attrs: ['lunar', 'onChange', 'useMilitaryTime']
- },
- Span: {
- atomic: true,
- attrs: [
- 'fontColor', 'fontSize', 'fontStyle', 'fontFamily', 'fontWeight', 'decoration', 'letterSpacing', 'textCase'
- ]
- },
- Button: {
- attrs: ['type', 'stateEffect', 'fontColor', 'fontSize', 'fontWeight']
- },
- Divider: {
- atomic: true,
- attrs: ['color', 'vertical', 'strokeWidth', 'lineCap']
- },
- Piece: {
- atomic: true,
- attrs: ['iconPosition']
- },
- Slider: {
- atomic: true,
- attrs: ['blockColor', 'trackColor', 'selectedColor', 'minLabel','maxLabel', 'showSteps', 'showTips', 'onChange']
- },
- Counter: {
- attrs: [
- 'onStateChange', 'onInc',
- 'onDec', 'height', 'width'
- ]
- },
- Row: {
- attrs: ['alignItems']
- },
- Column: {
- attrs: ['alignItems']
- },
- Stack: {
- attrs: ['alignContent']
- },
- List: {
- children: ['ListItem', 'Section'],
- attrs: [
- 'listDirection', 'scrollBar', 'edgeEffect', 'divider', 'editMode', 'cachedCount', 'chainAnimation',
- 'onScroll', 'onReachStart', 'onReachEnd', 'onScrollStop', 'onItemDelete', 'onItemMove'
- ]
- },
- ListItem: {
- parents: ['List'],
- single: true,
- attrs: ['sticky', 'editable']
- },
- Grid: {
- children: ['GridItem'],
- attrs: ['columnsTemplate', 'rowsTemplate', 'columnsGap', 'rowsGap', 'scrollBar', 'scrollBarWidth', 'scrollBarColor']
- },
- GridItem: {
- parents: ['Grid'],
- single: true,
- attrs: ['rowStart', 'rowEnd', 'columnStart', 'columnEnd', 'forceRebuild']
- },
- GridContainer: {
- attrs: ['columns', 'sizeType', 'gutter', 'margin']
- },
- Hyperlink: {
- attrs: ['color']
- },
- Swiper: {
- attrs: [
- 'index', 'autoPlay', 'interval', 'indicator',
- 'loop', 'duration', 'vertical', 'itemSpace', 'displayMode', 'onChange'
- ]
- },
- Stepper: {
- children: ['StepperItem'],
- attrs: [
- 'onFinish', 'onSkip', 'onChange', 'onNext', 'onPrevious'
- ]
- },
- StepperItem: {
- parents: ['Stepper'],
- single: true,
- attrs: ['prevLabel', 'nextLabel', 'status']
- },
- Rating: {
- attrs: ['stars', 'stepSize', 'starStyle', 'onChange']
- },
- Calendar: {
- attrs: [
- 'date', 'showLunar', 'startOfWeek', 'offDays', 'onSelectChange', 'onRequestData',
- 'currentData', 'preData', 'nextData', 'needSlide', 'showHoliday', 'direction',
- 'currentDayStyle', 'nonCurrentDayStyle', 'todayStyle', 'weekStyle', 'workStateStyle'
- ]
- },
- Panel: {
- attrs: [
- 'type', 'mode', 'dragBar', 'fullHeight',
- 'halfHeight', 'miniHeight', 'show', 'onChange'
- ]
- },
- Navigator: {
- single: true,
- attrs: ['target', 'type', 'params', 'active']
- },
- Sheet: {
- children: ['Section'],
- attrs: []
- },
- Section: {
- attrs: []
- },
- QRCode: {
- attrs: ['color', 'backgroundColor']
- },
- Flex: {
- attrs: []
- },
- LoadingProgress: {
- atomic: true,
- attrs: ['color']
- },
- NavigationView: {
- attrs: []
- },
- Scroll: {
- attrs: [
- 'scrollable', 'onScroll', 'onScrollEdge', 'onScrollEnd', 'scrollBar', 'scrollBarColor',
- 'scrollBarWidth', 'edgeEffect'
- ]
- },
- Shape: {
- children: ['Rect', 'Path', 'Circle', 'Ellipse', 'Shape', 'Polyline', 'Polygon', 'Image', 'Text'],
- attrs: [
- 'stroke', 'fill', 'strokeDashOffset', 'strokeLineCap',
- 'strokeLineJoin', 'strokeMiterLimit', 'strokeOpacity',
- 'fillOpacity', 'strokeWidth', 'antiAlias', 'strokeDashArray',
- 'viewPort'
- ]
- },
- Progress: {
- atomic: true,
- attrs: [
- 'value', 'color', 'cricularStyle', 'circularStyle'
- ]
- },
- Rect: {
- atomic: true,
- attrs: [
- 'radiusWidth', 'radiusHeight', 'radius'
- ]
- },
- Path: {
- atomic: true,
- attrs: [
- 'commands'
- ]
- },
- Circle: {
- atomic: true
- },
- Ellipse: {
- atomic: true
- },
- Camera: {
- atomic: true,
- attrs: ['devicePosition']
- },
- Tabs: {
- children: ['TabContent'],
- attrs: [
- 'vertical', 'scrollable', 'barMode', 'barWidth', 'barHeight', 'animationDuration',
- 'onChange'
- ]
- },
- TabContent: {
- parents: ['Tabs'],
- attrs: ['tabBar']
- },
- PageTransitionEnter: {
- atomic: true,
- noDebugLine: true,
- attrs: ['onEnter']
- },
- PageTransitionExit: {
- atomic: true,
- noDebugLine: true,
- attrs: ['onExit']
- },
- Blank: {
- parents: ['Row', 'Column'],
- atomic: true,
- attrs: ['color']
- },
- RowSplit: {
- attrs: ['resizeable']
- },
- ColumnSplit: {
- attrs: ['resizeable']
- },
- Toggle: {
- attrs: ['onChange', 'selectedColor', 'swithPointStyle']
- },
- AlertDialog: {
- attrs: ['show']
- },
- ActionSheet: {
- attrs: ['show']
- },
- Video: {
- atomic: true,
- attrs: [
- 'muted', 'autoPlay', 'controls', 'loop', 'objectFit', 'onSeeking', 'onFullscreenChange',
- 'onStart', 'onPause', 'onPrepared', 'onFinish', 'onSeeked', 'onUpdate', 'onError'
- ]
- },
- AbilityComponent: {
- attrs: ['onReady', 'onDestroy', 'onAbilityCreated', 'onAbilityMoveToFront', 'onAbilityWillRemove']
- },
- AlphabetIndexer: {
- attrs: [
- 'onSelected', 'selectedColor', 'popupColor', 'selectedBackgroundColor', 'popupBackground', 'usingPopup',
- 'selectedFont', 'popupFont', 'itemSize', 'font', 'color', 'alignStyle'
- ]
- },
- Radio: {
- atomic: true,
- attrs: ['checked', 'onChange']
- },
- Web: {
- atomic: true,
- attrs: ['pagestart', 'pagefinish', 'error','message', 'reload']
- },
- GeometryView: {
- atomic: true
- },
- DataPanel: {
- atomic: false,
- attrs: ['closeEffect']
- },
- Badge: {
- atomics: true,
- attrs: []
- },
- Line: {
- atomic: true,
- attrs: [
- 'startPoint','endPoint'
- ]
- },
- Polygon: {
- atomic: true,
- attrs: ['points']
- },
- Polyline: {
- atomic: true,
- attrs: ['points']
- },
- Gauge: {
- atomic: true,
- attrs: ['value', 'startAngle', 'endAngle', 'colors', 'strokeWidth', 'labelTextConfig', 'labelColorConfig']
- },
- TextArea: {
- atomic: true,
- attrs: [
- 'placeholderColor', 'placeholderFont', 'textAlign', 'caretColor', 'onChange'
- ]
- },
- TextInput: {
- atomic: true,
- attrs: [
- 'type', 'placeholderColor', 'placeholderFont', 'enterKeyType', 'caretColor', 'maxLength', 'onEditChanged',
- 'onSubmit', 'onChange'
- ]
- },
- Marquee: {
- atomic: true,
- attrs: ['fontColor', 'fontSize', 'allowScale', 'fontWeight', 'fontFamily', 'onStart', 'onBounce', 'onFinish']
- },
- Menu: {
- children: ['Option'],
- attrs: ['show', 'showPosition', 'fontColor', 'fontSize', 'fontWeight', 'fontFamily'],
- },
- Option: {
- parents: ['Menu'],
- attrs: ['fontColor', 'fontSize', 'fontWeight', 'fontFamily'],
- },
-};
+const fs = require('fs');
+const path = require('path');
+import ts from 'typescript';
+
+export const COMPONENT_MAP: any = {};
+
+export let COMMON_ATTRS: Set = new Set([]);
+
+(function readComponents() {
+ const componentsFile: string = path.join(__dirname, '../components');
+ const files: string[] = fs.readdirSync(componentsFile);
+ files.forEach(function(item) {
+ const fPath: string = path.join(componentsFile, item);
+ const json: any = require(fPath);
+ const stat: any = fs.statSync(fPath);
+ if (stat.isFile()) {
+ if (json.name) {
+ const compName: string = json.name;
+ delete json.name;
+ COMPONENT_MAP[compName] = json;
+ } else {
+ COMMON_ATTRS = new Set(json.attrs);
+ }
+ }
+ });
+})();
-const COMMON_ATTRS: Set = new Set([
- 'width', 'height', 'size', 'constraintSize', 'layoutPriority', 'layoutWeight',
- 'padding', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom',
- 'margin', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom',
- 'border', 'borderStyle', 'borderWidth', 'borderColor', 'borderRadius',
- 'backgroundColor', 'backgroundImage', 'backgroundImageSize', 'backgroundImagePosition',
- 'opacity', 'animation', 'transition',
- 'navigationTitle', 'navigationSubTitle', 'hideNavigationBar', 'hideNavigationBackButton',
- 'toolBar', 'hideToolBar', 'onClick', 'onTouch', 'onKeyEvent', 'onHover',
- 'blur', 'backdropBlur', 'windowBlur', 'translate', 'rotate', 'scale', 'transform',
- 'onAppear', 'onDisAppear', 'visibility', 'flexBasis', 'flexShrink', 'flexGrow', 'alignSelf',
- 'useAlign', 'zIndex', 'sharedTransition', 'direction', 'align', 'position', 'markAnchor', 'offset',
- 'enabled', 'aspectRatio', 'displayPriority',
- 'onDrag', 'onDragEnter', 'onDragMove', 'onDragLeave', 'onDrop',
- 'overlay', 'linearGradient', 'sweepGradient', 'radialGradient',
- 'gridOffset', 'gridSpan', 'useSizeType',
- 'motionPath', 'clip', 'shadow', 'mask',
- 'accessibilityGroup', 'accessibilityText', 'accessibilityDescription',
- 'accessibilityImportance', 'onAccessibility', 'grayscale', 'brightness', 'contrast',
- 'saturate', 'geometryTransition',
- 'bindPopup', 'colorBlend', 'invert', 'sepia', 'hueRotate', 'bindMenu'
-]);
const TRANSITION_COMMON_ATTRS: Set = new Set([
'slide', 'translate', 'scale', 'opacity'
]);
@@ -397,8 +48,9 @@ export const GESTURE_ATTRS: Set = new Set([
]);
export const forbiddenUseStateType: Set = new Set(['Scroller', 'SwiperScroller',
- 'VideoController', 'CustomDialogController', 'SwiperController', 'TabsController',
- 'CalendarController', 'AbilityController'
+ 'VideoController', 'WebController', 'CustomDialogController', 'SwiperController', 'TabsController',
+ 'CalendarController', 'AbilityController', 'RenderingContext', 'CanvasGradient', 'ImageBitmap',
+ 'ImageData', 'Path2D', 'RenderingContextSettings', 'OffscreenRenderingContext'
]);
export const INNER_COMPONENT_NAMES: Set = new Set();
@@ -411,22 +63,30 @@ export const AUTOMIC_COMPONENT: Set = new Set();
export const SINGLE_CHILD_COMPONENT: Set = new Set();
export const SPECIFIC_CHILD_COMPONENT: Map> = new Map();
export const GESTURE_TYPE_NAMES: Set = new Set([
- 'TapGesture', 'LongPressGesture', 'PanGesture', 'PinchGesture', 'RotationGesture', 'GestureGroup'
+ 'TapGesture', 'LongPressGesture', 'PanGesture', 'PinchGesture', 'RotationGesture', 'GestureGroup',
+ 'SwipeGesture'
]);
export const CUSTOM_BUILDER_METHOD: Set = new Set();
+export const INNER_STYLE_FUNCTION: Map = new Map();
+export const GLOBAL_STYLE_FUNCTION: Map = new Map();
export interface ExtendParamterInterfance {
attribute: string,
parameterCount: number
}
export const EXTEND_ATTRIBUTE: Map> = new Map();
+export const STYLES_ATTRIBUTE: Set = new Set();
export const JS_BIND_COMPONENTS: Set = new Set([
...GESTURE_TYPE_NAMES, 'Gesture',
'PanGestureOption', 'CustomDialogController', 'Storage', 'Scroller', 'SwiperController',
- 'TabsController', 'CalendarController', 'AbilityController', 'VideoController'
+ 'TabsController', 'CalendarController', 'AbilityController', 'VideoController', 'WebController',
+ 'RenderingContext', 'CanvasGradient', 'ImageBitmap', 'ImageData', 'Path2D','RenderingContextSettings',
+ 'OffscreenRenderingContext', 'AlertDialog'
]);
+export const NEEDPOP_COMPONENT: Set = new Set(['Blank', 'Search']);
+
(function initComponent() {
Object.keys(COMPONENT_MAP).forEach((componentName) => {
INNER_COMPONENT_NAMES.add(componentName);
diff --git a/compiler/src/create.ts b/compiler/src/create.ts
index f24f1443eaa757e77a69a90fce5ba052606c9736..1cd11150eba15f75761ecb55aa90766685cc9c6d 100644
--- a/compiler/src/create.ts
+++ b/compiler/src/create.ts
@@ -54,7 +54,7 @@ function createProject(dist: string) {
}`;
const manifest:string = `{
- "appID": "com.huawei.` + appID + `",
+ "appID": "com.example.` + appID + `",
"appName": "` + appName + `",
"versionName": "1.0.0",
"versionCode": 1,
diff --git a/compiler/src/pre_define.ts b/compiler/src/pre_define.ts
index ce665c478406fc5ebb10fac4f196ef08d36fe897..015eae1a2e6e80db154f2e601a32005fed494633 100644
--- a/compiler/src/pre_define.ts
+++ b/compiler/src/pre_define.ts
@@ -13,6 +13,8 @@
* limitations under the License.
*/
+import path from 'path';
+
export const NATIVE_MODULE: Set = new Set(
['system.app', 'ohos.app', 'system.router', 'system.curves', 'ohos.curves', 'system.matrix4', 'ohos.matrix4']);
export const SYSTEM_PLUGIN: string = 'system';
@@ -44,6 +46,7 @@ export const INNER_COMPONENT_MEMBER_DECORATORS: Set = new Set([COMPONENT
export const COMPONENT_OBSERVED_DECORATOR: string = '@Observed';
export const COMPONENT_BUILDER_DECORATOR: string = '@Builder';
export const COMPONENT_EXTEND_DECORATOR: string = '@Extend';
+export const COMPONENT_STYLES_DECORATOR: string = '@Styles';
export const OBSERVED_PROPERTY_SIMPLE: string = 'ObservedPropertySimple';
export const OBSERVED_PROPERTY_OBJECT: string = 'ObservedPropertyObject';
@@ -86,7 +89,6 @@ export const COMPONENT_BUTTON: string = 'Button';
export const COMPONENT_FOREACH: string = 'ForEach';
export const COMPONENT_LAZYFOREACH: string = 'LazyForEach';
export const IS_RENDERING_IN_PROGRESS: string = 'isRenderingInProgress';
-export const COMPONENT_BLANK: string = 'Blank';
export const FOREACH_OBSERVED_OBJECT: string = 'ObservedObject';
export const FOREACH_GET_RAW_OBJECT: string = 'GetRawObject';
export const COMPONENT_IF: string = 'If';
@@ -95,6 +97,7 @@ export const COMPONENT_IF_UNDEFINED: string = 'undefined';
export const GLOBAL_CONTEXT: string = 'Context';
export const ATTRIBUTE_ANIMATION: string = 'animation';
export const ATTRIBUTE_ANIMATETO: string = 'animateTo';
+export const ATTRIBUTE_STATESTYLES: string = 'stateStyles';
export const COMPONENT_CONSTRUCTOR_ID: string = 'compilerAssignedUniqueChildId';
export const COMPONENT_CONSTRUCTOR_PARENT: string = 'parent';
@@ -170,4 +173,14 @@ export const SET_CONTROLLER_CTR_TYPE: string = 'CustomDialogController';
export const JS_DIALOG: string = 'jsDialog';
export const CUSTOM_DIALOG_CONTROLLER_BUILDER: string = 'builder';
+export const BUILDER_ATTR_NAME: string = 'builder';
+export const BUILDER_ATTR_BIND: string = 'bind';
+
export const GEOMETRY_VIEW: string = 'GeometryView';
+
+export const MODULE_SHARE_PATH: string = 'src' + path.sep + 'ets' + path.sep + 'share';
+export const BUILD_SHARE_PATH: string = '../share';
+
+export const THIS: string = 'this';
+export const STYLES: string = 'Styles';
+export const VISUAL_STATE: string = 'visualState';
diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts
index f59db6ad9acfbea406e1e6fdc8622ec56fc7d18d..53bf0603c9ab0dc251190b0f695f768828c3c650 100644
--- a/compiler/src/process_component_build.ts
+++ b/compiler/src/process_component_build.ts
@@ -21,7 +21,6 @@ import {
COMPONENT_CREATE_FUNCTION,
COMPONENT_POP_FUNCTION,
COMPONENT_BUTTON,
- COMPONENT_BLANK,
COMPONENT_CREATE_LABEL_FUNCTION,
COMPONENT_CREATE_CHILD_FUNCTION,
COMPONENT_FOREACH,
@@ -44,7 +43,10 @@ import {
GESTURE_ENUM_VALUE_LOW,
GESTURE_ENUM_VALUE_PARALLEL,
COMPONENT_TRANSITION_NAME,
- COMPONENT_DEBUGLINE_FUNCTION
+ COMPONENT_DEBUGLINE_FUNCTION,
+ ATTRIBUTE_STATESTYLES,
+ THIS,
+ VISUAL_STATE
} from './pre_define';
import {
INNER_COMPONENT_NAMES,
@@ -54,7 +56,11 @@ import {
GESTURE_ATTRS,
GESTURE_TYPE_NAMES,
EXTEND_ATTRIBUTE,
- NO_DEBUG_LINE_COMPONENT
+ NO_DEBUG_LINE_COMPONENT,
+ NEEDPOP_COMPONENT,
+ INNER_STYLE_FUNCTION,
+ GLOBAL_STYLE_FUNCTION,
+ COMMON_ATTRS
} from './component_map';
import { componentCollection } from './validate_ui_syntax';
import { processCustomComponent } from './process_custom_component';
@@ -141,7 +147,7 @@ function validateRootNode(node: ts.MethodDeclaration, log: LogInfo[]): boolean {
return isValid;
}
-function processComponentChild(node: ts.Block, newStatements: ts.Statement[],
+export function processComponentChild(node: ts.Block | ts.SourceFile, newStatements: ts.Statement[],
log: LogInfo[]): void {
if (node.statements.length) {
node.statements.forEach((item, index) => {
@@ -423,7 +429,7 @@ function createComponent(node: ts.ExpressionStatement, type: string): CreateResu
? ts.factory.createIdentifier(COMPONENT_CREATE_CHILD_FUNCTION)
: ts.factory.createIdentifier(COMPONENT_CREATE_LABEL_FUNCTION);
}
- if (temp.getText() === COMPONENT_BLANK) {
+ if (NEEDPOP_COMPONENT.has(temp.getText())) {
res.needPop = true;
}
if (BUILDIN_CONTAINER_COMPONENT.has(temp.getText())) {
@@ -445,19 +451,22 @@ interface AnimationInfo {
}
export function bindComponentAttr(node: ts.ExpressionStatement, identifierNode: ts.Identifier,
- newStatements: ts.Statement[], log: LogInfo[], reverse: boolean = true): void {
+ newStatements: ts.Statement[], log: LogInfo[], reverse: boolean = true,
+ isStylesAttr: boolean = false): void {
let temp: any = node.expression;
const statements: ts.Statement[] = [];
const lastStatement: AnimationInfo = { statement: null, kind: false };
while (temp && ts.isCallExpression(temp) && temp.expression) {
if (ts.isPropertyAccessExpression(temp.expression) &&
temp.expression.name && ts.isIdentifier(temp.expression.name)) {
- addComponentAttr(temp, temp.expression.name, lastStatement, statements, identifierNode, log);
+ addComponentAttr(temp, temp.expression.name, lastStatement, statements, identifierNode, log,
+ isStylesAttr);
temp = temp.expression.expression;
} else if (ts.isIdentifier(temp.expression)) {
if (!INNER_COMPONENT_NAMES.has(temp.expression.getText()) &&
!GESTURE_TYPE_NAMES.has(temp.expression.getText())) {
- addComponentAttr(temp, temp.expression, lastStatement, statements, identifierNode, log);
+ addComponentAttr(temp, temp.expression, lastStatement, statements, identifierNode, log,
+ isStylesAttr);
}
break;
}
@@ -471,7 +480,8 @@ export function bindComponentAttr(node: ts.ExpressionStatement, identifierNode:
}
function addComponentAttr(temp: any, node: ts.Identifier, lastStatement: any,
- statements: ts.Statement[], identifierNode: ts.Identifier, log: LogInfo[]): void {
+ statements: ts.Statement[], identifierNode: ts.Identifier, log: LogInfo[],
+ isStylesAttr): void {
const propName: string = node.getText();
if (propName === ATTRIBUTE_ANIMATION) {
if (!lastStatement.statement) {
@@ -497,13 +507,72 @@ function addComponentAttr(temp: any, node: ts.Identifier, lastStatement: any,
ts.factory.createIdentifier(`__${identifierNode.escapedText.toString()}__${propName}`),
undefined, temp.arguments)));
lastStatement.kind = true;
+ } else if (propName === ATTRIBUTE_STATESTYLES) {
+ if (temp.arguments.length === 1 && ts.isObjectLiteralExpression(temp.arguments[0])) {
+ statements.push(createViewStackProcessor(temp, true));
+ traverseStateStylesAttr(temp, statements, identifierNode, log);
+ lastStatement.kind = true;
+ } else {
+ validateStateStyleSyntax(temp, log);
+ }
+ } else if (GLOBAL_STYLE_FUNCTION.has(propName) || INNER_STYLE_FUNCTION.has(propName)) {
+ const styleBlock: ts.Block =
+ GLOBAL_STYLE_FUNCTION.get(propName) || INNER_STYLE_FUNCTION.get(propName);
+ bindComponentAttr(styleBlock.statements[0] as ts.ExpressionStatement, identifierNode,
+ statements, log, false, true);
} else {
+ if (isStylesAttr && !COMMON_ATTRS.has(propName)) {
+ validateStateStyleSyntax(temp, log);
+ }
statements.push(ts.factory.createExpressionStatement(
createFunction(identifierNode, node, temp.arguments)));
lastStatement.kind = true;
}
}
+function createViewStackProcessor(item: any, endViewStack: boolean) {
+ const argument: ts.StringLiteral[] = []
+ if (!endViewStack && item.name) {
+ argument.push(ts.factory.createStringLiteral(item.name.getText()));
+ }
+ return ts.factory.createExpressionStatement(ts.factory.createCallExpression(
+ ts.factory.createPropertyAccessExpression(
+ ts.factory.createIdentifier(GLOBAL_CONTEXT),
+ ts.factory.createIdentifier(VISUAL_STATE)
+ ),
+ undefined,
+ argument
+ ));
+}
+
+function traverseStateStylesAttr(temp: any, statements: ts.Statement[],
+ identifierNode: ts.Identifier, log: LogInfo[]) {
+ temp.arguments[0].properties.reverse().forEach((item: ts.PropertyAssignment) => {
+ if (ts.isPropertyAccessExpression(item.initializer) &&
+ item.initializer.expression.getText() === THIS &&
+ INNER_STYLE_FUNCTION.get(item.initializer.name.getText())) {
+ const name: string = item.initializer.name.getText();
+ bindComponentAttr(INNER_STYLE_FUNCTION.get(name).statements[0] as ts.ExpressionStatement,
+ identifierNode, statements, log, false, true);
+ } else if (ts.isIdentifier(item.initializer) &&
+ GLOBAL_STYLE_FUNCTION.get(item.initializer.getText())) {
+ const name: string = item.initializer.getText();
+ bindComponentAttr(GLOBAL_STYLE_FUNCTION.get(name).statements[0] as ts.ExpressionStatement,
+ identifierNode, statements, log, false, true);
+ } else if (ts.isObjectLiteralExpression(item.initializer) &&
+ item.initializer.properties.length === 1 &&
+ ts.isPropertyAssignment(item.initializer.properties[0])) {
+ bindComponentAttr(ts.factory.createExpressionStatement
+ (item.initializer.properties[0].initializer), identifierNode, statements, log, false, true);
+ } else {
+ validateStateStyleSyntax(temp, log);
+ }
+ if (item.name) {
+ statements.push(createViewStackProcessor(item, false));
+ }
+ })
+}
+
function isExtendFunctionNode(identifierNode: ts.Identifier, propName: string): boolean {
if (identifierNode && EXTEND_ATTRIBUTE.has(identifierNode.escapedText.toString())) {
const attributeArray: string[] =
@@ -700,3 +769,11 @@ function validateExtendParameterCount(temp: any, identifierNode: ts.Identifier,
});
}
}
+
+export function validateStateStyleSyntax(temp: any, log: LogInfo[]) {
+ log.push({
+ type: LogType.ERROR,
+ message: `.stateStyles doesn't conform standard.`,
+ pos: temp.getStart()
+ });
+}
diff --git a/compiler/src/process_component_class.ts b/compiler/src/process_component_class.ts
index c5429593d1811feba4e98b098f16c2116caf3729..e01c8728ae665d66f3eb79f4bb1ebb2113b93cc5 100644
--- a/compiler/src/process_component_class.ts
+++ b/compiler/src/process_component_class.ts
@@ -32,11 +32,17 @@ import {
COMPONENT_BUILDER_DECORATOR,
COMPONENT_TRANSITION_FUNCTION,
COMPONENT_CREATE_FUNCTION,
- GEOMETRY_VIEW
+ GEOMETRY_VIEW,
+ BUILDER_ATTR_NAME,
+ BUILDER_ATTR_BIND,
+ COMPONENT_STYLES_DECORATOR,
+ STYLES
} from './pre_define';
import {
BUILDIN_STYLE_NAMES,
- CUSTOM_BUILDER_METHOD
+ CUSTOM_BUILDER_METHOD,
+ INNER_STYLE_FUNCTION,
+ STYLES_ATTRIBUTE
} from './component_map';
import {
componentCollection,
@@ -51,7 +57,8 @@ import {
processMemberVariableDecorators,
UpdateResult,
stateObjectCollection,
- curPropMap
+ curPropMap,
+ decoratorParamSet
} from './process_component_member';
import {
processComponentBuild,
@@ -149,6 +156,20 @@ function processComponentMethod(node: ts.MethodDeclaration, parentComponentName:
updateItem = ts.factory.updateMethodDeclaration(node, undefined, node.modifiers,
node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters,
node.type, processComponentBlock(node.body, false, log));
+ } else if (hasDecorator(node, COMPONENT_STYLES_DECORATOR)) {
+ if (node.parameters && node.parameters.length === 0) {
+ INNER_STYLE_FUNCTION.set(name, node.body);
+ STYLES_ATTRIBUTE.add(name);
+ BUILDIN_STYLE_NAMES.add(name);
+ decoratorParamSet.add(STYLES);
+ } else {
+ log.push({
+ type: LogType.ERROR,
+ message: `@Styles can't have parameters.`,
+ pos: node.getStart()
+ });
+ }
+ return;
}
}
return ts.visitNode(updateItem, visitMethod);
@@ -189,10 +210,64 @@ function processBuildMember(node: ts.MethodDeclaration, context: ts.Transformati
ts.factory.createIdentifier(FOREACH_OBSERVED_OBJECT),
ts.factory.createIdentifier(FOREACH_GET_RAW_OBJECT)), undefined, [node]);
}
+ if ((ts.isIdentifier(node) || ts.isPropertyAccessExpression(node)) &&
+ validateBuilderFunctionNode(node)) {
+ return getParsedBuilderAttrArgument(node);
+ }
return ts.visitEachChild(node, visitBuild, context);
}
}
+function validateBuilderFunctionNode(node: ts.PropertyAccessExpression | ts.Identifier): boolean {
+ if (((ts.isPropertyAccessExpression(node) && node.expression && node.name &&
+ node.expression.kind === ts.SyntaxKind.ThisKeyword && ts.isIdentifier(node.name) &&
+ CUSTOM_BUILDER_METHOD.has(node.name.escapedText.toString())) ||
+ ts.isIdentifier(node) && CUSTOM_BUILDER_METHOD.has(node.escapedText.toString())) &&
+ !((ts.isPropertyAccessExpression(node) && validateBuilderParam(node)) ||
+ (ts.isIdentifier(node) && node.parent && ts.isPropertyAccessExpression(node.parent) &&
+ validateBuilderParam(node.parent)))) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function validateBuilderParam(node: ts.PropertyAccessExpression): boolean {
+ if (node.parent && ts.isCallExpression(node.parent) && node.parent.expression === node) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function getParsedBuilderAttrArgument(node: ts.PropertyAccessExpression | ts.Identifier):
+ ts.ObjectLiteralExpression {
+ let newObjectNode: ts.ObjectLiteralExpression = null;
+ if (ts.isPropertyAccessExpression(node)) {
+ newObjectNode = ts.factory.createObjectLiteralExpression([
+ ts.factory.createPropertyAssignment(
+ ts.factory.createIdentifier(BUILDER_ATTR_NAME),
+ ts.factory.createCallExpression(
+ ts.factory.createPropertyAccessExpression(
+ node,
+ ts.factory.createIdentifier(BUILDER_ATTR_BIND)
+ ),
+ undefined,
+ [ts.factory.createThis()]
+ )
+ )
+ ]);
+ } else if (ts.isIdentifier(node)) {
+ newObjectNode = ts.factory.createObjectLiteralExpression([
+ ts.factory.createPropertyAssignment(
+ ts.factory.createIdentifier(BUILDER_ATTR_NAME),
+ node
+ )
+ ])
+ }
+ return newObjectNode;
+}
+
function isGeometryView(node: ts.Node): boolean {
if (ts.isExpressionStatement(node) && ts.isCallExpression(node.expression)) {
const call: ts.CallExpression = node.expression;
diff --git a/compiler/src/process_component_member.ts b/compiler/src/process_component_member.ts
index b3fffb467283891bb6a25f7d119be1c858806cc0..56fa2a2a5a17d791048e39297fb94bf2cbacce96 100644
--- a/compiler/src/process_component_member.ts
+++ b/compiler/src/process_component_member.ts
@@ -836,7 +836,7 @@ function validateHasIllegalQuestionToken(propertyName: ts.Identifier, decorator:
log: LogInfo[]): void {
log.push({
type: LogType.WARN,
- message: `The ${decorator} property '${propertyName.getText()}' cannot have a question token.`,
+ message: `The ${decorator} property '${propertyName.getText()}' cannot be an optional parameter.`,
pos: propertyName.getStart()
});
}
diff --git a/compiler/src/process_import.ts b/compiler/src/process_import.ts
index 1e8e12a4342d0288aa539620f197754d26fe68f3..eb5bb1cebab0576584e10d9e4b86e0da12fe6469 100644
--- a/compiler/src/process_import.ts
+++ b/compiler/src/process_import.ts
@@ -78,7 +78,7 @@ export default function processImport(node: ts.ImportDeclaration | ts.ImportEqua
try {
let fileResolvePath: string;
if (/^(\.|\.\.)\//.test(filePath)) {
- fileResolvePath = path.join(pagesDir, filePath);
+ fileResolvePath = path.resolve(pagesDir, filePath);
} else if (/^\//.test(filePath)) {
fileResolvePath = filePath;
} else {
@@ -92,7 +92,7 @@ export default function processImport(node: ts.ImportDeclaration | ts.ImportEqua
})), fileResolvePath, log);
const sourceFile: ts.SourceFile = ts.createSourceFile(filePath, content,
ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
- visitAllNode(sourceFile, defaultName, asName, pagesDir, log);
+ visitAllNode(sourceFile, defaultName, asName, path.dirname(fileResolvePath), log);
}
} catch (e) {
// ignore
diff --git a/compiler/src/process_ui_syntax.ts b/compiler/src/process_ui_syntax.ts
index d2f0d106d716894081f8b7a24b8b0e3e222131a4..a4628675cd769a196744c0d4ba46037d86ae7520 100644
--- a/compiler/src/process_ui_syntax.ts
+++ b/compiler/src/process_ui_syntax.ts
@@ -26,6 +26,7 @@ import {
COMPONENT_BUILD_FUNCTION,
COMPONENT_BUILDER_DECORATOR,
COMPONENT_EXTEND_DECORATOR,
+ COMPONENT_STYLES_DECORATOR,
RESOURCE,
RESOURCE_TYPE,
WORKER_OBJECT,
@@ -50,9 +51,12 @@ import {
} from './process_component_build';
import {
BUILDIN_CONTAINER_COMPONENT,
+ BUILDIN_STYLE_NAMES,
CUSTOM_BUILDER_METHOD,
EXTEND_ATTRIBUTE,
- JS_BIND_COMPONENTS
+ JS_BIND_COMPONENTS,
+ INNER_STYLE_FUNCTION,
+ GLOBAL_STYLE_FUNCTION
} from './component_map';
import { resources } from '../main';
@@ -73,6 +77,10 @@ export function processUISyntax(program: ts.Program, ut = false): Function {
validateSourceFileNode(node);
node = createEntryNode(node, context);
node = ts.visitEachChild(node, processAllNodes, context);
+ GLOBAL_STYLE_FUNCTION.forEach((block, styleName) => {
+ BUILDIN_STYLE_NAMES.delete(styleName);
+ })
+ GLOBAL_STYLE_FUNCTION.clear();
return node;
} else {
return node;
@@ -86,6 +94,10 @@ export function processUISyntax(program: ts.Program, ut = false): Function {
componentCollection.currentClassName = node.name.getText();
node = processComponentClass(node, context, transformLog.errors, program);
componentCollection.currentClassName = null;
+ INNER_STYLE_FUNCTION.forEach((block, styleName) => {
+ BUILDIN_STYLE_NAMES.delete(styleName);
+ })
+ INNER_STYLE_FUNCTION.clear();
} else if (ts.isFunctionDeclaration(node)) {
if (hasDecorator(node, COMPONENT_EXTEND_DECORATOR)) {
node = processExtend(node, transformLog.errors);
@@ -95,6 +107,16 @@ export function processUISyntax(program: ts.Program, ut = false): Function {
node = ts.factory.updateFunctionDeclaration(node, undefined, node.modifiers,
node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type,
processComponentBlock(node.body, false, transformLog.errors));
+ } else if (hasDecorator(node, COMPONENT_STYLES_DECORATOR)) {
+ if (node.parameters.length === 0) {
+ node = undefined;
+ } else {
+ transformLog.errors.push({
+ type: LogType.ERROR,
+ message: `@Styles can't have parameters.`,
+ pos: node.getStart()
+ });
+ }
}
} else if (isResource(node)) {
node = processResourceData(node as ts.CallExpression);
@@ -266,11 +288,11 @@ function isExtendFunction(node: ts.FunctionDeclaration): string {
}
function createEntryNode(node: ts.SourceFile, context: ts.TransformationContext): ts.SourceFile {
- if (componentCollection.entryComponent && !componentCollection.previewComponent) {
+ if (componentCollection.entryComponent) {
const entryNode: ts.ExpressionStatement =
createEntryFunction(componentCollection.entryComponent, context);
return context.factory.updateSourceFile(node, [...node.statements, entryNode]);
- } else if (componentCollection.entryComponent && componentCollection.previewComponent) {
+ } else if (componentCollection.previewComponent) {
const entryNode: ts.ExpressionStatement =
createEntryFunction(componentCollection.previewComponent, context);
return context.factory.updateSourceFile(node, [...node.statements, entryNode]);
diff --git a/compiler/src/utils.ts b/compiler/src/utils.ts
index c58d0244e93e740c6ecd0f5134236c74b9a275db..fdd8cf412400c0b51f38231aeeaa4ddef78f6aa7 100644
--- a/compiler/src/utils.ts
+++ b/compiler/src/utils.ts
@@ -126,7 +126,8 @@ export function hasDecorator(node: ts.MethodDeclaration | ts.FunctionDeclaration
const STATEMENT_EXPECT: number = 1128;
const SEMICOLON_EXPECT: number = 1005;
-export const IGNORE_ERROR_CODE: number[] = [STATEMENT_EXPECT, SEMICOLON_EXPECT];
+const STATESTYLES_EXPECT: number = 1003;
+export const IGNORE_ERROR_CODE: number[] = [STATEMENT_EXPECT, SEMICOLON_EXPECT, STATESTYLES_EXPECT];
export function readFile(dir: string, utFiles: string[]) {
try {
@@ -156,3 +157,52 @@ export function createFunction(node: ts.Identifier, attrNode: ts.Identifier,
argumentsArr && argumentsArr.length ? argumentsArr : []
);
}
+
+export function circularFile(inputPath: string, outputPath: string): void {
+ if ((!inputPath) || (!outputPath)) {
+ return;
+ }
+ fs.readdir(inputPath, function (err, files) {
+ if (!files) {
+ return;
+ }
+ files.forEach(file => {
+ const inputFile: string = path.resolve(inputPath, file);
+ const outputFile: string = path.resolve(outputPath, file);
+ const fileStat: fs.Stats = fs.statSync(inputFile);
+ if (fileStat.isFile()) {
+ copyFile(inputFile, outputFile);
+ } else {
+ circularFile(inputFile, outputFile);
+ }
+ });
+ });
+}
+
+function copyFile(inputFile: string, outputFile: string): void {
+ try {
+ const parent: string = path.join(outputFile, '..');
+ if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
+ mkDir(parent);
+ }
+ if (fs.existsSync(outputFile)) {
+ return;
+ }
+ const readStream: fs.ReadStream = fs.createReadStream(inputFile);
+ const writeStream: fs.WriteStream = fs.createWriteStream(outputFile);
+ readStream.pipe(writeStream);
+ readStream.on('close', function() {
+ writeStream.end();
+ });
+ } catch (err) {
+ throw err.message;
+ }
+}
+
+function mkDir(path_: string): void {
+ const parent: string = path.join(path_, '..');
+ if (!(fs.existsSync(parent) && !fs.statSync(parent).isFile())) {
+ mkDir(parent);
+ }
+ fs.mkdirSync(path_);
+}
\ No newline at end of file
diff --git a/compiler/src/validate_ui_syntax.ts b/compiler/src/validate_ui_syntax.ts
index e60fcf575592d96fbf8317d07e3c897c1512d751..db0f79bb9422881ae0b25db268c0300808b5e79b 100644
--- a/compiler/src/validate_ui_syntax.ts
+++ b/compiler/src/validate_ui_syntax.ts
@@ -42,7 +42,8 @@ import {
COMPONENT_CONSTRUCTOR_PARENT,
COMPONENT_CONSTRUCTOR_PARAMS,
COMPONENT_EXTEND_DECORATOR,
- COMPONENT_OBSERVED_DECORATOR
+ COMPONENT_OBSERVED_DECORATOR,
+ STYLES
} from './pre_define';
import {
INNER_COMPONENT_NAMES,
@@ -50,7 +51,9 @@ import {
SINGLE_CHILD_COMPONENT,
SPECIFIC_CHILD_COMPONENT,
BUILDIN_STYLE_NAMES,
- EXTEND_ATTRIBUTE
+ EXTEND_ATTRIBUTE,
+ GLOBAL_STYLE_FUNCTION,
+ STYLES_ATTRIBUTE
} from './component_map';
import {
LogType,
@@ -59,6 +62,7 @@ import {
addLog,
hasDecorator
} from './utils';
+import { projectConfig } from '../main';
const parser = require('../syntax_parser/dist/syntax_parser.js');
export interface ComponentCollection {
@@ -170,27 +174,55 @@ function checkComponentDecorator(source: string, filePath: string,
if (ts.isMissingDeclaration(item)) {
const decorators: ts.NodeArray = item.decorators;
for (let i = 0; i < decorators.length; i++) {
- if (decorators[i] && /struct/.test(item.getText())) {
+ if (decorators[i] && /struct/.test(decorators[i].getText())) {
const message: string = `Please use a valid decorator.`;
addLog(LogType.ERROR, message, item.getStart(), log, sourceFile);
break;
}
}
}
+ if (ts.isFunctionDeclaration(item) && item.decorators && item.decorators.length === 1 &&
+ item.decorators[0].expression && item.decorators[0].expression.getText() === STYLES) {
+ STYLES_ATTRIBUTE.add(item.name.getText())
+ GLOBAL_STYLE_FUNCTION.set(item.name.getText(), item.body);
+ BUILDIN_STYLE_NAMES.add(item.name.getText());
+ }
});
- validateEntryCount(result, fileQuery, sourceFile.fileName, log);
+ validateEntryAndPreviewCount(result, fileQuery, sourceFile.fileName, projectConfig.isPreview, log);
}
return log.length ? log : null;
}
-function validateEntryCount(result: DecoratorResult, fileQuery: string,
- fileName: string, log: LogInfo[]): void {
- if (result.entryCount !== 1 && fileQuery === '?entry') {
+function validateEntryAndPreviewCount(result: DecoratorResult, fileQuery: string,
+ fileName: string, isPreview: boolean, log: LogInfo[]): void {
+ if (result.previewCount > 10 && fileQuery === '?entry') {
+ log.push({
+ type: LogType.ERROR,
+ message: `A page can contain at most 10 '@Preview' decorators.`,
+ fileName: fileName
+ });
+ }
+ if (result.entryCount > 1 && fileQuery === '?entry') {
+ log.push({
+ type: LogType.ERROR,
+ message: `A page can't contain more than one '@Entry' decorator`,
+ fileName: fileName
+ });
+ }
+ if (isPreview && result.previewCount < 1 && result.entryCount !== 1 &&
+ fileQuery === '?entry') {
+ log.push({
+ type: LogType.ERROR,
+ message: `A page configured in 'config.json' must have one and only one '@Entry' `
+ + `decorator, or at least one '@Preview' decorator.`,
+ fileName: fileName
+ });
+ } else if (!isPreview && result.entryCount !== 1 && fileQuery === '?entry') {
log.push({
type: LogType.ERROR,
message: `A page configured in 'config.json' must have one and only one '@Entry' `
- + `decorator with a struct.`,
+ + `decorator.`,
fileName: fileName
});
}
@@ -236,7 +268,7 @@ function checkDecorators(node: ts.MissingDeclaration | ts.ExportAssignment, resu
let hasComponentDecorator: boolean = false;
const componentName: string = component.getText();
node.decorators.forEach((element) => {
- const name: string = element.getText();
+ const name: string = element.getText().replace(/\((.|\n)*\)/, '').trim();
if (INNER_COMPONENT_DECORATORS.has(name)) {
componentCollection.customComponents.add(componentName);
switch (name) {
@@ -788,9 +820,10 @@ export function processSystemApi(content: string): string {
item = `var ${systemValue} = isSystemplugin('${systemKey}', '${SYSTEM_PLUGIN}') ? ` +
`globalThis.systemplugin.${systemKey} : globalThis.requireNapi('${systemKey}')`;
} else if (moduleType === OHOS_PLUGIN) {
- item = `var ${systemValue} = isSystemplugin('${systemKey}', '${OHOS_PLUGIN}') ? ` +
- `globalThis.ohosplugin.${systemKey} : isSystemplugin('${systemKey}', '${SYSTEM_PLUGIN}') ? ` +
- `globalThis.systemplugin.${systemKey} : globalThis.requireNapi('${systemKey}')`;
+ item = `var ${systemValue} = globalThis.requireNapi('${systemKey}') || ` +
+ `(isSystemplugin('${systemKey}', '${OHOS_PLUGIN}') ? ` +
+ `globalThis.ohosplugin.${systemKey} : isSystemplugin('${systemKey}', '${SYSTEM_PLUGIN}') ` +
+ `? globalThis.systemplugin.${systemKey} : undefined)`;
}
return item;
});
diff --git a/compiler/syntax_parser/src/syntax_parser.peg b/compiler/syntax_parser/src/syntax_parser.peg
index c77c99afcd835e86a118b36b81b98dfe3ad6a2fb..309860e41409dca8248db673107c62ca8e67dbb5 100644
--- a/compiler/syntax_parser/src/syntax_parser.peg
+++ b/compiler/syntax_parser/src/syntax_parser.peg
@@ -31,10 +31,18 @@
};
}
-start = blocks: block+
+start = blocks: block+
{
+ let newContent = "";
+ for (let item in blocks) {
+ if (Array.isArray(blocks[item])) {
+ newContent += blocks[item].join('');
+ } else {
+ newContent += blocks[item];
+ }
+ }
return {
- content: blocks.join(''),
+ content: newContent,
location: location(),
collect_extend: collect_extend,
error_otherParsers: error_otherParsers
@@ -84,12 +92,11 @@ function_name_tail = $ [a-zA-Z0-9_$]*
parameters = $ ([^()]* item* [^()]*)
//extract Extend internal attribute SyntaxError
-funcBody_extend = body:($[^{}]* item* [^{}]*)
+funcBody_extend = body:$([^{}]* item* [^{}]*)
{
try {
- let functionBody = body.join('');
- parse_extend.parse(functionBody);
- return functionBody;
+ parse_extend.parse(body);
+ return body;
} catch (err) {
let countLines = location().end.line - location().start.line;
if (err.location.start.line === 1) {
diff --git a/compiler/test/test.js b/compiler/test/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..0a6506aa049f1c30b938579f647b273fe18e35e8
--- /dev/null
+++ b/compiler/test/test.js
@@ -0,0 +1,64 @@
+/*
+ * 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 ts = require('typescript');
+const path = require('path');
+const chai = require('chai');
+const mocha = require('mocha');
+const expect = chai.expect;
+
+const {
+ validateUISyntax,
+ resetComponentCollection,
+ sourceReplace,
+ componentCollection
+} = require('../lib/validate_ui_syntax');
+const { processUISyntax } = require('../lib/process_ui_syntax');
+const {
+ componentInfo,
+ readFile
+} = require('../lib/utils');
+const { BUILD_ON } = require('../lib/pre_define');
+
+function expectActual(name, filePath) {
+ const content = require(filePath);
+ const source = content.source;
+ process.env.compiler = BUILD_ON;
+ const afterProcess = sourceReplace(source);
+ validateUISyntax(source, afterProcess.content, `${name}.ts`);
+ const result = ts.transpileModule(afterProcess.content, {
+ compilerOptions: {
+ "target": ts.ScriptTarget.ES2017
+ },
+ fileName: `${name}.ts`,
+ transformers: { before: [processUISyntax(null, true)] }
+ });
+ componentInfo.id = 0;
+ componentCollection.customComponents.clear();
+ resetComponentCollection();
+ expect(result.outputText).eql(content.expectResult);
+}
+
+mocha.describe('compiler', () => {
+ const utPath = path.resolve(__dirname, './ut');
+ const utFiles = [];
+ readFile(utPath, utFiles);
+ utFiles.forEach((item) => {
+ const fileName = path.basename(item, '.ts');
+ mocha.it(fileName, () => {
+ expectActual(fileName, item);
+ })
+ })
+})
diff --git a/compiler/test/ut/animation/animation.ts b/compiler/test/ut/animation/animation.ts
index a2cad53bef5e40332a5475763a120dea6f0f50b3..487a7fee56f47d639b15b33bfe650c352677ac42 100644
--- a/compiler/test/ut/animation/animation.ts
+++ b/compiler/test/ut/animation/animation.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct Animation {
@@ -58,7 +58,7 @@ struct Animation {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class Animation extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/build/build.ts b/compiler/test/ut/build/build.ts
index 65bb964d42cbb0da5d042a4915c707443bf75d43..cd9def8723bd0e97513cfcbc4298819162e6d023 100644
--- a/compiler/test/ut/build/build.ts
+++ b/compiler/test/ut/build/build.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyComponent {
@@ -28,7 +28,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/component/component.ts b/compiler/test/ut/component/component.ts
index 9b46eb74911cb70e292f506a6e7a4b9595a01eb5..dfbed5caace9b47825c5f7428e43244c2a367ad7 100644
--- a/compiler/test/ut/component/component.ts
+++ b/compiler/test/ut/component/component.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Component
@Entry
struct MyComponent {
@@ -30,7 +30,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/component/customComponent.ts b/compiler/test/ut/component/customComponent.ts
index 6907d09b70e53de27e27748abffa06eaefa9e3f1..bdf19913bc88f4cef950109df91c2663342ab961 100644
--- a/compiler/test/ut/component/customComponent.ts
+++ b/compiler/test/ut/component/customComponent.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct Parent {
@@ -44,7 +44,7 @@ struct Child {
}
`
-export const expectResult: string =
+exports.expectResult =
`class Parent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/constructor/id.ts b/compiler/test/ut/constructor/id.ts
index 3a79203334c37a14350a200f6d5b69a385f8e00c..54f547f5184c71018347f14b2f19110051b0c805 100644
--- a/compiler/test/ut/constructor/id.ts
+++ b/compiler/test/ut/constructor/id.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct HomeComponent {
@@ -67,7 +67,7 @@ struct Banner {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class HomeComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/constructor/link.ts b/compiler/test/ut/constructor/link.ts
index 117c65802f796795d1de078bb3aff81ad96eb640..d2345c6c5b6af4c14da4e1ded64c709cfef283dd 100644
--- a/compiler/test/ut/constructor/link.ts
+++ b/compiler/test/ut/constructor/link.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyLinkComponent {
@@ -30,7 +30,7 @@ struct MyLinkComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyLinkComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/constructor/observedObjectLink.ts b/compiler/test/ut/constructor/observedObjectLink.ts
index 1614e151290711b10b06fa669b66dcd8d9a6f8d5..80d965e40bac9b1d4bbf5b122cbc8afd245d5e20 100644
--- a/compiler/test/ut/constructor/observedObjectLink.ts
+++ b/compiler/test/ut/constructor/observedObjectLink.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
let NextID : number = 0;
@Observed class ClassA {
@@ -54,7 +54,7 @@ struct ViewB {
}
`
-export const expectResult: string =
+exports.expectResult =
`var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
diff --git a/compiler/test/ut/constructor/prop.ts b/compiler/test/ut/constructor/prop.ts
index 8765e74e5e5e1f87508d3ffabc3ec4fd20017ac6..7c3331c6d43dda9e494494e8b4008a4135fc911d 100644
--- a/compiler/test/ut/constructor/prop.ts
+++ b/compiler/test/ut/constructor/prop.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyPropComponent {
@@ -30,7 +30,7 @@ struct MyPropComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyPropComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/constructor/provideConsume.ts b/compiler/test/ut/constructor/provideConsume.ts
index a8f884a1ee842d6e97cd67f2a391f9e313137169..eada9230039ed87e39253b50a3bb0bdbf24835a7 100644
--- a/compiler/test/ut/constructor/provideConsume.ts
+++ b/compiler/test/ut/constructor/provideConsume.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Component
struct GrandChild {
@Consume arr: number[];
@@ -42,7 +42,7 @@ struct Parent {
}
`
-export const expectResult: string =
+exports.expectResult =
`class GrandChild extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/constructor/state.ts b/compiler/test/ut/constructor/state.ts
index 9f67c7c041835497c18105eb9a1163d6cddac16d..a78778cd889e67d6d41ea92d010a9b0af5b7a5fe 100644
--- a/compiler/test/ut/constructor/state.ts
+++ b/compiler/test/ut/constructor/state.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
class DataModel{
private myData1: number = 0
}
@@ -35,7 +35,7 @@ struct MyStateComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class DataModel {
constructor() {
this.myData1 = 0;
diff --git a/compiler/test/ut/customDialog/customDialog.ts b/compiler/test/ut/customDialog/customDialog.ts
index b57f513141cd1a59a3da84503ef89c62de28e1be..2a0444f2c4444c53fc6fc9f0c765c990c4cd548f 100644
--- a/compiler/test/ut/customDialog/customDialog.ts
+++ b/compiler/test/ut/customDialog/customDialog.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@CustomDialog
struct DialogExample {
controller: CustomDialogController;
@@ -68,7 +68,7 @@ struct CustomDialogUser {
}
`
-export const expectResult: string =
+exports.expectResult =
`class DialogExample extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/decorator/builder.ts b/compiler/test/ut/decorator/builder.ts
index 0bf64721d833dec0205b990f26acda3b95938043..9b8c506fb8426783572633dae611ca4e178ac1f1 100644
--- a/compiler/test/ut/decorator/builder.ts
+++ b/compiler/test/ut/decorator/builder.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Builder
function SquareText(label: string, size: number) {
Text(label)
@@ -44,7 +44,7 @@ struct HomeComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`function SquareText(label, size) {
Text.create(label);
Text.width(1 * size);
diff --git a/compiler/test/ut/decorator/extend.ts b/compiler/test/ut/decorator/extend.ts
index a8494672c8a9dd9ec59c62b652f404f482ca8a3e..3463b321f062b702dcdbd65c4fd53a6a4f5a2476 100644
--- a/compiler/test/ut/decorator/extend.ts
+++ b/compiler/test/ut/decorator/extend.ts
@@ -13,10 +13,10 @@
* limitations under the License.
*/
-export const source: string = `
- @Extend Text.fancy(color:string){
- .backgroundColor(color)
- }
+exports.source = `
+@Extend Text.fancy(color:string){
+ .backgroundColor(color)
+}
@Extend
Text.superFancy(size:number){
@@ -43,7 +43,7 @@ struct FancyText {
}
}`
-export const expectResult: string =
+exports.expectResult =
`function __Text__fancy(color) {
Text.backgroundColor(color);
}
diff --git a/compiler/test/ut/decorator/watch.ts b/compiler/test/ut/decorator/watch.ts
index 90c2461944c1738d6175ff0611e71325d38681a0..afafc0a43950d79e9c1cb628849deb9222dbad9a 100644
--- a/compiler/test/ut/decorator/watch.ts
+++ b/compiler/test/ut/decorator/watch.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
class PurchaseItem {
static NextId : number = 0;
@@ -66,7 +66,7 @@ struct BasketModifier {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class PurchaseItem {
constructor(price) {
this.id = PurchaseItem.NextId++;
diff --git a/compiler/test/ut/decorator/watchWithAnimateTo.ts b/compiler/test/ut/decorator/watchWithAnimateTo.ts
index dc728962dd7a907c0878a36e925c2de17b9ce60d..7744147bae5933609b6c67a44bb76feb5250f9f2 100644
--- a/compiler/test/ut/decorator/watchWithAnimateTo.ts
+++ b/compiler/test/ut/decorator/watchWithAnimateTo.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct ListComponent {
@@ -49,7 +49,7 @@ struct DialogView {
}
`
-export const expectResult: string =
+exports.expectResult =
`class ListComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/geometryReader/geometryReader.ts b/compiler/test/ut/geometryReader/geometryReader.ts
index e8b5b6c4fe0bcdadc94372f5f7441160d11fc4e4..bc072834f4181d5b3f8825dd6970e3cbe1e9c15a 100644
--- a/compiler/test/ut/geometryReader/geometryReader.ts
+++ b/compiler/test/ut/geometryReader/geometryReader.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct GeometryReaderTest {
@@ -30,7 +30,7 @@ struct GeometryReaderTest {
}
`
-export const expectResult: string =
+exports.expectResult =
`class GeometryReaderTest extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/gesture/panGestrue.ts b/compiler/test/ut/gesture/panGestrue.ts
index f558964a4b8a3833fec3bdd96cfadbba5f12f5aa..36fad83a863834fc00fbbbb54fc6564d50612107 100644
--- a/compiler/test/ut/gesture/panGestrue.ts
+++ b/compiler/test/ut/gesture/panGestrue.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
import router from '@system.router'
import app from '@system.app'
@@ -110,7 +110,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`var router = globalThis.requireNativeModule('system.router');
var app = globalThis.requireNativeModule('system.app');
class MyComponent extends View {
diff --git a/compiler/test/ut/gesture/pinchGesture.ts b/compiler/test/ut/gesture/pinchGesture.ts
index c85947f2b303c2f32fa4f01d186579e246387226..751f3d0cfced0051e86d5d043f349494c969f501 100644
--- a/compiler/test/ut/gesture/pinchGesture.ts
+++ b/compiler/test/ut/gesture/pinchGesture.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
import router from '@system.router'
import app from '@system.app'
@@ -50,7 +50,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`var router = globalThis.requireNativeModule('system.router');
var app = globalThis.requireNativeModule('system.app');
class MyComponent extends View {
diff --git a/compiler/test/ut/gesture/rotationGesture.ts b/compiler/test/ut/gesture/rotationGesture.ts
index 87c0b76e9cab28a3f28438e7ee06827897b18c8b..60cd852e878901c46b36a72f7b0ff9a3aba656f1 100644
--- a/compiler/test/ut/gesture/rotationGesture.ts
+++ b/compiler/test/ut/gesture/rotationGesture.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
import router from '@system.router'
import app from '@system.app'
@@ -51,7 +51,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`var router = globalThis.requireNativeModule('system.router');
var app = globalThis.requireNativeModule('system.app');
class MyComponent extends View {
diff --git a/compiler/test/ut/gesture/tapGesture.ts b/compiler/test/ut/gesture/tapGesture.ts
index 4365532865e961b96607cb1c3f4e6e3222abdfe5..556acaee1b2ef8541609d2b39772401d5726f6aa 100644
--- a/compiler/test/ut/gesture/tapGesture.ts
+++ b/compiler/test/ut/gesture/tapGesture.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyComponent {
@@ -86,7 +86,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/import/importEts.ts b/compiler/test/ut/import/importEts.ts
index 783eb14a0bfdd5e366b97de371cee74d89848a7c..031371839ee035b2a5f82c4cd29a43ff9c69e540 100644
--- a/compiler/test/ut/import/importEts.ts
+++ b/compiler/test/ut/import/importEts.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
import
LinkComponentDefault, {
LinkComponent as LinkComponent1Ref,
@@ -134,7 +134,7 @@ struct ImportTest {
}
`
-export const expectResult: string =
+exports.expectResult =
`import LinkComponentDefault, { LinkComponent as LinkComponent1Ref, LinkComponent2 as LinkComponent2Ref, LinkComponent3 } from './test/pages/LinkComponent.ets';
import DefaultComponent from "./test/pages/DefaultComponent.ets";
import * as AllComponent from './test/pages/NamespaceComponent';
diff --git a/compiler/test/ut/import/importSystemApi.ts b/compiler/test/ut/import/importSystemApi.ts
index 33f1646b18b51017600114147be4d1979d4517c0..df5b4058ece947c7ee9da43df2cac3e0e53b6e83 100644
--- a/compiler/test/ut/import/importSystemApi.ts
+++ b/compiler/test/ut/import/importSystemApi.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
import { router1, router2 } from "@system.router";
import { app } from "@system.router";
import { fetch } from "@system.fetch";
@@ -36,7 +36,7 @@ import hello from 'libhello.so'
import world = require('libworld.so')
`
-export const expectResult: string =
+exports.expectResult =
`var { router1, router2 } = globalThis.requireNativeModule('system.router');
var { app } = globalThis.requireNativeModule('system.router');
var { fetch } = isSystemplugin('fetch', 'system') ? globalThis.systemplugin.fetch : globalThis.requireNapi('fetch');
@@ -49,7 +49,7 @@ var fetch = isSystemplugin('fetch', 'system') ? globalThis.systemplugin.fetch :
var router = globalThis.requireNativeModule('system.router');
var app = globalThis.requireNativeModule('system.app');
var fetch = isSystemplugin('fetch', 'system') ? globalThis.systemplugin.fetch : globalThis.requireNapi('fetch');
-var fetch = isSystemplugin('net.http', 'ohos') ? globalThis.ohosplugin.net.http : isSystemplugin('net.http', 'system') ? globalThis.systemplugin.net.http : globalThis.requireNapi('net.http');
+var fetch = globalThis.requireNapi('net.http') || (isSystemplugin('net.http', 'ohos') ? globalThis.ohosplugin.net.http : isSystemplugin('net.http', 'system') ? globalThis.systemplugin.net.http : undefined);
var hello = globalThis.requireNapi("hello", true);
var world = globalThis.requireNapi("world", true);
`
diff --git a/compiler/test/ut/import/importTs.ts b/compiler/test/ut/import/importTs.ts
index 357302aecfc622376f80dbe694417bf880f01d22..e223e550ca12b70b72a0646c30dcb5404ee5ec56 100644
--- a/compiler/test/ut/import/importTs.ts
+++ b/compiler/test/ut/import/importTs.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
import { AllStarComponent } from './test/pages/ExportStarComponent'
import TsModule from './test/pages/TsModule'
@@ -52,7 +52,7 @@ struct ImportTest {
}
`
-export const expectResult: string =
+exports.expectResult =
`import { AllStarComponent } from './test/pages/ExportStarComponent';
import TsModule from './test/pages/TsModule';
class ImportTest extends View {
diff --git a/compiler/test/ut/link/createLinkReference.ts b/compiler/test/ut/link/createLinkReference.ts
index e9562301c442c391d893bba803b5ea2d75fc6217..f0924a05e7ae408e2bb15d982de65b186c456637 100644
--- a/compiler/test/ut/link/createLinkReference.ts
+++ b/compiler/test/ut/link/createLinkReference.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Component
struct MyLinkTestComponent {
@Link myLink1?: any
@@ -51,7 +51,7 @@ struct LinkTest {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyLinkTestComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/preview/previewDecorator.ts b/compiler/test/ut/preview/previewDecorator.ts
index b1adbbbd44b64ce31a733577db5c9c1e33a8f67c..c959b92074d1b5951914ba7913e2c723f019244d 100644
--- a/compiler/test/ut/preview/previewDecorator.ts
+++ b/compiler/test/ut/preview/previewDecorator.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct HomePreviewComponent {
@@ -56,7 +56,7 @@ struct HomePreviewComponent_Preview {
}
`
-export const expectResult: string =
+exports.expectResult =
`class HomePreviewComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
@@ -134,5 +134,5 @@ class HomePreviewComponent_Preview extends View {
Column.pop();
}
}
-loadDocument(new HomePreviewComponent_Preview("1", undefined, {}));
+loadDocument(new HomePreviewComponent("1", undefined, {}));
`
diff --git a/compiler/test/ut/render/forEach/forEach01.ts b/compiler/test/ut/render/forEach/forEach01.ts
index 1f87b890404dd2e1d562068955bc3d74a2c47183..0dc49f73fde9c91f215dccc5838fa09757681ddd 100644
--- a/compiler/test/ut/render/forEach/forEach01.ts
+++ b/compiler/test/ut/render/forEach/forEach01.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyComponent {
@@ -34,7 +34,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/render/forEach/forEach02.ts b/compiler/test/ut/render/forEach/forEach02.ts
index 4007051c15eeffbc290e62d1f6673cd693300905..a8e85db6e0cb6f33d4ed9fd13e4db1654dc4cdfa 100644
--- a/compiler/test/ut/render/forEach/forEach02.ts
+++ b/compiler/test/ut/render/forEach/forEach02.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyComponent {
@@ -31,7 +31,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/render/forEach/forEach03.ts b/compiler/test/ut/render/forEach/forEach03.ts
index f3122986aa39930f026725a49e477894c73c6cd3..49673c81d0af472db7abfb35cc48115353ea0d6e 100644
--- a/compiler/test/ut/render/forEach/forEach03.ts
+++ b/compiler/test/ut/render/forEach/forEach03.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyComponent {
@@ -40,7 +40,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/render/forEach/forEach04.ts b/compiler/test/ut/render/forEach/forEach04.ts
index 586bd720492b3812dad5ced8c39d3040f07740e3..f122d727bcafc86edfc10901ccf3a60e2f0cbdf3 100644
--- a/compiler/test/ut/render/forEach/forEach04.ts
+++ b/compiler/test/ut/render/forEach/forEach04.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyComponent {
@@ -32,7 +32,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/render/forEach/forEachComplexModel.ts b/compiler/test/ut/render/forEach/forEachComplexModel.ts
index 5f5eb56d89e54a9cfa723e4c4332952e8e94f9a9..cabea54733e152a1f10625f53964c5e5ee68d1b6 100644
--- a/compiler/test/ut/render/forEach/forEachComplexModel.ts
+++ b/compiler/test/ut/render/forEach/forEachComplexModel.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
// class without @Component convert tool will not process.
class Month {
year: number = 2010; // why add assignment here, TS grammar required, if not it will omit by TSC.
@@ -65,7 +65,7 @@ struct Calendar {
}
}`
-export const expectResult: string =
+exports.expectResult =
`// class without @Component convert tool will not process.
class Month {
constructor(year, month, days) {
diff --git a/compiler/test/ut/render/forEach/forEachSimpleModel.ts b/compiler/test/ut/render/forEach/forEachSimpleModel.ts
index 92e66c9c1adf9c838f46bfc3fe98b663e0ade886..5c018d913264da93a852b81aeb8b37f7a352d69b 100644
--- a/compiler/test/ut/render/forEach/forEachSimpleModel.ts
+++ b/compiler/test/ut/render/forEach/forEachSimpleModel.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyComponent2 {
@@ -39,7 +39,7 @@ struct MyComponent2 {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent2 extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/render/if/if.ts b/compiler/test/ut/render/if/if.ts
index 38e086356c6ad83e3e9eb00cc982b854e272067a..5ca49ed5e19b6a92c7a82e35eedd9bf27f0f926e 100644
--- a/compiler/test/ut/render/if/if.ts
+++ b/compiler/test/ut/render/if/if.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct MyComponent {
@@ -76,7 +76,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/render/if/ifIncludeForEach.ts b/compiler/test/ut/render/if/ifIncludeForEach.ts
index becd794ee3e02ad52f1aa84d3b6ede7d42744117..1da65db28982dd6c2bdcb0b033c1e4fcd1702a21 100644
--- a/compiler/test/ut/render/if/ifIncludeForEach.ts
+++ b/compiler/test/ut/render/if/ifIncludeForEach.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct HomeComponent {
@@ -49,7 +49,7 @@ struct HomeComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class HomeComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/struct/struct_01.ts b/compiler/test/ut/struct/struct_01.ts
index 04d53f94bc54d8b8e632818697044721d40649cf..658ddff72944c37eaa4fbdd975431e00835ed1af 100644
--- a/compiler/test/ut/struct/struct_01.ts
+++ b/compiler/test/ut/struct/struct_01.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Component
@Entry
struct MyComponent {
@@ -21,7 +21,7 @@ struct MyComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/test/ut/struct/struct_02.ts b/compiler/test/ut/struct/struct_02.ts
index 644ce3bb3e841fd7101470c467ba28bb8a201a2e..175a1085d27a9c70852b6fe7277399ad305e9d3f 100644
--- a/compiler/test/ut/struct/struct_02.ts
+++ b/compiler/test/ut/struct/struct_02.ts
@@ -13,13 +13,13 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
struct MyComponent {
build() {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class MyComponent {
constructor(compilerAssignedUniqueChildId, parent, params) { }
build() {
diff --git a/compiler/test/ut/transition/transition.ts b/compiler/test/ut/transition/transition.ts
index bae55792befe1424abf67bffbacb75c752fb36d6..22b7a279f751e2ea12c8dd7fda1a5a7f929042b7 100644
--- a/compiler/test/ut/transition/transition.ts
+++ b/compiler/test/ut/transition/transition.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-export const source: string = `
+exports.source = `
@Entry
@Component
struct HomeComponent {
@@ -45,7 +45,7 @@ struct HomeComponent {
}
}`
-export const expectResult: string =
+exports.expectResult =
`class HomeComponent extends View {
constructor(compilerAssignedUniqueChildId, parent, params) {
super(compilerAssignedUniqueChildId, parent);
diff --git a/compiler/uglify-source.js b/compiler/uglify-source.js
index 0823ead66524970703a5b5b53b9e905b4e1757e6..397d5ebcb61e49cd36706cd00ffedc078398d841 100644
--- a/compiler/uglify-source.js
+++ b/compiler/uglify-source.js
@@ -15,7 +15,7 @@
const fs = require('fs')
const path = require('path')
-const uglifyJS = require('uglify-es')
+const uglifyJS = require('uglify-js')
readCode(process.argv[2])
diff --git a/compiler/webpack.config.js b/compiler/webpack.config.js
index 8e0ab7b80bd504cc5a73d3651806336551bda779..ad57f512db8d48181a82031a1c2e8aad23cf29e4 100644
--- a/compiler/webpack.config.js
+++ b/compiler/webpack.config.js
@@ -14,10 +14,12 @@
*/
const path = require('path');
+const fs = require('fs');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const Webpack = require('webpack');
const { GenAbcPlugin } = require('./lib/gen_abc_plugin');
+const buildPipeServer = require('./server/build_pipe_server');
const {
projectConfig,
@@ -30,6 +32,7 @@ const {
const { ResultStates } = require('./lib/compile_info');
const { processUISyntax } = require('./lib/process_ui_syntax');
const { IGNORE_ERROR_CODE } = require('./lib/utils');
+const { BUILD_SHARE_PATH } = require('./lib/pre_define');
const watchMode = (process.env.watchMode && process.env.watchMode === 'true') || false;
@@ -43,10 +46,32 @@ function initConfig(config) {
poll: false,
ignored: /node_modules/
},
+ optimization: {
+ splitChunks: {
+ chunks: "all",
+ minSize: 0,
+ cacheGroups: {
+ vendors: {
+ test: /[\\/]node_modules[\\/]/,
+ priority: -10,
+ name: "vendors",
+ chunks: 'initial'
+ },
+ commons: {
+ name: 'commons',
+ priority: -20,
+ minChunks: 2,
+ chunks: 'initial',
+ reuseExistingChunk: true
+ }
+ }
+ },
+ },
output: {
path: path.resolve(__dirname, projectConfig.buildPath),
filename: '[name].js',
- devtoolModuleFilenameTemplate: 'webpack:///[absolute-resource-path]'
+ devtoolModuleFilenameTemplate: 'webpack:///[absolute-resource-path]',
+ globalObject: 'globalThis'
},
devtool: 'nosources-source-map',
mode: 'development',
@@ -150,8 +175,28 @@ function setCopyPluginConfig(config) {
},
noErrorOnMissing: true
});
+ const sharePath = path.resolve(__dirname, projectConfig.projectPath, BUILD_SHARE_PATH);
+ if (fs.existsSync(sharePath)) {
+ copyPluginPattrens.push({
+ from: '**/*',
+ context: path.resolve(__dirname, projectConfig.projectPath, BUILD_SHARE_PATH),
+ to: path.resolve(__dirname, projectConfig.buildPath, BUILD_SHARE_PATH),
+ globOptions: {
+ ignore: [
+ '**/*.ets',
+ '**/*.ts',
+ '**/*.js',
+ ]
+ },
+ noErrorOnMissing: true
+ });
+ }
if (abilityConfig.abilityType === 'page') {
- copyPluginPattrens.push({ from: projectConfig.manifestFilePath });
+ if (fs.existsSync(projectConfig.manifestFilePath)) {
+ copyPluginPattrens.push({ from: projectConfig.manifestFilePath });
+ } else if (fs.existsSync(projectConfig.aceConfigPath)) {
+ copyPluginPattrens.push({ from: projectConfig.aceConfigPath });
+ }
}
config.plugins.push(new CopyPlugin({ patterns: copyPluginPattrens }));
}
@@ -170,6 +215,15 @@ module.exports = (env, argv) => {
}
} else {
projectConfig.isPreview = true;
+ let port;
+ process.argv.forEach((val, index) => {
+ if(val.startsWith('port=')){
+ port = val.split('=')[1];
+ }
+ });
+ if (port) {
+ buildPipeServer.init(port);
+ }
}
if (env.sourceMap === 'none') {
diff --git "a/compiler/\345\246\202\344\275\225\346\226\260\345\242\236\346\210\226\344\277\256\346\224\271\347\273\204\344\273\266\346\214\207\345\257\274\350\247\204\350\214\203.md" "b/compiler/\345\246\202\344\275\225\346\226\260\345\242\236\346\210\226\344\277\256\346\224\271\347\273\204\344\273\266\346\214\207\345\257\274\350\247\204\350\214\203.md"
new file mode 100644
index 0000000000000000000000000000000000000000..5024b4dc3fe2f4fce899fce509b30911ec25d939
--- /dev/null
+++ "b/compiler/\345\246\202\344\275\225\346\226\260\345\242\236\346\210\226\344\277\256\346\224\271\347\273\204\344\273\266\346\214\207\345\257\274\350\247\204\350\214\203.md"
@@ -0,0 +1,82 @@
+## 新增或修改组件规则
+
+#### 概述:
+
+当新增或更新组件和属性时,需要在compiler/src/components目录下新增或修改对应的json文件。
+
+同时我们将公共属性放入compiler/components/common_attrs.json文件中,若要更新公共属性在该文件下修改即可。
+
+组件形式如下:
+
+```gn
+{
+ "name": string,
+ "attrs": [],
+ "atomic": boolean,
+ "parents": [],
+ "children": [],
+ "single": boolean,
+ "noDebugLine": boolean
+}
+```
+
+| 参数 | 参数描述 |
+| ------------------------------------------------ | ----------------------------------- |
+| name(必须) | 组件名称 |
+| attrs(组件必须, 若没有私有属性对应value写空数组) | 组件属性 |
+| atomic(可选,默认false) | 是否不能有子组件 |
+| parents(可选,默认所有组件可用) | 父组件只能是哪些组件 |
+| children(可选,默认所有组件可用) | 子组件只能是哪些组件 |
+| single(可选,默认false) | 是否只能包含一个子组件 |
+| noDebugLine(可选,默认false) | 预览模式下对应组件是否生成debugline |
+
+#### 模块结构:
+
+```mermaid
+classDiagram
+ Component_Map <|-- List
+ Component_Map <|-- TextArea
+ Component_Map <|-- AlphabetIndexer
+ Component_Map <|-- Others
+ class List{
+ name,
+ attrs,
+ atomic?,
+ children?,
+ parents?,
+ single?,
+ noDebugLine?
+ }
+ class TextArea{
+ name,
+ attrs,
+ atomic?,
+ children?,
+ parents,
+ single?,
+ noDebugLine?
+ }
+ class AlphabetIndexer{
+ name,
+ attrs,
+ atomic?,
+ children?,
+ parents,
+ single?,
+ noDebugLine?
+ }
+
+```
+
+#### 文件结构:
+
+```bash
+ace_ets2bundle/compiler
+ ├── src
+ ├── component_map
+ ├── components
+ ├── Option
+ ├── Line
+ ├── Gauge
+ ....
+```
diff --git a/generateSysResource.py b/generateSysResource.py
index 2a80ebe7bd02f0896dc54f4345528d167bed78d1..d678a2a83f9cb1fa168d26c9fb3b3a182dac862b 100644
--- a/generateSysResource.py
+++ b/generateSysResource.py
@@ -1,20 +1,18 @@
-# /*
-# 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
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# 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.
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
import json
import os
import argparse
@@ -49,19 +47,25 @@ class SysResource:
self.records[item_type][item_name] = item_id
def write_to_file(self, js_file):
- context = "module.exports.sys = {\n"
+ output = open(js_file, 'w+')
+ output.write("module.exports.sys = {\n")
+ first_item = True
for (item_type, dataset) in self.records.items():
- context += " " + item_type + ": {\n"
+ if first_item:
+ first_item = False
+ output.write(" %s: {\n" % (item_type))
+ else:
+ output.write(",\n %s: {\n" % (item_type))
+ first_line = True
for (res_name, res_id) in dataset.items():
- context += " " + res_name + ": " + str(res_id) + ",\n"
- # 移除最后一个多余的","
- context = context[:-2] + "\n"
- context += " },\n"
- # 移除最后一个多余的","
- context = context[:-2] + "\n"
- context += "}\n"
- with open(js_file, 'w+') as fp:
- fp.write(context)
+ if first_line:
+ first_line = False
+ output.write(" %s: %d" % (res_name, res_id))
+ else:
+ output.write(",\n %s: %d" % (res_name, res_id))
+ output.write("\n }")
+ output.write("\n}\n")
+ output.close()
if __name__ == "__main__":
parser = argparse.ArgumentParser()