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
2 changes: 1 addition & 1 deletion .github/agents/spx-upgrader.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You are a release specialist dedicated to upgrading spx across goplus/builder sa
- For released versions, verify they exist by running `gh release view --repo goplus/spx v<version>`
- Verify the matching web package exists by running `npm view @xgo-pkgs/spx@<version> version`
- Run `pnpm add @xgo-pkgs/spx@<version> --save-exact` in `spx-gui/` to update `spx-gui/package.json` and `spx-gui/pnpm-lock.yaml`
- Refresh Go modules in `tools/ai/`, `tools/spxls/`, and `tools/ispx/` via `go get github.com/goplus/spx/v2@v<version>` followed by `go mod tidy` in each directory
- Refresh Go modules in `tools/ai/`, `tools/spxls/`, and `tools/ispx/` via `go get github.com/goplus/spx/v3@v<version>` followed by `go mod tidy` in each directory
- Execute `pnpm install --frozen-lockfile` in `spx-gui/` to install dependencies and expose the installed runtime assets under `spx-gui/public/` via `postinstall`
- Execute `bash build-wasm.sh` in `spx-gui/` to build Wasm components
- Run `pnpm run lint`, `pnpm run test -- --run` in `spx-gui/`, plus `go test ./...` inside `tools/ai/`, `tools/spxls/`, and `tools/ispx/` if there are packages to test
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/code-editor/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ interface DefinitionIdentifier {
* If `main`, it's the current user package.
* Exmples:
* - `fmt`
* - `github.com/goplus/spx/v2`
* - `github.com/goplus/spx/v3`
* - `main`
*/
package?: string
Expand Down
52 changes: 3 additions & 49 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,6 @@ paths:
- title
- thumbnail
- entrypoint
- references
- prompt
properties:
title:
Expand All @@ -1692,8 +1691,6 @@ paths:
$ref: "#/components/schemas/Course/properties/thumbnail"
entrypoint:
$ref: "#/components/schemas/Course/properties/entrypoint"
references:
$ref: "#/components/schemas/Course/properties/references"
prompt:
$ref: "#/components/schemas/Course/properties/prompt"
responses:
Expand Down Expand Up @@ -3137,8 +3134,6 @@ paths:
$ref: "#/components/schemas/Course/properties/thumbnail"
entrypoint:
$ref: "#/components/schemas/Course/properties/entrypoint"
references:
$ref: "#/components/schemas/Course/properties/references"
prompt:
$ref: "#/components/schemas/Course/properties/prompt"
responses:
Expand Down Expand Up @@ -4600,7 +4595,7 @@ paths:
description: |
Scratch project file, such as .sb2, .sb3, or project zip. Form field name must be `file`.

Maximum size is 64 MiB.
Maximum size is 128 MiB.
type: string
format: binary
responses:
Expand Down Expand Up @@ -5409,8 +5404,6 @@ paths:
$ref: "#/components/schemas/AccountApp/properties/clientType"
redirectURIs:
$ref: "#/components/schemas/AccountApp/properties/redirectURIs"
allowedOrigins:
$ref: "#/components/schemas/AccountApp/properties/allowedOrigins"
responses:
"201":
description: Account app created.
Expand Down Expand Up @@ -5489,8 +5482,6 @@ paths:
$ref: "#/components/schemas/AccountApp/properties/status"
redirectURIs:
$ref: "#/components/schemas/AccountApp/properties/redirectURIs"
allowedOrigins:
$ref: "#/components/schemas/AccountApp/properties/allowedOrigins"
responses:
"200":
description: Account app updated.
Expand Down Expand Up @@ -6357,12 +6348,12 @@ components:
examples:
- John Doe
avatar:
description: Public HTTP URL or Kodo universal URL of the user's avatar image.
description: Public HTTP URL of the user's avatar image.
type: string
format: uri
pattern: "^https?://"
examples:
- https://avatars.example.com/users/10137.png
- kodo://xbuilder-usercontent-test/files/avatar.png
description:
description: Brief bio or description of the user.
type: string
Expand Down Expand Up @@ -6667,7 +6658,6 @@ components:
- status
- redirectURIs
- redirectURIPatterns
- allowedOrigins
properties:
id:
$ref: "#/components/schemas/Model/properties/id"
Expand Down Expand Up @@ -6743,16 +6733,6 @@ components:
type: string
examples:
- - https://app-*.example.com/oauth/callback
allowedOrigins:
description: |
Allowed web origins.

Production web origins must use `https`, must not include path, query, or fragment, and must be matched
exactly by the server.
type: array
items:
type: string
format: uri

AccountAppSecret:
type: object
Expand Down Expand Up @@ -7580,7 +7560,6 @@ components:
- title
- thumbnail
- entrypoint
- references
- prompt
properties:
id:
Expand Down Expand Up @@ -7613,38 +7592,13 @@ components:
minLength: 1
examples:
- /editor/john/loop
references:
description: References associated with the course.
type: array
items:
$ref: "#/components/schemas/CourseReference"
prompt:
description: Prompt text for the course (used for copilot assistance).
type: string
maxLength: 4000
examples:
- Learn the basics of XGo programming language

CourseReference:
description: Reference to a resource associated with a course.
type: object
required:
- type
- fullName
properties:
type:
description: Type of the reference.
type: string
enum:
- project
examples:
- project
fullName:
description: Full name of the reference, in the format `owner/project`.
$ref: "#/components/schemas/ProjectFullName"
examples:
- john/NiuXiaoQi

CourseSeries:
description: Collection of related courses.
type: object
Expand Down
3 changes: 2 additions & 1 deletion spx-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"dependencies": {
"@floating-ui/dom": "^1.7.6",
"@jridgewell/resolve-uri": "^3.1.2",
"@lottiefiles/dotlottie-web": "0.41.0",
"@lottiefiles/dotlottie-vue": "^0.5.8",
"@nighca/fflate": "^0.8.3",
"@scalar/api-reference": "^1.40.0",
Expand All @@ -43,7 +44,7 @@
"@vue/runtime-core": "3.5.25",
"@vue/test-utils": "^2.4.5",
"@vue/tsconfig": "^0.8.1",
"@xgo-pkgs/spx": "2.0.4",
"@xgo-pkgs/spx": "3.0.0",
"bowser": "^2.14.1",
"browserslist": "^4.28.0",
"browserslist-to-esbuild": "^2.1.1",
Expand Down
13 changes: 8 additions & 5 deletions spx-gui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions spx-gui/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ packages:
- .
allowBuilds:
vue-demi: true
minimumReleaseAgeExclude:
- '@xgo-pkgs/spx'
2 changes: 0 additions & 2 deletions spx-gui/src/apis/account/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export type AccountApp = AccountModel & {
redirectURIs: string[]
/** Read-only allowed redirect URI patterns */
redirectURIPatterns: string[]
/** Allowed web origins */
allowedOrigins: string[]
}

export type AccountAppSecret = {
Expand Down
4 changes: 0 additions & 4 deletions spx-gui/src/apis/admin/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ export type CreateAccountAppParams = {
clientType: AccountAppClientType
/** Allowed redirect URIs */
redirectURIs: string[]
/** Allowed web origins */
allowedOrigins?: string[]
}

export function createAccountApp(params: CreateAccountAppParams) {
Expand All @@ -213,8 +211,6 @@ export type UpdateAccountAppParams = {
status?: AccountAppStatus
/** Allowed redirect URIs */
redirectURIs?: string[]
/** Allowed web origins */
allowedOrigins?: string[]
}

export function updateAccountApp(appID: string, params: UpdateAccountAppParams) {
Expand Down
12 changes: 1 addition & 11 deletions spx-gui/src/apis/course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ import { client, type ByPage, type PaginationParams } from './common'
export const courseTitleMaxLength = 200
export const coursePromptMaxLength = 4000

export type ProjectReference = {
type: 'project'
/** Full name of the project, in the format `owner/project`. */
fullName: string
}

export type Reference = ProjectReference // We may support more reference types in the future

export type Course = {
/** Unique identifier */
id: string
Expand All @@ -22,8 +14,6 @@ export type Course = {
thumbnail: string
/** Starting URL of the course */
entrypoint: string
/** References of the course */
references: Reference[]
/** Prompt (for copilot) of the course */
prompt: string
}
Expand All @@ -33,7 +23,7 @@ export function getCourse(id: string, signal?: AbortSignal) {
return client.get(`/courses/${encodeURIComponent(id)}`, undefined, { signal }) as Promise<Course>
}

export type AddUpdateCourseParams = Pick<Course, 'title' | 'thumbnail' | 'entrypoint' | 'references' | 'prompt'>
export type AddUpdateCourseParams = Pick<Course, 'title' | 'thumbnail' | 'entrypoint' | 'prompt'>

/** Add a new course */
export function addCourse(params: AddUpdateCourseParams, signal?: AbortSignal) {
Expand Down
2 changes: 1 addition & 1 deletion spx-gui/src/apis/project-conversion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DefaultException } from '@/utils/exception'
import { client } from './common'
import { humanizeFileSize } from '@/utils/utils'

const maxFileSize = 64 * 1024 * 1024 // 64MB
const maxFileSize = 128 * 1024 * 1024 // 128MB
const convertTimeout = 60 * 1000 // 60s

/**
Expand Down
2 changes: 1 addition & 1 deletion spx-gui/src/apis/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type User = {
username: string
/** Display name of the user */
displayName: string
/** URL of the user's avatar image */
/** Public HTTP URL of the user's avatar image */
avatar: string
/** Brief bio or description of the user */
description: string
Expand Down
Loading