From 6d013e18f93bad5647cb9ea0a497336f64e1459a Mon Sep 17 00:00:00 2001 From: gengyang Date: Sat, 22 Feb 2020 19:23:06 +0800 Subject: [PATCH] feat: remove -p tslint.json for test --- .editorconfig | 4 - package.json | 2 +- packages/material-parser/package.json | 2 +- .../src/generator/Generator.ts | 36 +- .../material-parser/src/validate/schema.d.ts | 179 ----- .../__snapshots__/test/Materialize.ts.md | 199 ++---- .../__snapshots__/test/Materialize.ts.snap | Bin 3177 -> 3168 bytes .../test/accesser/LocalAccesser.ts.md | 199 ++---- .../test/accesser/LocalAccesser.ts.snap | Bin 3174 -> 3173 bytes .../test/accesser/OnlineAccesser.ts.md | 408 ----------- .../test/accesser/OnlineAccesser.ts.snap | Bin 2897 -> 0 bytes .../test/generator/Generator.ts.md | 398 ++++------- .../test/generator/Generator.ts.snap | Bin 4992 -> 4936 bytes .../test/scanner/LocalScanner.ts.md | 633 ------------------ .../test/scanner/LocalScanner.ts.snap | Bin 3709 -> 0 bytes .../test/scanner/OnlineScanner.ts.md | 580 ---------------- .../test/scanner/OnlineScanner.ts.snap | Bin 2988 -> 0 bytes .../__snapshots__/test/validate/index.ts.md | 38 +- .../__snapshots__/test/validate/index.ts.snap | Bin 458 -> 468 bytes .../es/basic/AIMakeBlank/manifest.js | 2 +- .../es/basic/AIMakeBlank/manifest.json | 1 + .../es/basic/AIMakeIcon/manifest.js | 2 +- .../es/basic/AIMakeIcon/manifest.json | 1 + .../es/basic/AIMakeImage/manifest.js | 2 +- .../es/basic/AIMakeImage/manifest.json | 1 + .../es/basic/AIMakeLink/manifest.js | 2 +- .../es/basic/AIMakeLink/manifest.json | 1 + .../es/basic/AIMakePlaceholder/manifest.js | 2 +- .../es/basic/AIMakePlaceholder/manifest.json | 1 + .../es/basic/AIMakeText/manifest.js | 2 +- .../es/basic/AIMakeText/manifest.json | 1 + .../es/basic/Root/manifest.js | 2 +- .../es/basic/Root/manifest.json | 1 + .../src/basic/AIMakeBlank/manifest.json | 1 + .../src/basic/AIMakeIcon/manifest.json | 1 + .../src/basic/AIMakeImage/manifest.json | 1 + .../src/basic/AIMakeLink/manifest.json | 1 + .../src/basic/AIMakePlaceholder/manifest.json | 1 + .../src/basic/AIMakeText/manifest.json | 1 + .../src/basic/Root/manifest.json | 1 + .../es/manifest.json | 1 + .../src/manifest.json | 1 + .../test/generator/Generator.ts | 14 +- .../test/snapshots/Materialize.ts.md | 563 ---------------- .../test/snapshots/Materialize.ts.snap | Bin 3942 -> 0 bytes tsconfig.json | 7 +- tslint.json | 3 + 47 files changed, 375 insertions(+), 2920 deletions(-) delete mode 100644 packages/material-parser/src/validate/schema.d.ts delete mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.md delete mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.snap delete mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.md delete mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.snap delete mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.md delete mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.snap create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/manifest.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/manifest.json create mode 100644 packages/material-parser/test/fixtures/single-exported-component/es/manifest.json create mode 100644 packages/material-parser/test/fixtures/single-exported-component/src/manifest.json delete mode 100644 packages/material-parser/test/snapshots/Materialize.ts.md delete mode 100644 packages/material-parser/test/snapshots/Materialize.ts.snap diff --git a/.editorconfig b/.editorconfig index 0fb5f20ff..ee55bb502 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,7 +11,3 @@ quote_type = single [*.md] trim_trailing_whitespace = false - -[makefile] -indent_style = tab -indent_size = 4 diff --git a/package.json b/package.json index bcbec102d..21874f502 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "lint-staged": { "*.ts": [ "prettier --write", - "tslint --fix -p tsconfig.json", + "tslint --fix", "git add" ] }, diff --git a/packages/material-parser/package.json b/packages/material-parser/package.json index 39d77a712..95fd2c630 100644 --- a/packages/material-parser/package.json +++ b/packages/material-parser/package.json @@ -23,7 +23,7 @@ "scripts": { "build": "tsc", "prebuild": "npm run schema", - "test": "ava", + "test": "ava --verbose --serial", "test:snapshot": "ava --update-snapshots", "schema": "node ./scripts/transform.js" }, diff --git a/packages/material-parser/src/generator/Generator.ts b/packages/material-parser/src/generator/Generator.ts index e7634c304..575cdaea5 100644 --- a/packages/material-parser/src/generator/Generator.ts +++ b/packages/material-parser/src/generator/Generator.ts @@ -118,7 +118,7 @@ class Generator implements IGenerator { const defaultManifestFilePath = join( dirname(matParsedModel.filePath), - './manifest.js', + './manifest.json', ); // 填充 props @@ -155,14 +155,34 @@ class Generator implements IGenerator { const defaultValueItem = matParsedModel.propsDefaults.find( inner => inner.name === item.name, ); - props.push({ + const propItem: Partial = { name: item.name, - propType: item.type as PropType, - description: '', - defaultValue: defaultValueItem - ? defaultValueItem.defaultValue - : undefined, - }); + }; + if ( + [ + 'array', + 'bool', + 'func', + 'number', + 'object', + 'string', + 'node', + 'element', + 'any', + ].includes(item.type) + ) { + propItem.propType = item.type as PropType; + } else { + propItem.propType = { + type: item.type, + // @ts-ignore + value: item.value, + } as PropType; + } + if (defaultValueItem) { + propItem.defaultValue = defaultValueItem.defaultValue; + } + props.push(propItem as PropsSection['props'][0]); }); return props; diff --git a/packages/material-parser/src/validate/schema.d.ts b/packages/material-parser/src/validate/schema.d.ts deleted file mode 100644 index ed478418f..000000000 --- a/packages/material-parser/src/validate/schema.d.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* tslint:disable */ -/** - * This file was automatically generated by json-schema-to-typescript. - * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, - * and run json-schema-to-typescript to regenerate this file. - */ - -/** - * json schema for low code component protocol - */ -export type ComponentMaterial = BasicSection & PropsSection & ConfigureSection; -export type PropType = BasicType | RequiredType | ComplexType; -export type BasicType = - | 'array' - | 'bool' - | 'func' - | 'number' - | 'object' - | 'string' - | 'node' - | 'element' - | 'any'; -export type ComplexType = - | OneOf - | OneOfType - | ArrayOf - | ObjectOf - | Shape - | Exact; -export type ConfigureProp = { - title?: string; - extraProps?: { - [k: string]: any; - }; - [k: string]: any; -} & (ConfigureFieldProp | ConfigureGroupProp); - -export interface BasicSection { - componentName: string; - title: string; - description?: string; - docUrl: string; - screenshot: string; - icon?: string; - tags?: string[]; - devMode?: 'proCode' | 'lowCode'; - npm: Npm; - [k: string]: any; -} -export interface Npm { - package: string; - exportName: string; - subName: string; - main: string; - destructuring: boolean; - version: string; - [k: string]: any; -} -export interface PropsSection { - props?: { - name: string; - propType: PropType; - description?: string; - defaultValue?: any; - [k: string]: any; - }[]; - [k: string]: any; -} -export interface RequiredType { - type: BasicType; - isRequired?: boolean; -} -export interface OneOf { - type: 'oneOf'; - value: string[]; - isRequired?: boolean; - [k: string]: any; -} -export interface OneOfType { - type: 'oneOfType'; - value: PropType[]; - isRequired?: boolean; - [k: string]: any; -} -export interface ArrayOf { - type: 'arrayOf'; - value: PropType; - isRequired?: boolean; - [k: string]: any; -} -export interface ObjectOf { - type: 'objectOf'; - value: PropType; - isRequired?: boolean; - [k: string]: any; -} -export interface Shape { - type: 'shape'; - value: { - name?: string; - propType?: PropType; - }[]; - isRequired?: boolean; - [k: string]: any; -} -export interface Exact { - type: 'exact'; - value: { - name?: string; - propType?: PropType; - }[]; - isRequired?: boolean; - [k: string]: any; -} -export interface ConfigureSection { - configure?: { - props?: ConfigureProp[]; - styles?: { - [k: string]: any; - }; - events?: { - [k: string]: any; - }; - component?: ConfigureComponent; - [k: string]: any; - }; - [k: string]: any; -} -export interface ConfigureFieldProp { - type: 'field'; - name?: string; - setter?: ConfigureFieldSetter; - [k: string]: any; -} -export interface ConfigureFieldSetter { - componentName: - | 'List' - | 'Object' - | 'Function' - | 'Node' - | 'Mixin' - | 'Expression' - | 'Switch' - | 'Number' - | 'Input' - | 'TextArea' - | 'Date' - | 'DateYear' - | 'DateMonth' - | 'DateRange' - | 'ColorPicker' - | 'CodeEditor' - | 'Select' - | 'RadioGroup'; - props?: { - [k: string]: any; - }; - [k: string]: any; -} -export interface ConfigureGroupProp { - type: 'group'; - items: ConfigureProp[]; - [k: string]: any; -} -export interface ConfigureComponent { - isContainer?: boolean; - isModal?: boolean; - descriptor?: string; - nestingRule?: { - childWhitelist?: string[]; - parentWhitelist?: string[]; - descendantBlacklist?: string[]; - ancestorWhitelist?: string[]; - [k: string]: any; - }; - isNullNode?: boolean; - isLayout?: boolean; - [k: string]: any; -} diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.md index b39f095d8..e40e4f0d7 100644 --- a/packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.md +++ b/packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.md @@ -10,7 +10,7 @@ Generated by [AVA](https://ava.li). [ { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js', + manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json', manifestJS: undefined, manifestObj: { componentName: 'AIMakeBlank', @@ -25,44 +25,34 @@ Generated by [AVA](https://ava.li). }, props: [ { - defaultValue: undefined, - description: '', name: 'children', - propType: 'oneOfType', + propType: { + type: 'oneOfType', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'styleBoxModel', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleLayout', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleBackground', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleFlexLayout', propType: 'object', }, { defaultValue: '{}', - description: '', name: 'style', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'id', propType: 'string', }, @@ -72,7 +62,7 @@ Generated by [AVA](https://ava.li). }, }, { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js', + manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json', manifestJS: undefined, manifestObj: { componentName: 'AIMakeIcon', @@ -87,44 +77,34 @@ Generated by [AVA](https://ava.li). }, props: [ { - defaultValue: undefined, - description: '', name: 'className', propType: 'string', }, { - defaultValue: undefined, - description: '', name: 'iconClassName', propType: 'string', }, { - defaultValue: undefined, - description: '', name: 'children', - propType: 'oneOfType', + propType: { + type: 'oneOfType', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'styleBoxModel', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleText', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleBackground', propType: 'object', }, { defaultValue: '{}', - description: '', name: 'style', propType: 'object', }, @@ -134,7 +114,7 @@ Generated by [AVA](https://ava.li). }, }, { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js', + manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json', manifestJS: undefined, manifestObj: { componentName: 'AIMakeImage', @@ -149,14 +129,11 @@ Generated by [AVA](https://ava.li). }, props: [ { - defaultValue: undefined, - description: '', name: 'styleBoxModel', propType: 'object', }, { defaultValue: '{}', - description: '', name: 'style', propType: 'object', }, @@ -166,7 +143,7 @@ Generated by [AVA](https://ava.li). }, }, { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js', + manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json', manifestJS: undefined, manifestObj: { componentName: 'AIMakeLink', @@ -181,38 +158,30 @@ Generated by [AVA](https://ava.li). }, props: [ { - defaultValue: undefined, - description: '', name: 'children', - propType: 'oneOfType', + propType: { + type: 'oneOfType', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'styleBoxModel', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleText', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleLayout', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleBackground', propType: 'object', }, { defaultValue: '{}', - description: '', name: 'style', propType: 'object', }, @@ -222,7 +191,7 @@ Generated by [AVA](https://ava.li). }, }, { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js', + manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json', manifestJS: undefined, manifestObj: { componentName: 'AIMakePlaceholder', @@ -237,26 +206,22 @@ Generated by [AVA](https://ava.li). }, props: [ { - defaultValue: undefined, - description: '', name: 'children', - propType: 'oneOfType', + propType: { + type: 'oneOfType', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'styleBoxModel', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleLayout', propType: 'object', }, { defaultValue: '{}', - description: '', name: 'style', propType: 'object', }, @@ -266,7 +231,7 @@ Generated by [AVA](https://ava.li). }, }, { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js', + manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json', manifestJS: undefined, manifestObj: { componentName: 'AIMakeText', @@ -281,44 +246,34 @@ Generated by [AVA](https://ava.li). }, props: [ { - defaultValue: undefined, - description: '', name: 'children', - propType: 'oneOfType', + propType: { + type: 'oneOfType', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'type', propType: 'string', }, { - defaultValue: undefined, - description: '', name: 'styleBoxModel', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleText', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleLayout', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'styleBackground', propType: 'object', }, { defaultValue: '{}', - description: '', name: 'style', propType: 'object', }, @@ -328,7 +283,7 @@ Generated by [AVA](https://ava.li). }, }, { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js', + manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json', manifestJS: undefined, manifestObj: { componentName: 'Root', @@ -348,15 +303,15 @@ Generated by [AVA](https://ava.li). backgroundColor: '#f0f2f5',␊ minHeight: '100%'␊ }`, - description: '', name: 'style', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'children', - propType: 'oneOfType', + propType: { + type: 'oneOfType', + value: undefined, + }, }, ], screenshot: '', @@ -371,7 +326,7 @@ Generated by [AVA](https://ava.li). [ { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.js', + manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.json', manifestJS: undefined, manifestObj: { componentName: 'Demo', @@ -386,122 +341,112 @@ Generated by [AVA](https://ava.li). }, props: [ { - defaultValue: undefined, - description: '', name: 'optionalArray', propType: 'array', }, { - defaultValue: undefined, - description: '', name: 'optionalBool', propType: 'bool', }, { - defaultValue: undefined, - description: '', name: 'optionalFunc', propType: 'func', }, { - defaultValue: undefined, - description: '', name: 'optionalNumber', propType: 'number', }, { - defaultValue: undefined, - description: '', name: 'optionalObject', propType: 'object', }, { - defaultValue: undefined, - description: '', name: 'optionalString', propType: 'string', }, { - defaultValue: undefined, - description: '', name: 'optionalSymbol', - propType: 'symbol', + propType: { + type: 'symbol', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalNode', propType: 'node', }, { - defaultValue: undefined, - description: '', name: 'optionalElement', propType: 'element', }, { - defaultValue: undefined, - description: '', name: 'optionalElementType', - propType: 'elementType', + propType: { + type: 'elementType', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalMessage', - propType: 'instanceOf', + propType: { + type: 'instanceOf', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalEnum', - propType: 'oneOf', + propType: { + type: 'oneOf', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalUnion', - propType: 'oneOfType', + propType: { + type: 'oneOfType', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalArrayOf', - propType: 'arrayOf', + propType: { + type: 'arrayOf', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalObjectOf', - propType: 'objectOf', + propType: { + type: 'objectOf', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalObjectWithShape', - propType: 'shape', + propType: { + type: 'shape', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalObjectWithShape2', - propType: 'shape', + propType: { + type: 'shape', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'optionalObjectWithStrictShape', - propType: 'exact', + propType: { + type: 'exact', + value: undefined, + }, }, { - defaultValue: undefined, - description: '', name: 'requiredFunc', propType: 'func', }, { - defaultValue: undefined, - description: '', name: 'requiredAny', propType: 'any', }, diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.snap index 9cb741a67bc78452c2af8edf0a0d21c8a07dbdf8..0636b4e2058a3368722787c4a251dc60405e36eb 100644 GIT binary patch literal 3168 zcmV-m44?BsRzVZ?KAbvwM>)?A{yp0f|%!)l#k0 zvFKE!2#!{q7Oi3*KB}X|v1lDciX+rI+UkfFA2UU?)^Vi&dpCQN{mzEFZq`Zagqh!P zvirN=Irlv7x##3$8e`1FJ~@2V5B#nx?QcJG$;Y#vzj~g))PJ`YGZrkrlCLpjgN%6s*mmkk~B<@s!i)WP*bU0uyosVMhES z%Ub-u4%8vHONE|`vo3F4BY7i&Nlz9O6fhx=31%iZ;h0L)l(kSO2#T`5O$tZm`UBD; zG1AfVh3OXNULKZ0VRySEw|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9xgFdrI^j#a$)( zj^aN`^c_WyN8eFw@aQ{=cYC5cihY;Xv#-H2SxqvlFL`2FJ>k)_S~5b<>XH$9R@aWu zv--OcdRC8*=QPL(>8o$EUk-2M$_8oqb|YHJCh#6^hD3OuF=!;+mZUH zJ2p}ub;YInsJo_AA9Z(?Mn_%WrPAOkWd!$bV* zAlU$30Pli-(-!vN`^d3`RD!F43?3Y7c<_A>Bpsj=II9S$sWLqHz8sS8fxEyH-~er5 z55Av)qzibearr>3Haz&g5t7Z|CGa6|j59p=?uBGBxDng|ennf@gYSQW2OOm>)7Z`vA!E$i-bjmWFu{;aOc5o1Mfs$IvQp;H8 zLNXuh0Ple>Y0GSOvY3I(2K7J!n`Tg!%lhLNEDm3bDEUJ|8Xl_64M*A~;R>Z~0hS-e zC-zhOYX_$m+xJxV>B~HQ#BMaeXSq*nkACNkFitz)gYbwe`b!#%u&e)R<}Ca;|cP9 zKZZ}Or=|*jHR{b!r$|bu)>Bd1RMRw}X>x`7Za|c;62#_~2wopwQ&V1%osL)5A9uw6 M0u61@cEwQu01B${3IG5A diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.md deleted file mode 100644 index 53eece2d9..000000000 --- a/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.md +++ /dev/null @@ -1,408 +0,0 @@ -# Snapshot report for `test/accesser/OnlineAccesser.ts` - -The actual snapshot is saved in `OnlineAccesser.ts.snap`. - -Generated by [AVA](https://ava.li). - -## access multiple exported component by online - -> Snapshot 1 - - [ - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeBlank/manifest.js', - manifestJS: 'export default {"name":"AIMakeBlank","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"styleFlexLayout","label":"styleFlexLayout","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"},{"name":"id","label":"id","renderer":""}]}}', - manifestObj: { - name: 'AIMakeBlank', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleLayout', - name: 'styleLayout', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBackground', - name: 'styleBackground', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleFlexLayout', - name: 'styleFlexLayout', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - { - defaultValue: undefined, - label: 'id', - name: 'id', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeIcon/manifest.js', - manifestJS: 'export default {"name":"AIMakeIcon","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"className","label":"className","renderer":""},{"name":"iconClassName","label":"iconClassName","renderer":""},{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakeIcon', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'className', - name: 'className', - renderer: '', - }, - { - defaultValue: undefined, - label: 'iconClassName', - name: 'iconClassName', - renderer: '', - }, - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleText', - name: 'styleText', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBackground', - name: 'styleBackground', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeImage/manifest.js', - manifestJS: 'export default {"name":"AIMakeImage","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakeImage', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeLink/manifest.js', - manifestJS: 'export default {"name":"AIMakeLink","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakeLink', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleText', - name: 'styleText', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleLayout', - name: 'styleLayout', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBackground', - name: 'styleBackground', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakePlaceholder/manifest.js', - manifestJS: 'export default {"name":"AIMakePlaceholder","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakePlaceholder', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleLayout', - name: 'styleLayout', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeText/manifest.js', - manifestJS: 'export default {"name":"AIMakeText","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"type","label":"type","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakeText', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'type', - name: 'type', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleText', - name: 'styleText', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleLayout', - name: 'styleLayout', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBackground', - name: 'styleBackground', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/Root/manifest.js', - manifestJS: 'export default {"name":"Root","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"style","label":"style","renderer":"","defaultValue":"{\\n padding: 0,\\n backgroundColor: \'#f0f2f5\',\\n minHeight: \'100%\'\\n}"},{"name":"children","label":"children","renderer":""}]}}', - manifestObj: { - name: 'Root', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: `{␊ - padding: 0,␊ - backgroundColor: '#f0f2f5',␊ - minHeight: '100%'␊ - }`, - label: 'style', - name: 'style', - renderer: '', - }, - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - ] - -## access single exported component by online - -> Snapshot 1 - - [ - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/rT9SFxrRVdFSqBfMvpxH2T/node_modules/@ali/demo-biz-test090702/es/manifest.js', - manifestJS: 'export default {"name":"Demo","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[]}}', - manifestObj: { - name: 'Demo', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - ] diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.snap deleted file mode 100644 index 5edda1335c3f1ffb024819fa8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scanner/LocalScanner.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.md deleted file mode 100644 index c34fd12b6..000000000 --- a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.md +++ /dev/null @@ -1,633 +0,0 @@ -# Snapshot report for `test/scanner/LocalScanner.ts` - -The actual snapshot is saved in `LocalScanner.ts.snap`. - -Generated by [AVA](https://ava.li). - -## scan from multiple exported component - -> Snapshot 1 - - { - mainEntry: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/index.js', - modules: [ - { - fileContent: `import AIMakeBlank from './basic/AIMakeBlank';␊ - import AIMakeIcon from './basic/AIMakeIcon';␊ - import AIMakeImage from './basic/AIMakeImage';␊ - import AIMakeLink from './basic/AIMakeLink';␊ - import AIMakePlaceholder from './basic/AIMakePlaceholder';␊ - import AIMakeText from './basic/AIMakeText';␊ - import Root from './basic/Root';␊ - export { AIMakeBlank, AIMakeIcon, AIMakeImage, AIMakeLink, AIMakePlaceholder, AIMakeText, Root };␊ - `, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/index.js', - }, - { - fileContent: `import _extends from "@babel/runtime/helpers/extends";␊ - import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - import HOCLayoutProps from '../utils/HOCLayoutProps';␊ - import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊ - import HOCFlexLayoutProps from '../utils/HOCFlexLayoutProps';␊ - ␊ - var AIMakeBlank =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeBlank, _Component);␊ - ␊ - function AIMakeBlank() {␊ - _classCallCheck(this, AIMakeBlank);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeBlank).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakeBlank, [{␊ - key: "render",␊ - value: function render() {␊ - var merged = {};␊ - var _this$props = this.props,␊ - children = _this$props.children,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleLayout = _this$props.styleLayout,␊ - styleBackground = _this$props.styleBackground,␊ - styleFlexLayout = _this$props.styleFlexLayout,␊ - style = _this$props.style,␊ - id = _this$props.id;␊ - var styles = { ...styleBoxModel,␊ - ...styleLayout,␊ - ...styleBackground,␊ - ...styleFlexLayout,␊ - ...style␊ - };␊ - ␊ - if (id) {␊ - merged.id = id;␊ - }␊ - ␊ - return React.createElement("div", _extends({␊ - style: styles␊ - }, merged), children);␊ - }␊ - }]);␊ - ␊ - return AIMakeBlank;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeBlank, "propTypes", {␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleLayout: PropTypes.object.isRequired,␊ - styleBackground: PropTypes.object.isRequired,␊ - styleFlexLayout: PropTypes.object.isRequired,␊ - style: PropTypes.object,␊ - id: PropTypes.string␊ - });␊ - ␊ - _defineProperty(AIMakeBlank, "defaultProps", {␊ - children: [],␊ - style: {},␊ - id: ''␊ - });␊ - ␊ - export default HOCBoxModelProps(HOCLayoutProps(HOCBackgroundProps(HOCFlexLayoutProps(AIMakeBlank))));`, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/index.js', - }, - { - fileContent: `import _extends from "@babel/runtime/helpers/extends";␊ - import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊ - import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import classNames from 'classnames';␊ - import createFromIconfont from './IconFont';␊ - ␊ - var AIMakeIcon =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeIcon, _Component);␊ - ␊ - function AIMakeIcon() {␊ - _classCallCheck(this, AIMakeIcon);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeIcon).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakeIcon, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - className = _this$props.className,␊ - iconClassName = _this$props.iconClassName,␊ - children = _this$props.children,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleText = _this$props.styleText,␊ - styleBackground = _this$props.styleBackground,␊ - style = _this$props.style,␊ - otherProps = _objectWithoutProperties(_this$props, ["className", "iconClassName", "children", "styleBoxModel", "styleText", "styleBackground", "style"]);␊ - ␊ - var styles = { ...styleBoxModel,␊ - ...styleText,␊ - ...styleBackground,␊ - ...style␊ - };␊ - return React.createElement("i", _extends({}, otherProps, {␊ - className: classNames(className, iconClassName),␊ - style: styles␊ - }), children);␊ - }␊ - }]);␊ - ␊ - return AIMakeIcon;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeIcon, "propTypes", {␊ - className: PropTypes.string,␊ - iconClassName: PropTypes.string,␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleText: PropTypes.object.isRequired,␊ - styleBackground: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakeIcon, "defaultProps", {␊ - className: '',␊ - iconClassName: 'iconfont',␊ - children: '',␊ - style: {}␊ - });␊ - ␊ - AIMakeIcon.createFromIconfont = createFromIconfont;␊ - export default AIMakeIcon;`, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/index.js', - }, - { - fileContent: `import _extends from "@babel/runtime/helpers/extends";␊ - import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊ - import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - ␊ - var AIMakeImage =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeImage, _Component);␊ - ␊ - function AIMakeImage() {␊ - _classCallCheck(this, AIMakeImage);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeImage).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakeImage, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - style = _this$props.style,␊ - otherProps = _objectWithoutProperties(_this$props, ["styleBoxModel", "style"]);␊ - ␊ - var styles = { ...styleBoxModel,␊ - ...style␊ - };␊ - return React.createElement("img", _extends({}, otherProps, {␊ - style: styles,␊ - alt: "AIMakeImage"␊ - }));␊ - }␊ - }]);␊ - ␊ - return AIMakeImage;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeImage, "propTypes", {␊ - styleBoxModel: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakeImage, "defaultProps", {␊ - style: {}␊ - });␊ - ␊ - export default HOCBoxModelProps(AIMakeImage);`, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/index.js', - }, - { - fileContent: `import _extends from "@babel/runtime/helpers/extends";␊ - import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊ - import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - import HOCTextProps from '../utils/HOCTextProps';␊ - import HOCLayoutProps from '../utils/HOCLayoutProps';␊ - import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊ - ␊ - var AIMakeLink =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeLink, _Component);␊ - ␊ - function AIMakeLink() {␊ - _classCallCheck(this, AIMakeLink);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeLink).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakeLink, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - children = _this$props.children,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleText = _this$props.styleText,␊ - styleLayout = _this$props.styleLayout,␊ - styleBackground = _this$props.styleBackground,␊ - style = _this$props.style,␊ - otherProps = _objectWithoutProperties(_this$props, ["children", "styleBoxModel", "styleText", "styleLayout", "styleBackground", "style"]);␊ - ␊ - var styles = { ...styleBoxModel,␊ - ...styleText,␊ - ...styleLayout,␊ - ...styleBackground,␊ - ...style␊ - };␊ - ␊ - if (typeof children !== 'string') {␊ - styles.display = 'inline-block';␊ - }␊ - ␊ - return React.createElement("a", _extends({}, otherProps, {␊ - style: styles␊ - }), [children]);␊ - }␊ - }]);␊ - ␊ - return AIMakeLink;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeLink, "propTypes", {␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleText: PropTypes.object.isRequired,␊ - styleLayout: PropTypes.object.isRequired,␊ - styleBackground: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakeLink, "defaultProps", {␊ - children: '',␊ - style: {}␊ - });␊ - ␊ - export default HOCBoxModelProps(HOCTextProps(HOCLayoutProps(HOCBackgroundProps(AIMakeLink))));`, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/index.js', - }, - { - fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - import HOCLayoutProps from '../utils/HOCLayoutProps';␊ - ␊ - var AIMakePlaceholder =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakePlaceholder, _Component);␊ - ␊ - function AIMakePlaceholder() {␊ - _classCallCheck(this, AIMakePlaceholder);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakePlaceholder).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakePlaceholder, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - children = _this$props.children,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleLayout = _this$props.styleLayout,␊ - style = _this$props.style;␊ - var styles = { ...styleBoxModel,␊ - ...styleLayout,␊ - ...style␊ - };␊ - var placeholderStyle = {␊ - display: 'inline-block',␊ - border: '1px dashed #aaa',␊ - lineHeight: styles.height,␊ - backgroundColor: '#F5E075',␊ - overflow: 'hidden',␊ - textAlign: 'center',␊ - ...styles␊ - };␊ - return React.createElement("div", {␊ - style: placeholderStyle␊ - }, children);␊ - }␊ - }]);␊ - ␊ - return AIMakePlaceholder;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakePlaceholder, "propTypes", {␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleLayout: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakePlaceholder, "defaultProps", {␊ - children: '',␊ - style: {}␊ - });␊ - ␊ - export default HOCBoxModelProps(HOCLayoutProps(AIMakePlaceholder));`, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/index.js', - }, - { - fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - import HOCTextProps from '../utils/HOCTextProps';␊ - import HOCLayoutProps from '../utils/HOCLayoutProps';␊ - import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊ - ␊ - var AIMakeText =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeText, _Component);␊ - ␊ - function AIMakeText() {␊ - var _this;␊ - ␊ - _classCallCheck(this, AIMakeText);␊ - ␊ - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {␊ - args[_key] = arguments[_key];␊ - }␊ - ␊ - _this = _possibleConstructorReturn(this, _getPrototypeOf(AIMakeText).call(this, ...args));␊ - ␊ - _defineProperty(_assertThisInitialized(_this), "generateComponentType", function (componentType) {␊ - var componentNameMap = {␊ - h1: 'h1',␊ - h2: 'h2',␊ - h3: 'h3',␊ - h4: 'h4',␊ - h5: 'h5',␊ - paragraph: 'p',␊ - label: 'label'␊ - };␊ - return componentNameMap[componentType] || 'div';␊ - });␊ - ␊ - return _this;␊ - }␊ - ␊ - _createClass(AIMakeText, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - children = _this$props.children,␊ - type = _this$props.type,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleText = _this$props.styleText,␊ - styleLayout = _this$props.styleLayout,␊ - styleBackground = _this$props.styleBackground,␊ - style = _this$props.style;␊ - var styles = { ...styleBoxModel,␊ - ...styleText,␊ - ...styleLayout,␊ - ...styleBackground,␊ - ...style␊ - };␊ - var Comp = this.generateComponentType(type);␊ - var labelStyle = Comp === 'label' ? {␊ - display: 'inline-block'␊ - } : {};␊ - return React.createElement(Comp, {␊ - className: "AIMakeText",␊ - style: Object.assign(labelStyle, styles)␊ - }, [children]);␊ - }␊ - }]);␊ - ␊ - return AIMakeText;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeText, "propTypes", {␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.string]),␊ - type: PropTypes.string,␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleText: PropTypes.object.isRequired,␊ - styleLayout: PropTypes.object.isRequired,␊ - styleBackground: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakeText, "defaultProps", {␊ - children: '',␊ - type: '',␊ - // paragraph || label␊ - style: {}␊ - });␊ - ␊ - export default HOCBoxModelProps(HOCTextProps(HOCLayoutProps(HOCBackgroundProps(AIMakeText))));`, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeText/index.js', - }, - { - fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React from 'react';␊ - import PropTypes from 'prop-types';␊ - ␊ - var Root =␊ - /*#__PURE__*/␊ - function (_React$Component) {␊ - _inherits(Root, _React$Component);␊ - ␊ - function Root() {␊ - _classCallCheck(this, Root);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(Root).apply(this, arguments));␊ - }␊ - ␊ - _createClass(Root, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - style = _this$props.style,␊ - children = _this$props.children;␊ - var newStyle = Object.assign({}, Root.defaultProps.style, style);␊ - return React.createElement("div", {␊ - style: newStyle␊ - }, children);␊ - }␊ - }]);␊ - ␊ - return Root;␊ - }(React.Component);␊ - ␊ - _defineProperty(Root, "propTypes", {␊ - style: PropTypes.object,␊ - children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)])␊ - });␊ - ␊ - _defineProperty(Root, "defaultProps", {␊ - style: {␊ - padding: 0,␊ - backgroundColor: '#f0f2f5',␊ - minHeight: '100%'␊ - },␊ - children: null␊ - });␊ - ␊ - export default Root;`, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/Root/index.js', - }, - ], - pkgName: 'multiple-exported-component', - pkgVersion: '1.0.0', - sourceType: 'module', - } - -## scan from single exported component - -> Snapshot 1 - - { - mainEntry: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/single-exported-component/es/index.js', - modules: [ - { - fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - ␊ - /* eslint-disable react/no-unused-prop-types */␊ - ␊ - /* eslint-disable react/require-default-props */␊ - import React from 'react';␊ - import PropTypes from 'prop-types';␊ - import "./main.css";␊ - ␊ - var Demo =␊ - /*#__PURE__*/␊ - function (_React$Component) {␊ - _inherits(Demo, _React$Component);␊ - ␊ - function Demo() {␊ - _classCallCheck(this, Demo);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(Demo).apply(this, arguments));␊ - }␊ - ␊ - _createClass(Demo, [{␊ - key: "render",␊ - value: function render() {␊ - return React.createElement("div", null, " Test ");␊ - }␊ - }]);␊ - ␊ - return Demo;␊ - }(React.Component);␊ - ␊ - Demo.propTypes = {␊ - optionalArray: PropTypes.array,␊ - optionalBool: PropTypes.bool,␊ - optionalFunc: PropTypes.func,␊ - optionalNumber: PropTypes.number,␊ - optionalObject: PropTypes.object,␊ - optionalString: PropTypes.string,␊ - optionalSymbol: PropTypes.symbol,␊ - // Anything that can be rendered: numbers, strings, elements or an array␊ - // (or fragment) containing these types.␊ - optionalNode: PropTypes.node,␊ - // A React element (ie. ).␊ - optionalElement: PropTypes.element,␊ - // A React element type (ie. MyComponent).␊ - optionalElementType: PropTypes.elementType,␊ - // You can also declare that a prop is an instance of a class. This uses␊ - // JS's instanceof operator.␊ - optionalMessage: PropTypes.instanceOf(Demo),␊ - // You can ensure that your prop is limited to specific values by treating␊ - // it as an enum.␊ - optionalEnum: PropTypes.oneOf(['News', 'Photos']),␊ - // An object that could be one of many types␊ - optionalUnion: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.instanceOf(Demo)]),␊ - // An array of a certain type␊ - optionalArrayOf: PropTypes.arrayOf(PropTypes.number),␊ - // An object with property values of a certain type␊ - optionalObjectOf: PropTypes.objectOf(PropTypes.number),␊ - // You can chain any of the above with `isRequired` to make sure a warning␊ - // is shown if the prop isn't provided.␊ - // An object taking on a particular shape␊ - optionalObjectWithShape: PropTypes.shape({␊ - optionalProperty: PropTypes.string,␊ - requiredProperty: PropTypes.number.isRequired␊ - }),␊ - optionalObjectWithShape2: PropTypes.shape({␊ - optionalProperty: PropTypes.string,␊ - requiredProperty: PropTypes.number.isRequired␊ - }).isRequired,␊ - // An object with warnings on extra properties␊ - optionalObjectWithStrictShape: PropTypes.exact({␊ - optionalProperty: PropTypes.string,␊ - requiredProperty: PropTypes.number.isRequired␊ - }),␊ - requiredFunc: PropTypes.func.isRequired,␊ - // A value of any data type␊ - requiredAny: PropTypes.any.isRequired␊ - };␊ - Demo.defaultProps = {};␊ - export default Demo;`, - filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/single-exported-component/es/index.js', - }, - ], - pkgName: 'single-exported-component', - pkgVersion: '1.0.0', - sourceType: 'module', - } diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.snap deleted file mode 100644 index 3e40b83192128a4861f7766bcd9e75d733ebb76d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV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R%1-1s>OX-P7g3^@LsM+d~3MYN^B0%#2fE4Iovyj z*Wsq;hiYl(alMHxAljWR%SQI+PkN(+6498@1*||q>-KFXlz1&nm%WCQk0g_DAED$9 zb*ymGUE+4^I~Kl(i!!9+SS1f{ZyQb4)DyExw{X$J-cB(&<{6E?iFxb}O&J`%>U23 b%g?mMPN$q0WSveA*x~Gdj#3cDWmy0KZ;B*} diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.md deleted file mode 100644 index 0d4d5d63d..000000000 --- a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.md +++ /dev/null @@ -1,580 +0,0 @@ -# Snapshot report for `test/scanner/OnlineScanner.ts` - -The actual snapshot is saved in `OnlineScanner.ts.snap`. - -Generated by [AVA](https://ava.li). - -## scan multiple exported component from online - -> Snapshot 1 - - { - mainEntry: '@ali/aimake-basic@0.1.0/es/index.js', - modules: [ - { - fileContent: `import AIMakeBlank from './basic/AIMakeBlank';␊ - import AIMakeIcon from './basic/AIMakeIcon';␊ - import AIMakeImage from './basic/AIMakeImage';␊ - import AIMakeLink from './basic/AIMakeLink';␊ - import AIMakePlaceholder from './basic/AIMakePlaceholder';␊ - import AIMakeText from './basic/AIMakeText';␊ - import Root from './basic/Root';␊ - export { AIMakeBlank, AIMakeIcon, AIMakeImage, AIMakeLink, AIMakePlaceholder, AIMakeText, Root };`, - filePath: '@ali/aimake-basic@0.1.0/es/index.js', - }, - { - fileContent: `import _extends from "@babel/runtime/helpers/extends";␊ - import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - import HOCLayoutProps from '../utils/HOCLayoutProps';␊ - import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊ - import HOCFlexLayoutProps from '../utils/HOCFlexLayoutProps';␊ - ␊ - var AIMakeBlank =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeBlank, _Component);␊ - ␊ - function AIMakeBlank() {␊ - _classCallCheck(this, AIMakeBlank);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeBlank).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakeBlank, [{␊ - key: "render",␊ - value: function render() {␊ - var merged = {};␊ - var _this$props = this.props,␊ - children = _this$props.children,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleLayout = _this$props.styleLayout,␊ - styleBackground = _this$props.styleBackground,␊ - styleFlexLayout = _this$props.styleFlexLayout,␊ - style = _this$props.style,␊ - id = _this$props.id;␊ - var styles = { ...styleBoxModel,␊ - ...styleLayout,␊ - ...styleBackground,␊ - ...styleFlexLayout,␊ - ...style␊ - };␊ - ␊ - if (id) {␊ - merged.id = id;␊ - }␊ - ␊ - return React.createElement("div", _extends({␊ - style: styles␊ - }, merged), children);␊ - }␊ - }]);␊ - ␊ - return AIMakeBlank;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeBlank, "propTypes", {␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleLayout: PropTypes.object.isRequired,␊ - styleBackground: PropTypes.object.isRequired,␊ - styleFlexLayout: PropTypes.object.isRequired,␊ - style: PropTypes.object,␊ - id: PropTypes.string␊ - });␊ - ␊ - _defineProperty(AIMakeBlank, "defaultProps", {␊ - children: [],␊ - style: {},␊ - id: ''␊ - });␊ - ␊ - export default HOCBoxModelProps(HOCLayoutProps(HOCBackgroundProps(HOCFlexLayoutProps(AIMakeBlank))));`, - filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeBlank/index.js', - }, - { - fileContent: `import _extends from "@babel/runtime/helpers/extends";␊ - import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊ - import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import classNames from 'classnames';␊ - import createFromIconfont from './IconFont';␊ - ␊ - var AIMakeIcon =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeIcon, _Component);␊ - ␊ - function AIMakeIcon() {␊ - _classCallCheck(this, AIMakeIcon);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeIcon).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakeIcon, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - className = _this$props.className,␊ - iconClassName = _this$props.iconClassName,␊ - children = _this$props.children,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleText = _this$props.styleText,␊ - styleBackground = _this$props.styleBackground,␊ - style = _this$props.style,␊ - otherProps = _objectWithoutProperties(_this$props, ["className", "iconClassName", "children", "styleBoxModel", "styleText", "styleBackground", "style"]);␊ - ␊ - var styles = { ...styleBoxModel,␊ - ...styleText,␊ - ...styleBackground,␊ - ...style␊ - };␊ - return React.createElement("i", _extends({}, otherProps, {␊ - className: classNames(className, iconClassName),␊ - style: styles␊ - }), children);␊ - }␊ - }]);␊ - ␊ - return AIMakeIcon;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeIcon, "propTypes", {␊ - className: PropTypes.string,␊ - iconClassName: PropTypes.string,␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleText: PropTypes.object.isRequired,␊ - styleBackground: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakeIcon, "defaultProps", {␊ - className: '',␊ - iconClassName: 'iconfont',␊ - children: '',␊ - style: {}␊ - });␊ - ␊ - AIMakeIcon.createFromIconfont = createFromIconfont;␊ - export default AIMakeIcon;`, - filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeIcon/index.js', - }, - { - fileContent: `import _extends from "@babel/runtime/helpers/extends";␊ - import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊ - import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - ␊ - var AIMakeImage =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeImage, _Component);␊ - ␊ - function AIMakeImage() {␊ - _classCallCheck(this, AIMakeImage);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeImage).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakeImage, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - style = _this$props.style,␊ - otherProps = _objectWithoutProperties(_this$props, ["styleBoxModel", "style"]);␊ - ␊ - var styles = { ...styleBoxModel,␊ - ...style␊ - };␊ - return React.createElement("img", _extends({}, otherProps, {␊ - style: styles,␊ - alt: "AIMakeImage"␊ - }));␊ - }␊ - }]);␊ - ␊ - return AIMakeImage;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeImage, "propTypes", {␊ - styleBoxModel: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakeImage, "defaultProps", {␊ - style: {}␊ - });␊ - ␊ - export default HOCBoxModelProps(AIMakeImage);`, - filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeImage/index.js', - }, - { - fileContent: `import _extends from "@babel/runtime/helpers/extends";␊ - import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊ - import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - import HOCTextProps from '../utils/HOCTextProps';␊ - import HOCLayoutProps from '../utils/HOCLayoutProps';␊ - import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊ - ␊ - var AIMakeLink =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeLink, _Component);␊ - ␊ - function AIMakeLink() {␊ - _classCallCheck(this, AIMakeLink);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeLink).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakeLink, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - children = _this$props.children,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleText = _this$props.styleText,␊ - styleLayout = _this$props.styleLayout,␊ - styleBackground = _this$props.styleBackground,␊ - style = _this$props.style,␊ - otherProps = _objectWithoutProperties(_this$props, ["children", "styleBoxModel", "styleText", "styleLayout", "styleBackground", "style"]);␊ - ␊ - var styles = { ...styleBoxModel,␊ - ...styleText,␊ - ...styleLayout,␊ - ...styleBackground,␊ - ...style␊ - };␊ - ␊ - if (typeof children !== 'string') {␊ - styles.display = 'inline-block';␊ - }␊ - ␊ - return React.createElement("a", _extends({}, otherProps, {␊ - style: styles␊ - }), [children]);␊ - }␊ - }]);␊ - ␊ - return AIMakeLink;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeLink, "propTypes", {␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleText: PropTypes.object.isRequired,␊ - styleLayout: PropTypes.object.isRequired,␊ - styleBackground: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakeLink, "defaultProps", {␊ - children: '',␊ - style: {}␊ - });␊ - ␊ - export default HOCBoxModelProps(HOCTextProps(HOCLayoutProps(HOCBackgroundProps(AIMakeLink))));`, - filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeLink/index.js', - }, - { - fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - import HOCLayoutProps from '../utils/HOCLayoutProps';␊ - ␊ - var AIMakePlaceholder =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakePlaceholder, _Component);␊ - ␊ - function AIMakePlaceholder() {␊ - _classCallCheck(this, AIMakePlaceholder);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(AIMakePlaceholder).apply(this, arguments));␊ - }␊ - ␊ - _createClass(AIMakePlaceholder, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - children = _this$props.children,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleLayout = _this$props.styleLayout,␊ - style = _this$props.style;␊ - var styles = { ...styleBoxModel,␊ - ...styleLayout,␊ - ...style␊ - };␊ - var placeholderStyle = {␊ - display: 'inline-block',␊ - border: '1px dashed #aaa',␊ - lineHeight: styles.height,␊ - backgroundColor: '#F5E075',␊ - overflow: 'hidden',␊ - textAlign: 'center',␊ - ...styles␊ - };␊ - return React.createElement("div", {␊ - style: placeholderStyle␊ - }, children);␊ - }␊ - }]);␊ - ␊ - return AIMakePlaceholder;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakePlaceholder, "propTypes", {␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleLayout: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakePlaceholder, "defaultProps", {␊ - children: '',␊ - style: {}␊ - });␊ - ␊ - export default HOCBoxModelProps(HOCLayoutProps(AIMakePlaceholder));`, - filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakePlaceholder/index.js', - }, - { - fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React, { Component } from 'react';␊ - import PropTypes from 'prop-types';␊ - import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊ - import HOCTextProps from '../utils/HOCTextProps';␊ - import HOCLayoutProps from '../utils/HOCLayoutProps';␊ - import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊ - ␊ - var AIMakeText =␊ - /*#__PURE__*/␊ - function (_Component) {␊ - _inherits(AIMakeText, _Component);␊ - ␊ - function AIMakeText() {␊ - var _this;␊ - ␊ - _classCallCheck(this, AIMakeText);␊ - ␊ - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {␊ - args[_key] = arguments[_key];␊ - }␊ - ␊ - _this = _possibleConstructorReturn(this, _getPrototypeOf(AIMakeText).call(this, ...args));␊ - ␊ - _defineProperty(_assertThisInitialized(_this), "generateComponentType", function (componentType) {␊ - var componentNameMap = {␊ - h1: 'h1',␊ - h2: 'h2',␊ - h3: 'h3',␊ - h4: 'h4',␊ - h5: 'h5',␊ - paragraph: 'p',␊ - label: 'label'␊ - };␊ - return componentNameMap[componentType] || 'div';␊ - });␊ - ␊ - return _this;␊ - }␊ - ␊ - _createClass(AIMakeText, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - children = _this$props.children,␊ - type = _this$props.type,␊ - styleBoxModel = _this$props.styleBoxModel,␊ - styleText = _this$props.styleText,␊ - styleLayout = _this$props.styleLayout,␊ - styleBackground = _this$props.styleBackground,␊ - style = _this$props.style;␊ - var styles = { ...styleBoxModel,␊ - ...styleText,␊ - ...styleLayout,␊ - ...styleBackground,␊ - ...style␊ - };␊ - var Comp = this.generateComponentType(type);␊ - var labelStyle = Comp === 'label' ? {␊ - display: 'inline-block'␊ - } : {};␊ - return React.createElement(Comp, {␊ - className: "AIMakeText",␊ - style: Object.assign(labelStyle, styles)␊ - }, [children]);␊ - }␊ - }]);␊ - ␊ - return AIMakeText;␊ - }(Component);␊ - ␊ - _defineProperty(AIMakeText, "propTypes", {␊ - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.string]),␊ - type: PropTypes.string,␊ - styleBoxModel: PropTypes.object.isRequired,␊ - styleText: PropTypes.object.isRequired,␊ - styleLayout: PropTypes.object.isRequired,␊ - styleBackground: PropTypes.object.isRequired,␊ - style: PropTypes.object␊ - });␊ - ␊ - _defineProperty(AIMakeText, "defaultProps", {␊ - children: '',␊ - type: '',␊ - // paragraph || label␊ - style: {}␊ - });␊ - ␊ - export default HOCBoxModelProps(HOCTextProps(HOCLayoutProps(HOCBackgroundProps(AIMakeText))));`, - filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeText/index.js', - }, - { - fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import _defineProperty from "@babel/runtime/helpers/defineProperty";␊ - import React from 'react';␊ - import PropTypes from 'prop-types';␊ - ␊ - var Root =␊ - /*#__PURE__*/␊ - function (_React$Component) {␊ - _inherits(Root, _React$Component);␊ - ␊ - function Root() {␊ - _classCallCheck(this, Root);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(Root).apply(this, arguments));␊ - }␊ - ␊ - _createClass(Root, [{␊ - key: "render",␊ - value: function render() {␊ - var _this$props = this.props,␊ - style = _this$props.style,␊ - children = _this$props.children;␊ - var newStyle = Object.assign({}, Root.defaultProps.style, style);␊ - return React.createElement("div", {␊ - style: newStyle␊ - }, children);␊ - }␊ - }]);␊ - ␊ - return Root;␊ - }(React.Component);␊ - ␊ - _defineProperty(Root, "propTypes", {␊ - style: PropTypes.object,␊ - children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)])␊ - });␊ - ␊ - _defineProperty(Root, "defaultProps", {␊ - style: {␊ - padding: 0,␊ - backgroundColor: '#f0f2f5',␊ - minHeight: '100%'␊ - },␊ - children: null␊ - });␊ - ␊ - export default Root;`, - filePath: '@ali/aimake-basic@0.1.0/es/basic/Root/index.js', - }, - ], - pkgName: '@ali/aimake-basic', - pkgVersion: '0.1.0', - sourceType: 'module', - } - -## scan single exported component from online - -> Snapshot 1 - - { - mainEntry: '@ali/demo-biz-test090702@0.0.2/es/index.js', - modules: [ - { - fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊ - import _createClass from "@babel/runtime/helpers/createClass";␊ - import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊ - import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊ - import _inherits from "@babel/runtime/helpers/inherits";␊ - import React from 'react'; // import PropTypes from 'prop-types';␊ - ␊ - import "./main.css";␊ - ␊ - var Demo =␊ - /*#__PURE__*/␊ - function (_React$Component) {␊ - _inherits(Demo, _React$Component);␊ - ␊ - function Demo() {␊ - _classCallCheck(this, Demo);␊ - ␊ - return _possibleConstructorReturn(this, _getPrototypeOf(Demo).apply(this, arguments));␊ - }␊ - ␊ - _createClass(Demo, [{␊ - key: "render",␊ - value: function render() {␊ - return React.createElement("div", null, " Test ");␊ - }␊ - }]);␊ - ␊ - return Demo;␊ - }(React.Component);␊ - ␊ - export default Demo;`, - filePath: '@ali/demo-biz-test090702@0.0.2/es/index.js', - }, - ], - pkgName: '@ali/demo-biz-test090702', - pkgVersion: '0.0.2', - sourceType: 'module', - } diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.snap deleted file mode 100644 index 832d139536b3de4186e43497f6f19790d5b670ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2988 zcmV;d3sdw#RzV%`LP9)%kU)3hi91h+nQ@M zZ`RdCwO%7`&9HQ`tG@0^^7FEM2}}-z7P_|HH;Eh5zR=rge?{w(;QB&BcTAuF0>6fgY1YE*DVlu;vvV~2N6gOC z?8lg0KFq`#huP1meAT>!l@CrOKt{``CldMXJ$2T({CJ`;n^C7>;Un2^4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(rC>wF z^0ivD$K!@f{pOg?RB41g%rjL~IR353FXpDVB2Uwq>I63mlt|NGagU(TRQaW$L>k3` zE5=bGkw#F)$t6M#dRR$yjCVfC%s;L-$Fd%+W>6|V0K)&kMHacA@??<+T7^R%j68(&g?X7AAQ(PiMYra za|K-=R8(uYB-ADyFdB;QfTJED6r*@%C`M35C`QOZLowAcUMObfA0QNGhcnznVf$7d i!$zPKhes?lWk|$|?Y*4BOaK4}lhD`z diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/validate/index.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/validate/index.ts.md index f60e3e0e1..143620a94 100644 --- a/packages/material-parser/test/fixtures/__snapshots__/test/validate/index.ts.md +++ b/packages/material-parser/test/fixtures/__snapshots__/test/validate/index.ts.md @@ -4,6 +4,25 @@ The actual snapshot is saved in `index.ts.snap`. Generated by [AVA](https://ava.li). +## should be right in dir basic-error + +> Snapshot 1 + + { + errors: [ + { + dataPath: '', + keyword: 'required', + message: 'should have required property \'props\'', + params: { + missingProperty: 'props', + }, + schemaPath: '#/required', + }, + ], + success: false, + } + ## should be right in dir basic-success > Snapshot 1 @@ -35,22 +54,3 @@ Generated by [AVA](https://ava.li). { success: true, } - -## should be right in dir basic-error - -> Snapshot 1 - - { - errors: [ - { - dataPath: '', - keyword: 'required', - message: 'should have required property \'props\'', - params: { - missingProperty: 'props', - }, - schemaPath: '#/required', - }, - ], - success: false, - } diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/validate/index.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/validate/index.ts.snap index 820b00f47ef1622cdf8d2dafffec59ff2d4bb579..5da9d0b0da54c9d0382560c811feebef1f7368ca 100644 GIT binary patch literal 468 zcmV;_0W1DNRzVzX2q6@&2EIsDxt*_QtSA;Rl%H%Q@%Ed3@*0T>=0dmfBCxmk%QQ7i{jO={eerQ1~hs zfc4rR83^UImDSqo&RFae6+2AW=*5-BiSDkq_s!T-p_J|O@c{t12huM?R{Qbzn z@H#4%X#iJc>o~u)*Rp##nmUI>1G7~E1?_SQj-Vo`o3T5qo=dsB&AGFjm1BOxxB9Q6}<)4NVe_ocieHSAG2m}G~bT`Hxy=*(%FF$9vKjW>Q#RwK%0>sK! z?(Z(kSYNtLq~TsdW85@Gu;@1+zQ{R^v0>&C!^Nk=SW=P}F*1ThJ%EOGnC;rzxlU=> zDW=+2`Y)9Y7{Q_;%nS_74D4V#895l4^nkPp5DPQ12{N+zCuOB3moPHInF0a=42--C zKw}yCfohmU7?~LuSp^x{i%XM}Q;Unid?x-8Zz8i1khTEg0K%p+F);EmGUfpl!pvn$ zEh@?{D#mM@0NCM^fx2eGtYCF4DoU(mWP-8y`S}?bxxmimW@KCpa~s<&ApHQ$VPMbz z;#?qZWkho)Gln}^(cHt4l30=$kXVud6<|PjZ+2>Bd45p}Tzye$VQFSjY6`l#T%e~C z(^Fx5)#8l&(wr29jKs231(+U%f};F_)S{9~1$7XsSREW_n;4M-tst=|F&911xQdfA zQge}=$;hRwk8lYv3~vGrxsUFB7J`w_pPN}+oSBy%0CgBloE7Xo0PP^62HXPx00bJt AvH$=8 diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js index 17c6c16d0..6ef1078e0 100644 --- a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js @@ -1 +1 @@ -{"componentName":"AIMakeBlank","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeBlank","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"styleFlexLayout","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"},{"name":"id","propType":"string","description":""}]} \ No newline at end of file +{"componentName":"AIMakeBlank","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeBlank","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"styleFlexLayout","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"},{"name":"id","propType":"string","description":""}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json new file mode 100644 index 000000000..44a517687 --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeBlank","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeBlank","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"styleFlexLayout","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"},{"name":"id","propType":"string"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js index 21824462a..cb0b26eab 100644 --- a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js @@ -1 +1 @@ -{"componentName":"AIMakeIcon","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeIcon","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"className","propType":"string","description":""},{"name":"iconClassName","propType":"string","description":""},{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file +{"componentName":"AIMakeIcon","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeIcon","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"className","propType":"string","description":""},{"name":"iconClassName","propType":"string","description":""},{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json new file mode 100644 index 000000000..e3c51f31e --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeIcon","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeIcon","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"className","propType":"string"},{"name":"iconClassName","propType":"string"},{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js index b5ffde284..ea27808dc 100644 --- a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js @@ -1 +1 @@ -{"componentName":"AIMakeImage","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeImage","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"styleBoxModel","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file +{"componentName":"AIMakeImage","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeImage","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"styleBoxModel","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json new file mode 100644 index 000000000..76a5bb10f --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeImage","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeImage","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"styleBoxModel","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js index 377983d6d..f5f08c322 100644 --- a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js @@ -1 +1 @@ -{"componentName":"AIMakeLink","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeLink","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file +{"componentName":"AIMakeLink","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeLink","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json new file mode 100644 index 000000000..6557dd4f6 --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeLink","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeLink","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js index 7456ed578..022906cdd 100644 --- a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js @@ -1 +1 @@ -{"componentName":"AIMakePlaceholder","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakePlaceholder","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file +{"componentName":"AIMakePlaceholder","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakePlaceholder","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json new file mode 100644 index 000000000..91203f99b --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakePlaceholder","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakePlaceholder","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js index b275a1815..d0d95a4d2 100644 --- a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js @@ -1 +1 @@ -{"componentName":"AIMakeText","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeText","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"type","propType":"string","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file +{"componentName":"AIMakeText","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeText","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"type","propType":"string","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json new file mode 100644 index 000000000..06231166e --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeText","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeText","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"type","propType":"string"},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js index 2ec2d9e3e..756d388b2 100644 --- a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js @@ -1 +1 @@ -{"componentName":"Root","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"Root","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"style","propType":"object","description":"","defaultValue":"{\n padding: 0,\n backgroundColor: '#f0f2f5',\n minHeight: '100%'\n}"},{"name":"children","propType":"oneOfType","description":""}]} \ No newline at end of file +{"componentName":"Root","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"Root","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"style","propType":"object","description":"","defaultValue":"{\n padding: 0,\n backgroundColor: '#f0f2f5',\n minHeight: '100%'\n}"},{"name":"children","propType":"oneOfType","description":""}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json new file mode 100644 index 000000000..666da89a5 --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json @@ -0,0 +1 @@ +{"componentName":"Root","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"Root","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"style","propType":"object","defaultValue":"{\n padding: 0,\n backgroundColor: '#f0f2f5',\n minHeight: '100%'\n}"},{"name":"children","propType":{"type":"oneOfType"}}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/manifest.json new file mode 100644 index 000000000..44a517687 --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeBlank","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeBlank","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"styleFlexLayout","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"},{"name":"id","propType":"string"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/manifest.json new file mode 100644 index 000000000..e3c51f31e --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeIcon","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeIcon","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"className","propType":"string"},{"name":"iconClassName","propType":"string"},{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/manifest.json new file mode 100644 index 000000000..76a5bb10f --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeImage","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeImage","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"styleBoxModel","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/manifest.json new file mode 100644 index 000000000..6557dd4f6 --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeLink","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeLink","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/manifest.json new file mode 100644 index 000000000..91203f99b --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakePlaceholder","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakePlaceholder","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/manifest.json new file mode 100644 index 000000000..06231166e --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/manifest.json @@ -0,0 +1 @@ +{"componentName":"AIMakeText","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeText","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"type","propType":"string"},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/manifest.json b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/manifest.json new file mode 100644 index 000000000..666da89a5 --- /dev/null +++ b/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/manifest.json @@ -0,0 +1 @@ +{"componentName":"Root","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"Root","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"style","propType":"object","defaultValue":"{\n padding: 0,\n backgroundColor: '#f0f2f5',\n minHeight: '100%'\n}"},{"name":"children","propType":{"type":"oneOfType"}}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/single-exported-component/es/manifest.json b/packages/material-parser/test/fixtures/single-exported-component/es/manifest.json new file mode 100644 index 000000000..4c5c7745a --- /dev/null +++ b/packages/material-parser/test/fixtures/single-exported-component/es/manifest.json @@ -0,0 +1 @@ +{"componentName":"Demo","title":"","docUrl":"","screenshot":"","npm":{"package":"single-exported-component","version":"1.0.0","exportName":"Demo","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"optionalArray","propType":"array"},{"name":"optionalBool","propType":"bool"},{"name":"optionalFunc","propType":"func"},{"name":"optionalNumber","propType":"number"},{"name":"optionalObject","propType":"object"},{"name":"optionalString","propType":"string"},{"name":"optionalSymbol","propType":{"type":"symbol"}},{"name":"optionalNode","propType":"node"},{"name":"optionalElement","propType":"element"},{"name":"optionalElementType","propType":{"type":"elementType"}},{"name":"optionalMessage","propType":{"type":"instanceOf"}},{"name":"optionalEnum","propType":{"type":"oneOf"}},{"name":"optionalUnion","propType":{"type":"oneOfType"}},{"name":"optionalArrayOf","propType":{"type":"arrayOf"}},{"name":"optionalObjectOf","propType":{"type":"objectOf"}},{"name":"optionalObjectWithShape","propType":{"type":"shape"}},{"name":"optionalObjectWithShape2","propType":{"type":"shape"}},{"name":"optionalObjectWithStrictShape","propType":{"type":"exact"}},{"name":"requiredFunc","propType":"func"},{"name":"requiredAny","propType":"any"}]} \ No newline at end of file diff --git a/packages/material-parser/test/fixtures/single-exported-component/src/manifest.json b/packages/material-parser/test/fixtures/single-exported-component/src/manifest.json new file mode 100644 index 000000000..4c5c7745a --- /dev/null +++ b/packages/material-parser/test/fixtures/single-exported-component/src/manifest.json @@ -0,0 +1 @@ +{"componentName":"Demo","title":"","docUrl":"","screenshot":"","npm":{"package":"single-exported-component","version":"1.0.0","exportName":"Demo","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"optionalArray","propType":"array"},{"name":"optionalBool","propType":"bool"},{"name":"optionalFunc","propType":"func"},{"name":"optionalNumber","propType":"number"},{"name":"optionalObject","propType":"object"},{"name":"optionalString","propType":"string"},{"name":"optionalSymbol","propType":{"type":"symbol"}},{"name":"optionalNode","propType":"node"},{"name":"optionalElement","propType":"element"},{"name":"optionalElementType","propType":{"type":"elementType"}},{"name":"optionalMessage","propType":{"type":"instanceOf"}},{"name":"optionalEnum","propType":{"type":"oneOf"}},{"name":"optionalUnion","propType":{"type":"oneOfType"}},{"name":"optionalArrayOf","propType":{"type":"arrayOf"}},{"name":"optionalObjectOf","propType":{"type":"objectOf"}},{"name":"optionalObjectWithShape","propType":{"type":"shape"}},{"name":"optionalObjectWithShape2","propType":{"type":"shape"}},{"name":"optionalObjectWithStrictShape","propType":{"type":"exact"}},{"name":"requiredFunc","propType":"func"},{"name":"requiredAny","propType":"any"}]} \ No newline at end of file diff --git a/packages/material-parser/test/generator/Generator.ts b/packages/material-parser/test/generator/Generator.ts index 955e0dfd4..dead5622e 100644 --- a/packages/material-parser/test/generator/Generator.ts +++ b/packages/material-parser/test/generator/Generator.ts @@ -1,7 +1,4 @@ import test from 'ava'; -test.serial('generator', (t) => { - t.pass(); -}) import { ensureFile, writeFile } from 'fs-extra'; import { join } from 'path'; import { IComponentMaterial } from '../../src/otter-core'; @@ -53,7 +50,16 @@ test.serial('generate single exported components', async t => { accesser: 'local', isExportedAsMultiple: false, }; - + // const scanner = new Scanner(options); + // const scanModel = await scanner.scan(); + // const parser = new ReactParser(options); + // const parsedModels: IMaterialParsedModel[] = await parser.parse(scanModel); + // const generator = new Generator(options); + // t.log('parsedModels', JSON.stringify(parsedModels,null,2)); + // const actual: IComponentMaterial = await generator.generate( + // scanModel, + // parsedModels + // ); const actual = await generate(options); t.snapshot(actual); diff --git a/packages/material-parser/test/snapshots/Materialize.ts.md b/packages/material-parser/test/snapshots/Materialize.ts.md deleted file mode 100644 index 5aa747b04..000000000 --- a/packages/material-parser/test/snapshots/Materialize.ts.md +++ /dev/null @@ -1,563 +0,0 @@ -# Snapshot report for `test/Materialize.ts` - -The actual snapshot is saved in `Materialize.ts.snap`. - -Generated by [AVA](https://ava.li). - -## materialize multiple exported component by local - -> Snapshot 1 - - [ - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js', - manifestJS: 'export default {"name":"AIMakeBlank","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"styleFlexLayout","label":"styleFlexLayout","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"},{"name":"id","label":"id","renderer":""}]}}', - manifestObj: { - name: 'AIMakeBlank', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleLayout', - name: 'styleLayout', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBackground', - name: 'styleBackground', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleFlexLayout', - name: 'styleFlexLayout', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - { - defaultValue: undefined, - label: 'id', - name: 'id', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js', - manifestJS: 'export default {"name":"AIMakeIcon","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"className","label":"className","renderer":""},{"name":"iconClassName","label":"iconClassName","renderer":""},{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakeIcon', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'className', - name: 'className', - renderer: '', - }, - { - defaultValue: undefined, - label: 'iconClassName', - name: 'iconClassName', - renderer: '', - }, - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleText', - name: 'styleText', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBackground', - name: 'styleBackground', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js', - manifestJS: 'export default {"name":"AIMakeImage","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakeImage', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js', - manifestJS: 'export default {"name":"AIMakeLink","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakeLink', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleText', - name: 'styleText', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleLayout', - name: 'styleLayout', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBackground', - name: 'styleBackground', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js', - manifestJS: 'export default {"name":"AIMakePlaceholder","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakePlaceholder', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleLayout', - name: 'styleLayout', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js', - manifestJS: 'export default {"name":"AIMakeText","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"type","label":"type","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}', - manifestObj: { - name: 'AIMakeText', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - { - defaultValue: undefined, - label: 'type', - name: 'type', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBoxModel', - name: 'styleBoxModel', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleText', - name: 'styleText', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleLayout', - name: 'styleLayout', - renderer: '', - }, - { - defaultValue: undefined, - label: 'styleBackground', - name: 'styleBackground', - renderer: '', - }, - { - defaultValue: '{}', - label: 'style', - name: 'style', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js', - manifestJS: 'export default {"name":"Root","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"style","label":"style","renderer":"","defaultValue":"{\\n padding: 0,\\n backgroundColor: \'#f0f2f5\',\\n minHeight: \'100%\'\\n}"},{"name":"children","label":"children","renderer":""}]}}', - manifestObj: { - name: 'Root', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: `{␊ - padding: 0,␊ - backgroundColor: '#f0f2f5',␊ - minHeight: '100%'␊ - }`, - label: 'style', - name: 'style', - renderer: '', - }, - { - defaultValue: undefined, - label: 'children', - name: 'children', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - ] - -## materialize multiple exported component by online - -> Snapshot 1 - - [] - -## materialize single exported component by local - -> Snapshot 1 - - [ - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.js', - manifestJS: 'export default {"name":"Demo","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"optionalArray","label":"optionalArray","renderer":""},{"name":"optionalBool","label":"optionalBool","renderer":""},{"name":"optionalFunc","label":"optionalFunc","renderer":""},{"name":"optionalNumber","label":"optionalNumber","renderer":""},{"name":"optionalObject","label":"optionalObject","renderer":""},{"name":"optionalString","label":"optionalString","renderer":""},{"name":"optionalSymbol","label":"optionalSymbol","renderer":""},{"name":"optionalNode","label":"optionalNode","renderer":""},{"name":"optionalElement","label":"optionalElement","renderer":""},{"name":"optionalElementType","label":"optionalElementType","renderer":""},{"name":"optionalMessage","label":"optionalMessage","renderer":""},{"name":"optionalEnum","label":"optionalEnum","renderer":""},{"name":"optionalUnion","label":"optionalUnion","renderer":""},{"name":"optionalArrayOf","label":"optionalArrayOf","renderer":""},{"name":"optionalObjectOf","label":"optionalObjectOf","renderer":""},{"name":"optionalObjectWithShape","label":"optionalObjectWithShape","renderer":""},{"name":"optionalObjectWithShape2","label":"optionalObjectWithShape2","renderer":""},{"name":"optionalObjectWithStrictShape","label":"optionalObjectWithStrictShape","renderer":""},{"name":"requiredFunc","label":"requiredFunc","renderer":""},{"name":"requiredAny","label":"requiredAny","renderer":""}]}}', - manifestObj: { - name: 'Demo', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [ - { - defaultValue: undefined, - label: 'optionalArray', - name: 'optionalArray', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalBool', - name: 'optionalBool', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalFunc', - name: 'optionalFunc', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalNumber', - name: 'optionalNumber', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalObject', - name: 'optionalObject', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalString', - name: 'optionalString', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalSymbol', - name: 'optionalSymbol', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalNode', - name: 'optionalNode', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalElement', - name: 'optionalElement', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalElementType', - name: 'optionalElementType', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalMessage', - name: 'optionalMessage', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalEnum', - name: 'optionalEnum', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalUnion', - name: 'optionalUnion', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalArrayOf', - name: 'optionalArrayOf', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalObjectOf', - name: 'optionalObjectOf', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalObjectWithShape', - name: 'optionalObjectWithShape', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalObjectWithShape2', - name: 'optionalObjectWithShape2', - renderer: '', - }, - { - defaultValue: undefined, - label: 'optionalObjectWithStrictShape', - name: 'optionalObjectWithStrictShape', - renderer: '', - }, - { - defaultValue: undefined, - label: 'requiredFunc', - name: 'requiredFunc', - renderer: '', - }, - { - defaultValue: undefined, - label: 'requiredAny', - name: 'requiredAny', - renderer: '', - }, - ], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - ] - -## materialize single exported component by online - -> Snapshot 1 - - [ - { - manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/f9BkivefjM2f2w6CkepGr/node_modules/@ali/demo-biz-test090702/es/manifest.js', - manifestJS: 'export default {"name":"Demo","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[]}}', - manifestObj: { - name: 'Demo', - settings: { - handles: [ - 'cut', - 'copy', - 'duplicate', - 'delete', - 'paste', - ], - insertionModes: 'tbrl', - props: [], - shouldActive: true, - shouldDrag: true, - type: 'element_inline', - }, - }, - }, - ] diff --git a/packages/material-parser/test/snapshots/Materialize.ts.snap b/packages/material-parser/test/snapshots/Materialize.ts.snap deleted file mode 100644 index 84d4a2e45445fe42b2df8719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h$QS}fRDf9$S78wrUBP1Qvl- zutOW<-v&RX?fN{v%i3_5$2TB?kPJ`^rUD~qjZmD&=eI39{*3qk0L`!!DnMoc09HL( AR{#J2 diff --git a/tsconfig.json b/tsconfig.json index 4719291d5..ef844fdbe 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,8 +9,5 @@ "resolveJsonModule": true, "sourceMap": true }, - "exclude": [ - "**/test", - "**/lib" - ] -} \ No newline at end of file + "exclude": ["**/test", "**/lib"] +} diff --git a/tslint.json b/tslint.json index fbc6b2423..359d1e07e 100644 --- a/tslint.json +++ b/tslint.json @@ -7,5 +7,8 @@ "object-literal-sort-keys": false, "no-var-requires": false, "no-console": false + }, + "linterOptions": { + "exclude": ["test/**/*"] } }