mirror of
https://gitee.com/zhangsken/opencode.git
synced 2026-10-16 10:30:01 +08:00
refactor(schema): remove project initialized time
This commit is contained in:
@@ -66,7 +66,7 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|---|---|---|---|---|---|
|
||||
| [x] 001–002 | `GET` | `/api/status` | `server.status` | Keep | Replaces the former health and server endpoints. |
|
||||
| [x] 003 | `GET` | `/api/location` | `location.get` | Keep | Workspace selectors and response fields removed until workspace support ships. |
|
||||
| [ ] 004 | `GET` | `/api/project` | `project.list` | | |
|
||||
| [x] 004 | `GET` | `/api/project` | `project.list` | Keep | Removed unused `time.initialized`; the database column remains for migration data. |
|
||||
| [ ] 005 | `PATCH` | `/api/project/{projectID}` | `project.update` | | |
|
||||
|
||||
## Group 2: Configuration and capability catalogs
|
||||
|
||||
@@ -304,7 +304,7 @@ export type ProjectIcon = { url?: string; override?: string; color?: string }
|
||||
|
||||
export type ProjectCommands = { start?: string }
|
||||
|
||||
export type ProjectTime = { created: number; updated: number; initialized?: number }
|
||||
export type ProjectTime = { created: number; updated: number }
|
||||
|
||||
export type FormMetadata = { [x: string]: JsonValue }
|
||||
|
||||
|
||||
@@ -85,7 +85,6 @@ function fromRow(row: typeof ProjectTable.$inferSelect): Info {
|
||||
time: {
|
||||
created: row.time_created,
|
||||
updated: row.time_updated,
|
||||
initialized: row.time_initialized ?? undefined,
|
||||
},
|
||||
sandboxes: row.sandboxes,
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ describe("Project.list", () => {
|
||||
{
|
||||
id: Project.ID.make("newer"),
|
||||
canonical: abs("/newer"),
|
||||
time: { created: 2, updated: 2, initialized: 3 },
|
||||
time: { created: 2, updated: 2 },
|
||||
sandboxes: [],
|
||||
},
|
||||
{
|
||||
@@ -551,7 +551,7 @@ describe("Project.resolve", () => {
|
||||
icon: { color: "#123456" },
|
||||
commands: { start: "bun dev" },
|
||||
sandboxes: [abs("/preserved-sandbox")],
|
||||
time: { created: 1, initialized: 2 },
|
||||
time: { created: 1 },
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -16572,10 +16572,6 @@
|
||||
"updated": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"initialized": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": ["created", "updated"],
|
||||
|
||||
@@ -32,7 +32,6 @@ export interface Commands extends Schema.Schema.Type<typeof Commands> {}
|
||||
export const Time = Schema.Struct({
|
||||
created: NonNegativeInt,
|
||||
updated: NonNegativeInt,
|
||||
initialized: optional(NonNegativeInt),
|
||||
}).annotate({ identifier: "Project.Time" })
|
||||
export interface Time extends Schema.Schema.Type<typeof Time> {}
|
||||
|
||||
|
||||
@@ -16572,10 +16572,6 @@
|
||||
"updated": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"initialized": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": ["created", "updated"],
|
||||
|
||||
@@ -16572,10 +16572,6 @@
|
||||
"updated": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"initialized": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": ["created", "updated"],
|
||||
|
||||
Reference in New Issue
Block a user