@adhd/apigen-plugin-health 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,5 +9,5 @@ npx @adhd/apigen-cli run --source ./api.ts --type api-fastify --use @adhd/apigen
9
9
  ```
10
10
 
11
11
  ```ts
12
- import { healthPlugin, type HealthOptions } from '@adhd/apigen-plugin-health'
12
+ import { healthPlugin, type HealthOptions } from '@adhd/apigen-plugin-health';
13
13
  ```
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function s(e){return{raw:e,words:[e]}}function n(e,t={}){return[{id:"_meta/health",host:e.host,namespace:s("meta"),path:[s("health")],kind:"query",async:!1,streaming:!1,safe:!0,input:{},output:{type:"object",required:["status","host"],properties:{status:{const:"ok"},host:{type:"string"},meta:{type:"object"}}},envelope:{},typeText:null,transports:["http","grpc"],handler:i=>{const a={status:"ok",host:e.host};return t.meta!==void 0&&Object.keys(t.meta).length>0&&(a.meta=t.meta),a}}]}const o={id:"health",description:"Mount plugin: exposes GET /meta/health for gateway readiness (SPEC §13.1)",optionsSchema:{type:"object",properties:{meta:{type:"object",description:"Extra metadata included in the health response"}},additionalProperties:!1},capabilities:{mount:{operations(e,t){return n(e,t)}}}};exports.default=o;exports.healthPlugin=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function s(e){return{raw:e,words:[e]}}function o(e,t={}){return[{id:"_meta/health",host:e.host,namespace:s("meta"),path:[s("health")],kind:"query",async:!1,streaming:!1,safe:!0,input:{},output:{type:"object",required:["status","host"],properties:{status:{const:"ok"},host:{type:"string"},meta:{type:"object"}}},envelope:{},typeText:null,transports:["http","grpc"],handler:i=>{const a={status:"ok",host:e.host};return t.meta!==void 0&&Object.keys(t.meta).length>0&&(a.meta=t.meta),a}}]}const n={id:"health",description:"Mount plugin: exposes GET /meta/health for gateway readiness (SPEC §13.1)",language:"ts",optionsSchema:{type:"object",properties:{meta:{type:"object",description:"Extra metadata included in the health response"}},additionalProperties:!1},capabilities:{mount:{operations(e,t){return o(e,t)}}}};exports.default=n;exports.healthPlugin=n;
package/index.mjs CHANGED
@@ -45,17 +45,24 @@ function n(t, e = {}) {
45
45
  const r = {
46
46
  id: "health",
47
47
  description: "Mount plugin: exposes GET /meta/health for gateway readiness (SPEC §13.1)",
48
+ language: "ts",
48
49
  optionsSchema: {
49
50
  type: "object",
50
51
  properties: {
51
- meta: { type: "object", description: "Extra metadata included in the health response" }
52
+ meta: {
53
+ type: "object",
54
+ description: "Extra metadata included in the health response"
55
+ }
52
56
  },
53
57
  additionalProperties: !1
54
58
  },
55
59
  capabilities: {
56
60
  mount: {
57
61
  operations(t, e) {
58
- return n(t, e);
62
+ return n(
63
+ t,
64
+ e
65
+ );
59
66
  }
60
67
  }
61
68
  }
package/lib/plugin.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Plugin } from '@adhd/apigen-core';
1
+ import { Plugin } from '@adhd/apigen-core-client';
2
2
 
3
3
  /** Options accepted by the health mount plugin. */
4
4
  export interface HealthOptions {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@adhd/apigen-plugin-health",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "main": "./index.js",
5
5
  "dependencies": {
6
- "@adhd/apigen-core": "^0.1.0"
6
+ "@adhd/apigen-core-client": "^0.1.0"
7
7
  },
8
8
  "publishConfig": {
9
9
  "access": "public"