Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions .aci.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
- [ ] Other Changes

### Background or solution

<!-- Copilot for PRs will automatically generate detailed revisions based on PRs here, and you can add additional content on the end -->
<!-- Copilot for PRs 会在这里了自动生成基于 PR 的详细修改,可在后面补充进一步内容 -->

copilot:walkthrough

<!-- Additional content -->
<!-- 补充额外内容 -->

### Changelog

<!-- Copilot for PRs will automatically generate a PR-based summary here. If you need to modify it, you can remove the following content for modification --><!-- Copilot for PRs 会在这里了自动生成基于 PR 的总结,如需修改,可移除下面内容进行修改 -->

copilot:summary
21 changes: 21 additions & 0 deletions .github/workflows/auto-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Auto Labeler
on:
pull_request_target:
types: [opened, edited]

jobs:
labeler:
runs-on: ubuntu-latest

steps:
- uses: opensumi/actions/bot-token@main
id: bot-token
with:
token-server: ${{ secrets.BOT_TOKEN_SERVER }}
flag: ${{ secrets.BOT_FLAG }}

- name: Check Labels
id: labeler
uses: jimschubert/labeler-action@v2
with:
GITHUB_TOKEN: ${{env.GITHUB_TOKEN}}
95 changes: 95 additions & 0 deletions .github/workflows/release-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Release NEXT Version

on:
workflow_dispatch:
inputs:
ref:
description: 'A valid ref, eg: v1.xx, main'
required: true
default: 'main'

jobs:
next-version:
name: Next Version
environment: next
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
# 判断用户是否有写权限
- name: 'Check if user has write access'
uses: 'lannonbr/repo-permission-check-action@2.0.0'
with:
permission: 'write'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Checkout to specific branch
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Get yarn cache directory path
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

# 安装依赖并构建
- name: Install dependencies & Build
run: |
yarn install --immutable
yarn run init
yarn run build:all

- name: Setup .yarnrc.yml
run: |
yarn config set -H npmRegistryServer "https://registry.npmjs.org"
yarn config set -H npmAlwaysAuth true
yarn config set -H npmAuthToken $NPM_AUTH_TOKEN
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish prepatch version
run: |
lerna publish --exact --preid next-$(date +%s) --dist-tag next --force-publish='*' --no-push --no-git-tag-version prepatch --ignore-prepublish --ignore-scripts --no-private -y
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Adding markdown
if: success()
run: |
CURRENT_VERSION=$(node -p 'require("./lerna.json").version')
CURRENT_COMMIT=$(git rev-parse --short HEAD)
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
echo "CURRENT_COMMIT=${CURRENT_COMMIT}" >> $GITHUB_ENV
echo '### Released :rocket:' $CURRENT_VERSION >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo $CURRENT_VERSION >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo 'user input ref:' $INPUT_REF >> $GITHUB_STEP_SUMMARY
echo '```log' >> $GITHUB_STEP_SUMMARY
git log --oneline -1 >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo 'SUMMARY<<EOF' >> $GITHUB_ENV
cat $GITHUB_STEP_SUMMARY >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
INPUT_REF: ${{ github.event.inputs.ref }}
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'

yarnPath: .yarn/releases/yarn-3.6.4.cjs
4 changes: 3 additions & 1 deletion README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
```bash
1. yarn
2. yarn run init
3. yarn run dev
3. yarn run start
```
终端打开输出的地址,默认端口 9009,如被占用,会从 9009 查找可用端口

### 示例 [codeblitz-sample](https://github.com/opensumi/codeblitz-sample)
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Need to install yarn >= 1.0 and use yarn's [workspaces](https://classic.yarnpkg.
```bash
1. yarn
2. yarn run init
3. yarn run dev
3. yarn run start
```
The terminal opens the output address, the default port is 9009, if it is occupied, it will search for available ports from 9009

### Samples [codeblitz-sample](https://github.com/opensumi/codeblitz-sample)
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "codeblitzjs",
"main": "index.js",
"engines": {
"opensumi": "2.26.8"
"opensumi": "2.27.1"
},
"scripts": {
"prepare": "husky install",
Expand Down Expand Up @@ -70,11 +70,12 @@
"localforage": "^1.10.0",
"minimist": "^1.2.5",
"prettier": "^2.1.2",
"shelljs": "^0.8.4",
"signale": "^1.4.0",
"ts-jest": "^26.4.4",
"ts-node": "^9.0.0",
"tslib": "^2.2.0",
"typescript": "^4.2.3",
"shelljs": "^0.8.4"
}
"typescript": "^4.2.3"
},
"packageManager": "yarn@3.6.4"
}
13 changes: 6 additions & 7 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
"opensumi": "2.16.1",
"node": ">=10.0.0"
},
"scripts": {},
"dependencies": {
"@codeblitzjs/ide-common": "1.0.4",
"@opensumi/ide-extension": "2.26.8",
"@opensumi/ide-extension": "2.27.1",
"async-retry": "^1.3.1",
"await-event": "^2.1.0",
"commander": "^7.2.0",
"content-disposition": "^0.5.3",
"fs-extra": "^9.0.1",
"lodash.flatten": "^4.4.0",
"lodash.pick": "^4.4.0",
Expand All @@ -28,11 +30,8 @@
"signale": "^1.4.0",
"tslib": "^2.2.0",
"urllib": "^2.36.1",
"yauzl": "^2.10.0",
"async-retry": "^1.3.1",
"await-event": "^2.1.0",
"content-disposition": "^0.5.3",
"uuid": "^7.0.2"
"uuid": "^7.0.2",
"yauzl": "^2.10.0"
},
"devDependencies": {
"@types/commander": "^2.12.2",
Expand Down
56 changes: 52 additions & 4 deletions packages/code-api/README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- API参考
1. [Github REST API](https://docs.github.com/zh/rest)
2. [Github GraphQL API](https://docs.github.com/zh/graphql)

#### [GitLab](https://gitlab.cn/)
- 提供基础代码服务API请自行集成 修改 packages/code-api/src/common/config.ts 默认配置
- [GitLab API](https://docs.gitlab.com/ee/api/)
Expand All @@ -21,6 +22,7 @@
# 2. 访问地址
http://localhost:9009/gitlab/${group}/${name}
```

#### [AtomGit](https://atomgit.com/)
- 自行配置 [Private Token](https://atomgit.com/-/profile/tokens)
- API参考 [AtomGit API](https://docs.atomgit.com/category/api)
Expand All @@ -33,7 +35,7 @@
CodeServiceModule.Config({
...
atomgit: {
// atomgit token https://atomgit.com/-/profile/tokens
## atomgit token https://atomgit.com/-/profile/tokens
token: 'your token'
}
...
Expand All @@ -42,6 +44,7 @@
# 3. 访问地址
http://localhost:9009/atomgit/opensumi/codeblitz
```

#### [GitLink](https://www.gitlink.org.cn/)
- API参考: [GitLink API](https://www.gitlink.org.cn/docs/api#introduction)
- 介绍: [GitLink WebIDE](https://help.gitlink.org.cn/%E4%BB%A3%E7%A0%81%E5%BA%93%E7%AE%A1%E7%90%86/WebIDE)
Expand All @@ -57,9 +60,54 @@
http://localhost:9009/gitlink/opensumi/core
```

TODO
1. [Gitee](https://gitee.com/)
2. [Codeup](https://codeup.aliyun.com)
#### [Gitee](https://gitee.com/)
- API参考: [Gitee API](https://gitee.com/api/v5/swagger#/getV5ReposOwnerRepoStargazers?ex=no)
- 示例: [WebIDE for Gitee](https://codeblitz.cloud.alipay.com/gitee/opensumi/codeblitz)
- 本地开发
```bash
# 1. 在 packages/startup/src/startup/index.tsx 设置 Gitee Token
CodeServiceModule.Config({
...
gitee: {
## gitee 文件接口为递归接口
recursive: true,
## gitee token https://gitee.com/profile/personal_access_tokens
token: 'your token'
},
...
})
# 3. 启动服务
npm run start
# 3. 访问地址
http://localhost:9009/gitee/opensumi/codeblitz
```

#### [Codeup](https://codeup.aliyun.com)
- API参考: [Codeup API](https://help.aliyun.com/document_detail/2527054.html)
- 介绍: [Codeup WebIDE](https://mp.weixin.qq.com/s/CFrxYdFxbj53JRqGDqAH-A?poc_token=HI1nhWWjDV_9mGYXCa3tjkBesVjvosq1JYEiXo6m)
- 本地开发
```bash
# 1. 修改本地配置 .env 文件
CODE_SERVICE_HOST=https://codeup.aliyun.com
# 2. 配置 codeup cookie

在 packages/toolkit/webpack/config.dev.js 内添加 代理Cookie 可以从 https://codeup.aliyun.com 任意响应头中获取

# 3. 配置 codeup projectId 因为codeup以项目为单位进行权限控制,需要配置projectId
codeup: {
owner: 'your owner',
name: 'your name',
projectId: 'your projectId', # 项目 id 必须
}

# 3. 启动服务
npm run start
# 3. 访问地址
http://localhost:9009/codeup/${owner}/${name}

```





Loading