@north-light/cli 0.3.730 → 0.3.731

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.
@@ -43,6 +43,11 @@ export { APIError as ApiError };
43
43
  /** A local API transport failure has stable status/code identity, independent
44
44
  * of message prose. */
45
45
  export declare function isDaemonTransportApiError(error: unknown): error is APIError;
46
+ /** A daemon answer that says nothing about the caller's data: the daemon was unreachable, starting, draining for a
47
+ * restart (503 `startup_blocked`), overloaded, or failed server-side. Retrying the same request later can succeed, so a
48
+ * long-lived caller (a broker's inbox poll) retries it rather than treating it as corrupt state. A 4xx other than
49
+ * 408/429 is about the request itself and is not transient. */
50
+ export declare function isTransientDaemonApiError(error: unknown): error is APIError;
46
51
  /** The daemon refused the caller's node token. A teardown revokes the broker's token before its process stops, so a broker
47
52
  * that sees this on a poll is being shut down, not hitting a corrupt state. */
48
53
  export declare function isTokenRevokedApiError(error: unknown): error is APIError;
@@ -1 +1 @@
1
- var u=Object.defineProperty;var r=(t,s)=>u(t,"name",{value:s,configurable:!0});class n extends Error{static{r(this,"APIError")}status;code;details;headers;type;param;origin;retryable;retryAfterS;resetAt;requestId;runId;questionId;scope;userAction;constructor(s,i,a,d,o,e){super(a),this.name="APIError",this.status=s,this.code=i,this.headers=new Headers(o),d!==void 0&&(this.details=d),this.type=e?.type,this.param=e?.param,this.origin=e?.origin,this.retryable=e?.retryable,this.retryAfterS=e?.retry_after_s,this.resetAt=e?.reset_at,this.requestId=e?.request_id??this.headers.get("Request-Id")??void 0,this.runId=e?.run_id,this.questionId=e?.question_id,this.scope=e?.scope,this.userAction=e?.user_action}}function h(t){return t instanceof n?t.status===503&&(t.code==="daemon_unavailable"||t.code==="transport_error"||t.code==="daemon_request_interrupted"||t.code==="runtime_starting"||t.code==="northlight_unreachable")||t.status===504&&(t.code==="request_timeout"||t.code==="deadline_exceeded")||t.status>=500&&t.code==="daemon_health_unavailable":!1}r(h,"isDaemonTransportApiError");function f(t){return t instanceof n&&t.status===401}r(f,"isTokenRevokedApiError");function _(t){if(typeof t!="object"||t===null)return!1;const s=t.error;if(typeof s!="object"||s===null)return!1;const{code:i,message:a}=s;return typeof i=="string"&&typeof a=="string"}r(_,"isErrorBody");export{n as APIError,n as ApiError,h as isDaemonTransportApiError,_ as isErrorBody,f as isTokenRevokedApiError};
1
+ var d=Object.defineProperty;var r=(t,e)=>d(t,"name",{value:e,configurable:!0});class a extends Error{static{r(this,"APIError")}status;code;details;headers;type;param;origin;retryable;retryAfterS;resetAt;requestId;runId;questionId;scope;userAction;constructor(e,i,n,o,u,s){super(n),this.name="APIError",this.status=e,this.code=i,this.headers=new Headers(u),o!==void 0&&(this.details=o),this.type=s?.type,this.param=s?.param,this.origin=s?.origin,this.retryable=s?.retryable,this.retryAfterS=s?.retry_after_s,this.resetAt=s?.reset_at,this.requestId=s?.request_id??this.headers.get("Request-Id")??void 0,this.runId=s?.run_id,this.questionId=s?.question_id,this.scope=s?.scope,this.userAction=s?.user_action}}function c(t){return t instanceof a?t.status===503&&(t.code==="daemon_unavailable"||t.code==="transport_error"||t.code==="daemon_request_interrupted"||t.code==="runtime_starting"||t.code==="northlight_unreachable")||t.status===504&&(t.code==="request_timeout"||t.code==="deadline_exceeded")||t.status>=500&&t.code==="daemon_health_unavailable":!1}r(c,"isDaemonTransportApiError");function h(t){if(!(t instanceof a))return!1;const{status:e,code:i,retryable:n}=t;return c(t)||n===!0||i==="startup_blocked"||e===408||e===429||e>=500}r(h,"isTransientDaemonApiError");function p(t){return t instanceof a&&t.status===401}r(p,"isTokenRevokedApiError");function _(t){if(typeof t!="object"||t===null)return!1;const e=t.error;if(typeof e!="object"||e===null)return!1;const{code:i,message:n}=e;return typeof i=="string"&&typeof n=="string"}r(_,"isErrorBody");export{a as APIError,a as ApiError,c as isDaemonTransportApiError,_ as isErrorBody,p as isTokenRevokedApiError,h as isTransientDaemonApiError};