diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ee819b596..998a87e85 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -21,7 +21,7 @@ Hi! I’m really excited that you are interested in contributing to AppWorks. Be Clone repo and initialize the setup environment: ```bash -$ git clone git@github.com:appworks-lab/pack.git +$ git clone git@github.com:appworks-lab/appworks.git $ cd appworks && npm run setup # This will take about 20 minutes # add dep to some package @@ -114,7 +114,7 @@ Get a Personal Access Token: Set Personal Access Token for Github Actions: -1. Visit [Actions secrets](https://github.com/appworks-lab/pack/settings/secrets/actions) +1. Visit [Actions secrets](https://github.com/appworks-lab/appworks/settings/secrets/actions) 2. Update `VSCE_TOKEN`: ![](https://img.alicdn.com/imgextra/i2/O1CN01NpeNCf2558rTm9812_!!6000000007474-2-tps-2880-1754.png_790x10000.jpg) diff --git a/.github/DOCUMENT_SPECIFIC.md b/.github/DOCUMENT_SPECIFIC.md index a1b37fba7..62771f408 100644 --- a/.github/DOCUMENT_SPECIFIC.md +++ b/.github/DOCUMENT_SPECIFIC.md @@ -46,7 +46,7 @@ ## License -[MIT](https://github.com/appworks-lab/pack/blob/master/LICENSE) +[MIT](https://github.com/appworks-lab/appworks/blob/master/LICENSE) ``` - When there is only one function, there is no need for a three-level title diff --git a/.github/O2_SPECIFIC.md b/.github/O2_SPECIFIC.md index ab85e53c6..1ddcca15d 100644 --- a/.github/O2_SPECIFIC.md +++ b/.github/O2_SPECIFIC.md @@ -9,7 +9,7 @@ AppWorks converts VS Code Pack to O2 Pack, this document describes the develop, General O2 pack by following commands: ```bash -$ git clone git@github.com:appworks-lab/pack.git +$ git clone git@github.com:appworks-lab/appworks.git $ cd appworks/ $ npm install # before run this script, modify `pushExtension2Npm` param which is in `./config.ts` to true when publish to tnpm diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27bd1d840..0d12d6b8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: - run: | npm run setup:packages npm run dependency:check + npm run lint npm run test npm run coverage env: @@ -28,3 +29,4 @@ jobs: uses: codecov/codecov-action@v1 with: fail_ci_if_error: true + \ No newline at end of file diff --git a/.stylelintrc.js b/.stylelintrc.js index df89a3f06..2805e3924 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -1,4 +1,3 @@ -const { getESLintConfig } = require('@iceworks/spec'); +const { getStylelintConfig } = require('@iceworks/spec'); -// getESLintConfig(rule: 'rax'|'react'|'vue', customConfig?); -module.exports = getESLintConfig('react'); \ No newline at end of file +module.exports = getStylelintConfig('rax'); diff --git a/README.md b/README.md index ec2106fa8..80a3b4216 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,8 @@ English | [简体中文](./README.zh-CN.md) - - Test Coverage - PRs Welcome + + PRs Welcome GitHub license

@@ -36,7 +35,7 @@ Use AppWorks to develop Universal Application quickly: ## Contributors -Feel free to report any questions as an [issue](https://github.com/appworks-lab/pack/issues/new), we'd love to have your helping hand on AppWorks. +Feel free to report any questions as an [issue](https://github.com/appworks-lab/appworks/issues/new), we'd love to have your helping hand on AppWorks. If you're interested in AppWorks, see [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for more information to learn how to get started. diff --git a/README.zh-CN.md b/README.zh-CN.md index 7c76d5f1a..b1d485dca 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -15,9 +15,9 @@ - + Test Coverage - PRs Welcome + PRs Welcome GitHub license

@@ -34,7 +34,7 @@ ## 参与贡献 -欢迎通过 [issue](https://github.com/appworks-lab/pack/issues/new) 反馈问题。 +欢迎通过 [issue](https://github.com/appworks-lab/appworks/issues/new) 反馈问题。 如果对 `AppWorks` 感兴趣,请参考 [CONTRIBUTING.md](./.github/CONTRIBUTING.md) 学习如何贡献代码。 diff --git a/extensions/application-manager/CHANGELOG.md b/extensions/application-manager/CHANGELOG.md index 20dde7ba0..568b05e88 100644 --- a/extensions/application-manager/CHANGELOG.md +++ b/extensions/application-manager/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.0.4 + +- fix: fail to update the material source + ## 1.0.3 - fix: can not get project info in dashboard when in external diff --git a/extensions/application-manager/README.md b/extensions/application-manager/README.md index 2654b48a7..bea8c8114 100644 --- a/extensions/application-manager/README.md +++ b/extensions/application-manager/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/README.zh-CN.md) # Application Manager @@ -77,7 +77,7 @@ The dashboard shows some status of the current application. If your application 2. Add a customize device or delete devices 3. Select the custom device for debugging -For more information, please see [Reference Document](https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/docs/debug.en.md) +For more information, please see [Reference Document](https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/docs/debug.en.md) ### Node Dependencies diff --git a/extensions/application-manager/README.zh-CN.md b/extensions/application-manager/README.zh-CN.md index 289574e08..149560f6a 100644 --- a/extensions/application-manager/README.zh-CN.md +++ b/extensions/application-manager/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/README.md) # 应用管理器 @@ -79,7 +79,7 @@ 2. 添加或删除设备信息 3. 选择自定义的设备进行调试 -更多请看[参考文档](https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/docs/debug.md) +更多请看[参考文档](https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/docs/debug.md) ### 依赖信息视图 diff --git a/extensions/application-manager/assets/sidebar-logo.png b/extensions/application-manager/assets/sidebar-logo.png index 6b7e2ab64..4411e8d0e 100644 Binary files a/extensions/application-manager/assets/sidebar-logo.png and b/extensions/application-manager/assets/sidebar-logo.png differ diff --git a/extensions/application-manager/package.json b/extensions/application-manager/package.json index 66d338338..93c0811dd 100644 --- a/extensions/application-manager/package.json +++ b/extensions/application-manager/package.json @@ -3,7 +3,7 @@ "displayName": "Application Manager", "description": "Quick view your Universal Application(React/Rax/Vue, etc).", "publisher": "iceworks-team", - "version": "1.0.3", + "version": "1.0.4", "engines": { "vscode": "^1.41.0" }, @@ -329,7 +329,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "scripts": { "vscode:prepublish": "rm -rf build && npm run build:web && npm run build:extension", @@ -368,9 +368,9 @@ "extensionDependencies": [ "iceworks-team.iceworks-project-creator" ], - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/application-manager/src/debugConfig/index.ts b/extensions/application-manager/src/debugConfig/index.ts index 6b1bbab5f..aa2ee9cf9 100644 --- a/extensions/application-manager/src/debugConfig/index.ts +++ b/extensions/application-manager/src/debugConfig/index.ts @@ -19,7 +19,7 @@ export interface IDebugConfig { function writeConfigFile(filePath: string, config: IDebugConfig) { fs.writeFileSync( filePath, - '// See https://github.com/appworks-lab/pack/blob/master/extensions/application-manager/docs/debug.md \n' + + '// See https://github.com/appworks-lab/appworks/blob/master/extensions/application-manager/docs/debug.md \n' + '// for the documentation about the AppWorks debug \n' + `${JSON.stringify(config, null, ' ')}`, ); diff --git a/extensions/application-manager/web/mocks/project/getProjectGitInfo.json b/extensions/application-manager/web/mocks/project/getProjectGitInfo.json index 5202e2a05..0f6ac8d66 100644 --- a/extensions/application-manager/web/mocks/project/getProjectGitInfo.json +++ b/extensions/application-manager/web/mocks/project/getProjectGitInfo.json @@ -1,5 +1,5 @@ { - "repository": "https://github.com/appworks-lab/pack", + "repository": "https://github.com/appworks-lab/appworks", "branch": "feat/test", "isGit": true } diff --git a/extensions/application-manager/web/package.json b/extensions/application-manager/web/package.json index 6024723a6..7a3e351d8 100644 --- a/extensions/application-manager/web/package.json +++ b/extensions/application-manager/web/package.json @@ -41,6 +41,6 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" } } diff --git a/extensions/application-manager/web/src/pages/Welcome/components/Information/index.tsx b/extensions/application-manager/web/src/pages/Welcome/components/Information/index.tsx index 35ee47e52..9542a1b22 100644 --- a/extensions/application-manager/web/src/pages/Welcome/components/Information/index.tsx +++ b/extensions/application-manager/web/src/pages/Welcome/components/Information/index.tsx @@ -29,7 +29,7 @@ const Information = () => { title: intl.formatMessage({ id: 'web.applicationManager.Welcome.Information.updates.title' }), description: intl.formatMessage({ id: 'web.applicationManager.Welcome.Information.updates.desc' }), linkName: intl.formatMessage({ id: 'web.applicationManager.Welcome.Information.updates.link' }), - link: 'https://github.com/appworks-lab/pack/releases', + link: 'https://github.com/appworks-lab/appworks/releases', }, ]; diff --git a/extensions/application-manager/web/tsconfig.json b/extensions/application-manager/web/tsconfig.json index a83b4ad1a..ff499eeae 100644 --- a/extensions/application-manager/web/tsconfig.json +++ b/extensions/application-manager/web/tsconfig.json @@ -11,6 +11,6 @@ }, "resolveJsonModule": true }, - "include": ["src/*", ".ice"], + "include": ["src", ".ice"], "exclude": ["node_modules", "public"] } diff --git a/extensions/appworks/CHANGELOG.md b/extensions/appworks/CHANGELOG.md index c9ed9fd5e..8014a83dc 100644 --- a/extensions/appworks/CHANGELOG.md +++ b/extensions/appworks/CHANGELOG.md @@ -1,44 +1,48 @@ # Change Log -## [1.3.1] +## [1.3.1](https://github.com/appworks-lab/appworks/releases/tag/v1.3.1) +- feat: update doctor codemod report [#920](https://github.com/appworks-lab/appworks/pull/920) +- feat: update official materials [#922](https://github.com/appworks-lab/appworks/pull/922) +- fix: fail to update material source [#921](https://github.com/appworks-lab/appworks/pull/921) - fix: remove stylelint extension that causes some bugs in vscode -## [1.3.0](https://github.com/appworks-lab/pack/releases/tag/v1.3.0) -- feat: add jsx files propTypes auto complete [#902](https://github.com/appworks-lab/pack/pull/902) -- feat: add code snippets [#903](https://github.com/appworks-lab/pack/pull/903) -- feat: auto fill content in store's files when create [#908](https://github.com/appworks-lab/pack/pull/908) -- feat: add auto complete when import modules [#905](https://github.com/appworks-lab/pack/pull/905) -- fix: dashboard show 404 and 500 error [#911](https://github.com/appworks-lab/pack/pull/911) -- fix: eslint config `overrides` not work [#901](https://github.com/appworks-lab/pack/pull/901) +## [1.3.0](https://github.com/appworks-lab/appworks/releases/tag/v1.3.0) -## [1.2.1](https://github.com/appworks-lab/pack/releases/tag/v1.2.1) +- feat: add jsx files propTypes auto complete [#902](https://github.com/appworks-lab/appworks/pull/902) +- feat: add code snippets [#903](https://github.com/appworks-lab/appworks/pull/903) +- feat: auto fill content in store's files when create [#908](https://github.com/appworks-lab/appworks/pull/908) +- feat: add auto complete when import modules [#905](https://github.com/appworks-lab/appworks/pull/905) +- fix: dashboard show 404 and 500 error [#911](https://github.com/appworks-lab/appworks/pull/911) +- fix: eslint config `overrides` not work [#901](https://github.com/appworks-lab/appworks/pull/901) -- feat: support double click to select scaffold [#895](https://github.com/appworks-lab/pack/pull/895) -- feat: loading status when reinstalling deps [#896](https://github.com/appworks-lab/pack/pull/896) -- fix: build error in macos platform [#891](https://github.com/appworks-lab/pack/pull/891) -- fix: empty project wrong CodeMod notice [#894](https://github.com/appworks-lab/pack/pull/894) +## [1.2.1](https://github.com/appworks-lab/appworks/releases/tag/v1.2.1) -## [1.2.0](https://github.com/appworks-lab/pack/releases/tag/v1.2.0) +- feat: support double click to select scaffold [#895](https://github.com/appworks-lab/appworks/pull/895) +- feat: loading status when reinstalling deps [#896](https://github.com/appworks-lab/appworks/pull/896) +- fix: build error in macos platform [#891](https://github.com/appworks-lab/appworks/pull/891) +- fix: empty project wrong CodeMod notice [#894](https://github.com/appworks-lab/appworks/pull/894) -- feat: remove Auto Complete Tag Feat remove Auto Complete Tag [#878](https://github.com/appworks-lab/pack/pull/878) -- feat: add time master configuration enableDataAnalysisServices Feat add time master configuration [#871](https://github.com/appworks-lab/pack/pull/871) -- feat: update vscodeignore Feat update vscodeignore [#883](https://github.com/appworks-lab/pack/pull/883) -- feat: add codemod check to doctor package Feat add codemod check to doctor package [#870](https://github.com/appworks-lab/pack/pull/870) -- feat: doctor extension add codemod Feat doctor extension add codemod [#873](https://github.com/appworks-lab/pack/pull/873) -- fix: auto-complete-tag confused typescript coding [#877](https://github.com/appworks-lab/pack/issues/877) -- fix: command Find Components In Current File not working Fix command Find Components In Current File not working [#876](https://github.com/appworks-lab/pack/pull/876) -- fix: component docs link fix: component link [#884](https://github.com/appworks-lab/pack/pull/884) +## [1.2.0](https://github.com/appworks-lab/appworks/releases/tag/v1.2.0) + +- feat: remove Auto Complete Tag Feat remove Auto Complete Tag [#878](https://github.com/appworks-lab/appworks/pull/878) +- feat: add time master configuration enableDataAnalysisServices Feat add time master configuration [#871](https://github.com/appworks-lab/appworks/pull/871) +- feat: update vscodeignore Feat update vscodeignore [#883](https://github.com/appworks-lab/appworks/pull/883) +- feat: add codemod check to doctor package Feat add codemod check to doctor package [#870](https://github.com/appworks-lab/appworks/pull/870) +- feat: doctor extension add codemod Feat doctor extension add codemod [#873](https://github.com/appworks-lab/appworks/pull/873) +- fix: auto-complete-tag confused typescript coding [#877](https://github.com/appworks-lab/appworks/issues/877) +- fix: command Find Components In Current File not working Fix command Find Components In Current File not working [#876](https://github.com/appworks-lab/appworks/pull/876) +- fix: component docs link fix: component link [#884](https://github.com/appworks-lab/appworks/pull/884) ## 1.1.0 -- feat: hint user install types/rax [#854](https://github.com/appworks-lab/pack/pull/854) -- fix: rax-spa project targets null [#862](https://github.com/appworks-lab/pack/pull/862) -- Chore: update webview icon [#856](https://github.com/appworks-lab/pack/pull/856) [#846](https://github.com/appworks-lab/pack/pull/846) -- feat: add recommend extensions [#837](https://github.com/appworks-lab/pack/pull/837) -- fix: only exit process when prepublishOnly [#836](https://github.com/appworks-lab/pack/pull/836) -- fix: make sure that the start & end fields exist [#838](https://github.com/appworks-lab/pack/pull/838) +- feat: hint user install types/rax [#854](https://github.com/appworks-lab/appworks/pull/854) +- fix: rax-spa project targets null [#862](https://github.com/appworks-lab/appworks/pull/862) +- Chore: update webview icon [#856](https://github.com/appworks-lab/appworks/pull/856) [#846](https://github.com/appworks-lab/appworks/pull/846) +- feat: add recommend extensions [#837](https://github.com/appworks-lab/appworks/pull/837) +- fix: only exit process when prepublishOnly [#836](https://github.com/appworks-lab/appworks/pull/836) +- fix: make sure that the start & end fields exist [#838](https://github.com/appworks-lab/appworks/pull/838) - fix: vsce [#576](https://github.com/microsoft/vscode-vsce/issues/576) .vscodeignore configuration ## 1.0.3 @@ -47,7 +51,7 @@ ## 1.0.2 -- Fix [#848](https://github.com/appworks-lab/pack/issues/848), remove [Chinese (Simplified) Language Pack for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=MS-CEINTL.vscode-language-pack-zh-hans). +- Fix [#848](https://github.com/appworks-lab/appworks/issues/848), remove [Chinese (Simplified) Language Pack for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=MS-CEINTL.vscode-language-pack-zh-hans). ## 1.0.1 diff --git a/extensions/appworks/README.md b/extensions/appworks/README.md index 1d903a8f0..551a4f016 100644 --- a/extensions/appworks/README.md +++ b/extensions/appworks/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/iceworks/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/iceworks/README.zh-CN.md) # AppWorks @@ -6,7 +6,7 @@ English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extens [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) [![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) [![Rating](https://vsmarketplacebadge.apphb.com/rating-star/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks&ssr=false#review-details) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/appworks-lab/pack/pulls) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/appworks-lab/appworks/pulls) [![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT) AppWorks is a Application Development Pack, provide visualization and intelligent technology to build Universal Application faster and better, support Web / H5 / MiniProgram Application. @@ -82,4 +82,4 @@ AppWorks Pack extension installs these recommend extensions: ## Help -Open an [issue](https://github.com/appworks-lab/pack/issues/new), We will respond quickly to the submitted issues. +Open an [issue](https://github.com/appworks-lab/appworks/issues/new), We will respond quickly to the submitted issues. diff --git a/extensions/appworks/README.zh-CN.md b/extensions/appworks/README.zh-CN.md index c03a162c2..3243adda0 100644 --- a/extensions/appworks/README.zh-CN.md +++ b/extensions/appworks/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/iceworks/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/iceworks/README.md) # AppWorks @@ -6,7 +6,7 @@ [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) [![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) [![Rating](https://vsmarketplacebadge.apphb.com/rating-star/iceworks-team.iceworks.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks&ssr=false#review-details) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/appworks-lab/pack/pulls) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/appworks-lab/appworks/pulls) [![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT) 前端研发套件,通过可视化编程和编码辅助手段,更快更好地构建多端应用,支持 Web 、HTML 5 和小程序应用。 @@ -82,4 +82,4 @@ AppWorks 套件内包含以下推荐的三方插件: ## 获取帮助 -向 AppWorks 的 Github 仓库提交 [issue](https://github.com/appworks-lab/pack/issues/new) ,我们会快速响应所提交的问题。 +向 AppWorks 的 Github 仓库提交 [issue](https://github.com/appworks-lab/appworks/issues/new) ,我们会快速响应所提交的问题。 diff --git a/extensions/appworks/package.json b/extensions/appworks/package.json index 7febc6322..a239577fd 100644 --- a/extensions/appworks/package.json +++ b/extensions/appworks/package.json @@ -29,7 +29,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "icon": "public/logo.png", "extensionPack": [ @@ -51,9 +51,9 @@ "msjsdiag.debugger-for-chrome", "alefragnani.Bookmarks" ], - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/appworks/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/appworks/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/codemod/README.md b/extensions/codemod/README.md index fbaf09038..232f77911 100644 --- a/extensions/codemod/README.md +++ b/extensions/codemod/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/codemod/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/codemod/README.zh-CN.md) # CodeMod diff --git a/extensions/codemod/README.zh-CN.md b/extensions/codemod/README.zh-CN.md index 35c45c0f5..d964b5ece 100644 --- a/extensions/codemod/README.zh-CN.md +++ b/extensions/codemod/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/codemod/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/codemod/README.md) # 代码更新插件 diff --git a/extensions/codemod/package.json b/extensions/codemod/package.json index 92f71c2e0..fc0b6e7d4 100644 --- a/extensions/codemod/package.json +++ b/extensions/codemod/package.json @@ -29,7 +29,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "main": "./build/extension.js", "scripts": { @@ -63,9 +63,9 @@ "lodash.clonedeep": "^4.5.0", "lodash.flatten": "^4.4.0" }, - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/codemod/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/codemod/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/codemod/web/tsconfig.json b/extensions/codemod/web/tsconfig.json index a83b4ad1a..ff499eeae 100644 --- a/extensions/codemod/web/tsconfig.json +++ b/extensions/codemod/web/tsconfig.json @@ -11,6 +11,6 @@ }, "resolveJsonModule": true }, - "include": ["src/*", ".ice"], + "include": ["src", ".ice"], "exclude": ["node_modules", "public"] } diff --git a/extensions/doctor/CHANGELOG.md b/extensions/doctor/CHANGELOG.md index f8c55ef6f..44dcabe17 100644 --- a/extensions/doctor/CHANGELOG.md +++ b/extensions/doctor/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log +# 1.1.3 +- feat: update @appworks/codemod +- feat: update codemod check result list ## 1.1.2 - feat: update @appworks/doctor to support custom config set extends and plugins. @@ -65,7 +68,7 @@ Release 1.0.0 ## 0.1.6 -- fix: [#604](https://github.com/appworks-lab/pack/issues/604) +- fix: [#604](https://github.com/appworks-lab/appworks/issues/604) ## 0.1.5 diff --git a/extensions/doctor/README.md b/extensions/doctor/README.md index dd6ecf690..52afb228e 100644 --- a/extensions/doctor/README.md +++ b/extensions/doctor/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/doctor/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/doctor/README.zh-CN.md) # Doctor diff --git a/extensions/doctor/README.zh-CN.md b/extensions/doctor/README.zh-CN.md index 09cf8021c..7b5a54d67 100644 --- a/extensions/doctor/README.zh-CN.md +++ b/extensions/doctor/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/doctor/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/doctor/README.md) # Doctor diff --git a/extensions/doctor/package.json b/extensions/doctor/package.json index 541df17f7..64f6ed496 100644 --- a/extensions/doctor/package.json +++ b/extensions/doctor/package.json @@ -3,7 +3,7 @@ "displayName": "Doctor", "description": "A free security and quality audit tool for modern DevOps teams", "publisher": "iceworks-team", - "version": "1.1.2", + "version": "1.1.3", "engines": { "vscode": "^1.41.0" }, @@ -30,11 +30,11 @@ "main": "./build/extension.js", "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/doctor/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/doctor/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" }, "scripts": { diff --git a/extensions/doctor/src/codemod.ts b/extensions/doctor/src/codemod.ts index 8b97572d3..a09e54e18 100644 --- a/extensions/doctor/src/codemod.ts +++ b/extensions/doctor/src/codemod.ts @@ -17,10 +17,7 @@ const SCAN_OPTIONS = { }; export async function runCodemod(transform: string) { - const result = await doctor.scan( - projectPath, - Object.assign({ transforms: [transform] }, SCAN_OPTIONS), - ); + const result = await doctor.scan(projectPath, Object.assign({ transforms: [transform] }, SCAN_OPTIONS)); setOutput(result.codemod?.reports[0].output || ''); return result; } @@ -31,53 +28,63 @@ export async function activateCodemod(context: vscode.ExtensionContext) { const deprecatedPackageConfig = {}; - const reports = await doctor.scan(projectPath, SCAN_OPTIONS); const packageFile = path.join(projectPath, 'package.json'); const packageJSON = fs.existsSync(packageFile) ? JSON.parse(fs.readFileSync(packageFile, 'utf-8')) : {}; // Show notifaction - if (projectPath) { + if (fs.existsSync(packageFile) && projectPath) { + const reports = await doctor.scan(projectPath, SCAN_OPTIONS); (reports.codemod?.reports || []).forEach((codemod) => { - const action = 'Run a Codemod'; + if (codemod.severity > 0) { + const action = 'Run a Codemod'; - if (codemod.npm_deprecate) { - const { name, version } = parse(codemod.npm_deprecate); - const dependence = (packageJSON.dependencies || {})[name] || (packageJSON.devDependencies || {})[name]; + if (codemod.npm_deprecate) { + const { name, version } = parse(codemod.npm_deprecate); + const dependence = (packageJSON.dependencies || {})[name] || (packageJSON.devDependencies || {})[name]; - if (dependence && semver.satisfies(semver.coerce(dependence), version || '*')) { - deprecatedPackageConfig[name] = { - ...codemod, - name, - version, - }; + if (dependence && semver.satisfies(semver.coerce(dependence), version || '*')) { + deprecatedPackageConfig[name] = { + ...codemod, + name, + version, + }; + } } - } - const message = - `${isEn ? codemod.title_en : codemod.title}: ` + - `${isEn ? codemod.message_en : codemod.message} ` + - `( [${isEn ? 'docs' : '文档'}](${codemod.docs}) )`; - const showMessage = codemod.severity === 2 ? window.showErrorMessage : window.showWarningMessage; + const message = + `${isEn ? codemod.title_en : codemod.title}: ` + + `${isEn ? codemod.message_en : codemod.message} ` + + `( [${isEn ? 'docs' : '文档'}](${codemod.docs}) )`; + const showMessage = codemod.severity === 2 ? window.showErrorMessage : window.showWarningMessage; - showMessage(message, action).then(async (item) => { - // Run codemod - if (item === action) { - const result = await runCodemod(codemod.transform); + showMessage(message, action).then(async (item) => { + // Run codemod + if (item === action) { + const result = await runCodemod(codemod.transform); - // Remove fixed deprecated package - if (result.codemod?.reports[0].npm_deprecate) { - delete deprecatedPackageConfig[result.codemod?.reports[0].npm_deprecate]; + // Remove fixed deprecated package + if (result.codemod?.reports[0].npm_deprecate) { + delete deprecatedPackageConfig[result.codemod?.reports[0].npm_deprecate]; + } } - } - }); + }); + } }); } // Show deprecate package setDeprecatedPackage(deprecatedPackageConfig); - vscode.window.onDidChangeActiveTextEditor(() => { - setDeprecatedPackage(deprecatedPackageConfig); - }, null, context.subscriptions); - vscode.workspace.onDidChangeTextDocument(() => { - setDeprecatedPackage(deprecatedPackageConfig); - }, null, context.subscriptions); + vscode.window.onDidChangeActiveTextEditor( + () => { + setDeprecatedPackage(deprecatedPackageConfig); + }, + null, + context.subscriptions, + ); + vscode.workspace.onDidChangeTextDocument( + () => { + setDeprecatedPackage(deprecatedPackageConfig); + }, + null, + context.subscriptions, + ); } diff --git a/extensions/doctor/web/mocks/action/getScanReport.ts b/extensions/doctor/web/mocks/action/getScanReport.ts index 6060c1cbd..ed2430f87 100644 --- a/extensions/doctor/web/mocks/action/getScanReport.ts +++ b/extensions/doctor/web/mocks/action/getScanReport.ts @@ -451,6 +451,34 @@ export default { codemod: { score: 98, reports: [ + { + title: '遵循阿里巴巴前端规范,并接入 @iceworks/spec 的最佳实践', + title_en: 'Follow Alibaba FED lint rules, and use @iceworks/spec best practices', + message: '遵循阿里巴巴前端规范,并更新 rax, ice 和 react 项目中的 eslint / stylelint / prettier 配置。', + message_en: 'Follow Alibaba FED lint rules, and update eslint / stylelint / prettier in rax, ice and react project.', + severity: 0, + npm_deprecate: '@ice/spec', + transform: 'lint-config-to-spec', + docs: 'https://github.com/appworks-lab/codemod/tree/master/transforms/docs/lint-config-to-spec.md', + mode: 'check', + output: 'Processing 211 files... \n' + + 'Spawning 7 workers...\n' + + 'Running in dry mode, no files will be written! \n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 31 files to free worker...\n' + + 'Sending 25 files to free worker...\n' + + 'All done. \n' + + 'Results: \n' + + '0 errors\n' + + '0 unmodified\n' + + '194 skipped\n' + + '17 ok\n' + + 'Time elapsed: 3.707seconds \n' + }, { title: 'Rax 组件工程升级', title_en: 'Rax component project upgrade', diff --git a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.module.scss b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.module.scss index b55e9d08d..ff52c28a3 100644 --- a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.module.scss +++ b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.module.scss @@ -15,6 +15,10 @@ } .title { + .icon { + margin-right: 6px; + } + font-size: 16px; font-weight: bold; } diff --git a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.tsx b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.tsx index 6946a19d6..c4620c2d9 100644 --- a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.tsx +++ b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/CodemodReport/index.tsx @@ -1,5 +1,6 @@ import React, { useState } from 'react'; import { Element } from 'react-scroll'; +import { Icon } from '@alifd/next'; import { getReportKey } from '@/config'; import callService from '@/callService'; import Appreciate from '../Appreciate'; @@ -54,7 +55,17 @@ const CodemodReport = (props) => { {(data.reports || []).map((codemod, index) => { return (
-

{window.USE_EN ? codemod.title_en : codemod.title}

+

+ {codemod.severity > 0 ? ( + + ) : null} + {window.USE_EN ? codemod.title_en : codemod.title} +

{window.USE_EN ? codemod.message_en : codemod.message} {window.USE_EN ? ' [docs] ' : '【文档】'} @@ -78,7 +89,8 @@ const CodemodReport = (props) => { ); })}

- )} + ) + } ); }; diff --git a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/ScanFailedWrap/index.tsx b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/ScanFailedWrap/index.tsx index 5839c7e8d..b34e45432 100644 --- a/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/ScanFailedWrap/index.tsx +++ b/extensions/doctor/web/src/pages/Dashboard/components/ScanCard/components/ScanFailedWrap/index.tsx @@ -7,8 +7,8 @@ const ScanFailedWrap = () => {
{window.USE_EN ? 'Scan Failed, open ' : '扫描失败,请至 '} - - https://github.com/appworks-lab/pack/issues + + https://github.com/appworks-lab/appworks/issues {window.USE_EN ? ' report your problem' : ' 反馈'} diff --git a/extensions/material-helper/CHANGELOG.md b/extensions/material-helper/CHANGELOG.md index 44a32cfc2..ea00f1496 100644 --- a/extensions/material-helper/CHANGELOG.md +++ b/extensions/material-helper/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.0.8 + +- fix: update code snippets, the snippet - mtop.[request | config] => mtop[Request | Config] + ## 1.0.7 - feat: add import auxiliary @@ -176,7 +180,7 @@ ## 0.1.4 -Fix React component completion items, See: https://github.com/appworks-lab/pack/issues/233 +Fix React component completion items, See: https://github.com/appworks-lab/appworks/issues/233 ## 0.1.3 diff --git a/extensions/material-helper/README.md b/extensions/material-helper/README.md index e94cc1126..dec0b48d0 100644 --- a/extensions/material-helper/README.md +++ b/extensions/material-helper/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/material-helper/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/material-helper/README.zh-CN.md) # Component Helper diff --git a/extensions/material-helper/README.zh-CN.md b/extensions/material-helper/README.zh-CN.md index f40c8f72b..8f12e83c2 100644 --- a/extensions/material-helper/README.zh-CN.md +++ b/extensions/material-helper/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/material-helper/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/material-helper/README.md) # 前端组件开发辅助插件 diff --git a/extensions/material-helper/package.json b/extensions/material-helper/package.json index ff275a922..5d59faa39 100644 --- a/extensions/material-helper/package.json +++ b/extensions/material-helper/package.json @@ -3,7 +3,7 @@ "displayName": "Component Helper", "description": "Easily use Component in React/Vue/Rax.", "publisher": "iceworks-team", - "version": "1.0.7", + "version": "1.0.8", "main": "./build/extension.js", "engines": { "vscode": "^1.41.0" @@ -392,11 +392,11 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/material-helper/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/material-helper/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/material-helper/src/componentDocSupport/getHoverItem.ts b/extensions/material-helper/src/componentDocSupport/getHoverItem.ts index 9a11f2f8e..8dd545d8a 100644 --- a/extensions/material-helper/src/componentDocSupport/getHoverItem.ts +++ b/extensions/material-helper/src/componentDocSupport/getHoverItem.ts @@ -5,7 +5,7 @@ import i18n from '../i18n'; export default function getHoverItem(tagName: string, source: string) { const docInfos = getDocInfos(); const tagInfo = docInfos.find((info) => { - return info.label === tagName && info.source.npm === source + return info.label === tagName && info.source.npm === source; }); if (tagInfo) { const docsLink = new vscode.MarkdownString( diff --git a/extensions/material-helper/src/extension.ts b/extensions/material-helper/src/extension.ts index 03ecac3bd..dd88215e8 100644 --- a/extensions/material-helper/src/extension.ts +++ b/extensions/material-helper/src/extension.ts @@ -129,7 +129,7 @@ export function activate(context: vscode.ExtensionContext) { createPagesTreeView(context); importAutoComplete(); - // help user complete React Component's propTypes; + // help user complete React Component's propTypes; propTypesAutoComplete(); } diff --git a/extensions/material-helper/src/propsAutoComplete/getPropKeysFromCode.ts b/extensions/material-helper/src/propsAutoComplete/getPropKeysFromCode.ts index 00c9bf8c0..3752e6af3 100644 --- a/extensions/material-helper/src/propsAutoComplete/getPropKeysFromCode.ts +++ b/extensions/material-helper/src/propsAutoComplete/getPropKeysFromCode.ts @@ -21,7 +21,7 @@ export default function getPropKeysFromCode(componentPath: string): string[] { } catch (error) { // ignore } - console.log(propKeys) + console.log(propKeys); return propKeys; } diff --git a/extensions/material-helper/web/package.json b/extensions/material-helper/web/package.json index 88e11ff12..23808eef8 100644 --- a/extensions/material-helper/web/package.json +++ b/extensions/material-helper/web/package.json @@ -38,6 +38,6 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" } } diff --git a/extensions/material-helper/web/tsconfig.json b/extensions/material-helper/web/tsconfig.json index a83b4ad1a..ff499eeae 100644 --- a/extensions/material-helper/web/tsconfig.json +++ b/extensions/material-helper/web/tsconfig.json @@ -11,6 +11,6 @@ }, "resolveJsonModule": true }, - "include": ["src/*", ".ice"], + "include": ["src", ".ice"], "exclude": ["node_modules", "public"] } diff --git a/extensions/project-creator/CHANGELOG.md b/extensions/project-creator/CHANGELOG.md index f37294607..25d69c864 100644 --- a/extensions/project-creator/CHANGELOG.md +++ b/extensions/project-creator/CHANGELOG.md @@ -1,13 +1,18 @@ # Changelog +## 1.0.4 + +- feat: update official materials +- feat: display ts or js icon which depends on the projectType in material source data + ## 1.0.3 -- feat: support double click to select scaffold. [#872](https://github.com/appworks-lab/pack/issues/872) +- feat: support double click to select scaffold. [#872](https://github.com/appworks-lab/appworks/issues/872) - fix: service api(setUserInfo) not found ## 1.0.2 -- fix: rax-spa project targets null problem. [#861](https://github.com/appworks-lab/pack/issues/861) +- fix: rax-spa project targets null problem. [#861](https://github.com/appworks-lab/appworks/issues/861) - fix .vscodeignore configuration [#576](https://github.com/microsoft/vscode-vsce/issues/576) ## 1.0.1 diff --git a/extensions/project-creator/README.md b/extensions/project-creator/README.md index f13904067..e29977c00 100644 --- a/extensions/project-creator/README.md +++ b/extensions/project-creator/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/project-creator/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/project-creator/README.zh-CN.md) # Application Creator diff --git a/extensions/project-creator/README.zh-CN.md b/extensions/project-creator/README.zh-CN.md index ddcf033b6..063d9dc1f 100644 --- a/extensions/project-creator/README.zh-CN.md +++ b/extensions/project-creator/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/project-creator/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/project-creator/README.md) # 应用创建器 diff --git a/extensions/project-creator/package.json b/extensions/project-creator/package.json index 8c10e0d44..a5c92413d 100644 --- a/extensions/project-creator/package.json +++ b/extensions/project-creator/package.json @@ -3,7 +3,7 @@ "displayName": "Application Creator", "description": "Quick create a Universal Application(React/Rax/Vue, etc).", "publisher": "iceworks-team", - "version": "1.0.3", + "version": "1.0.4", "engines": { "vscode": "^1.41.0" }, @@ -53,7 +53,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "scripts": { "vscode:prepublish": "rm -rf build && npm run build:web && npm run build:extension", @@ -83,9 +83,9 @@ "@appworks/connector": "^0.1.0", "js-base64": "^3.6.0" }, - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/project-creator/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/project-creator/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/project-creator/web/package.json b/extensions/project-creator/web/package.json index e2f0a144f..f56125d18 100644 --- a/extensions/project-creator/web/package.json +++ b/extensions/project-creator/web/package.json @@ -39,6 +39,6 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" } } diff --git a/extensions/project-creator/web/src/components/ScaffoldCard/index.module.scss b/extensions/project-creator/web/src/components/PCScaffoldCard/index.module.scss similarity index 100% rename from extensions/project-creator/web/src/components/ScaffoldCard/index.module.scss rename to extensions/project-creator/web/src/components/PCScaffoldCard/index.module.scss diff --git a/extensions/project-creator/web/src/components/ScaffoldCard/index.tsx b/extensions/project-creator/web/src/components/PCScaffoldCard/index.tsx similarity index 86% rename from extensions/project-creator/web/src/components/ScaffoldCard/index.tsx rename to extensions/project-creator/web/src/components/PCScaffoldCard/index.tsx index f749e479d..4e5dced60 100644 --- a/extensions/project-creator/web/src/components/ScaffoldCard/index.tsx +++ b/extensions/project-creator/web/src/components/PCScaffoldCard/index.tsx @@ -13,7 +13,7 @@ interface IScaffoldCardProps { onDoubleClick?: (event: React.MouseEvent) => void; } -const ScaffoldCard: React.FC = ({ title, content, selected, onClick, media, onDoubleClick = () => {} }) => { +const PCScaffoldCard: React.FC = ({ title, content, selected, onClick, media, onDoubleClick = () => {} }) => { return (
= ({ title, content, selected, ); }; -export default ScaffoldCard; +export default PCScaffoldCard; diff --git a/extensions/project-creator/web/src/pages/CreateProject/components/ScaffoldMarket/index.module.scss b/extensions/project-creator/web/src/pages/CreateProject/components/ScaffoldMarket/index.module.scss index 5907a28bf..d2987a77d 100644 --- a/extensions/project-creator/web/src/pages/CreateProject/components/ScaffoldMarket/index.module.scss +++ b/extensions/project-creator/web/src/pages/CreateProject/components/ScaffoldMarket/index.module.scss @@ -52,24 +52,6 @@ justify-content: flex-start; flex-wrap: wrap; } - - .collapse { - width: 100%; - border: none; - :global { - .next-collapse-panel-expanded > .next-collapse-panel-content { - padding: 12px 0; - } - .next-collapse-panel-title:hover { - background: $color-brand1-1; - } - } - .collapseScaffolds { - display: flex; - justify-content: flex-start; - flex-wrap: wrap; - } - } } } diff --git a/extensions/project-creator/web/src/pages/CreateProject/components/ScaffoldMarket/index.tsx b/extensions/project-creator/web/src/pages/CreateProject/components/ScaffoldMarket/index.tsx index 083f34921..f348bdf26 100644 --- a/extensions/project-creator/web/src/pages/CreateProject/components/ScaffoldMarket/index.tsx +++ b/extensions/project-creator/web/src/pages/CreateProject/components/ScaffoldMarket/index.tsx @@ -1,17 +1,15 @@ -/* eslint-disable */ import React, { useState, useEffect } from 'react'; -import { Collapse, Notification, Loading, Button, Icon, Divider } from '@alifd/next'; +import { Notification, Loading, Button, Icon, Divider } from '@alifd/next'; import MaterialSourceCard from '@/components/MaterialSourceCard'; import MobileScaffoldCard from '@/components/MobileScaffoldCard'; -import ScaffoldCard from '@/components/ScaffoldCard'; +import PCScaffoldCard from '@/components/PCScaffoldCard'; import AddScaffoldCard from '@/components/AddScaffoldCard'; import NotFound from '@/components/NotFound'; import PegasusCard from '@/components/PegasusCard'; import PegasusScaffoldContent from '@/components/PegasusScaffoldContent'; import callService from '@/callService'; import { IMaterialSource, IMaterialScaffold } from '@appworks/material-utils'; -import { mainScaffoldsList, scaffoldsBlackList, tsScaffoldsList, jsScaffoldsList } from '../../constants'; -import { IScaffoldMarket } from '@/types'; +import { scaffoldsBlackList } from '../../constants'; import styles from './index.module.scss'; import { useIntl } from 'react-intl'; @@ -32,8 +30,7 @@ const ScaffoldMarket = ({ }) => { const intl = useIntl(); const [selectedSource, setSelectedSource] = useState({}); - const [mainScaffolds, setMainScaffolds] = useState([]); - const [otherScaffolds, setOtherScaffolds] = useState([]); + const [scaffolds, setScaffolds] = useState([]); const [loading, setLoading] = useState(false); const [pegasusCardSelected, setPegasusCardSelected] = useState(false); @@ -43,11 +40,9 @@ const ScaffoldMarket = ({ setLoading(true); setSelectedSource(scaffold); const data = await getScaffolds(scaffold.source); - const { mainScaffolds, otherScaffolds } = data as any; - setMainScaffolds(mainScaffolds); - setOtherScaffolds(otherScaffolds); + setScaffolds(data); } catch (err) { - console.log(err); + console.error(err); } finally { setLoading(false); } @@ -62,33 +57,16 @@ const ScaffoldMarket = ({ onScaffoldSelect(selectedSource, scaffold); } - async function getScaffolds(source: string): Promise { + async function getScaffolds(source: string): Promise { try { - const scaffolds = (await callService('scaffold', 'getAll', source)) as IMaterialScaffold[]; - let main = scaffolds.filter((scaffold) => { - const isMainScaffold = mainScaffoldsList.includes(scaffold.source.npm); - let isInScaffoldBlackList = false; - if (isAliInternal) { - isInScaffoldBlackList = scaffoldsBlackList.includes(scaffold.source.npm) - } - return isMainScaffold && !isInScaffoldBlackList; - }); - let other = scaffolds.filter((scaffold) => { - const isOtherScaffold = !mainScaffoldsList.includes(scaffold.source.npm); - let isInScaffoldBlackList = false; - if (isAliInternal) { - isInScaffoldBlackList = scaffoldsBlackList.includes(scaffold.source.npm) - } - return isOtherScaffold && !isInScaffoldBlackList; - }); - if (!main.length && other.length) { - main = other; - other = []; + const allScaffolds = (await callService('scaffold', 'getAll', source)) as IMaterialScaffold[]; + if (isAliInternal) { + return allScaffolds.filter((scaffold: IMaterialScaffold) => !scaffoldsBlackList.includes(scaffold.source.npm)); } - return { mainScaffolds: main, otherScaffolds: other }; + return allScaffolds; } catch (e) { Notification.error({ content: e.message }); - return { mainScaffolds: [], otherScaffolds: [] }; + return []; } } @@ -98,17 +76,15 @@ const ScaffoldMarket = ({ if (!materialSources.length) { return; } - const selectedSource = curProjectField.source ? curProjectField.source : materialSources[0]; - setSelectedSource(selectedSource); - const source = selectedSource.source; + const curSelectedSource = curProjectField.source ? curProjectField.source : materialSources[0]; + setSelectedSource(curSelectedSource); + const { source } = curSelectedSource; - const data = await getScaffolds(source); - const { mainScaffolds, otherScaffolds } = data as IScaffoldMarket; - setMainScaffolds(mainScaffolds); - setOtherScaffolds(otherScaffolds); - if (mainScaffolds.length > 0) { - const selectedScaffold = curProjectField.scaffold ? curProjectField.scaffold : mainScaffolds[0]; - onScaffoldSelect(selectedSource, selectedScaffold); + const allScaffolds = await getScaffolds(source); + setScaffolds(allScaffolds); + if (allScaffolds.length > 0) { + const selectedScaffold = curProjectField.scaffold ? curProjectField.scaffold : allScaffolds[0]; + onScaffoldSelect(curSelectedSource, selectedScaffold); } } catch (error) { Notification.error({ content: error.message }); @@ -125,37 +101,96 @@ const ScaffoldMarket = ({ } } + const SourceCard = ({ materialSource }: { materialSource: IMaterialSource }) => { + let iconName = 'app'; + const projectType = materialSource.type.toLocaleLowerCase(); + if (materialSource.client) { + iconName = materialSource.client.toLocaleLowerCase(); + } else if (projectTypes.includes(projectType)) { + iconName = projectType; + } + return ( + + {projectType} +
{materialSource.name}
+
+ } + selected={selectedSource.name && selectedSource.name === materialSource.name} + onClick={() => onMaterialSourceClick(materialSource)} + /> + ); + }; + + const ScaffoldCard = ({ scaffold }: { scaffold: IMaterialScaffold }) => { + const scaffoldType = scaffold.languageType || ''; + const isWireless = checkIsWireless(selectedSource); + const CardComponent = isWireless ? MobileScaffoldCard : PCScaffoldCard; + return ( + + {scaffoldType && ( + languageType + )} +
+ {scaffoldType ? scaffold.title.replace(' - TS', '').replace(' - JS', '') : scaffold.title} +
+
+ } + content={scaffold.description} + media={scaffold.screenshot} + selected={curProjectField.scaffold && curProjectField.scaffold.name === scaffold.name} + onClick={() => onScaffoldClick(scaffold)} + onDoubleClick={onScaffoldSubmit} + /> + ); + }; + + const ScaffoldCardsList = ({ scaffoldsList }: {scaffoldsList: IMaterialScaffold[]}) => { + return ( + pegasusCardSelected ? ( + + ) : ( + <> +
+ {scaffoldsList.length ? ( + <> + {scaffoldsList.map((scaffold: IMaterialScaffold) => )} + {selectedSource.name === 'PC Web' && } + + ) : ( + + )} +
+ + ) + ); + }; + useEffect(() => { initData(); }, [materialSources]); + return (
- {materialSources && - materialSources.map((item) => { - let iconName = 'app'; - const projectType = item.type.toLocaleLowerCase(); - if (item.client) { - iconName = item.client.toLocaleLowerCase(); - } else if (projectTypes.includes(projectType)) { - iconName = projectType; - } - return ( - - {projectType} -
{item.name}
-
- } - selected={selectedSource.name && selectedSource.name === item.name} - onClick={() => onMaterialSourceClick(item)} - /> - ); - })} + { + materialSources && + materialSources.map((materialSource: IMaterialSource) => ) + }
{isAliInternal ? : null}
@@ -169,102 +204,9 @@ const ScaffoldMarket = ({ {selectedSource.description &&
{selectedSource.description}
} {loading ? ( - ) : pegasusCardSelected ? ( - ) : ( - <> -
- {!!mainScaffolds.length ? ( - <> - {mainScaffolds.map((item) => { - // tsScaffoldsList and jsScaffoldsList only contain the official scaffolds - // so the TypeScript and JavaScript logo only display in official scaffolds - const scaffoldType = tsScaffoldsList.includes(item.source.npm) - ? 'ts' - : jsScaffoldsList.includes(item.source.npm) - ? 'js' - : ''; - const isWireless = checkIsWireless(selectedSource); - const CardComponent = isWireless ? MobileScaffoldCard : ScaffoldCard; - return ( - - {scaffoldType && ( - languageType - )} -
- {scaffoldType ? item.title.replace(' - TS', '').replace(' - JS', '') : item.title} -
-
- } - content={item.description} - media={item.screenshot} - selected={curProjectField.scaffold && curProjectField.scaffold.name === item.name} - onClick={() => onScaffoldClick(item)} - onDoubleClick={onScaffoldSubmit} - /> - ); - })} - {selectedSource.name === 'PC Web' && } - - ) : ( - - )} -
- {!!otherScaffolds.length && ( - - -
- {otherScaffolds.map((item) => { - // tsScaffoldsList and jsScaffoldsList only contain the official scaffolds - // so the TypeScript and JavaScript logo only display in official scaffolds - const scaffoldType = tsScaffoldsList.includes(item.source.npm) - ? 'ts' - : jsScaffoldsList.includes(item.source.npm) - ? 'js' - : ''; - const isWireless = checkIsWireless(selectedSource); - const CardComponent = isWireless ? MobileScaffoldCard : ScaffoldCard; - return ( - - {scaffoldType && ( - languageType - )} -
- {scaffoldType ? item.title.replace(' - JS', '').replace(' - TS', '') : item.title} -
-
- } - content={item.description} - media={item.screenshot} - selected={curProjectField.scaffold && curProjectField.scaffold.name === item.name} - onClick={() => onScaffoldClick(item)} - /> - ); - })} -
- - - )} - - )} + + )}
{pegasusCardSelected ? null :
{children}
} diff --git a/extensions/project-creator/web/src/pages/CreateProject/constants.ts b/extensions/project-creator/web/src/pages/CreateProject/constants.ts index d0cd3c5fc..2f5deb435 100644 --- a/extensions/project-creator/web/src/pages/CreateProject/constants.ts +++ b/extensions/project-creator/web/src/pages/CreateProject/constants.ts @@ -1,32 +1,3 @@ -export const mainScaffoldsList = [ - '@alifd/fusion-design-pro', - '@alifd/scaffold-lite', - '@alifd/scaffold-simple', - '@rax-materials/scaffolds-app-js', - '@rax-materials/scaffolds-app-ts', - '@miniprogram-materials/scaffolds-app-js', - '@miniprogram-materials/scaffolds-app-ts', - '@miniprogram-materials/scaffolds-todos', -]; - -export const tsScaffoldsList = [ - '@alifd/fusion-design-pro', - '@alifd/scaffold-lite', - '@alifd/scaffold-simple', - '@icedesign/stark-layout-scaffold', - '@icedesign/stark-child-scaffold', - '@rax-materials/scaffolds-app-ts', - '@miniprogram-materials/scaffolds-app-ts', -]; - -export const jsScaffoldsList = [ - '@alifd/fusion-design-pro-js', - '@alifd/scaffold-lite-js', - '@rax-materials/scaffolds-app-js', - '@miniprogram-materials/scaffolds-app-js', - '@miniprogram-materials/scaffolds-todos', -]; - export const scaffoldsBlackList = [ '@icedesign/scaffold-midway-faas', '@rax-materials/scaffolds-app-midway-faas', diff --git a/extensions/project-creator/web/tsconfig.json b/extensions/project-creator/web/tsconfig.json index a83b4ad1a..ff499eeae 100644 --- a/extensions/project-creator/web/tsconfig.json +++ b/extensions/project-creator/web/tsconfig.json @@ -11,6 +11,6 @@ }, "resolveJsonModule": true }, - "include": ["src/*", ".ice"], + "include": ["src", ".ice"], "exclude": ["node_modules", "public"] } diff --git a/extensions/react-refactor/README.md b/extensions/react-refactor/README.md index ddde2b139..2c4ef0acb 100644 --- a/extensions/react-refactor/README.md +++ b/extensions/react-refactor/README.md @@ -1,6 +1,6 @@ # React Refactor -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/react-refactor/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/react-refactor/README.zh-CN.md) [![Version for VS Code Extension](https://vsmarketplacebadge.apphb.com/version-short/iceworks-team.iceworks-refactor.svg?logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-refactor) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/iceworks-team.iceworks-refactor.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-refactor) diff --git a/extensions/react-refactor/README.zh-CN.md b/extensions/react-refactor/README.zh-CN.md index c360817fb..3d58d701b 100644 --- a/extensions/react-refactor/README.zh-CN.md +++ b/extensions/react-refactor/README.zh-CN.md @@ -1,6 +1,6 @@ # React 代码重构 -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/react-refactor/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/react-refactor/README.zh-CN.md) [![Version for VS Code Extension](https://vsmarketplacebadge.apphb.com/version-short/iceworks-team.iceworks-refactor.svg?logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-refactor) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/iceworks-team.iceworks-refactor.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-refactor) diff --git a/extensions/react-refactor/package.json b/extensions/react-refactor/package.json index 5a350a3bc..d0ef53f90 100644 --- a/extensions/react-refactor/package.json +++ b/extensions/react-refactor/package.json @@ -57,10 +57,10 @@ "main": "./build/extension.js", "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" }, "scripts": { diff --git a/extensions/style-helper/README.md b/extensions/style-helper/README.md index 539ce4701..09992e674 100644 --- a/extensions/style-helper/README.md +++ b/extensions/style-helper/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/style-helper/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/style-helper/README.zh-CN.md) # React Style Helper diff --git a/extensions/style-helper/README.zh-CN.md b/extensions/style-helper/README.zh-CN.md index 446940428..b8d9f43a5 100644 --- a/extensions/style-helper/README.zh-CN.md +++ b/extensions/style-helper/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/style-helper/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/style-helper/README.md) # React 样式开发辅助插件 diff --git a/extensions/style-helper/package.json b/extensions/style-helper/package.json index af53f3e11..c82e15c4e 100644 --- a/extensions/style-helper/package.json +++ b/extensions/style-helper/package.json @@ -37,7 +37,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "main": "./build/extension.js", "scripts": { @@ -82,9 +82,9 @@ "tinycolor2": "^1.4.1", "vscode-web-custom-data": "^0.1.4" }, - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/style-helper/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/style-helper/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/extensions/time-master/README.md b/extensions/time-master/README.md index 600fe51e1..081ccec23 100644 --- a/extensions/time-master/README.md +++ b/extensions/time-master/README.md @@ -1,4 +1,4 @@ -English | [简体中文](https://github.com/appworks-lab/pack/blob/master/extensions/time-master/README.zh-CN.md) +English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/time-master/README.zh-CN.md) # Time Master diff --git a/extensions/time-master/README.zh-CN.md b/extensions/time-master/README.zh-CN.md index 01bd44c4a..22097647c 100644 --- a/extensions/time-master/README.zh-CN.md +++ b/extensions/time-master/README.zh-CN.md @@ -1,4 +1,4 @@ -简体中文 | [English](https://github.com/appworks-lab/pack/blob/master/extensions/time-master/README.md) +简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/time-master/README.md) # 时间管理大师 @@ -29,7 +29,7 @@ - **从不访问您的代码**:我们不处理、发送或存储您的代码。 - **您的数据是私有的**:我们不会与任何人共享您的个人数据。 -最重要的一点,插件代码是[开源](https://github.com/appworks-lab/pack/tree/master/extensions/iceworks-time-master)的,您可以很容易地看到我们对于数据处理的实现。 +最重要的一点,插件代码是[开源](https://github.com/appworks-lab/appworks/tree/master/extensions/iceworks-time-master)的,您可以很容易地看到我们对于数据处理的实现。 > 备注 1:这是针对社区开发者而言的,如果您是阿里内部用户,我们将默认上传您的数据。 > diff --git a/extensions/time-master/package.json b/extensions/time-master/package.json index 3ce17fc6d..a0094c303 100644 --- a/extensions/time-master/package.json +++ b/extensions/time-master/package.json @@ -73,7 +73,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "main": "./build/extension.js", "scripts": { @@ -114,9 +114,9 @@ "node-cache": "^5.1.2", "numeral": "^2.0.6" }, - "homepage": "https://github.com/appworks-lab/pack/blob/master/extensions/time-master/README.md", + "homepage": "https://github.com/appworks-lab/appworks/blob/master/extensions/time-master/README.md", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues", + "url": "https://github.com/appworks-lab/appworks/issues", "email": "iceworksteam@163.com" } } diff --git a/package.json b/package.json index 71975e04b..b8717c4f2 100644 --- a/package.json +++ b/package.json @@ -45,13 +45,13 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/appworks-lab/pack.git" + "url": "git+https://github.com/appworks-lab/appworks.git" }, "license": "ISC", "bugs": { - "url": "https://github.com/appworks-lab/pack/issues" + "url": "https://github.com/appworks-lab/appworks/issues" }, - "homepage": "https://github.com/appworks-lab/pack#readme", + "homepage": "https://github.com/appworks-lab/appworks#readme", "devDependencies": { "@commitlint/cli": "^12.1.1", "@appworks/constant": "^0.1.0", diff --git a/packages/constant/CHANGELOG.md b/packages/constant/CHANGELOG.md index 7412e7414..c2aebfc26 100644 --- a/packages/constant/CHANGELOG.md +++ b/packages/constant/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.1.4 + +- Chore: update ALI_NPM_REGISTRY + ## 0.1.3 - Feat: remove typescript from dependencies diff --git a/packages/constant/package.json b/packages/constant/package.json index 2d5c9263c..35f72e7c6 100644 --- a/packages/constant/package.json +++ b/packages/constant/package.json @@ -1,6 +1,6 @@ { "name": "@appworks/constant", - "version": "0.1.3", + "version": "0.1.4", "main": "lib/index.js", "scripts": { "compile": "rm -rf lib && tsc -p ./tsconfig.json", diff --git a/packages/constant/src/index.ts b/packages/constant/src/index.ts index e4657c4e8..c897d53a3 100644 --- a/packages/constant/src/index.ts +++ b/packages/constant/src/index.ts @@ -1,7 +1,7 @@ import { Base64 } from 'js-base64'; // Some internal URLs are not suitable for direct disclosure -export const ALI_NPM_REGISTRY = Base64.decode('aHR0cHM6Ly9yZWdpc3RyeS5ucG0uYWxpYmFiYS1pbmMuY29t'); +export const ALI_NPM_REGISTRY = Base64.decode('aHR0cHM6Ly9yZWdpc3RyeS5ucG0uYWxpYmFiYS1pbmMuY29tLw=='); export const ALI_GITACCOUNT_URL = Base64.decode('aHR0cDovL2dpdGxhYi5hbGliYWJhLWluYy5jb20vcHJvZmlsZS9hY2NvdW50'); export const ALI_GITACCOUNT_SHORTURL = Base64.decode('Z2l0bGFiLmFsaWJhYmEtaW5jLmNvbS9wcm9maWxlL2FjY291bnQ='); export const ALI_GITLABGROUPS_API = Base64.decode('aHR0cDovL2dpdGxhYi5hbGliYWJhLWluYy5jb20vYXBpL3YzL2dyb3Vwcw=='); diff --git a/packages/doctor-ui/src/index.tsx b/packages/doctor-ui/src/index.tsx index 7ce9f42f7..176507056 100644 --- a/packages/doctor-ui/src/index.tsx +++ b/packages/doctor-ui/src/index.tsx @@ -31,8 +31,8 @@ const Dashboard = (props: Props) => { {locale.projectRating}

}>

{locale.haveProblem} - - https://github.com/appworks-lab/pack/issues + + https://github.com/appworks-lab/appworks/issues {locale.reportProblem}

diff --git a/packages/doctor/CHANGELOG.md b/packages/doctor/CHANGELOG.md index 9400029ef..8add7e0bb 100644 --- a/packages/doctor/CHANGELOG.md +++ b/packages/doctor/CHANGELOG.md @@ -1,5 +1,9 @@ # changelog +## 0.2.2 + +- Feat update @appworks/codemod. + ## 0.2.1 - Support custom config set extends and plugins. diff --git a/packages/doctor/bin/appworks-doctor b/packages/doctor/bin/appworks-doctor index db85e0b3a..8320b4c66 100755 --- a/packages/doctor/bin/appworks-doctor +++ b/packages/doctor/bin/appworks-doctor @@ -45,7 +45,7 @@ if (args.scan) { }, score: result.score || 0, }; - ['ESLint', 'maintainability', 'repeatability'].forEach((key) => { + ['ESLint', 'maintainability', 'repeatability', 'codemod'].forEach((key) => { if (result[key]) { report[key] = result[key].score; } diff --git a/packages/doctor/package.json b/packages/doctor/package.json index 668310611..1809e603b 100644 --- a/packages/doctor/package.json +++ b/packages/doctor/package.json @@ -1,7 +1,7 @@ { "name": "@appworks/doctor", "description": "Analyse and running codemods over react/rax projects, troubleshooting and automatically fixing errors", - "version": "0.2.1", + "version": "0.2.2", "keywords": [ "doctor", "analysis", @@ -25,7 +25,7 @@ "prepublishOnly": "npm run compile" }, "dependencies": { - "@appworks/codemod": "^0.1.0", + "@appworks/codemod": "^0.2.0", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", "@iceworks/spec": "^1.0.2", diff --git a/packages/material-engine/CHANGELOG.md b/packages/material-engine/CHANGELOG.md index 21d630cdf..d1c08871d 100644 --- a/packages/material-engine/CHANGELOG.md +++ b/packages/material-engine/CHANGELOG.md @@ -1,6 +1,12 @@ # CHANGELOG -## 0.1.0 +## 0.1.2 + +- feat: update official materials +- chore: remove antd material source +- fix: fail to update material source + +## 0.1.1 - feat: support generate antd and fusion mobile base material info diff --git a/packages/material-engine/package.json b/packages/material-engine/package.json index 953b613ee..865a04917 100644 --- a/packages/material-engine/package.json +++ b/packages/material-engine/package.json @@ -1,6 +1,6 @@ { "name": "@appworks/material-engine", - "version": "0.1.1", + "version": "0.1.2", "description": "AppWorks Material Engine for VSCode extension.", "files": [ "lib" diff --git a/packages/material-engine/src/material/index.ts b/packages/material-engine/src/material/index.ts index b277e4c48..3bdaa8f3e 100644 --- a/packages/material-engine/src/material/index.ts +++ b/packages/material-engine/src/material/index.ts @@ -18,7 +18,6 @@ export { generateDebugMaterialData }; // material source const ICE_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/react-materials.json'; -const ANTD_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/antd-materials.json'; const VUE_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/vue-materials.json'; // const MINI_PROGRAM_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/miniprogram-materials.json'; const RAX_MATERIAL_SOURCE = 'https://ice.alicdn.com/assets/materials/rax-materials.json'; @@ -53,7 +52,7 @@ const componentSourceDetails = [ }, ]; -const OFFICAL_MATERIAL_SOURCES = [ +const OFFICIAL_MATERIAL_SOURCES = [ { name: i18n.format('package.materialService.index.webTitle'), type: 'react', @@ -61,13 +60,6 @@ const OFFICAL_MATERIAL_SOURCES = [ source: ICE_MATERIAL_SOURCE, description: i18n.format('package.materialService.index.webDescription'), }, - { - name: i18n.format('package.materialService.index.antdTitle'), - type: 'react', - client: 'pc', - source: ANTD_MATERIAL_SOURCE, - description: i18n.format('package.materialService.index.antdDescription'), - }, { name: i18n.format('package.materialService.index.raxTitle'), type: 'rax', @@ -77,7 +69,7 @@ const OFFICAL_MATERIAL_SOURCES = [ }, ]; -const OFFICAL_MATERIAL_SOURCES_FOR_EXTERNAL = [ +const OFFICIAL_MATERIAL_SOURCES_FOR_EXTERNAL = [ // { // name: i18n.format('package.materialService.index.miniProgramTitle'), // type: 'miniProgram', @@ -98,10 +90,6 @@ const isIceMaterial = (source: string) => { return source === ICE_MATERIAL_SOURCE; }; -const isAntdMaterial = (source: string) => { - return source === ANTD_MATERIAL_SOURCE; -}; - const isRaxMaterial = (source: string) => { return source === RAX_MATERIAL_SOURCE; }; @@ -112,7 +100,7 @@ export const getSourcesByProjectType = async function () { return getSources(type); }; -export const getOfficalMaterialSources = () => [].concat(OFFICAL_MATERIAL_SOURCES); +export const getOfficialMaterialSources = () => [].concat(OFFICIAL_MATERIAL_SOURCES); export const getUserSources = () => getDataFromSettingJson(CONFIGURATION_KEY_MATERIAL_SOURCES); @@ -126,10 +114,10 @@ export async function getSources(specifiedType?: string): Promise { let bases: IMaterialBase[]; try { if (isIceMaterial(source)) { - const baseResult = await axios({ url: FUSION_PC_COMPONENTS_SOURCE }); - bases = getBaseMaterials(baseResult.data, '@alifd/next', '1.18.16'); - } else if (isAntdMaterial(source)) { - const baseResult = await axios({ url: ANTD_PC_COMPONENTS_SOURCE }); - bases = getBaseMaterials(baseResult.data, 'antd', '4.16.5'); + const fusionBaseResult = await axios({ url: FUSION_PC_COMPONENTS_SOURCE }); + const fusionBaseMaterials = getBaseMaterials(fusionBaseResult.data, '@alifd/next', '1.18.16'); + const antdBaseResult = await axios({ url: ANTD_PC_COMPONENTS_SOURCE }); + const antdBaseMaterials = getBaseMaterials(antdBaseResult.data, 'antd', '4.16.5'); + bases = [...fusionBaseMaterials, ...antdBaseMaterials]; } else if (isRaxMaterial(source)) { const baseResult = await axios({ url: RAX_BASE_COMPONENTS_SOURCE }); bases = baseResult.data; @@ -243,6 +231,7 @@ export const addSource = async function (materialSource: IMaterialSource) { export const updateSource = async function (newMaterialSource: IMaterialSource, originSource: IMaterialSource) { const sources: IMaterialSource[] = await getSources(); + // don't update source when the source has already existed const existedSource = sources.some( ({ source: defaultSource }) => defaultSource === newMaterialSource.source && defaultSource !== originSource.source, ); @@ -263,7 +252,7 @@ export const updateSource = async function (newMaterialSource: IMaterialSource, const materialSources = getDataFromSettingJson(CONFIGURATION_KEY_MATERIAL_SOURCES); const newSources = materialSources.map((item) => { - if (item.source === newMaterialSource.source) { + if (item.source === originSource.source) { return { ...item, ...newMaterialSource, diff --git a/packages/material-engine/src/material/locales/en-US.json b/packages/material-engine/src/material/locales/en-US.json index aee92d4ed..2465d23f3 100644 --- a/packages/material-engine/src/material/locales/en-US.json +++ b/packages/material-engine/src/material/locales/en-US.json @@ -1,13 +1,11 @@ { - "package.materialService.index.webTitle": "Fusion Materials", - "package.materialService.index.webDescription": "Based On React, Fusion Design and icejs Framework", - "package.materialService.index.antdTitle": "Antd Materials", - "package.materialService.index.antdDescription": "Based On React, Ant Design and icejs Framework", + "package.materialService.index.webTitle": "PC", + "package.materialService.index.webDescription": "Based On React and icejs Framework", "package.materialService.index.raxTitle": "Mobile Apps", "package.materialService.index.raxDescription": "Based On Rax Components and Rax App", - "package.materialService.index.vueTitle": "Vue materials", + "package.materialService.index.vueTitle": "Vue", "package.materialService.index.vueDescription": "Based On Vue, Element and Vue CLI ", - "package.materialService.index.materialSourceExistError": "Material source already exists.", - "package.materialService.index.materialNameExistError": "Material name s already exists.", - "package.materialService.index.materialDataError": "Incorrect material source " + "package.materialService.index.materialSourceExistError": "Material source already exists, please try again.", + "package.materialService.index.materialNameExistError": "Material name s already exists, please try again.", + "package.materialService.index.materialDataError": "Incorrect material source, please try again." } diff --git a/packages/material-engine/src/material/locales/zh-CN.json b/packages/material-engine/src/material/locales/zh-CN.json index 6774b38ad..f97807564 100644 --- a/packages/material-engine/src/material/locales/zh-CN.json +++ b/packages/material-engine/src/material/locales/zh-CN.json @@ -1,13 +1,11 @@ { - "package.materialService.index.webTitle": "Fusion 物料", - "package.materialService.index.webDescription": "基于 React, Fusion 组件和 icejs 框架的官方物料", - "package.materialService.index.antdTitle": "Antd 物料", - "package.materialService.index.antdDescription": "基于 React,antd 组件和 icejs 框架的官方物料", - "package.materialService.index.raxTitle": "Rax 物料", + "package.materialService.index.webTitle": "PC", + "package.materialService.index.webDescription": "基于 React 和 icejs 框架的官方物料", + "package.materialService.index.raxTitle": "跨端应用", "package.materialService.index.raxDescription": "基于 Rax 组件和 Rax 脚手架的官方物料", - "package.materialService.index.vueTitle": "Vue 物料", + "package.materialService.index.vueTitle": "Vue", "package.materialService.index.vueDescription": "基于 Vue,Element, Vue CLI 的官方物料", - "package.materialService.index.materialSourceExistError": "物料源已存在。", - "package.materialService.index.materialNameExistError": "物料源名称已存在。", - "package.materialService.index.materialDataError": "物料源数据错误。" + "package.materialService.index.materialSourceExistError": "物料源已存在,请重新输入", + "package.materialService.index.materialNameExistError": "物料源名称已存在,请重新输入", + "package.materialService.index.materialDataError": "物料源数据错误,请重试" } diff --git a/packages/material-utils/CHANGELOG.md b/packages/material-utils/CHANGELOG.md new file mode 100644 index 000000000..b741c1ee6 --- /dev/null +++ b/packages/material-utils/CHANGELOG.md @@ -0,0 +1,6 @@ +# CHANGELOG + +## 0.1.1 + +- feat: add languageType type to IMaterialScaffold +- feat: add client type to IMaterialSource diff --git a/packages/material-utils/package.json b/packages/material-utils/package.json index 48d857dc3..2cec30d3d 100644 --- a/packages/material-utils/package.json +++ b/packages/material-utils/package.json @@ -1,6 +1,6 @@ { "name": "@appworks/material-utils", - "version": "0.1.0", + "version": "0.1.1", "description": "General tool library for materials.", "files": [ "lib" diff --git a/packages/material-utils/src/types.ts b/packages/material-utils/src/types.ts index 7c32c3cfb..7cd34ca41 100644 --- a/packages/material-utils/src/types.ts +++ b/packages/material-utils/src/types.ts @@ -6,6 +6,7 @@ export interface IMaterialSource { name: string; type: string; source: string; + client?: string; official?: boolean; checked?: boolean; description?: string; @@ -52,6 +53,7 @@ export interface IMaterialScaffold { title: string; updateTime: string; isNewlyCreated?: boolean; + languageType?: 'js' | 'ts'; } export interface IMaterialComponent { @@ -142,11 +144,11 @@ export const MaterialServerPath = 'MaterialServerPath'; export const IMaterialServer = Symbol('IMaterialServer'); export interface IMaterialServer { - getSources(type?: string): Promise; - getData(source: string): Promise; - addSource(param: IMaterialAddSourceParam): Promise; - updateSource(newSource: IMaterialAddSourceParam, originSource: IMaterialSource): Promise; - removeSource(source: string): Promise; + getSources: (type?: string) => Promise; + getData: (source: string) => Promise; + addSource: (param: IMaterialAddSourceParam) => Promise; + updateSource: (newSource: IMaterialAddSourceParam, originSource: IMaterialSource) => Promise; + removeSource: (source: string) => Promise; } export interface ILocalBack { @@ -155,16 +157,16 @@ export interface ILocalBack { } export interface IMaterialModule extends IMaterialServer { - goldlog(originParam: any); - maxComposePanel(); - checkIsTemplate(fsPath: string): boolean; - getLocalBlocks(): ILocalBack[]; - editLocalBlock(oldBlock: ILocalBack, newBlock: ILocalBack): void; - composeLocalBlock(blockName: string): void; - deleteLocalBlock(blockName: string): void; - createLocalBlock(): void; - addBlockCode(block: IMaterialBlock): Promise; - addCode(dataSource: IMaterialComponent): Promise; + goldlog: (originParam: any) => any; + maxComposePanel: () => any; + checkIsTemplate: (fsPath: string) => boolean; + getLocalBlocks: () => ILocalBack[]; + editLocalBlock: (oldBlock: ILocalBack, newBlock: ILocalBack) => void; + composeLocalBlock: (blockName: string) => void; + deleteLocalBlock: (blockName: string) => void; + createLocalBlock: () => void; + addBlockCode: (block: IMaterialBlock) => Promise; + addCode: (dataSource: IMaterialComponent) => Promise; } export const IMaterialModule = Symbol('IMaterialModule'); @@ -184,11 +186,11 @@ export interface IMaterialService { sources: IMaterialSource[]; data: IMaterialTypeDatum[]; currentSource: string; - getSources(): Promise; - setCurrentSource(source: string): Promise; - addSource(param: IMaterialAddSourceParam): Promise; - removeSource(source: string): Promise; - getMaterialData(source: string): Promise; - setSourceIsEditing(source: string, isEditing: boolean): Promise; - updateSource(newSource: IMaterialAddSourceParam, originSource: IMaterialSource): Promise; + getSources: () => Promise; + setCurrentSource: (source: string) => Promise; + addSource: (param: IMaterialAddSourceParam) => Promise; + removeSource: (source: string) => Promise; + getMaterialData: (source: string) => Promise; + setSourceIsEditing: (source: string, isEditing: boolean) => Promise; + updateSource: (newSource: IMaterialAddSourceParam, originSource: IMaterialSource) => Promise; } diff --git a/packages/project-service/CHANGELOG.md b/packages/project-service/CHANGELOG.md index a62c7fa3b..1f3587637 100644 --- a/packages/project-service/CHANGELOG.md +++ b/packages/project-service/CHANGELOG.md @@ -7,7 +7,7 @@ ## 0.1.1 -- fix: rax-spa project targets null problem. [#861](https://github.com/appworks-lab/pack/issues/861) +- fix: rax-spa project targets null problem. [#861](https://github.com/appworks-lab/appworks/issues/861) ## 0.1.0 diff --git a/packages/project-utils/src/git.ts b/packages/project-utils/src/git.ts index 60f9cbcb6..81c8dcbcc 100644 --- a/packages/project-utils/src/git.ts +++ b/packages/project-utils/src/git.ts @@ -8,8 +8,8 @@ const gitRemoteOriginUrl = require('git-remote-origin-url'); export interface GitInfo { branch: string; // master - repository: string; // git@github.com:appworks-lab/pack.git - remoteUrl: string; // https://github.com/appworks-lab/pack + repository: string; // git@github.com:appworks-lab/appworks.git + remoteUrl: string; // https://github.com/appworks-lab/appworks group: string; // appworks-lab project: string; // pack tag?: string; diff --git a/packages/user-service/scripts/get-def-login-client.ts b/packages/user-service/scripts/get-def-login-client.ts index 42033a2b2..4ab66ff85 100644 --- a/packages/user-service/scripts/get-def-login-client.ts +++ b/packages/user-service/scripts/get-def-login-client.ts @@ -15,9 +15,9 @@ async function getDefLoginClient() { accessKeySecret: ACCESS_KEY_SECRET, timeout: '300s', }); - + const target = 'packages/def-login-client.zip'; - + try { const result = await ossClient.get(target); const zipPath = path.join(__dirname, '..', 'tmp.zip'); diff --git a/packages/vscode-generator/src/templates/extension/package.json.ejs b/packages/vscode-generator/src/templates/extension/package.json.ejs index e029ff175..1580ef5d7 100644 --- a/packages/vscode-generator/src/templates/extension/package.json.ejs +++ b/packages/vscode-generator/src/templates/extension/package.json.ejs @@ -20,10 +20,10 @@ "main": "./build/extension.js", "repository": { "type": "git", - "url": "https://github.com/appworks-lab/pack.git" + "url": "https://github.com/appworks-lab/appworks.git" }, "bugs": { - "url": "https://github.com/appworks-lab/pack/issues" + "url": "https://github.com/appworks-lab/appworks/issues" }, "scripts": { "vscode:prepublish": "rm -rf build && npm run build:web && webpack --mode production",