@adhd/apigen-plugin-health 0.2.1 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 0.2.2 (2026-08-07)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - **apigen:** wire MountHostBridge/LayerContext into express, fastify, health
7
+
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **apigen-cli:** restore 2768 files mass-deleted by 0117eb22 (BUG-APIGEN-052)
12
+
13
+
14
+ ### ❤️ Thank You
15
+
16
+ - parity-harness-self-test
17
+ - pseudosky
18
+
1
19
  ## 0.2.1 (2026-07-28)
2
20
 
3
21
  This was a version bump only for apigen-plugin-health to align it with other projects, there were no code changes.
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("ts-morph");require("node:fs");require("node:path");require("ts-json-schema-generator");function i(e){return{raw:e,words:e.split(/(?=[A-Z])|[-_]/).map(a=>a.toLowerCase()).filter(Boolean)}}function h(e,a,t={}){const s=e.split("/");if(s.length<2||s.some(c=>c.length===0))throw new Error(`syntheticOp: id "${e}" must be "<namespace>/<path...>" with non-empty segments`);const[p,...u]=s,l=p.replace(/^_+/,""),o=t.kind??"action",r={id:e,host:a.host,namespace:i(l),path:u.map(i),kind:o,async:t.async??!1,streaming:t.streaming??!1,safe:t.safe??o==="query",input:t.input??{},output:t.output??{},envelope:t.envelope??{},typeText:t.typeText??null};return t.hasCtx!==void 0&&(r.hasCtx=t.hasCtx),t.transports!==void 0&&(r.transports=t.transports),r}const m={"decimal.js":"Decimal"};function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Object.entries(m).map(([e,a])=>({pattern:new RegExp(`import\\(["'][^"']*${d(e)}[^"']*["']\\)\\.\\w+`,"g"),key:a}));function g(e,a={}){return[{...h("_meta/health",e,{kind:"query",safe:!0,output:{type:"object",required:["status","host"],properties:{status:{const:"ok"},host:{type:"string"},meta:{type:"object"}}},transports:["http","grpc"]}),handler:t=>{const s={status:"ok",host:e.host};return a.meta!==void 0&&Object.keys(a.meta).length>0&&(s.meta=a.meta),s}}]}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,a){return g(e,a)}}}};exports.default=n;exports.healthPlugin=n;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("ts-morph");require("node:fs");require("node:path");require("ts-json-schema-generator");function i(e){return{raw:e,words:e.split(/(?=[A-Z])|[-_]/).map(a=>a.toLowerCase()).filter(Boolean)}}function h(e,a,t={}){const s=e.split("/");if(s.length<2||s.some(c=>c.length===0))throw new Error(`syntheticOp: id "${e}" must be "<namespace>/<path...>" with non-empty segments`);const[p,...u]=s,l=p.replace(/^_+/,""),o=t.kind??"action",n={id:e,host:a.host,namespace:i(l),path:u.map(i),kind:o,async:t.async??!1,streaming:t.streaming??!1,safe:t.safe??o==="query",input:t.input??{},output:t.output??{},envelope:t.envelope??{},typeText:t.typeText??null};return t.hasCtx!==void 0&&(n.hasCtx=t.hasCtx),t.transports!==void 0&&(n.transports=t.transports),n}const m={"decimal.js":"Decimal"};function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Object.entries(m).map(([e,a])=>({pattern:new RegExp(`import\\(["'][^"']*${d(e)}[^"']*["']\\)\\.\\w+`,"g"),key:a}));function g(e,a={}){return[{...h("_meta/health",e,{kind:"query",safe:!0,output:{type:"object",required:["status","host"],properties:{status:{const:"ok"},host:{type:"string"},meta:{type:"object"}}},transports:["http","grpc"]}),handler:t=>{const s={status:"ok",host:e.host};return a.meta!==void 0&&Object.keys(a.meta).length>0&&(s.meta=a.meta),s}}]}const r={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,a){return g(e,a)}}}};exports.default=r;exports.healthPlugin=r;
package/index.mjs CHANGED
@@ -2,7 +2,7 @@ import "ts-morph";
2
2
  import "node:fs";
3
3
  import "node:path";
4
4
  import "ts-json-schema-generator";
5
- function n(t) {
5
+ function i(t) {
6
6
  return {
7
7
  raw: t,
8
8
  words: t.split(/(?=[A-Z])|[-_]/).map((a) => a.toLowerCase()).filter(Boolean)
@@ -14,21 +14,21 @@ function c(t, a, e = {}) {
14
14
  throw new Error(
15
15
  `syntheticOp: id "${t}" must be "<namespace>/<path...>" with non-empty segments`
16
16
  );
17
- const [i, ...p] = s, l = i.replace(/^_+/, ""), r = e.kind ?? "action", o = {
17
+ const [p, ...r] = s, l = p.replace(/^_+/, ""), o = e.kind ?? "action", n = {
18
18
  id: t,
19
19
  host: a.host,
20
- namespace: n(l),
21
- path: p.map(n),
22
- kind: r,
20
+ namespace: i(l),
21
+ path: r.map(i),
22
+ kind: o,
23
23
  async: e.async ?? !1,
24
24
  streaming: e.streaming ?? !1,
25
- safe: e.safe ?? r === "query",
25
+ safe: e.safe ?? o === "query",
26
26
  input: e.input ?? {},
27
27
  output: e.output ?? {},
28
28
  envelope: e.envelope ?? {},
29
29
  typeText: e.typeText ?? null
30
30
  };
31
- return e.hasCtx !== void 0 && (o.hasCtx = e.hasCtx), e.transports !== void 0 && (o.transports = e.transports), o;
31
+ return e.hasCtx !== void 0 && (n.hasCtx = e.hasCtx), e.transports !== void 0 && (n.transports = e.transports), n;
32
32
  }
33
33
  const h = {
34
34
  "decimal.js": "Decimal"
@@ -81,7 +81,7 @@ function d(t, a = {}) {
81
81
  }
82
82
  ];
83
83
  }
84
- const b = {
84
+ const w = {
85
85
  id: "health",
86
86
  description: "Mount plugin: exposes GET /meta/health for gateway readiness (SPEC §13.1)",
87
87
  language: "ts",
@@ -107,6 +107,6 @@ const b = {
107
107
  }
108
108
  };
109
109
  export {
110
- b as default,
111
- b as healthPlugin
110
+ w as default,
111
+ w as healthPlugin
112
112
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@adhd/apigen-plugin-health",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "main": "./index.js",
5
5
  "dependencies": {
6
- "@adhd/apigen-core-client": "^0.2.1"
6
+ "@adhd/apigen-core-client": "^0.3.0"
7
7
  },
8
8
  "publishConfig": {
9
9
  "access": "public"