Skip to content

Commit

Permalink
Merge pull request #3031 from illacloud/release/3.2.0
Browse files Browse the repository at this point in the history
Release/3.2.0
  • Loading branch information
AruSeito authored Oct 19, 2023
2 parents b51c3c8 + a2b7bcc commit 1ec4629
Show file tree
Hide file tree
Showing 901 changed files with 100,552 additions and 30,932 deletions.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/ai-agent-idea.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Has AI-Agent idea"
description: "AI-Agent idea request"
labels: ["ILLA with AI"]
title: "[AI Agent idea] "
body:
- type: "markdown"
attributes:
value: |
Thanks for creating an issue 😄!
Please search open/closed issues before submitting. Someone
might have asked the same thing before 😉!
If you want to discuss sth, please go to the [Discussion](https://github.com/illacloud/discussions)
- type: "input"
id: "description"
attributes:
label: "Description"
description: "A brief description of the idea."
validations:
required: true
- type: "textarea"
id: "additional-information"
attributes:
label: "Additional Information"
description: |
Use this section to provide any additional information you might have like notes, or links to ideas.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/app-idea.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Has ILLA App idea"
description: "ILLA App idea request"
labels: ["build with ILLA"]
title: "[ILLA App idea] "
body:
- type: "markdown"
attributes:
value: |
Thanks for creating an issue 😄!
Please search open/closed issues before submitting. Someone
might have asked the same thing before 😉!
If you want to discuss sth, please go to the [Discussion](https://github.com/illacloud/discussions)
- type: "input"
id: "description"
attributes:
label: "Description"
description: "A brief description of the idea."
validations:
required: true
- type: "textarea"
id: "additional-information"
attributes:
label: "Additional Information"
description: |
Use this section to provide any additional information you might have like notes, or links to ideas.
15 changes: 15 additions & 0 deletions .github/holopin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
organization: illa
defaultSticker: clnbuq0zt55350il7di08vxey
stickers:
-
id: clnbuwccz20050il45drk120o
alias: Awesome ILLA App
-
id: clnbuz74g85880lkz0a5fyzis
alias: Awesome AI Agent
-
id: clnbv3uo903310fmgagvt713t
alias: AI Agent
-
id: clnbuq0zt55350il7di08vxey
alias: ILLA App
16 changes: 16 additions & 0 deletions .github/workflows/issue-mark-assignees.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Issue Mark Assignees

on:
issue_comment:
types: [created, edited]

jobs:
mark-assignees:
runs-on: ubuntu-latest
steps:
- name: mark-assignees
uses: actions-cool/issues-helper@v3
with:
actions: 'mark-assignees'
token: ${{ secrets.ILLA_BOT_TOKEN }}
require-permission: "read"
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ The core team is monitoring for pull requests. We will review your pull request

## Development Workflow

After cloning Illa-builder, run `pnpm install`to fetch its dependencies.After this,you need input the following to `apps/builder/.env.development.local`
After cloning Illa-builder, run `pnpm install` to fetch its dependencies. After this, you need input the following to `apps/builder/.env.development.local`

```
ILLA_API_BASE_URL=localhost:9999 # this is your backend address,if not has this line, it will use the default backend address,location.origin
ILLA_API_BASE_URL=localhost:9999 # this is your backend address, if not has this line, it will use the default backend address, location.origin
ILLA_INSTANCE_ID=SELF_HOST_CLOUD
ILLA_APP_VERSION=0.0.0
ILLA_APP_ENV=development
Expand All @@ -53,7 +53,7 @@ Then, you can run several commands:
If you need to run the production version, you need input the following to `apps/builder/env.self`

```
ILLA_API_BASE_URL=localhost:9999 # this is your backend address,if not has this line, it will use the default backend address,location.origin
ILLA_API_BASE_URL=localhost:9999 # this is your backend address, if not has this line, it will use the default backend address, location.origin
ILLA_INSTANCE_ID=SELF_HOST_CLOUD
ILLA_APP_VERSION=0.0.0
ILLA_APP_ENV=production
Expand All @@ -79,12 +79,12 @@ ILLA_USE_HTTPS=false

#### If you not have rust

You can use Docker pull image:`docker pull illasoft/illa-builder:latest`,and then you can run `docker run -d -p 9345:2022 illasoft/illa-builder:latest`,this means you will deploy illa-builder-backend at port 9345. And then you can modify your `.env.development.local`
You can use Docker pull image: `docker pull illasoft/illa-builder:latest`, and then you can run `docker run -d -p 9345:2022 illasoft/illa-builder:latest`, this means you will deploy illa-builder-backend at port 9345. And then you can modify your `.env.development.local`




### If you are go developer


you can build [illa-builder-backend](https://github.com/illacloud/builder-backend)
you can build [illa-builder-backend](https://github.com/illacloud/builder-backend)
13 changes: 1 addition & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN ls -alh /etc/nginx/

RUN apk add --no-cache \
bash \
sed
sed


## copy frontend
Expand All @@ -18,18 +18,7 @@ RUN rm /etc/nginx/conf.d/default.conf
# test nginx
RUN nginx -t



RUN ls -alh /opt/illa/illa-builder-frontend/

## add main scripts
COPY illa-builder-frontend-main.sh /opt/illa/
COPY illa-builder-frontend-config-init.sh /opt/illa/
RUN chmod +x /opt/illa/illa-builder-frontend-main.sh
RUN chmod +x /opt/illa/illa-builder-frontend-config-init.sh

# HEALTHCHECK --interval=5s --timeout=3s CMD curl -fs http://127.0.0.1:80/status?src=docker_health_check -H"Host:localhost" || exit 1

# run
EXPOSE 80
CMD ["/opt/illa/illa-builder-frontend-main.sh"]
2 changes: 1 addition & 1 deletion README-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ ILLA コミュニティに参加して、アイデア、提案、質問を共有

お問い合わせ: [email protected]

## 免許証
## ライセンス

このプロジェクトは [Apache License 2.0](./LICENSE) です。
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ Join ILLA Community to share your ideas, suggestions, or questions and connect w

## 🌱 Contributing

Thinking about contributing? All kinds of contributions to ILLA are greatly appreciated and welcomed! Check out [Contributing Guide](./CONTRIBUTING.md) for details about how you can get involved.
<p>Appreciate all the contributions from ❤︎ <a href="https://github.com/illacloud/illa-builder/graphs/contributors">contributors</a></p>
Thinking about contributing? All kind of contributions to ILLA are greatly appreciated and welcomed! Check out our [Contribution Guide](./CONTRIBUTING.md) for details about how you can get involved.
<p>Appreciate all the contributions from our ❤︎ <a href="https://github.com/illacloud/illa-builder/graphs/contributors">Contributors!</a></p>

## 📢 Translating

The `apps/builder/src/i18n/locale/*` dirs are kept up-to-date automatically via Crowdin. See our [official translation page](https://crowdin.com/project/illa-builder) in case you like to contribute.
The `apps/builder/src/i18n/locale/*` dirs are kept up-to-date automatically via Crowdin. See our [official translation page](https://crowdin.com/project/illa-builder) in case you would like to contribute.

## 🔥 We're Hiring
## 🔥 We are Hiring!

Looking for a passionate and creative team? We are actively hiring engineers for the following positions:

Expand All @@ -138,6 +138,6 @@ Looking for a passionate and creative team? We are actively hiring engineers for

Contact Us: [email protected]

## License
## LICENSE

This project is [Apache License 2.0](./LICENSE).
This project is currently licensed under [Apache License 2.0](./LICENSE).
1 change: 0 additions & 1 deletion apps/builder/.env.self
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ILLA_INSTANCE_ID=SELF_HOST_CLOUD
ILLA_APP_VERSION=0.0.0
ILLA_APP_ENV=production
8 changes: 5 additions & 3 deletions apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"author": "ILLA Cloud <[email protected]>",
"license": "Apache-2.0",
"version": "3.1.1",
"version": "3.2.0",
"scripts": {
"dev": "vite --strictPort --force",
"build-cloud": "NODE_OPTIONS=--max-old-space-size=12288 vite build --mode cloud",
Expand Down Expand Up @@ -91,7 +91,6 @@
"react-slick": "^0.29.0",
"react-use": "^17.4.0",
"react-use-measure": "^2.1.1",
"react-virtualized-auto-sizer": "^1.0.20",
"react-virtuoso": "^4.3.11",
"react-window": "^1.8.9",
"react-window-infinite-loader": "^1.0.9",
Expand Down Expand Up @@ -124,7 +123,10 @@
"@illa-public/invite-modal": "workspace:*",
"@illa-public/illa-net": "workspace:*",
"@illa-public/member-page": "workspace:*",
"@illa-public/upgrade-modal": "workspace:*"
"@illa-public/upgrade-modal": "workspace:*",
"@illa-public/text-link": "workspace:*",
"@illa-public/resource-generator": "workspace:*",
"@illa-public/public-types": "workspace:*"
},
"devDependencies": {
"@mdx-js/rollup": "^2.3.0",
Expand Down
44 changes: 0 additions & 44 deletions apps/builder/src/api/actions/index.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
import { builderRequest } from "@illa-public/illa-net"
import { isEqual } from "lodash"
import { getTemplateConfig } from "@/config/template"
import { TemplateName } from "@/config/template/interface"
import { actionActions } from "@/redux/currentApp/action/actionSlice"
import {
ActionContent,
ActionItem,
} from "@/redux/currentApp/action/actionState"
import { getAllResources } from "@/redux/resource/resourceSelector"
import { resourceActions } from "@/redux/resource/resourceSlice"
import {
Resource,
ResourceContent,
ResourceInitialConfig,
} from "@/redux/resource/resourceState"
import { createApp } from "@/services/apps"
import store from "@/store"
import { getCurrentTeamID } from "@/utils/team"

Expand Down Expand Up @@ -47,43 +41,5 @@ export const createAction = async (
},
{ teamID: getCurrentTeamID() },
)
store.dispatch(actionActions.addActionItemReducer(response.data))
return response.data.actionID
}

export const forkTemplateApp = async (
templateType: TemplateName,
appName: string,
) => {
const {
config: { appConfig, actions, resources },
} = getTemplateConfig(templateType)
const currentResources = getAllResources(store.getState())
const resourceList = await Promise.all(
resources.map((data) => {
const resource = currentResources.find(
(item) =>
item.resourceName === data.resourceName &&
item.resourceType === data.resourceType &&
isEqual(item.content, data.content),
)

return resource ? resource.resourceID : createResource(data)
}),
)

const appId = await createApp(appName, appConfig)
if (resourceList.length) {
await Promise.all(
actions.map((data) => {
const { resourceIndex, resourceID: _, ...actionData } = data
const resourceID = resourceList[resourceIndex] || ""
return createAction(appId, {
...actionData,
resourceID,
})
}),
)
}
return appId
}
2 changes: 1 addition & 1 deletion apps/builder/src/api/http/interceptors/request/auth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAuthToken } from "@illa-public/utils"
import { AxiosRequestConfig } from "axios"
import { getAuthToken } from "@/utils/auth"

export const authInterceptor = (config: AxiosRequestConfig) => {
const token = getAuthToken()
Expand Down
34 changes: 5 additions & 29 deletions apps/builder/src/api/http/interceptors/response/errorHandler.ts
Original file line number Diff line number Diff line change
@@ -1,54 +1,30 @@
import { isCloudVersion } from "@illa-public/utils"
import { getILLABuilderURL, removeAuthToken } from "@illa-public/utils"
import { AxiosError } from "axios"
import { cloudRedirect } from "@/router/constant"
import { getQS } from "@/router/utils/translateQS"
import { removeAuthToken } from "@/utils/auth"
import { commonBillingErrorHandler } from "@/utils/billing/errorHandler"

const getRedirectPathWhen401 = (searchParams: URLSearchParams) => {
const inviteToken = searchParams.get("inviteToken")
const qs = getQS(searchParams)
if (inviteToken) {
return `/register${qs}`
} else {
return `/login${qs}`
}
}

export const errorHandlerInterceptor = (error: AxiosError) => {
const { response } = error
if (!response) return Promise.reject(error)
const { href } = location
const { status } = response
switch (status) {
// TODO: @aruseito maybe need custom error status, because of we'll have plugin to request other's api
case 401: {
removeAuthToken()
if (isCloudVersion) {
// navigate to illa cloud, avoid redirect loop
if (!href.includes("redirectURL")) {
window.location.href = cloudRedirect
}
} else {
const { href } = location
const url = new URL(href)
const searchParams = url.searchParams
const path = getRedirectPathWhen401(searchParams)
window.location.pathname = path
}
window.location.href = cloudRedirect
break
}
case 403: {
window.location.pathname = "/403"
window.location.href = `${getILLABuilderURL()}/403`
break
}
case 500: {
window.location.pathname = "/500"
window.location.href = `${getILLABuilderURL()}/500`
break
}
default: {
if (status >= 500) {
window.location.pathname = "/500"
window.location.href = `${getILLABuilderURL()}/500`
break
}
commonBillingErrorHandler(response)
Expand Down
4 changes: 2 additions & 2 deletions apps/builder/src/api/ws/illaWS.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getCurrentTeamInfo } from "@illa-public/user-data"
import { getAuthToken } from "@illa-public/utils"
import { getTextMessagePayload } from "@/api/ws/index"
import {
Callback,
Expand All @@ -16,7 +17,6 @@ import {
REMOVE_DISPLAY_NAME,
UPDATE_DISPLAY_NAME,
} from "@/utils/generators/generateDisplayName"
import { ILLABuilderStorage } from "@/utils/storage"

const HEARTBEAT_PING_TIMEOUT = 2 * 1000
const HEARTBEAT_PONG_TIMEOUT = 5 * 1000
Expand Down Expand Up @@ -212,7 +212,7 @@ export class ILLAWebsocket {
uid,
[
{
authToken: ILLABuilderStorage.getLocalStorage("token"),
authToken: getAuthToken(),
},
],
),
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/api/ws/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
WSMessageListener,
} from "@/api/ws/illaWS"
import { TextSignal, TextTarget } from "@/api/ws/textSignal"
import { ComponentNode } from "@/redux/currentApp/editor/components/componentsState"
import { ComponentNode } from "@/redux/currentApp/components/componentsState"
import store from "@/store"
import { MovingMessageBin, Signal, Target } from "./ILLA_PROTO"
import { ILLABinaryWebsocket } from "./illaBinaryWS"
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/src/api/ws/interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TextSignal, TextTarget } from "@/api/ws/textSignal"
import { ComponentNode } from "@/redux/currentApp/editor/components/componentsState"
import { ComponentNode } from "@/redux/currentApp/components/componentsState"

export type RoomType = "dashboard" | "app" | "ai-agent"

Expand Down
Loading

0 comments on commit 1ec4629

Please sign in to comment.