Skip to content

Commit

Permalink
Release 0.11.0 (#567)
Browse files Browse the repository at this point in the history
* fix: require vscode (#565)

* refactor: record (#568)

* refactor: record execute command

* style: remove empty line

* feat: record for service

* chore: rename module

* feat: record open in browser

* feat: record show doc pick

* refactor: no need locale

* refactor: remove data

* chore: remove console

* feat: update

* feat: update

* feat: update readme

* fix: rules

* feat: support vue (#580)

* feat: support scan command (#581)

* chore: sets the extension to be flagged as a Preview in the Marketplace. (#582)

* feat: code Editor for Page Templater (#583)

* feat: add editor

* docs: changlog

* fix: no select blocks prompt (#575)

* fix: select blocks prompt

* chore: version and changelog

* fix: open materials panel when code editor opened (#573)

* feat: unable to open material panel when no editor

* feat: input path in settings.json

* feat: support generate page or component to the specify path

* fix: configuration description i18n

* fix: lint

* feat: support generate code to special path

* feat: generate code to special path

* feat: custom material sources will be at first in material sources list (#586)

* chore: update version and change log

* docs: new image for Visual Construction

* fix: require path not found (#590)

* chore: sorting of quick entry (#589)

* chore: sorting of quick entry

* docs: typo

* chore: package version

* feat: update readme

* chore: title for quick entry (#592)

Co-authored-by: Hengchang Lu <44047106+luhc228@users.noreply.github.com>
Co-authored-by: yangfan <18767120422@163.com>
Co-authored-by: luhc228 <luhengchang228@gmail.com>
  • Loading branch information
4 people authored Sep 29, 2020
1 parent 54f8c7e commit b2f0b83
Show file tree
Hide file tree
Showing 76 changed files with 725 additions and 385 deletions.
4 changes: 4 additions & 0 deletions extensions/iceworks-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 0.5.4

- chore: sorting of quick entry

## 0.5.3

- fix: compatible with scenarios without material source
Expand Down
2 changes: 1 addition & 1 deletion extensions/iceworks-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Iceworks Application Viewer",
"description": "Quick view your Universal Application(React/Rax/Vue, etc).",
"publisher": "iceworks-team",
"version": "0.5.3",
"version": "0.5.4",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
6 changes: 3 additions & 3 deletions extensions/iceworks-app/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export async function activate(context: vscode.ExtensionContext) {
subscriptions.push(extensionsStatusBar);
subscriptions.push(
registerCommand(showExtensionsQuickPickCommandId, async () => {
recorder.recordActivate();

await showEntriesQuickPick();
recorder.recordActivate();
}),
);

Expand Down Expand Up @@ -80,8 +79,8 @@ export async function activate(context: vscode.ExtensionContext) {
}
subscriptions.push(
registerCommand('iceworksApp.configHelper.start', (focusField: string) => {
recorder.recordActivate();
activeConfigWebview(focusField);
recorder.recordActivate();
}),
);
// init welcome webview
Expand Down Expand Up @@ -114,6 +113,7 @@ export async function activate(context: vscode.ExtensionContext) {
subscriptions.push(
registerCommand('iceworksApp.welcome.start', () => {
activeWelcomeWebview();
recorder.recordActivate();
}),
);

Expand Down
4 changes: 2 additions & 2 deletions extensions/iceworks-app/src/locales/en-US.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extension.iceworksApp.showEntriesQuickPick.projectCreater.label": "Create Application",
"extension.iceworksApp.showEntriesQuickPick.projectCreater.detail": "Create a Universal Application(React/Rax/Vue, etc) quickly",
"extension.iceworksApp.showEntriesQuickPick.generatePage.label": "Generate Page by assembling",
"extension.iceworksApp.showEntriesQuickPick.generatePage.label": "Generate Page by Blocks",
"extension.iceworksApp.showEntriesQuickPick.generatePage.detail": "Generate pages by block assembly",
"extension.iceworksApp.showEntriesQuickPick.createPage.label": "Generate Page by configure",
"extension.iceworksApp.showEntriesQuickPick.createPage.label": "Generate Page by Configuration",
"extension.iceworksApp.showEntriesQuickPick.createPage.detail": "Generate pages by using template configuration",
"extension.iceworksApp.showEntriesQuickPick.materialImport.label": "Import Component",
"extension.iceworksApp.showEntriesQuickPick.materialImport.detail": "Add Component to the Application in a visual way",
Expand Down
75 changes: 39 additions & 36 deletions extensions/iceworks-app/src/utils/getQuickEntryOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,29 @@ const entries = [
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.generatePage.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.generatePage.detail'),
command: 'iceworks-ui-builder.generate-page',
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.runDebug.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.runDebug.detail'),
command: 'iceworksApp.editorMenu.runDebug',
async condition() {
return !(await checkIsNotTarget()) && !(await checkIsPegasusProject());
return !(await checkIsNotTarget());
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.generateComponent.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.generateComponent.detail'),
command: 'iceworks-ui-builder.generate-component',
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.DefPublish.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.DefPublish.detail'),
command: 'iceworksApp.editorMenu.DefPublish',
async condition() {
const projectType = await getProjectType();
return projectType === 'react';
return (await checkIsAliInternal()) && !(await checkIsNotTarget());
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.createComponent.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.createComponent.detail'),
command: 'iceworks-ui-builder.create-component',
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.generatePage.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.generatePage.detail'),
command: 'iceworks-ui-builder.generate-page',
async condition() {
return !(await checkIsNotTarget()) && !(await checkIsPegasusProject());
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.materialImport.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.materialImport.detail'),
command: 'iceworks-material-helper.start',
async condition() {
return !(await checkIsNotTarget());
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.showMaterialDocs.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.showMaterialDocs.detail'),
command: 'iceworks-material-helper.showMaterialDocs',
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.createPage.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.createPage.detail'),
Expand All @@ -68,27 +54,36 @@ const entries = [
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.runDebug.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.runDebug.detail'),
command: 'iceworksApp.editorMenu.runDebug',
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.materialImport.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.materialImport.detail'),
command: 'iceworks-material-helper.start',
async condition() {
return !(await checkIsNotTarget());
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.runBuild.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.runBuild.detail'),
command: 'iceworksApp.editorMenu.runBuild',
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.generateComponent.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.generateComponent.detail'),
command: 'iceworks-ui-builder.generate-component',
async condition() {
return !(await checkIsNotTarget());
const projectType = await getProjectType();
return projectType === 'react';
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.DefPublish.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.DefPublish.detail'),
command: 'iceworksApp.editorMenu.DefPublish',
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.createComponent.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.createComponent.detail'),
command: 'iceworks-ui-builder.create-component',
async condition() {
return (await checkIsAliInternal()) && !(await checkIsNotTarget());
return !(await checkIsNotTarget()) && !(await checkIsPegasusProject());
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.showMaterialDocs.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.showMaterialDocs.detail'),
command: 'iceworks-material-helper.showMaterialDocs',
async condition() {
return !(await checkIsNotTarget());
},
},
{
Expand All @@ -107,6 +102,14 @@ const entries = [
return !(await checkIsNotTarget());
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.runBuild.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.runBuild.detail'),
command: 'iceworksApp.editorMenu.runBuild',
async condition() {
return !(await checkIsNotTarget());
},
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.welcomePage.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.welcomePage.detail'),
Expand Down
1 change: 1 addition & 0 deletions extensions/iceworks-doctor/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ web/**
**/*.map
**/*.ts

node_modules/terser
node_modules/typescript
node_modules/ts-loader
10 changes: 8 additions & 2 deletions extensions/iceworks-doctor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Navigate to the source code and remediate the results by interacting with the sc
![demo](https://img.alicdn.com/tfs/TB1XB6_UpY7gK0jSZKzXXaikpXa-1200-724.gif)

1. Open vscode command palette through `Ctrl+Shift+P` or `⇧⌘P`.
2. Enter `Iceworks: Open Dashboard` to activate the extension.
2. Enter `Iceworks: Open Dashboard` or `Iceworks: Scan Your Project` to activate the extension.

## Project details

Expand All @@ -25,13 +25,19 @@ The project is tested in 5 dimensions, `best practice`, `safety practice`, `Ali

## Detect when file is saved

The `Safety Practice Check` is performed by default when files are saved
The `Safety Practice Check` is performed by default when files are saved.

![demo](https://img.alicdn.com/tfs/TB1ySXAVHr1gK0jSZFDXXb9yVXa-1780-478.png)

## Setting

1. Click Settings to enter the Settings page
2. Configure `Check security practices when file saved`

## Security and Privacy

**Your data is private**: We will never share your individually identifiable data with anyone. Iceworks Doctor is an open source plugin, we make it easy to see the data we collect.

## More

See the [Iceworks](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) to know more features.
8 changes: 7 additions & 1 deletion extensions/iceworks-doctor/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Iceworks Doctor 是一个免费的安全和质量审核工具。借助基于集
![demo](https://img.alicdn.com/tfs/TB1XB6_UpY7gK0jSZKzXXaikpXa-1200-724.gif)

1. 通过 `⇧⌘P``Ctrl+Shift+P` 快捷键唤醒命令面板
2. 输入 `Iceworks: 打开仪表盘` 激活插件
2. 输入 `Iceworks: 打开仪表盘` `Iceworks: 扫描代码` 激活插件

## 项目详情

Expand All @@ -26,11 +26,17 @@ Iceworks Doctor 是一个免费的安全和质量审核工具。借助基于集

文件保存时默认进行`安全实践检测`

![demo](https://img.alicdn.com/tfs/TB1ySXAVHr1gK0jSZFDXXb9yVXa-1780-478.png)

## 设置

1. 点击设置,进入设置页面
2. 配置是否开启保存文件时进行`安全实践检测`

## 安全和隐私

**您的数据是私有的**:我们永远不会与任何人共享您的个人数据。Iceworks Doctor 是开源的,你可以很容易地看到我们收集了什么数据。

## 更多

访问 [Iceworks](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) 获取更多功能。
10 changes: 8 additions & 2 deletions extensions/iceworks-doctor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Iceworks Doctor",
"description": "A free security and quality audit tool for modern DevOps teams",
"publisher": "iceworks-team",
"version": "0.1.3",
"version": "0.1.4",
"engines": {
"vscode": "^1.41.0"
},
Expand Down Expand Up @@ -45,7 +45,7 @@
"email": "iceworksteam@163.com"
},
"scripts": {
"vscode:prepublish": "rm -rf build && npm run build:web && npm run compile",
"vscode:prepublish": "rm -rf build && npm run build:web && npm run compile && node scripts/minifyNodeModules.js",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./tsconfig.json",
"build:web": "cd web && npm run build",
Expand All @@ -56,6 +56,10 @@
{
"command": "iceworks-doctor.dashboard",
"title": "%iceworksDoctor.commands.dashboard.title%"
},
{
"command": "iceworks-doctor.scan",
"title": "%iceworksDoctor.commands.scan.title%"
}
],
"configuration": {
Expand Down Expand Up @@ -84,6 +88,8 @@
"@types/lodash": "^4.14.158",
"@types/node": "^12.11.7",
"@types/vscode": "^1.41.0",
"glob": "^7.1.6",
"terser": "^5.3.2",
"typescript": "^3.8.3"
}
}
3 changes: 2 additions & 1 deletion extensions/iceworks-doctor/package.nls.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"iceworksDoctor.commands.dashboard.title": "Iceworks: Open Dashboard."
"iceworksDoctor.commands.dashboard.title": "Iceworks: Open Dashboard.",
"iceworksDoctor.commands.scan.title": "Iceworks: Scan Your Project."
}
3 changes: 2 additions & 1 deletion extensions/iceworks-doctor/package.nls.zh-cn.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"iceworksDoctor.commands.dashboard.title": "Iceworks: 打开仪表盘"
"iceworksDoctor.commands.dashboard.title": "Iceworks: 打开仪表盘",
"iceworksDoctor.commands.scan.title": "Iceworks: 扫描代码"
}
59 changes: 59 additions & 0 deletions extensions/iceworks-doctor/scripts/minifyNodeModules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* eslint-disable */
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const { minify } = require('terser');

// ESLint has its own loader specification and cannot use webpack to build the entire package.
// Keep the npm package in node_modules so that ESLint can find the corresponding configs and plugins.
//
// When VS Code is released with all files in node_modules, the package size will exceed 30MB.
// This script filters all files in node_modules to remove unnecessary files and reduce the package size.
//
// After running this script, you may not be able to debug this project. You can reinstall the dependency for debugging.
glob(`${path.join(__dirname, '../node_modules')}/**/*.+(${['js', 'ts', 'md', 'map'].join('|')})`, { nodir: true }, async (error, files) => {
if (!error) {
console.log(`Start minify node_modules js files, count: ${files.length}`);

for (let i = 0, l = files.length; i < l; i++) {
const file = files[i];

// Delete .md, .ts and .map file after build
if (/\.(md|ts|map)$/.test(file)) {
fs.unlinkSync(file);
continue;
}

// Delete */test/* file after build
if (/^(?:\/(.*))\/test(?:\/(.*))[\/#\?]?$/i.test(file)) {
fs.unlinkSync(file);
continue;
}

// Minify node_modules js files
let minifiedCode = '';
try {
const result = await minify({
[file]: fs.readFileSync(file, 'utf8'),
});
minifiedCode = result.code;
} catch (e) {
// ignore
}

if (minifiedCode) {
fs.writeFileSync(file, minifiedCode, 'utf8');
}
}
}
});


// Delete licenses
glob(`${path.join(__dirname, '../node_modules')}/**/license`, { nodir: true }, async (error, files) => {
if (!error) {
(files || []).forEach(file => {
fs.unlinkSync(file);
});
}
});
Loading

0 comments on commit b2f0b83

Please sign in to comment.