@solongate/proxy 0.82.51 → 0.82.53
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/index.js +12 -4
- package/dist/tui/index.js +12 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9224,6 +9224,7 @@ function PoliciesPanel({ focused }) {
|
|
|
9224
9224
|
const [status, setStatus] = useState4(null);
|
|
9225
9225
|
const [pendingDel, setPendingDel] = useState4(null);
|
|
9226
9226
|
const [permCursor, setPermCursor] = useState4(0);
|
|
9227
|
+
const [busyCreate, setBusyCreate] = useState4(false);
|
|
9227
9228
|
const selected = policies[Math.min(pi, Math.max(0, policies.length - 1))];
|
|
9228
9229
|
const detail = useLoader(() => selected ? api.policies.get(selected.id) : Promise.resolve(null), [selected?.id]);
|
|
9229
9230
|
useEffect4(() => {
|
|
@@ -9283,11 +9284,18 @@ function PoliciesPanel({ focused }) {
|
|
|
9283
9284
|
setCreating(null);
|
|
9284
9285
|
if (!n) return;
|
|
9285
9286
|
setStatus("Creating\u2026");
|
|
9287
|
+
setBusyCreate(true);
|
|
9286
9288
|
void api.policies.create({ id: `policy-${Date.now()}`, name: n, rules: [], mode: "denylist" }).then(() => {
|
|
9287
9289
|
setStatus(`\u2713 created "${n}" - open it and press n to add rules`);
|
|
9288
9290
|
list5.reload();
|
|
9289
|
-
}).catch((e) =>
|
|
9291
|
+
}).catch((e) => {
|
|
9292
|
+
setBusyCreate(false);
|
|
9293
|
+
setStatus("\u2717 " + (e instanceof Error ? e.message : String(e)));
|
|
9294
|
+
});
|
|
9290
9295
|
}
|
|
9296
|
+
useEffect4(() => {
|
|
9297
|
+
if (busyCreate && policies.length > 0) setBusyCreate(false);
|
|
9298
|
+
}, [busyCreate, policies.length]);
|
|
9291
9299
|
useInput3(
|
|
9292
9300
|
(input, key) => {
|
|
9293
9301
|
if (creating !== null) return;
|
|
@@ -9423,7 +9431,7 @@ function PoliciesPanel({ focused }) {
|
|
|
9423
9431
|
const lWin = policies.slice(lStart, lStart + lBudget);
|
|
9424
9432
|
const lAbove = lStart;
|
|
9425
9433
|
const lBelow = Math.max(0, policies.length - (lStart + lBudget));
|
|
9426
|
-
return /* @__PURE__ */ jsx4(DataView, { loading: list5.loading && !list5.data, error: list5.error, empty: !!list5.data && policies.length === 0 && creating === null, emptyText: "No policies yet \u2014 press n to create one.", children: /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
9434
|
+
return /* @__PURE__ */ jsx4(DataView, { loading: list5.loading && !list5.data, error: list5.error, empty: !!list5.data && policies.length === 0 && creating === null && !busyCreate, emptyText: "No policies yet \u2014 press n to create one.", children: /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
9427
9435
|
/* @__PURE__ */ jsxs4(Box4, { children: [
|
|
9428
9436
|
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: "active: " }),
|
|
9429
9437
|
activeQ.loading && !activeQ.data ? /* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: "\u2026" }) : activeName ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
@@ -9509,7 +9517,7 @@ function PoliciesPanel({ focused }) {
|
|
|
9509
9517
|
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: rule?.id ?? "" }),
|
|
9510
9518
|
dirtyTag
|
|
9511
9519
|
] }),
|
|
9512
|
-
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: "\u2191\u2193 field \xB7 enter edit \xB7 space toggle \xB7 \u2190\u2192 move/pick \xB7
|
|
9520
|
+
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: "\u2191\u2193 field \xB7 enter edit \xB7 space toggle \xB7 \u2190\u2192 move/pick \xB7 type * for wildcard \xB7 s save \xB7 \u2190 back" }),
|
|
9513
9521
|
/* @__PURE__ */ jsx4(Box4, { marginTop: 1, flexDirection: "column", children: FIELDS.map((f, i) => {
|
|
9514
9522
|
const active2 = i === fi;
|
|
9515
9523
|
const label = /* @__PURE__ */ jsx4(Text4, { color: active2 ? theme.accentBright : void 0, children: (active2 ? "\u25B8 " : " ") + f.label.padEnd(13) });
|
|
@@ -9576,7 +9584,7 @@ function PoliciesPanel({ focused }) {
|
|
|
9576
9584
|
)
|
|
9577
9585
|
] }, f.label);
|
|
9578
9586
|
}) }),
|
|
9579
|
-
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: " * = wildcard (
|
|
9587
|
+
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: " * = wildcard (any run of chars). Just type it in the value: rm* or *ping*. Green \u2731 = active. (Shortcut, not while editing: [ / ] toggle a leading/trailing *.)" }),
|
|
9580
9588
|
status ? /* @__PURE__ */ jsx4(Text4, { color: status.startsWith("\u2717") ? theme.bad : theme.ok, children: status }) : null
|
|
9581
9589
|
] });
|
|
9582
9590
|
}
|
package/dist/tui/index.js
CHANGED
|
@@ -2542,6 +2542,7 @@ function PoliciesPanel({ focused }) {
|
|
|
2542
2542
|
const [status, setStatus] = useState4(null);
|
|
2543
2543
|
const [pendingDel, setPendingDel] = useState4(null);
|
|
2544
2544
|
const [permCursor, setPermCursor] = useState4(0);
|
|
2545
|
+
const [busyCreate, setBusyCreate] = useState4(false);
|
|
2545
2546
|
const selected = policies[Math.min(pi, Math.max(0, policies.length - 1))];
|
|
2546
2547
|
const detail = useLoader(() => selected ? api.policies.get(selected.id) : Promise.resolve(null), [selected?.id]);
|
|
2547
2548
|
useEffect4(() => {
|
|
@@ -2601,11 +2602,18 @@ function PoliciesPanel({ focused }) {
|
|
|
2601
2602
|
setCreating(null);
|
|
2602
2603
|
if (!n) return;
|
|
2603
2604
|
setStatus("Creating\u2026");
|
|
2605
|
+
setBusyCreate(true);
|
|
2604
2606
|
void api.policies.create({ id: `policy-${Date.now()}`, name: n, rules: [], mode: "denylist" }).then(() => {
|
|
2605
2607
|
setStatus(`\u2713 created "${n}" - open it and press n to add rules`);
|
|
2606
2608
|
list5.reload();
|
|
2607
|
-
}).catch((e) =>
|
|
2609
|
+
}).catch((e) => {
|
|
2610
|
+
setBusyCreate(false);
|
|
2611
|
+
setStatus("\u2717 " + (e instanceof Error ? e.message : String(e)));
|
|
2612
|
+
});
|
|
2608
2613
|
}
|
|
2614
|
+
useEffect4(() => {
|
|
2615
|
+
if (busyCreate && policies.length > 0) setBusyCreate(false);
|
|
2616
|
+
}, [busyCreate, policies.length]);
|
|
2609
2617
|
useInput3(
|
|
2610
2618
|
(input, key) => {
|
|
2611
2619
|
if (creating !== null) return;
|
|
@@ -2741,7 +2749,7 @@ function PoliciesPanel({ focused }) {
|
|
|
2741
2749
|
const lWin = policies.slice(lStart, lStart + lBudget);
|
|
2742
2750
|
const lAbove = lStart;
|
|
2743
2751
|
const lBelow = Math.max(0, policies.length - (lStart + lBudget));
|
|
2744
|
-
return /* @__PURE__ */ jsx4(DataView, { loading: list5.loading && !list5.data, error: list5.error, empty: !!list5.data && policies.length === 0 && creating === null, emptyText: "No policies yet \u2014 press n to create one.", children: /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
2752
|
+
return /* @__PURE__ */ jsx4(DataView, { loading: list5.loading && !list5.data, error: list5.error, empty: !!list5.data && policies.length === 0 && creating === null && !busyCreate, emptyText: "No policies yet \u2014 press n to create one.", children: /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
2745
2753
|
/* @__PURE__ */ jsxs4(Box4, { children: [
|
|
2746
2754
|
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: "active: " }),
|
|
2747
2755
|
activeQ.loading && !activeQ.data ? /* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: "\u2026" }) : activeName ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
@@ -2827,7 +2835,7 @@ function PoliciesPanel({ focused }) {
|
|
|
2827
2835
|
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: rule?.id ?? "" }),
|
|
2828
2836
|
dirtyTag
|
|
2829
2837
|
] }),
|
|
2830
|
-
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: "\u2191\u2193 field \xB7 enter edit \xB7 space toggle \xB7 \u2190\u2192 move/pick \xB7
|
|
2838
|
+
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: "\u2191\u2193 field \xB7 enter edit \xB7 space toggle \xB7 \u2190\u2192 move/pick \xB7 type * for wildcard \xB7 s save \xB7 \u2190 back" }),
|
|
2831
2839
|
/* @__PURE__ */ jsx4(Box4, { marginTop: 1, flexDirection: "column", children: FIELDS.map((f, i) => {
|
|
2832
2840
|
const active2 = i === fi;
|
|
2833
2841
|
const label = /* @__PURE__ */ jsx4(Text4, { color: active2 ? theme.accentBright : void 0, children: (active2 ? "\u25B8 " : " ") + f.label.padEnd(13) });
|
|
@@ -2894,7 +2902,7 @@ function PoliciesPanel({ focused }) {
|
|
|
2894
2902
|
)
|
|
2895
2903
|
] }, f.label);
|
|
2896
2904
|
}) }),
|
|
2897
|
-
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: " * = wildcard (
|
|
2905
|
+
/* @__PURE__ */ jsx4(Text4, { color: theme.dim, children: " * = wildcard (any run of chars). Just type it in the value: rm* or *ping*. Green \u2731 = active. (Shortcut, not while editing: [ / ] toggle a leading/trailing *.)" }),
|
|
2898
2906
|
status ? /* @__PURE__ */ jsx4(Text4, { color: status.startsWith("\u2717") ? theme.bad : theme.ok, children: status }) : null
|
|
2899
2907
|
] });
|
|
2900
2908
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.53",
|
|
4
4
|
"description": "AI tool security proxy: protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. No code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|