Skip to content

Commit 6604724

Browse files
Merge pull request alibaba#2 from alibaba/main
sync
2 parents f6d81bd + 4eace4c commit 6604724

File tree

45 files changed

+991
-790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+991
-790
lines changed

.github/CODEOWNERS

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22

33
# These owners will be the default owners for everything in
44
# the repo. Unless a later match takes precedence
5-
* @leoyuan @alvarto
5+
* @liujuping @JackLian @alvarto
66

77
/packages/plugin-manual/ @alvarto
8-
/packages/base-monaco-editor/ @alvarto @wangshihao111
9-
/packages/plugin-code-editor/ @alvarto
8+
/packages/base-monaco-editor/ @alvarto @wangshihao111 @SuSunSam
9+
/packages/plugin-code-editor/ @alvarto @SuSunSam
1010
/packages/plugin-schema/ @alvarto
11-
/packages/plugin-components-pane/ @mark-ck
12-
/packages/plugin-datasource-pane/ @xingmolu
13-
/packages/plugin-zh-en/ @leoyuan
14-
/packages/plugin-undo-redo/ @leoyuan
11+
/packages/plugin-components-pane/ @mark-ck @love999262
12+
/packages/plugin-datasource-pane/ @YSMJ1994
13+
/packages/plugin-zh-en/ @JackLian @liujuping
14+
/packages/plugin-undo-redo/ @JackLian @liujuping
15+
/packages/plugin-resource-tabs/ @JackLian @liujuping
16+
/packages/plugin-set-ref-prop/ @JackLian @liujuping
17+
/packages/plugin-view-manager-pane/ @JackLian @liujuping
18+
/packages/base-monaco-editor/ @hzd822
19+
/packages/plugin-multiple-editor/ @hzd822
20+
/packages/action-block @liujuping
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: deprecate Package Version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to be deleted package@version'
8+
required: true
9+
10+
jobs:
11+
delete-package-version:
12+
runs-on: ubuntu-latest
13+
if: >-
14+
github.ref == 'refs/heads/main' &&
15+
(github.actor == 'JackLian' || github.actor == 'liujuping')
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: '14'
25+
26+
- name: deprecate Package Version
27+
run: |
28+
git config --local user.email "action@github.com"
29+
git config --local user.name "GitHub Action"
30+
31+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
32+
npm deprecate ${{ github.event.inputs.version }} "This version is deprecated. Please consider upgrading to a newer version."
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Beta NPM Packages
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
packagePath:
6+
description: 'Path to the package (e.g., action-block)'
7+
required: true
8+
betaVersion:
9+
description: 'Beta version number (e.g., 1.0.1-beta.0)'
10+
required: true
11+
12+
jobs:
13+
publish-package:
14+
runs-on: ubuntu-latest
15+
if: >-
16+
github.actor == 'JackLian' || github.actor == 'liujuping'
17+
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v2
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: '16' # 或者您希望的任何版本
26+
27+
- name: Change to Package Directory
28+
run: |
29+
git config --local user.email "action@github.com"
30+
git config --local user.name "GitHub Action"
31+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
32+
cd packages/${{ github.event.inputs.packagePath }}
33+
npm install --legacy-peer-deps
34+
npm run build
35+
npm version ${{ github.event.inputs.betaVersion }}
36+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
37+
npm publish --tag beta

.github/workflows/publish npm.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish NPM Packages
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
packagePath:
6+
description: 'Path to the package (e.g., action-block)'
7+
required: true
8+
versionType:
9+
description: 'Version update type (major, minor, patch)'
10+
required: true
11+
default: 'patch'
12+
13+
jobs:
14+
publish-package:
15+
runs-on: ubuntu-latest
16+
if: >-
17+
github.ref == 'refs/heads/main' &&
18+
(github.actor == 'JackLian' || github.actor == 'liujuping')
19+
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v2
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: '16' # 或者您希望的任何版本
28+
29+
- name: Publish Package
30+
run: |
31+
git config --local user.email "action@github.com"
32+
git config --local user.name "GitHub Action"
33+
34+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
35+
cd packages/${{ github.event.inputs.packagePath }}
36+
npm install --legacy-peer-deps
37+
npm version ${{ github.event.inputs.versionType }}
38+
npm run build
39+
40+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
41+
npm publish
42+
43+
echo "PACKAGE_NAME=$(node -p "require('./package.json').name")" >> $GITHUB_ENV
44+
echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
45+
46+
git add package.json
47+
git commit -m "Bump version to ${PACKAGE_VERSION}"
48+
49+
git tag -a "${PACKAGE_NAME}@${PACKAGE_VERSION}" -m "Release ${PACKAGE_NAME} version ${PACKAGE_VERSION}"
50+
git push origin "${PACKAGE_NAME}@${PACKAGE_VERSION}"

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@
5454
},
5555
"resolutions": {
5656
"@builder/babel-preset-ice": "1.0.1"
57-
}
58-
}
57+
},
58+
"repository": "https://github.com/alibaba/lowcode-plugins.git"
59+
}

packages/plugin-block/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react';
2-
import { ILowCodePluginContext } from '@alilc/lowcode-engine';
2+
import { IPublicModelPluginContext } from '@alilc/lowcode-types';
33
import { default as BlockPane } from './pane';
44

5-
const LowcodePluginCusPlugin = (ctx: ILowCodePluginContext) => {
5+
const LowcodePluginCusPlugin = (ctx: IPublicModelPluginContext) => {
66
return {
77
// 插件名,注册环境下唯一
88
name: 'LowcodePluginCusPlugin',

packages/plugin-code-editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@alilc/lowcode-plugin-code-editor",
33
"author": "59174526@qq.com & humphry.huang9@gmail.com",
4-
"version": "1.0.8",
4+
"version": "1.0.9",
55
"description": "CodeEditor",
66
"files": [
77
"es",

packages/plugin-code-editor/src/components/ErrorBoundary/ErrorBoundary.less

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
.container {
2-
min-width: 300px;
3-
}
4-
.actions {
1+
.plugin-code-editor-errorBoundary-actions {
52
margin: 12px auto;
63
width: fit-content;
74
text-align: center;

packages/plugin-code-editor/src/components/ErrorBoundary/ErrorBoundary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Component, ErrorInfo, Suspense } from 'react';
22
import { Loading, Message, Button } from '@alifd/next';
33

4-
import styles from './ErrorBoundary.less';
4+
import './ErrorBoundary.less';
55

66
interface ErrorBoundaryProps {
77
onCatch?: (error: Error, info: ErrorInfo) => void;
@@ -41,7 +41,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
4141
return (
4242
<Message title="出错了~" type="error">
4343
<p>详细错误: {errorInfo || '未知原因'}</p>
44-
<div className={styles.actions}>
44+
<div className="plugin-code-editor-errorBoundary-actions">
4545
<Button onClick={this._handleReset} size="small">
4646
重试
4747
</Button>

packages/plugin-code-editor/src/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { CodeEditorPane } from './pane';
2-
import { project, ILowCodePluginContext } from '@alilc/lowcode-engine';
2+
import { project } from '@alilc/lowcode-engine';
33
import icon from './icon';
4+
import { IPublicModelPluginContext } from '@alilc/lowcode-types';
45

5-
const plugin = (ctx: ILowCodePluginContext) => {
6+
const plugin = (ctx: IPublicModelPluginContext) => {
67
return {
78
name: 'codeEditor',
89
width: 600,

0 commit comments

Comments
 (0)