@amalgm/live 0.2.81-preview.47301712017 → 0.2.81-preview.47318959880
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/faults/classify.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var N=Object.defineProperty;var r=(n,E)=>N(n,"name",{value:E,configurable:!0});import{isRefusal as u}from"../detection/refusal.js";import{isRecord as t}from"../contracts/validate.js";import{needOf as i}from"./need.js";const R=new Set(["ECONNRESET","ECONNREFUSED","ECONNABORTED","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ENETUNREACH","EHOSTUNREACH","ENETDOWN","EHOSTDOWN","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","UND_ERR_CLOSED","ENOSPC","EROFS","EIO","EDQUOT","EMFILE","ENFILE","ENOMEM","EBUSY","EAGAIN","SQLITE_BUSY","SQLITE_LOCKED","EACCES","EPERM","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_VERIFY_LEAF_SIGNATURE","DEPTH_ZERO_SELF_SIGNED_CERT","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID","wire_unavailable","wire_timeout","ground_moving"]),T=8;function _(n){const E=[];for(let e=n;e!=null&&E.length<T&&!E.includes(e);e=t(e)?e.cause:void 0)E.push(e);return E}r(_,"causeChain");function D(n){return _(n).some(E=>t(E)&&E.code==="ground_moving")}r(D,"groundMoved");function O(n){if(!t(n))return!1;if(typeof n.code=="string"&&R.has(n.code))return!0;const E=n.status;return typeof E=="number"&&(E>=500||E===429||E===408)}r(O,"environmental");function c(n){const E=_(n);for(const e of E){const o=i(e);if(o!==null)return{kind:"need",need:o}}return E.some(u)?{kind:"refusal"}:E.some(O)?{kind:"environment"}:{kind:"unnamed"}}r(c,"classifyFault");export{T as CHAIN,_ as causeChain,c as classifyFault,D as groundMoved};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var r=(e,E)=>i(e,"name",{value:E,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.CHAIN=void 0,exports.causeChain=t,exports.groundMoved=R,exports.classifyFault=O;const o=require("../detection/refusal.js"),_=require("../contracts/validate.js"),s=require("./need.js"),N=new Set(["ECONNRESET","ECONNREFUSED","ECONNABORTED","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ENETUNREACH","EHOSTUNREACH","ENETDOWN","EHOSTDOWN","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","UND_ERR_CLOSED","ENOSPC","EROFS","EIO","EDQUOT","EMFILE","ENFILE","ENOMEM","EBUSY","EAGAIN","SQLITE_BUSY","SQLITE_LOCKED","EACCES","EPERM","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_VERIFY_LEAF_SIGNATURE","DEPTH_ZERO_SELF_SIGNED_CERT","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID","wire_unavailable","wire_timeout","ground_moving"]);exports.CHAIN=8;function t(e){const E=[];for(let n=e;n!=null&&E.length<exports.CHAIN&&!E.includes(n);n=(0,_.isRecord)(n)?n.cause:void 0)E.push(n);return E}r(t,"causeChain");function R(e){return t(e).some(E=>(0,_.isRecord)(E)&&E.code==="ground_moving")}r(R,"groundMoved");function d(e){if(!(0,_.isRecord)(e))return!1;if(typeof e.code=="string"&&N.has(e.code))return!0;const E=e.status;return typeof E=="number"&&(E>=500||E===429||E===408)}r(d,"environmental");function O(e){const E=t(e);for(const n of E){const u=(0,s.needOf)(n);if(u!==null)return{kind:"need",need:u}}return E.some(o.isRefusal)?{kind:"refusal"}:E.some(d)?{kind:"environment"}:{kind:"unnamed"}}r(O,"classifyFault");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amalgm/live",
|
|
3
|
-
"version": "0.2.81-preview.
|
|
3
|
+
"version": "0.2.81-preview.47318959880",
|
|
4
4
|
"description": "Portable realtime SDK for Amalgm — wire contracts, mutation discipline, and delivery state machines behind host-injected adapters.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist-cjs/index.js",
|
|
@@ -133,11 +133,11 @@
|
|
|
133
133
|
"dependencies": {
|
|
134
134
|
"@amalgm/core": "0.5.1-preview.46345295340"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "538a37d0496b87ad72079d8396782ce23894f41b",
|
|
137
137
|
"amalgmSource": {
|
|
138
138
|
"repository": "amalgm-inc/amalgm-live",
|
|
139
139
|
"branch": "preview",
|
|
140
|
-
"commit": "
|
|
141
|
-
"occurrence": "
|
|
140
|
+
"commit": "538a37d0496b87ad72079d8396782ce23894f41b",
|
|
141
|
+
"occurrence": "47318959880"
|
|
142
142
|
}
|
|
143
143
|
}
|