GithubHelp home page GithubHelp logo

netease / tango Goto Github PK

View Code? Open in Web Editor NEW
1.9K 39.0 156.0 6.06 MB

A source code based low-code builder. Integrate low-code experience into your local development workflow seamlessly.

Home Page: https://netease.github.io/tango-site/

License: MIT License

JavaScript 1.19% HTML 0.01% TypeScript 98.75% Less 0.03% Shell 0.02%
builder low-code lowcode netease no-code nocode site-builder web-builder website-builder

tango's Issues

是否有方法将CDN资源替换为离线资源

由于网络原因,经常无法访问cdn资源,导致项目运行不起来
请问有没有手段使用本地的资源?

目前只看到 apps/playground/.umirc.ts 里面有一点点可以更改的地方

renderXXX 写法不支持

import React from "react";
import { definePage } from "@music163/tango-boot";
import { Page, Section, Button, Input, FormilyForm } from "@music163/antd";
class App extends React.Component {
  renderX(){
    return <Button>666</Button>
  }
  render() {
    return (
      <Page title={tango.stores.app.title}>
        <Section title="Section Title">
        {this.renderX()}</Section>
        <Section>
          <Button>button</Button>
          <Input />
        </Section>
      </Page>
    );
  }
}
export default definePage(App);

把这个丢到tango里, renderX里的组件可以拖拽,到另一个地方, 但表现上是复制,而不是移动

AST: 是否支持随意改动,包括结构改动、使用自定义组件、使用社区开源(Antd、Element) 等

首先非常感谢 tango 团队的付出!我有几个问题还没想明白,所以开个 issues 问一下

问题1:看起来是有物料约束的,虽然说摆脱了 JSON Schema 的约束

image

问题2:生成代码看起来是有一定的结构约束的

image

问题3:是否支持 .vue template,是否可以在与已有的业务页面代码兼容?还是说必须符合 Tango 提供的页面结构。

本地沙箱docker启动,修改了domain,无法链接

host做了修改

1、替换了:8080为local.netease.com

2、7f9beb0b21f9 docker.io/library/tango-codesandbox:latest "caddy run --config …" 3 minutes ago Up 0.0.0.0:8443->8443/tcp tango-codesandbox-7f9be

3、镜像启动日志
{"level":"info","ts":1695257316.437854,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1695257316.4388368,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":3}
{"level":"info","ts":1695257316.4394667,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1695257316.4397707,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x400009f180"}
{"level":"info","ts":1695257316.4407623,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":8443}
{"level":"warn","ts":1695257316.4407756,"logger":"http.auto_https","msg":"automatic HTTP->HTTPS redirects are disabled","server_name":"srv0"}
{"level":"info","ts":1695257316.4409783,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/data/caddy"}
{"level":"info","ts":1695257316.4410226,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1695257316.440989,"logger":"http","msg":"enabling HTTP/3 listener","addr":":8443"}
{"level":"info","ts":1695257316.44109,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details."}
{"level":"info","ts":1695257316.4412634,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1695257316.4412718,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["local.netease.com"]}
{"level":"info","ts":1695257316.441771,"logger":"tls.obtain","msg":"acquiring lock","identifier":"local.netease.com"}
{"level":"info","ts":1695257316.4428742,"logger":"tls.obtain","msg":"lock acquired","identifier":"local.netease.com"}
{"level":"info","ts":1695257316.4429135,"logger":"tls.obtain","msg":"obtaining certificate","identifier":"local.netease.com"}
{"level":"info","ts":1695257316.4434357,"logger":"tls.obtain","msg":"certificate obtained successfully","identifier":"local.netease.com"}
{"level":"info","ts":1695257316.443454,"logger":"tls.obtain","msg":"releasing lock","identifier":"local.netease.com"}
{"level":"warn","ts":1695257316.4435532,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [local.netease.com]: no OCSP server specified in certificate","identifiers":["local.netease.com"]}
{"level":"warn","ts":1695257316.4476962,"logger":"pki.ca.local","msg":"installing root certificate (you might be prompted for password)","path":"storage:pki/authorities/local/root.crt"}
{"level":"info","ts":1695257316.447804,"msg":"warning: "certutil" is not available, install "certutil" with "apt install libnss3-tools" or "yum install nss-tools" and try again"}
{"level":"info","ts":1695257316.4478083,"msg":"define JAVA_HOME environment variable to use the Java trust"}
{"level":"info","ts":1695257316.4613037,"msg":"certificate installed properly in linux trusts"}
{"level":"info","ts":1695257316.4615793,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1695257316.4615903,"msg":"serving initial configuration"}

运行sandbox是否可以用nginx替换Caddy

目前看到以下命令会构建出www的静态资源

yarn install
yarn build:deps
yarn build:sandpack

Caddy依赖的配置是以下几项

  1. https的设置
  2. local.netease.com的域名设置
  3. Origin-Agent-Cluster ?0 的 header设置

请问如果替换成nginx的话,是否只要满足以上3点就可以了?
是否还依赖Caddy的其他特性?

沙箱运行起来了 但是报错

首先感谢网易音乐云团队的付出。
image
1、看着像是环境变量的问题,请大佬指正
2、正式版咱们准备什么时候发行呢
3、项目中使用的是vue3 + element-plus 的二次封装, 怎么把项目修改成 vue3 的项目, 大佬能否说一下方案,或者应该注意的地方,愿意为社区贡献一份薄利

yarn start失败:digital envelope routines::unsupported

os: fedora 38
kernel: 6.5.5-200.fc38.x86_64
node: v18.18.0
code commit: 1a17ee1

$ yarn start
yarn run v1.22.19
$ yarn workspace playground start
$ umi dev
Starting the development server...

● Webpack █████████████████████████ building (10%) 1/2 modules 1 active
 babel-loader › src/.umi/umi.ts

(node:48865) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node-18 --trace-deprecation ...` to show where the warning was created)
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports.__webpack_modules__.57442.module.exports (/home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:135907:62)
    at NormalModule._initBuildHash (/home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109317:16)
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109352:10
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109223:13
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:61151:11
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:61017:18
    at context.callback (/home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:60895:13)
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/babel-loader/index.js:1:130029 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.18.0
Done in 2.85s.

沙箱能起来 但是报错

首先感谢网易音乐云团队的服务

image

看这像是环境变量的问题,具体怎么解决啊 大佬

项目中使用的vue3 + element-plus 组件的二次封装, 具体怎么修改成 vue3 项目,希望大佬说一下思路

Nice try...

看起来更像是 JSX 界面设计器。

这种设计的问题是完全没法摆脱代码编辑,比如

let button;
if (isLoggedIn) {
  button = <Button children="按钮1" />;
} else {
  button = <Button children="按钮2" />;
}
return (
  <Page title="页面标题">
    <Section></Section>
    <Section>{button}</Section>
  </Page>
);

可视化编辑器永远看不到另一个了,必须切换到代码编辑模式

是否可以将sandbox部署在相对路径上

目前sandbox是部署在根目录下,资源也是通过绝对路径加载的,导致部署在相对路径(比如/sandbox/)会失败。
但部署在根目录就需要有一个单独的域名。

codesandbox-client那边搜索了一下,也有相应的issue但没有提供好的解决方案,想知道这边有没有比较好的方案可以参考。

低代码平台提效的点在哪里

首先感谢网易云团队将低代码平台核心代码开源,其次我想问下,低代码平台一般都是给开发同学使用的,这种方式和传统的直接写代码的方式提效的点在哪,方便透露下内部使用了之后降本增效的数据吗?感谢🙏

文档建设需求

  1. 架构体系设计说明
  2. 很多代码中文注释不全
  3. 低代码开发文档
  4. 二次开发扩展手册
  5. 路线图

本地已有沙箱,如何接入?

我本地已经启动了一个sandpack沙箱,如何用它来替换sandbox?
我改写了bundlerURL,但问题是没法打通整个拖拽及事件系统

使用caddy托管后,无法使用https://local.netease.com:8443/访问,只能使用http://local.netease.com:2019/或者http://localhost:2019访问

更改了Caddyfile中的:8080为local.netease.com
使用caddy托管后,无法使用https://local.netease.com:8443/访问,只能使用http://local.netease.com:2019/或者http://localhost:2019访问,访问效果及日志如下
image

image
image
2023/11/01 09:40:12.310 INFO using adjacent Caddyfile
2023/11/01 09:40:12.312 WARN Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies {"adapter": "caddyfile", "file": "Caddyfile", "line": 3}
2023/11/01 09:40:12.324 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2023/11/01 09:40:12.326 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc0004bc100"}
2023/11/01 09:40:12.326 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 8443}
2023/11/01 09:40:12.326 WARN http.auto_https automatic HTTP->HTTPS redirects are disabled {"server_name": "srv0"}
2023/11/01 09:40:12.327 INFO http enabling HTTP/3 listener {"addr": ":8443"}
2023/11/01 09:40:12.327 INFO tls cleaning storage unit {"description": "FileStorage:/Users/01407142/Library/Application Support/Caddy"}
2023/11/01 09:40:12.328 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}
2023/11/01 09:40:12.328 INFO http enabling automatic TLS certificate management {"domains": ["local.netease.com"]}
2023/11/01 09:40:12.330 INFO tls finished cleaning storage units
2023/11/01 09:40:12.330 WARN tls stapling OCSP {"error": "no OCSP stapling for [local.netease.com]: no OCSP server specified in certificate", "identifiers": ["local.netease.com"]}
2023/11/01 09:40:12.333 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}
2023/11/01 09:40:12.334 INFO autosaved config (load with --resume flag) {"file": "/Users/01407142/Library/Application Support/Caddy/autosave.json"}
2023/11/01 09:40:12.334 INFO serving initial configuration

本地启动失败

tango和codesanbox 必须同源。否则codesanbox iframe中的window无法再tango环境里读取,如果无法读取,左边的物料面板是加载不全的

官方文档却介绍一个放在https://local.netease.com:6006(tango) 一个放在https://local.netease.com:8443(codesanbox)

执行 yarn start,启动不了项目

MacOS 之下启动,遇到下面的提示

yarn run v1.22.19
$ yarn workspace playground start
$ HTTPS=1 umi dev
Starting the development server...

● Webpack █████████████████████████ building (10%) 1/2 modules 1 active
 babel-loader › src/.umi/umi.ts

(node:24976) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
node:events:492
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND local.netease.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
Emitted 'error' event on Server instance at:
    at Server.emit (/Users/www/node_modules/@umijs/deps/compiled/spdy/spdy.js:1:211183)
    at GetAddrInfoReqWrap.doListen (node:net:2066:12)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:17) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'local.netease.com'
}

Node.js v20.5.0
✨  Done in 3.20s.

关于[vscode 插件]形态的疑问

因为在另外的问题下面提到了以后也会提供[vscode 插件]

想咨询一个这个插件的形态

  1. 是用vscode的编码能力替代设计器当中的源码视图吗?
  2. 因为vscode本身就能安装依赖启动服务,是否也能替代sandbox的角色?

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.