Giter Club home page Giter Club logo

ide-startup's Introduction

OpenSumi Web Sample

License Docker Image CI CLA assistant

This project is used to show how to run OpenSumi on Web.

perview

English | 简体中文

Quick Start

$ git clone [email protected]:opensumi/ide-startup.git
$ cd ide-startup
$ yarn
$ yarn start

Open http://127.0.0.1:8080.

You can add workspaceDir to the URL to open the specified directory, for example http://0.0.0.0:8080?workspaceDir=/path/to/dir.

Project Structure

.
├── extensions                  # The Buit-in extensions
├── configs                     # Build configuration
├── src
│   ├── browser
│   └── node
├── tsconfig.json
├── package.json
└── README.md

Use Docker

# Pull the image
docker pull ghcr.io/opensumi/opensumi-web:latest

# Run
docker run --init --rm -d  -p 8080:8000/tcp ghcr.io/opensumi/opensumi-web:latest

Open http://0.0.0.0:8080

License

Copyright (c) 2019-present Alibaba Group Holding Limited, Ant Group Co. Ltd.

Licensed under the MIT license.

ide-startup's People

Contributors

aaaaash avatar bytemain avatar dabaoshu avatar dependabot[bot] avatar erha19 avatar fankangsong avatar hjue avatar pipiiiiii avatar renovate[bot] avatar yantze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ide-startup's Issues

build 后,node dist-node/server/index.js 报错

理论上,npm run build 之后,只需要部署 distdist-nodehosted 三个目录即可启动服务,但目前报错:

image

但如果把 node_modules 目录也放上,是可以启动 8000 的。

容器内启动后,如何打开本地文件夹

使用 Docker 镜像

拉取镜像

docker pull ghcr.io/opensumi/opensumi-web:latest

运行(容器内端口必要是8000,代码里写了,对外端口18016可自定义)

docker run --rm -d -p 18066:8000/tcp ghcr.io/opensumi/opensumi-web:latest
浏览器打开 http://127.0.0.1:8080 进行预览或开发。

问题:如何打开本地文件夹。比如在容器登录后,访问服务。
使用场景:线上服务,给用户分配一下webide,用户临时不用时,给他停了,等用的时候再打开,再打开时,需要通过打开文件夹打开之前编辑的代码。

C++ Can not build

I use vscode-extensions-cpptool to build and debug my cpp file,but build with an error:
spawn /bin/sh ENOENT

image

image
image

安装数据库连接插件后,点击增加数据库连接没反应。

使用 Docker 镜像 部署

拉取镜像

docker pull ghcr.io/opensumi/opensumi-web:latest

运行(容器内端口必要是8000,代码里写了,对外端口18016可自定义)

docker run --rm -d -p 18066:8000/tcp ghcr.io/opensumi/opensumi-web:latest
浏览器打开 http://127.0.0.1:8080 进行预览或开发。

安装数据库连接插件
SQLTools MySQL/MariaDB、“MySQL”同时安装
image

你好,我在官方文档自定义菜单中

如题,我在自己根据官方文档完成了一个自定义菜单并且添加了一个子菜单,我想要通过点击子菜单调用一个自己写的方法,但我在官方文档发现都是调用内置的命令command,没有案例提示我怎么去调用自己的方法或者说怎么去编写一个自己的命令来调用,我想通过点击子菜单发起一个ws请求来和我的后台发起实时通讯,另外我对react还有ts不是很了解,还请多指教!谢谢你们!

安装Diff & Merge插件,选择2个文件diff的时候(choose a file to merge),提示Error: command 。

描述你的问题(Describe the bug)
安装Diff & Merge插件,选择2个文件diff的时候(choose a file to merge),提示Error: command 。

错误信息:
[browser:error] Error: command 'workbench.action.generateColorTheme' not found
at StandaloneCommandService.executeCommand (bundle.js:323041:35)
at MonacoCommandService.executeCommand (bundle.js:80233:39)
at async MainThreadCommands.$executeCommand (bundle.js:96820:20)
DebugLog.error @ bundle.js:54494
error @ bundle.js:125702
error @ bundle.js:37445
$executeCommand @ bundle.js:96823
await in $executeCommand (async)
$executeCommandWithExtensionInfo @ bundle.js:96816
_doInvokeHandler @ bundle.js:20825
await in _doInvokeHandler (async)
_invokeHandler @ bundle.js:20810
_receiveRequest @ bundle.js:20797
_receiveOneMessage @ bundle.js:20746
(anonymous) @ bundle.js:20697
fire @ bundle.js:173930
(anonymous) @ bundle.js:90522
onNotification @ bundle.js:20534
(anonymous) @ bundle.js:20476
handleNotification @ bundle.js:339966
processMessageQueue @ bundle.js:339690
(anonymous) @ bundle.js:339677
processImmediate @ node:internal/timers:464

预期表现(Expected behavior)

正常diff && merge

问题截图(Screenshots)
image

环境信息(Environment)

  • OS: macOS 12.4 非 arm
  • Browser: electron
  • OpenSumi Version: 2.18.15

补充信息(Additional context)

AppConfig.staticServicePath 配置不生效

背景

我的场景需要在域名后面加一个路径path来携带一些信息,例如 http://domain/path 来打开主页

问题

针对ws,可以配置AppConfig.wsPath 来配置,可以生效
针对静态文件,我使用AppConfig.staticServicePath 来配置,但是未生效
预期 : http://domain/**path**/assets/root/.sumi/extensions/vscode-icons-team.vscode-icons/icons/folder_type_src.svg,
实际 : http://domain/assets/root/.sumi/extensions/vscode-icons-team.vscode-icons/icons/folder_type_src.svg,

无法携带path信息

docker构建异常

构建过程

  1. 直接使用项目自带的dockerfile构建,异常如下
    image
  2. 指定两个依赖库版本后
    "vscode-languageserver-protocol": "3.16.0", "vscode-jsonrpc": "6.0.0"
    异常如下
    截屏2022-05-18 15 18 37.
    异常日志详情

截屏2022-05-18 15 20 14

terminal input incorrect with chinese

终端里面
英文输入正常
image
输入中文,表现不正常,中文第一个字不显示:
image
image
连续输入中文,第一次之后的不显示:
image
image
只有再次输入一次英文后再输入中文才会显示:
image
image

Explorer WorkSpace持续加载

在workSpace中创建名为.sumi且内容不为空的文件夹会触发这个bug
image
疑似core中file-tree的状态isReady和isLoading没有被成功赋值

打开目录按钮控制台报错

Uncaught (in promise) HANDLER_NOT_FOUND: The command 'filetree.open.folder' cannot be executed. There are no active handlers available for the command.

[QUESTION] How to use File System Access API with IDE?

We would like to access local file system but node.js server is deployed into remote computer like web cloud service whereas the client browser runs in our local computer PC, so question is how to extend IDE to be able to access local file system for example using File System Access API, and if OpenSumi may provide that feature in case that server and client not on same computer to access local file system for IDE?

cannot open menu

使用的最新版编译完成后,打开页面无法打开目录。

截图

尝试设置extensionCandidate参数,似乎没有生效

我在index.ts 中设置了extensionCandidate和extensionDir,yarn start后已安装的插件显示我预置的插件(如下图),这个是我期望的。
但extensionCandidate指定的插件未加载,这点可以从 Show Running Extensions中观察到,同时 html 未高亮也证实系统预置插件未加载。

image

这是我修改的index.ts 代码

renderApp({
  extensionDir: "/xxx/ide-startup/my-extensions",
  extensionCandidate: [{
    path: '/xxx/ide-startup/extensions',
    isBuiltin: true,
    isDevelopment: false
  }],
  modules: [
    ...CommonBrowserModules,
    ExpressFileServerModule,
  ],

关于直接修改某个文件编码区域

你好,我有个需求想要直接修改某个文件的编码区域内容,比如我在编辑器打开一个新的vue文件,有没有api可以在我需要应用的事件里面,自定义当前vue文件的源码,而不是手动去修改

yarn运行报错

PS C:\code\ide-startup-main\ide-startup-main> yarn
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
$ npm run compile:worker-host && npm run compile:ext-host && npm run download:extensions

[email protected] compile:worker-host
cross-env NODE_ENV=production webpack --config ./configs/webpack.worker-host.config.js

C:\code\ide-startup-main\ide-startup-main\node_modules\loader-runner\lib\LoaderRunner.js:106
throw new Error("callback(): The callback was already called.");
^

Error: callback(): The callback was already called.
at context.callback (C:\code\ide-startup-main\ide-startup-main\node_modules\loader-runner\lib\LoaderRunner.js:106:10)
at Object.ESBuildLoader (C:\code\ide-startup-main\ide-startup-main\node_modules\esbuild-loader\dist\loader.js:62:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.16.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

run yarn fail

error output:

error /Users/showonne/Desktop/ide-startup/node_modules/node-pty: Command failed.
Exit code: 1
Command: node scripts/install.js

# some info...

  CXX(target) Release/obj.target/pty/src/unix/pty.o
In file included from ../src/unix/pty.cc:20:
In file included from ../../nan/nan.h:178:
../../nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
typedef v8::Local<v8::AccessorSignature> Sig;
                  ~~~~^
In file included from ../src/unix/pty.cc:20:
../../nan/nan.h:2544:8: error: no matching member function for call to 'SetAccessor'
  tpl->SetAccessor(
  ~~~~~^~~~~~~~~~~
/Users/showonne/Library/Caches/node-gyp/20.11.0/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'imp::Sig' (aka 'int') to 'SideEffectType' for 7th argument
  void SetAccessor(
       ^
/Users/showonne/Library/Caches/node-gyp/20.11.0/include/node/v8-template.h:809:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'AccessorGetterCallback' (aka 'void (*)(Local<String>, const PropertyCallbackInfo<Value> &)') for 2nd argument
  void SetAccessor(
       ^
2 errors generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Darwin 23.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/showonne/Desktop/ide-startup/node_modules/node-pty

enviroment:

OS: MacOS 14.0 M1
[email protected]
[email protected]
Python 3.12.2

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • fix(deps): update opensumi packages to v3.1.4 (@opensumi/ide-addons, @opensumi/ide-comments, @opensumi/ide-core-browser, @opensumi/ide-core-common, @opensumi/ide-core-node, @opensumi/ide-debug, @opensumi/ide-decoration, @opensumi/ide-editor, @opensumi/ide-explorer, @opensumi/ide-express-file-server, @opensumi/ide-extension, @opensumi/ide-extension-manager, @opensumi/ide-extension-storage, @opensumi/ide-file-scheme, @opensumi/ide-file-search, @opensumi/ide-file-service, @opensumi/ide-file-tree-next, @opensumi/ide-i18n, @opensumi/ide-keymaps, @opensumi/ide-logs, @opensumi/ide-main-layout, @opensumi/ide-markdown, @opensumi/ide-markers, @opensumi/ide-menu-bar, @opensumi/ide-monaco, @opensumi/ide-monaco-enhance, @opensumi/ide-opened-editor, @opensumi/ide-outline, @opensumi/ide-output, @opensumi/ide-overlay, @opensumi/ide-preferences, @opensumi/ide-process, @opensumi/ide-quick-open, @opensumi/ide-remote-opener, @opensumi/ide-scm, @opensumi/ide-search, @opensumi/ide-startup, @opensumi/ide-status-bar, @opensumi/ide-storage, @opensumi/ide-task, @opensumi/ide-terminal-next, @opensumi/ide-theme, @opensumi/ide-toolbar, @opensumi/ide-variable, @opensumi/ide-webview, @opensumi/ide-workspace, @opensumi/ide-workspace-edit)

Detected dependencies

npm
package.json
  • @opensumi/ide-addons 3.1.3
  • @opensumi/ide-comments 3.1.3
  • @opensumi/ide-core-browser 3.1.3
  • @opensumi/ide-core-common 3.1.3
  • @opensumi/ide-core-node 3.1.3
  • @opensumi/ide-debug 3.1.3
  • @opensumi/ide-decoration 3.1.3
  • @opensumi/ide-editor 3.1.3
  • @opensumi/ide-explorer 3.1.3
  • @opensumi/ide-express-file-server 3.1.3
  • @opensumi/ide-extension 3.1.3
  • @opensumi/ide-extension-manager 3.1.3
  • @opensumi/ide-extension-storage 3.1.3
  • @opensumi/ide-file-scheme 3.1.3
  • @opensumi/ide-file-search 3.1.3
  • @opensumi/ide-file-service 3.1.3
  • @opensumi/ide-file-tree-next 3.1.3
  • @opensumi/ide-i18n 3.1.3
  • @opensumi/ide-keymaps 3.1.3
  • @opensumi/ide-logs 3.1.3
  • @opensumi/ide-main-layout 3.1.3
  • @opensumi/ide-markdown 3.1.3
  • @opensumi/ide-markers 3.1.3
  • @opensumi/ide-menu-bar 3.1.3
  • @opensumi/ide-monaco 3.1.3
  • @opensumi/ide-monaco-enhance 3.1.3
  • @opensumi/ide-opened-editor 3.1.3
  • @opensumi/ide-outline 3.1.3
  • @opensumi/ide-output 3.1.3
  • @opensumi/ide-overlay 3.1.3
  • @opensumi/ide-preferences 3.1.3
  • @opensumi/ide-process 3.1.3
  • @opensumi/ide-quick-open 3.1.3
  • @opensumi/ide-remote-opener 3.1.3
  • @opensumi/ide-scm 3.1.3
  • @opensumi/ide-search 3.1.3
  • @opensumi/ide-startup 3.1.3
  • @opensumi/ide-status-bar 3.1.3
  • @opensumi/ide-storage 3.1.3
  • @opensumi/ide-task 3.1.3
  • @opensumi/ide-terminal-next 3.1.3
  • @opensumi/ide-theme 3.1.3
  • @opensumi/ide-toolbar 3.1.3
  • @opensumi/ide-variable 3.1.3
  • @opensumi/ide-webview 3.1.3
  • @opensumi/ide-workspace 3.1.3
  • @opensumi/ide-workspace-edit 3.1.3

  • Check this box to trigger a request for Renovate to run again on this repository

插件异常

本地运行 yarn start,进入页面,是正确的,存在主题插件,如图:
image

运行打包命令yarn build,再启动node服务node dist-node/server/index.js,进入页面后,就没有主题插件了,如图:
image

并且node服务报错:
image

这是为什么,怎么解决呢?

permission denied with docker

docker-compose方式运行

workspace中创建文件没有权限
image

终端中尝试创建也提示没有权限
image


docker-compose.yml如下:

version: '3'
services:
  opensumi:
    image: ghcr.io/opensumi/opensumi-web:v1.20.0
    restart: unless-stopped
    stop_grace_period: 5s
    security_opt:
      - seccomp:unconfined
      - apparmor:unconfined
    ports:
      - "9000:8000" # HTTP
    user: "1000:1000"

我在renderApp已经设置了isElectronRenderer: false,ReferenceError: ElectronIpcRenderer is not defined

我打包后启动的服务,在electron中使用iframe加载出现以下错误

ReferenceError: ElectronIpcRenderer is not defined
at Proxy.on (bundle.js:2)
at bundle.js:2
at ua (bundle.js:2)
at Al (bundle.js:2)
at t.unstable_runWithPriority (bundle.js:2)
at qr (bundle.js:2)
at Rl (bundle.js:2)
at bundle.js:2
at j (bundle.js:2)
at MessagePort.w.port1.onmessage (bundle.js:2)

我在renderApp已经设置了isElectronRenderer: false。这是哪里还有判断呀!浏览器运行是正常的

通过 dist-node 启动后,Git 模块无效

使用 npm start 启动,一切正常,但是 build 后,通过 node dist-node/server/index.js 启动,Git 模块就无效,部分插件也无效(这里安装的 Vue,在 npm start 里都正常)

在本地和 centos 上均存在相同问题

以下是截图:

image

image

image

image

image

无法跳转定义

warning.js:6 Warning: info.item is deprecated since we will move to function component that not provides React Node instance in future.

文件持续加载,无法结束

image
不知道某些情况会触发,一直卡在加载文件,无法显示已保存文件

容器内查看报错:
image

不确定该报错是否导致文件加载问题

[feature request] support arm64 platform

The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

docker manifest inspect ghcr.io/opensumi/opensumi-web

The manifest does not support multi-cpu architecture, therefore mac with Apple silicon does not work properly and needs to be built by buildx etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.