ApiModule · packages/server/src/http/routes/plugin-market.ts:125

PluginMarketRoutes

component

The market's routes, deployment-global like the plugin index. The published document rides a hot push the way the index does: the successor starts from what the last App fetched, so a refresh that fails right after the push still answers with it.

API

@Component({
  contributes: {
    "HttpModule.routes": [
      { id: "PluginMarketRoutes.routes", prefix: "/api/plugins/market", auth: "user", order: 68 },
    ],
  },
  context: {
    version: 1,
    schema: { "market?": { at: "number", document: "unknown" } },
  },
})
export class PluginMarketRoutes {
  @Use() private readonly config!: Config;
  @Use() private readonly log!: Log;
  @Use() private readonly hmr!: Hmr;
  @Bind("PluginMarketRoutes.routes") routes!: Hono<AppEnv>;
  setup(_ctx: ClassCtx, context: Json);
  park(): Json;
}

Dependencies & Wiring

Extracted from class decorators
@Userequires (3)
config: Config · log: Log · hmr: Hmr
@Bindbinds (1)
routes → PluginMarketRoutes.routes: Hono<AppEnv>

Parked Context

context: {
    version: 1,
    schema: { "market?": { at: "number", document: "unknown" } },
  }

Contributes

{
  "HttpModule.routes": [
    {
      "id": "PluginMarketRoutes.routes",
      "prefix": "/api/plugins/market",
      "auth": "user",
      "order": 68
    }
  ]
}

Target slots: HttpModule.routes · View HTTP endpoints (2) →

Methods (2)

setup

setup(_ctx: ClassCtx, context: Json)
@param_ctxClassCtx
@paramcontextJson

park

park(): Json
@returnsJson