mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add --experiments flag to replace --experimental (#5767)
- Deprecates the --experimental flag - Adds a new flag --experiments which supports passing multiple comma-separated values or a wildcard value. - Exposes a new endpoint /api/v2/experiments that returns the list of enabled experiments. - Deprecates the field Features.Experimental in favour of this new API. - Updates apidocgen to support type aliases (shoutout to @mtojek). - Modifies apitypings to support generating slice types. - Updates develop.sh to pass additional args after -- to $CODERD_SHIM.
This commit is contained in:
@@ -982,6 +982,8 @@ export const MockEntitlementsWithAuditLog: TypesGen.Entitlements = {
|
||||
}),
|
||||
}
|
||||
|
||||
export const MockExperiments: TypesGen.Experiment[] = ["vscode_local"]
|
||||
|
||||
export const MockAuditLog: TypesGen.AuditLog = {
|
||||
id: "fbd2116a-8961-4954-87ae-e4575bd29ce0",
|
||||
request_id: "53bded77-7b9d-4e82-8771-991a34d759f9",
|
||||
|
||||
@@ -15,6 +15,11 @@ export const handlers = [
|
||||
return res(ctx.status(200), ctx.json(M.MockBuildInfo))
|
||||
}),
|
||||
|
||||
// experiments
|
||||
rest.get("/api/v2/experiments", async (req, res, ctx) => {
|
||||
return res(ctx.status(200), ctx.json(M.MockExperiments))
|
||||
}),
|
||||
|
||||
// update check
|
||||
rest.get("/api/v2/updatecheck", async (req, res, ctx) => {
|
||||
return res(ctx.status(200), ctx.json(M.MockUpdateCheck))
|
||||
|
||||
Reference in New Issue
Block a user