@mcp-com-ai/shared-utils 1.0.1-beta.260912 → 1.0.2-beta.260914

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/dist/errors.js CHANGED
@@ -1,3 +1,4 @@
1
1
  // @bun
2
- var N=Object.create;var{getPrototypeOf:A,defineProperty:U,getOwnPropertyNames:B}=Object;var V=Object.prototype.hasOwnProperty;function S(j){return this[j]}var y,k,v=(j,q,G)=>{var J=j!=null&&typeof j==="object";if(J){var Q=q?y??=new WeakMap:k??=new WeakMap,P=Q.get(j);if(P)return P}G=j!=null?N(A(j)):{};let X=q||!j||!j.__esModule?U(G,"default",{value:j,enumerable:!0}):G;for(let Y of B(j))if(!V.call(X,Y))U(X,Y,{get:S.bind(j,Y),enumerable:!0});if(J)Q.set(j,X);return X};var m=(j,q)=>()=>(q||j((q={exports:{}}).exports,q),q.exports);var d=import.meta.require;var _={},$=I(),Z=$.isBunRuntime,F=$.isCloudflareRuntime,E=$.isNodeRuntime,H=$.hasFileSystemAccess,w=$.console,M=_;K();function D(j,q){let G=typeof process<"u"?process.env:void 0,J=G?G[j]:void 0,Q=Z?Bun?.env?.[j]:void 0,P=M[j],X=typeof P==="string"?P:void 0,Y=F?X??J??Q:J??Q??X;return Y===void 0||Y===""?q:Y}function u(j,q){if(typeof process<"u")process.env[j]=q;M[j]=q}function l(j){globalThis.__hapiRuntimeOverride="cloudflare",O(),Object.assign(_,j)}function a(){delete globalThis.__hapiRuntimeOverride,O()}async function i(j){if(!Z)throw Error(`File system access not available in this runtime: ${j}`);return await Bun.file(j).text()}async function r(j){if(!Z)throw Error(`File system access not available in this runtime: ${j}`);return await Bun.file(j).json()}async function n(j){return Z?await Bun.file(j).exists():!1}function o(j){if(!Z)throw Error(`File system access not available in this runtime: ${j}`);return Bun.file(j)}function O(){let j=I();z(j),K()}function t(){if(H)return;if(W()!==void 0)return;let j=I();z(j),K()}function I(){let j=W(),q=f(j),G=q?!1:R(j),J=C(j,G);return{isBunRuntime:q,isCloudflareRuntime:G,isNodeRuntime:J,hasFileSystemAccess:!G&&(q||J),console:b()}}function f(j){if(j==="bun")return!0;if(j==="cloudflare"||j==="node")return!1;return typeof Bun<"u"}function R(j){if(j==="cloudflare")return!0;if(j==="bun"||j==="node")return!1;let q=typeof globalThis<"u"?globalThis:void 0,G=q?.navigator?.userAgent??"",J=typeof G==="string"&&G.includes("Cloudflare-Workers"),Q=typeof q?.__ENVIRONMENT__==="string"&&q.__ENVIRONMENT__.toLowerCase()==="workerd",P=typeof q?.caches?.default<"u";return J||Q||P}function C(j,q){if(j==="node")return!0;if(j==="bun"||j==="cloudflare")return!1;if(q)return!1;let G=typeof process<"u"?process.versions?.node:void 0;return typeof G==="string"&&G.length>0}function W(){return typeof globalThis<"u"?globalThis.__hapiRuntimeOverride:void 0}function b(){let j=()=>{},q=typeof console<"u"?console:void 0;if(!q)return{log:j,info:j,warn:j,error:j,debug:j};let G=(Q,P)=>typeof Q==="function"?Q.bind(q):P,J=G(q.log,j);return{log:J,info:G(q.info,J),warn:G(q.warn,J),error:G(q.error,J),debug:G(q.debug,J)}}function z(j){Z=j.isBunRuntime,F=j.isCloudflareRuntime,E=j.isNodeRuntime,H=j.hasFileSystemAccess,w=j.console}function K(){let j=x();for(let q of Object.keys(_))delete _[q];Object.assign(_,j)}function x(){if(Z)return{...typeof Bun<"u"?Bun.env:{},...typeof process<"u"?process.env:{}};return(typeof process<"u"?process:void 0)?.env??{}}function T(j){if(typeof j==="string")return j;if(j&&typeof j.toString==="function")return j.toString();try{return JSON.stringify(j)}catch{return String(j)}}function L(j){if(!j)return;return j.split(`
3
- `).map((q)=>q.trim()).find(Boolean)}function h(){return D("HAPI_DEBUG")==="true"||D("NODE_ENV")==="development"||D("DEBUG")==="true"||process.argv.includes("--dev")}function g(j){let q=[],G=j.toLowerCase();if(G.includes("wrangler")&&(G.includes("not found")||G.includes("command not found")))q.push("Wrangler CLI not found. Install with: bun add -g wrangler | npm i -g wrangler"),q.push("Then run: hapi cloudflare login");if(G.includes("not authenticated")||G.includes("unauthorized"))q.push("You may need to authenticate: hapi cloudflare login");if(G.includes("bun: command not found")||G.startsWith("bun: "))q.push("Bun runtime not found. Install from https://bun.sh and ensure `bun` is in PATH");if(G.includes("eaddrinuse")||G.includes("address already in use"))q.push("Port is in use. Try a different `--port` or stop the process holding it");if(G.includes("econnrefused")||G.includes("connection refused"))q.push("Connection refused. Ensure the target server is running and reachable");if(G.includes("enotfound")||G.includes("getaddrinfo enotfound"))q.push("Host not found. Check the URL or your network connectivity");if(G.includes("yaml")&&(G.includes("parse")||G.includes("syntax")))q.push("YAML parsing failed. Check the file for syntax/indentation issues");if(G.includes("no such file or directory")||G.includes("enoent"))q.push("File not found. Verify the path or provide the correct argument");if(G.includes("permission denied")||G.includes("eacces"))q.push("Permission denied. Try a different directory or adjust permissions");return q}function c(j){let q=j,G=q?.stderr?T(q.stderr):void 0,J=q?.stdout?T(q.stdout):void 0,P=L(G)||L(J)||q?.message||"Unknown error";return{message:P.trim(),hints:g(P),stack:q&&typeof q.stack==="string"?q.stack:void 0}}function qj(j,q,G={}){let{message:J,hints:Q,stack:P}=c(q),X=G.showStack??h();console.error(`${j}${J?`: ${J}`:""}`);for(let Y of Q)console.error(`\u2022 ${Y}`);if(X&&P)console.error("Stack:"),console.error(P)}class p extends Error{exitCode;hints;constructor(j,q={}){super(j);if(this.name="HapiCliError",this.exitCode=q.exitCode??1,this.hints=q.hints??[],q.cause!==void 0)this.cause=q.cause}}export{qj as printCliError,h as isDebugEnabled,c as formatCliError,p as HapiCliError};
2
+ var d={},a=f(),{isBunRuntime:s,isCloudflareRuntime:p,isNodeRuntime:x,hasFileSystemAccess:m,console:w}=a,y=d;g();function l(e,n){let t=typeof process<"u"?process.env:void 0,i=t?t[e]:void 0,o=s?Bun?.env?.[e]:void 0,r=y[e],c=typeof r==="string"?r:void 0,u=p?c??i??o:i??o??c;return u===void 0||u===""?n:u}function L(e,n){if(typeof process<"u")process.env[e]=n;y[e]=n}function P(e){globalThis.__hapiRuntimeOverride="cloudflare",h(),Object.assign(d,e)}function V(){delete globalThis.__hapiRuntimeOverride,h()}async function I(e){if(!s)throw Error(`File system access not available in this runtime: ${e}`);return await Bun.file(e).text()}async function H(e){if(!s)throw Error(`File system access not available in this runtime: ${e}`);return await Bun.file(e).json()}async function M(e){return s?await Bun.file(e).exists():!1}function U(e){if(!s)throw Error(`File system access not available in this runtime: ${e}`);return Bun.file(e)}function h(){let e=f();v(e),g()}function j(){if(m)return;if(b()!==void 0)return;let e=f();v(e),g()}function f(){let e=b(),n=k(e),t=n?!1:S(e),i=_(e,t);return{isBunRuntime:n,isCloudflareRuntime:t,isNodeRuntime:i,hasFileSystemAccess:!t&&(n||i),console:B()}}function k(e){if(e==="bun")return!0;if(e==="cloudflare"||e==="node")return!1;return typeof Bun<"u"}function S(e){if(e==="cloudflare")return!0;if(e==="bun"||e==="node")return!1;let n=typeof globalThis<"u"?globalThis:void 0,t=n?.navigator?.userAgent??"",i=typeof t==="string"&&t.includes("Cloudflare-Workers"),o=typeof n?.__ENVIRONMENT__==="string"&&n.__ENVIRONMENT__.toLowerCase()==="workerd",r=typeof n?.caches?.default<"u";return i||o||r}function _(e,n){if(e==="node")return!0;if(e==="bun"||e==="cloudflare")return!1;if(n)return!1;let t=typeof process<"u"?process.versions?.node:void 0;return typeof t==="string"&&t.length>0}function b(){return typeof globalThis<"u"?globalThis.__hapiRuntimeOverride:void 0}function B(){let e=()=>{},n=typeof console<"u"?console:void 0;if(!n)return{log:e,info:e,warn:e,error:e,debug:e};let t=(o,r)=>typeof o==="function"?o.bind(n):r,i=t(n.log,e);return{log:i,info:t(n.info,i),warn:t(n.warn,i),error:t(n.error,i),debug:t(n.debug,i)}}function v(e){s=e.isBunRuntime,p=e.isCloudflareRuntime,x=e.isNodeRuntime,m=e.hasFileSystemAccess,w=e.console}function g(){let e=T();for(let n of Object.keys(d))delete d[n];Object.assign(d,e)}function T(){if(s)return{...typeof Bun<"u"?Bun.env:{},...typeof process<"u"?process.env:{}};return(typeof process<"u"?process:void 0)?.env??{}}function R(e){if(typeof e==="string")return e;if(e&&typeof e.toString==="function")return e.toString();try{return JSON.stringify(e)}catch{return String(e)}}var E=4000;function C(e){if(!e)return;let n=e.trim();if(!n)return;return n.length>E?`${n.slice(0,E)}
3
+ \u2026 (truncated)`:n}function N(){return l("HAPI_DEBUG")==="true"||l("NODE_ENV")==="development"||l("DEBUG")==="true"||process.argv.includes("--dev")}function O(e){let n=[],t=e.toLowerCase();if(t.includes("wrangler")&&(t.includes("not found")||t.includes("command not found")))n.push("Wrangler CLI not found. Install with: bun add -g wrangler | npm i -g wrangler"),n.push("Then run: hapi cloudflare login");if(t.includes("not authenticated")||t.includes("unauthorized"))n.push("You may need to authenticate: hapi cloudflare login");if(t.includes("bun: command not found")||t.startsWith("bun: "))n.push("Bun runtime not found. Install from https://bun.sh and ensure `bun` is in PATH");if(t.includes("eaddrinuse")||t.includes("address already in use"))n.push("Port is in use. Try a different `--port` or stop the process holding it");if(t.includes("econnrefused")||t.includes("connection refused"))n.push("Connection refused. Ensure the target server is running and reachable");if(t.includes("enotfound")||t.includes("getaddrinfo enotfound"))n.push("Host not found. Check the URL or your network connectivity");if(t.includes("yaml")&&(t.includes("parse")||t.includes("syntax")))n.push("YAML parsing failed. Check the file for syntax/indentation issues");if(t.includes("could not connect")||t.includes("org.freedesktop.secrets")||t.includes("was not provided by any .service files"))n.push("OS secrets service (keyring/D-Bus) is unavailable \u2014 this is unrelated to any file path you passed. "+"Provide the key via a --public-key/--private-key file, a LICENSE_PUBLIC_KEY_PEM/LICENSE_PRIVATE_KEY_PEM env var, or start a session keyring (e.g. dbus-run-session).");else if(t.includes("no such file or directory")||t.includes("enoent"))n.push("File not found. Verify the path or provide the correct argument");if(t.includes("permission denied")||t.includes("eacces"))n.push("Permission denied. Try a different directory or adjust permissions");return n}function A(e){let n=e,t=n?.stderr?R(n.stderr):void 0,i=n?.stdout?R(n.stdout):void 0,r=C(t)||C(i)||n?.message||"Unknown error";return{message:r.trim(),hints:O(r),stack:n&&typeof n.stack==="string"?n.stack:void 0}}function G(e,n,t={}){let{message:i,hints:o,stack:r}=A(n),c=t.showStack??N();if(i.includes(`
4
+ `))console.error(`${e}:`),console.error(i);else console.error(`${e}${i?`: ${i}`:""}`);for(let u of o)console.error(`\u2022 ${u}`);if(c&&r)console.error("Stack:"),console.error(r)}class F extends Error{exitCode;hints;constructor(e,n={}){super(e);if(this.name="HapiCliError",this.exitCode=n.exitCode??1,this.hints=n.hints??[],n.cause!==void 0)this.cause=n.cause}}export{F as HapiCliError,A as formatCliError,N as isDebugEnabled,G as printCliError};
package/dist/home.d.ts CHANGED
@@ -11,6 +11,8 @@ export interface HapiPaths {
11
11
  logs: string;
12
12
  /** TLS certificates */
13
13
  certs: string;
14
+ /** Managed extension packages for standalone HAPI hosts. */
15
+ plugins: string;
14
16
  }
15
17
  export declare const hapiHome: string;
16
18
  export declare const hapiSpecs: string;
@@ -18,12 +20,23 @@ export declare const hapiConfig: string;
18
20
  export declare const hapiSrc: string;
19
21
  export declare const hapiLogs: string;
20
22
  export declare const hapiCerts: string;
23
+ export declare const hapiPlugins: string;
21
24
  export declare function getHapiPaths(): HapiPaths;
22
25
  /**
23
26
  * Resolve HAPI paths on the fly — useful for tests that set HAPI_HOME
24
27
  * after module import.
25
28
  */
26
29
  export declare function resolveHapiPaths(): HapiPaths;
30
+ /**
31
+ * Expand the current-user home shorthand and make HAPI_HOME absolute.
32
+ *
33
+ * Shells only expand `~` when it appears unquoted in a command line. A value
34
+ * supplied through an environment file, Docker configuration, or a quoted
35
+ * assignment reaches HAPI literally, so this normalization must live here.
36
+ * `~other-user` deliberately remains untouched: HAPI never guesses another
37
+ * user's home directory.
38
+ */
39
+ export declare function normalizeHapiHomePath(value: string): string;
27
40
  /**
28
41
  * Ensure a HAPI subdirectory exists (best-effort; silently ignores when
29
42
  * the runtime has no file-system access).
package/dist/home.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- var B=Object.create;var{getPrototypeOf:P,defineProperty:D,getOwnPropertyNames:k}=Object;var E=Object.prototype.hasOwnProperty;function S(j){return this[j]}var f,x,i=(j,G,I)=>{var J=j!=null&&typeof j==="object";if(J){var K=G?f??=new WeakMap:x??=new WeakMap,Q=K.get(j);if(Q)return Q}I=j!=null?B(P(j)):{};let Y=G||!j||!j.__esModule?D(I,"default",{value:j,enumerable:!0}):I;for(let Z of k(j))if(!E.call(Y,Z))D(Y,Z,{get:S.bind(j,Z),enumerable:!0});if(J)K.set(j,Y);return Y};var o=(j,G)=>()=>(G||j((G={exports:{}}).exports,G),G.exports);var y=import.meta.require;var w={},L=T(),X=L.isBunRuntime,M=L.isCloudflareRuntime,C=L.isNodeRuntime,_=L.hasFileSystemAccess,R=L.console,N=w;U();function O(j,G){let I=typeof process<"u"?process.env:void 0,J=I?I[j]:void 0,K=X?Bun?.env?.[j]:void 0,Q=N[j],Y=typeof Q==="string"?Q:void 0,Z=M?Y??J??K:J??K??Y;return Z===void 0||Z===""?G:Z}function t(j,G){if(typeof process<"u")process.env[j]=G;N[j]=G}function e(j){globalThis.__hapiRuntimeOverride="cloudflare",W(),Object.assign(w,j)}function jj(){delete globalThis.__hapiRuntimeOverride,W()}async function Gj(j){if(!X)throw Error(`File system access not available in this runtime: ${j}`);return await Bun.file(j).text()}async function Ij(j){if(!X)throw Error(`File system access not available in this runtime: ${j}`);return await Bun.file(j).json()}async function Jj(j){return X?await Bun.file(j).exists():!1}function Kj(j){if(!X)throw Error(`File system access not available in this runtime: ${j}`);return Bun.file(j)}function W(){let j=T();H(j),U()}function Qj(){if(_)return;if(z()!==void 0)return;let j=T();H(j),U()}function T(){let j=z(),G=g(j),I=G?!1:b(j),J=v(j,I);return{isBunRuntime:G,isCloudflareRuntime:I,isNodeRuntime:J,hasFileSystemAccess:!I&&(G||J),console:p()}}function g(j){if(j==="bun")return!0;if(j==="cloudflare"||j==="node")return!1;return typeof Bun<"u"}function b(j){if(j==="cloudflare")return!0;if(j==="bun"||j==="node")return!1;let G=typeof globalThis<"u"?globalThis:void 0,I=G?.navigator?.userAgent??"",J=typeof I==="string"&&I.includes("Cloudflare-Workers"),K=typeof G?.__ENVIRONMENT__==="string"&&G.__ENVIRONMENT__.toLowerCase()==="workerd",Q=typeof G?.caches?.default<"u";return J||K||Q}function v(j,G){if(j==="node")return!0;if(j==="bun"||j==="cloudflare")return!1;if(G)return!1;let I=typeof process<"u"?process.versions?.node:void 0;return typeof I==="string"&&I.length>0}function z(){return typeof globalThis<"u"?globalThis.__hapiRuntimeOverride:void 0}function p(){let j=()=>{},G=typeof console<"u"?console:void 0;if(!G)return{log:j,info:j,warn:j,error:j,debug:j};let I=(K,Q)=>typeof K==="function"?K.bind(G):Q,J=I(G.log,j);return{log:J,info:I(G.info,J),warn:I(G.warn,J),error:I(G.error,J),debug:I(G.debug,J)}}function H(j){X=j.isBunRuntime,M=j.isCloudflareRuntime,C=j.isNodeRuntime,_=j.hasFileSystemAccess,R=j.console}function U(){let j=c();for(let G of Object.keys(w))delete w[G];Object.assign(w,j)}function c(){if(X)return{...typeof Bun<"u"?Bun.env:{},...typeof process<"u"?process.env:{}};return(typeof process<"u"?process:void 0)?.env??{}}import $ from"path";var q=_?F():A(),h=q.home,d=q.specs,m=q.config,l=q.src,s=q.logs,u=q.certs;function _j(){return{...q}}function $j(){return _?F():A()}function F(){let j=O("HAPI_HOME"),G=j&&j.trim().length>0?j:a();return V(G)}function A(){return V("/hapi")}function V(j){return{home:j,specs:$.join(j,"specs"),config:$.join(j,"config"),src:$.join(j,"src"),logs:$.join(j,"logs"),certs:$.join(j,"certs")}}function a(){if(X){let G=globalThis.Bun?.env??{},I=G.HOME??G.USERPROFILE??process.env.HOME??process.env.USERPROFILE??".";return $.join(I,".hapi")}let j=process.env.HOME??process.env.USERPROFILE??".";return $.join(j,".hapi")}async function r(j){if(!_)return;try{await(await import("fs/promises")).mkdir(j,{recursive:!0})}catch{}}async function qj(){if(!_)return;await Promise.all([h,d,m,l,s,u].map(r))}export{$j as resolveHapiPaths,l as hapiSrc,d as hapiSpecs,s as hapiLogs,h as hapiHome,m as hapiConfig,u as hapiCerts,_j as getHapiPaths,r as ensureHapiDir,qj as ensureAllHapiDirs};
2
+ import o from"path";var f={},d=g(),{isBunRuntime:r,isCloudflareRuntime:R,isNodeRuntime:w,hasFileSystemAccess:a,console:O}=d,v=f;m();function l(n,e){let t=typeof process<"u"?process.env:void 0,i=t?t[n]:void 0,u=r?Bun?.env?.[n]:void 0,c=v[n],y=typeof c==="string"?c:void 0,p=R?y??i??u:i??u??y;return p===void 0||p===""?e:p}function W(n,e){if(typeof process<"u")process.env[n]=e;v[n]=e}function J(n){globalThis.__hapiRuntimeOverride="cloudflare",x(),Object.assign(f,n)}function q(){delete globalThis.__hapiRuntimeOverride,x()}async function G(n){if(!r)throw Error(`File system access not available in this runtime: ${n}`);return await Bun.file(n).text()}async function K(n){if(!r)throw Error(`File system access not available in this runtime: ${n}`);return await Bun.file(n).json()}async function Q(n){return r?await Bun.file(n).exists():!1}function X(n){if(!r)throw Error(`File system access not available in this runtime: ${n}`);return Bun.file(n)}function x(){let n=g();E(n),m()}function Y(){if(a)return;if(b()!==void 0)return;let n=g();E(n),m()}function g(){let n=b(),e=B(n),t=e?!1:F(n),i=S(n,t);return{isBunRuntime:e,isCloudflareRuntime:t,isNodeRuntime:i,hasFileSystemAccess:!t&&(e||i),console:_()}}function B(n){if(n==="bun")return!0;if(n==="cloudflare"||n==="node")return!1;return typeof Bun<"u"}function F(n){if(n==="cloudflare")return!0;if(n==="bun"||n==="node")return!1;let e=typeof globalThis<"u"?globalThis:void 0,t=e?.navigator?.userAgent??"",i=typeof t==="string"&&t.includes("Cloudflare-Workers"),u=typeof e?.__ENVIRONMENT__==="string"&&e.__ENVIRONMENT__.toLowerCase()==="workerd",c=typeof e?.caches?.default<"u";return i||u||c}function S(n,e){if(n==="node")return!0;if(n==="bun"||n==="cloudflare")return!1;if(e)return!1;let t=typeof process<"u"?process.versions?.node:void 0;return typeof t==="string"&&t.length>0}function b(){return typeof globalThis<"u"?globalThis.__hapiRuntimeOverride:void 0}function _(){let n=()=>{},e=typeof console<"u"?console:void 0;if(!e)return{log:n,info:n,warn:n,error:n,debug:n};let t=(u,c)=>typeof u==="function"?u.bind(e):c,i=t(e.log,n);return{log:i,info:t(e.info,i),warn:t(e.warn,i),error:t(e.error,i),debug:t(e.debug,i)}}function E(n){r=n.isBunRuntime,R=n.isCloudflareRuntime,w=n.isNodeRuntime,a=n.hasFileSystemAccess,O=n.console}function m(){let n=T();for(let e of Object.keys(f))delete f[e];Object.assign(f,n)}function T(){if(r)return{...typeof Bun<"u"?Bun.env:{},...typeof process<"u"?process.env:{}};return(typeof process<"u"?process:void 0)?.env??{}}var s=a?P():C(),{home:j,specs:A,config:N,src:k,logs:V,certs:M,plugins:L}=s;function tn(){return{...s}}function on(){return a?P():C()}function P(){let n=l("HAPI_HOME"),e=n&&n.trim().length>0?D(n):I();return H(e)}function C(){return H("/hapi")}function H(n){return{home:n,specs:o.join(n,"specs"),config:o.join(n,"config"),src:o.join(n,"src"),logs:o.join(n,"logs"),certs:o.join(n,"certs"),plugins:o.join(n,"plugins")}}function I(){return o.join(h(),".hapi")}function D(n){let e=n.trim(),t=e==="~"?h():e.replace(/^~(?=[\\/])/,h());return o.resolve(t)}function h(){let n=r?globalThis.Bun?.env??{}:{},e=n.HOME??n.USERPROFILE??l("HOME")??l("USERPROFILE")??z(l("HOMEDRIVE"),l("HOMEPATH"));return e?o.resolve(e):o.resolve(".")}function z(n,e){if(!n||!e)return;return`${n}${e}`}async function U(n){if(!a)return;try{let e=await import("fs/promises");await e.mkdir(n,{recursive:!0})}catch{}}async function rn(){if(!a)return;await Promise.all([j,A,N,k,V,M,L].map(U))}export{rn as ensureAllHapiDirs,U as ensureHapiDir,tn as getHapiPaths,M as hapiCerts,N as hapiConfig,j as hapiHome,V as hapiLogs,L as hapiPlugins,A as hapiSpecs,k as hapiSrc,D as normalizeHapiHomePath,on as resolveHapiPaths};