@floegence/floe-webapp-boot 0.46.8 → 0.47.1
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/artifact-source.js +18 -18
- package/package.json +3 -3
package/dist/artifact-source.js
CHANGED
|
@@ -21,8 +21,8 @@ function _(e, r) {
|
|
|
21
21
|
return t.pathname = t.pathname.replace(/\/+$/u, ""), t;
|
|
22
22
|
}
|
|
23
23
|
function j(e, r) {
|
|
24
|
-
const t = r === void 0 ? "/v1/connect/artifact" : "/v1/connect/artifact/entry";
|
|
25
|
-
return new URL(`${
|
|
24
|
+
const t = r === void 0 ? "/v1/connect/artifact" : "/v1/connect/artifact/entry", o = e.pathname === "/" ? "" : e.pathname;
|
|
25
|
+
return new URL(`${o}${t}`, e).toString();
|
|
26
26
|
}
|
|
27
27
|
function v(e) {
|
|
28
28
|
if (!y.test(e.code))
|
|
@@ -58,10 +58,10 @@ function m(e, r) {
|
|
|
58
58
|
throw new TypeError("validateSpendBinding is required");
|
|
59
59
|
const t = e.fetch ?? globalThis.fetch;
|
|
60
60
|
if (typeof t != "function") throw new TypeError("fetch is required");
|
|
61
|
-
const
|
|
61
|
+
const o = _(e.baseUrl, e.allowLoopbackHTTP === !0), s = j(o, e.entryTicket), i = {
|
|
62
62
|
acquire: async ({ signal: d }) => {
|
|
63
63
|
try {
|
|
64
|
-
const
|
|
64
|
+
const n = {
|
|
65
65
|
endpoint_id: e.endpointId,
|
|
66
66
|
...e.payload === void 0 ? {} : { payload: e.payload },
|
|
67
67
|
...e.entryTicket === void 0 && e.correlation !== void 0 ? { correlation: { trace_id: e.correlation.traceId } } : {}
|
|
@@ -72,16 +72,16 @@ function m(e, r) {
|
|
|
72
72
|
"content-type": "application/json",
|
|
73
73
|
...e.entryTicket === void 0 ? {} : { authorization: `Bearer ${e.entryTicket}` }
|
|
74
74
|
},
|
|
75
|
-
body: JSON.stringify(
|
|
75
|
+
body: JSON.stringify(n),
|
|
76
76
|
credentials: "omit",
|
|
77
77
|
redirect: "error",
|
|
78
78
|
signal: d
|
|
79
79
|
});
|
|
80
80
|
if (!c.ok) {
|
|
81
|
-
const
|
|
81
|
+
const f = await E(c);
|
|
82
82
|
return { kind: "failure", ...v({
|
|
83
83
|
status: c.status,
|
|
84
|
-
code:
|
|
84
|
+
code: f,
|
|
85
85
|
retryAfter: c.headers.get("retry-after"),
|
|
86
86
|
retryableBusinessCodes: e.retryableBusinessCodes
|
|
87
87
|
}) };
|
|
@@ -90,13 +90,13 @@ function m(e, r) {
|
|
|
90
90
|
try {
|
|
91
91
|
u = await c.json();
|
|
92
92
|
} catch {
|
|
93
|
-
return
|
|
93
|
+
return l("invalid_controlplane_response");
|
|
94
94
|
}
|
|
95
95
|
const h = await r(i, u, {
|
|
96
96
|
commitSpend: e.commitSpend,
|
|
97
|
-
validateSpendBinding: (
|
|
97
|
+
validateSpendBinding: (f) => {
|
|
98
98
|
try {
|
|
99
|
-
return e.validateSpendBinding(
|
|
99
|
+
return e.validateSpendBinding(f);
|
|
100
100
|
} catch {
|
|
101
101
|
throw new p("invalid_spend_binding");
|
|
102
102
|
}
|
|
@@ -104,10 +104,10 @@ function m(e, r) {
|
|
|
104
104
|
expectedConsumer: "trusted"
|
|
105
105
|
});
|
|
106
106
|
return Object.freeze({ kind: "lease", lease: h });
|
|
107
|
-
} catch (
|
|
107
|
+
} catch (n) {
|
|
108
108
|
if (d.aborted) throw d.reason ?? new DOMException("Aborted", "AbortError");
|
|
109
|
-
if (
|
|
110
|
-
return
|
|
109
|
+
if (n instanceof DOMException && n.name === "AbortError") throw n;
|
|
110
|
+
return n instanceof p || n instanceof a ? l(n.code) : Object.freeze({
|
|
111
111
|
kind: "failure",
|
|
112
112
|
code: "network_error",
|
|
113
113
|
disposition: Object.freeze({ kind: "retryable" })
|
|
@@ -142,8 +142,8 @@ async function E(e) {
|
|
|
142
142
|
if (r !== null && typeof r == "object" && !Array.isArray(r)) {
|
|
143
143
|
const t = r.error;
|
|
144
144
|
if (t !== null && typeof t == "object" && !Array.isArray(t)) {
|
|
145
|
-
const
|
|
146
|
-
if (typeof
|
|
145
|
+
const o = t.code;
|
|
146
|
+
if (typeof o == "string") return o;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
} catch {
|
|
@@ -159,10 +159,10 @@ function g(e, r) {
|
|
|
159
159
|
const i = r + s * 1e3;
|
|
160
160
|
return Number.isSafeInteger(i) && i > r ? i : void 0;
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
return Number.isSafeInteger(
|
|
162
|
+
const o = Date.parse(t);
|
|
163
|
+
return Number.isSafeInteger(o) && o > r ? o : void 0;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function l(e) {
|
|
166
166
|
return Object.freeze({
|
|
167
167
|
kind: "failure",
|
|
168
168
|
code: y.test(e) ? e : "invalid_error_code",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floegence/floe-webapp-boot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=24.
|
|
29
|
+
"node": ">=24.20.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"dev": "vite build --watch",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@floegence/flowersec-core": "
|
|
38
|
+
"@floegence/flowersec-core": "4.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "^5.9.3",
|