@crvouga/mockingbird-service-stripe 1.10.1 → 1.11.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/CHANGELOG.md +14 -4
- package/dist/{chunk-RPSJESGN.js → chunk-EINNHTOB.js} +94 -15
- package/dist/chunk-EINNHTOB.js.map +7 -0
- package/dist/{chunk-VFEAT5XK.js → chunk-NTTU6ZMY.js} +3 -2
- package/dist/chunk-NTTU6ZMY.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/server.d.ts +11 -9
- package/dist/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-RPSJESGN.js.map +0 -7
- package/dist/chunk-VFEAT5XK.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-stripe
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.11.1 (2026-09-30)
|
|
4
4
|
|
|
5
5
|
### Fixes and improvements
|
|
6
6
|
|
|
7
|
-
- keep
|
|
7
|
+
- keep admin buttons pressed until the action finishes ([0aabfcb](https://github.com/crvouga/mockingbird/commit/0aabfcb5f392aa51e193f9c3f817d5877d92bc6a))
|
|
8
|
+
- size admin select fields like the text inputs beside them ([0fb3ef2](https://github.com/crvouga/mockingbird/commit/0fb3ef2ddbf43376c93a2ae6d87c6c9bf890dafc))
|
|
9
|
+
- keep admin section tabs wired when boot is renamed ([4eda25e](https://github.com/crvouga/mockingbird/commit/4eda25eacd59da048d196f7cc8369d7a02b47bfc))
|
|
10
|
+
|
|
11
|
+
## 1.11.0 (2026-09-29)
|
|
12
|
+
|
|
13
|
+
### Features
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
- boot Bolt over Socket Mode ([01322df](https://github.com/crvouga/mockingbird/commit/01322df315c66b1f2f5b53094cbbeeeef6d3ae6c))
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
## 1.10.1 (2026-09-29)
|
|
18
|
+
|
|
19
|
+
### Fixes and improvements
|
|
20
|
+
|
|
21
|
+
- keep hosted pages inside narrow hosts and popups ([6512323](https://github.com/crvouga/mockingbird/commit/6512323198cb00b99005f3d2cfa5b9f1e6e321a7))
|
|
12
22
|
|
|
13
23
|
## 1.10.0 (2026-09-29)
|
|
14
24
|
|
|
@@ -2366,6 +2366,50 @@ function bootAdmin(config) {
|
|
|
2366
2366
|
if (render3)
|
|
2367
2367
|
await render3();
|
|
2368
2368
|
}
|
|
2369
|
+
const delay = (ms) => new Promise((resolve2) => {
|
|
2370
|
+
window.setTimeout(resolve2, ms);
|
|
2371
|
+
});
|
|
2372
|
+
const confirmAction = async (button, pending, done, work) => {
|
|
2373
|
+
if (button.dataset.pending === "1")
|
|
2374
|
+
return;
|
|
2375
|
+
const label = button.textContent ?? "";
|
|
2376
|
+
const width = button.offsetWidth;
|
|
2377
|
+
button.dataset.pending = "1";
|
|
2378
|
+
button.classList.add("pressed");
|
|
2379
|
+
button.setAttribute("aria-busy", "true");
|
|
2380
|
+
button.style.minWidth = `${width}px`;
|
|
2381
|
+
button.textContent = pending;
|
|
2382
|
+
try {
|
|
2383
|
+
await work();
|
|
2384
|
+
button.textContent = done;
|
|
2385
|
+
await delay(1e3);
|
|
2386
|
+
} catch (error) {
|
|
2387
|
+
showError(error);
|
|
2388
|
+
} finally {
|
|
2389
|
+
button.textContent = label;
|
|
2390
|
+
button.style.minWidth = "";
|
|
2391
|
+
button.classList.remove("pressed");
|
|
2392
|
+
button.removeAttribute("aria-busy");
|
|
2393
|
+
delete button.dataset.pending;
|
|
2394
|
+
}
|
|
2395
|
+
};
|
|
2396
|
+
document.addEventListener("click", (event) => {
|
|
2397
|
+
const target = event.target;
|
|
2398
|
+
if (!(target instanceof Element))
|
|
2399
|
+
return;
|
|
2400
|
+
const button = target.closest("button");
|
|
2401
|
+
if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
|
|
2402
|
+
return;
|
|
2403
|
+
button.classList.add("pressed");
|
|
2404
|
+
const token = String(Date.now());
|
|
2405
|
+
button.dataset.press = token;
|
|
2406
|
+
window.setTimeout(() => {
|
|
2407
|
+
if (button.dataset.press !== token || button.dataset.pending === "1")
|
|
2408
|
+
return;
|
|
2409
|
+
button.classList.remove("pressed");
|
|
2410
|
+
delete button.dataset.press;
|
|
2411
|
+
}, 450);
|
|
2412
|
+
});
|
|
2369
2413
|
el("namespace", HTMLSelectElement).addEventListener("change", () => {
|
|
2370
2414
|
state.namespace = el("namespace", HTMLSelectElement).value;
|
|
2371
2415
|
refresh().catch(showError);
|
|
@@ -2376,7 +2420,7 @@ function bootAdmin(config) {
|
|
|
2376
2420
|
refresh().catch(showError);
|
|
2377
2421
|
});
|
|
2378
2422
|
el("refresh", HTMLButtonElement).addEventListener("click", () => {
|
|
2379
|
-
refresh().catch(showError);
|
|
2423
|
+
confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
|
|
2380
2424
|
});
|
|
2381
2425
|
el("collections", HTMLElement).addEventListener("click", (event) => {
|
|
2382
2426
|
const target = event.target;
|
|
@@ -2499,10 +2543,10 @@ function bootAdmin(config) {
|
|
|
2499
2543
|
}).then(() => renderFaults()).catch(showError);
|
|
2500
2544
|
});
|
|
2501
2545
|
el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
|
|
2502
|
-
api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
|
|
2546
|
+
confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
|
|
2503
2547
|
});
|
|
2504
2548
|
el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
|
|
2505
|
-
api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
|
|
2549
|
+
confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
|
|
2506
2550
|
});
|
|
2507
2551
|
el("route-list", HTMLElement).addEventListener("click", (event) => {
|
|
2508
2552
|
const target = event.target;
|
|
@@ -2617,9 +2661,13 @@ function bootAdmin(config) {
|
|
|
2617
2661
|
var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
|
|
2618
2662
|
var adminClientSource = (config) => {
|
|
2619
2663
|
const payload = JSON.stringify(config).replace(/</g, "\\u003c");
|
|
2664
|
+
const entry = bootAdmin.name;
|
|
2665
|
+
if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
|
|
2666
|
+
throw new Error("admin client cannot call its boot function");
|
|
2667
|
+
}
|
|
2620
2668
|
return `<script>
|
|
2621
2669
|
${clientPrelude}
|
|
2622
|
-
|
|
2670
|
+
${entry}(${payload});
|
|
2623
2671
|
</script>`;
|
|
2624
2672
|
};
|
|
2625
2673
|
|
|
@@ -2833,9 +2881,24 @@ var renderAdminDocument = (service) => {
|
|
|
2833
2881
|
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
|
2834
2882
|
label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
|
|
2835
2883
|
label.field input, label.field select, .controls input[type="password"] {
|
|
2836
|
-
background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
|
|
2837
|
-
padding: 7px 8px; min-height: 36px;
|
|
2838
|
-
}
|
|
2884
|
+
background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
|
|
2885
|
+
padding: 7px 8px; min-height: 36px; line-height: 1.2;
|
|
2886
|
+
}
|
|
2887
|
+
/* A native menu ignores min-height, so Preset rendered about half as tall as
|
|
2888
|
+
the text fields in the same form. Paint it like those fields. */
|
|
2889
|
+
label.field select {
|
|
2890
|
+
-webkit-appearance: none; appearance: none;
|
|
2891
|
+
padding-right: 28px;
|
|
2892
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
|
|
2893
|
+
background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
|
|
2894
|
+
}
|
|
2895
|
+
.stack > .field > input,
|
|
2896
|
+
.stack > .field > select,
|
|
2897
|
+
.stack > .field > textarea,
|
|
2898
|
+
dialog .field > input,
|
|
2899
|
+
dialog .field > select,
|
|
2900
|
+
dialog .field > textarea { width: 100%; }
|
|
2901
|
+
.icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
|
|
2839
2902
|
.icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
|
|
2840
2903
|
border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
|
|
2841
2904
|
background: var(--bg-elev);
|
|
@@ -2843,6 +2906,14 @@ var renderAdminDocument = (service) => {
|
|
|
2843
2906
|
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
|
|
2844
2907
|
.btn-quiet { background: transparent; }
|
|
2845
2908
|
.btn-danger { color: var(--err); }
|
|
2909
|
+
/* Held after mouseup. Clearing an empty journal changes nothing on screen,
|
|
2910
|
+
so the press itself has to stay visible. */
|
|
2911
|
+
.icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
|
|
2912
|
+
.icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
|
|
2913
|
+
background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
|
|
2914
|
+
}
|
|
2915
|
+
.btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
|
|
2916
|
+
.btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
|
|
2846
2917
|
/* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
|
|
2847
2918
|
record or the full nav row would widen the page past the viewport. */
|
|
2848
2919
|
.layout {
|
|
@@ -2931,8 +3002,16 @@ var renderAdminDocument = (service) => {
|
|
|
2931
3002
|
input, select, textarea { font-size: 16px; }
|
|
2932
3003
|
.brand, .vendor, .controls { width: 100%; }
|
|
2933
3004
|
label.field, label.field select, label.field input { flex: 1; min-width: 0; }
|
|
2934
|
-
|
|
3005
|
+
/* The layout fills the screen. A single-column grid stretches every auto
|
|
3006
|
+
row, so the tab bar grew with the leftover height and the buttons floated
|
|
3007
|
+
in the middle of it. The bar stays one row; the page below takes the rest. */
|
|
3008
|
+
.layout {
|
|
3009
|
+
grid-template-columns: minmax(0, 1fr);
|
|
3010
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
3011
|
+
align-content: start;
|
|
3012
|
+
}
|
|
2935
3013
|
nav.side {
|
|
3014
|
+
align-self: start; height: auto;
|
|
2936
3015
|
flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
|
|
2937
3016
|
border-right: 0; border-bottom: 1px solid var(--line);
|
|
2938
3017
|
padding: 8px;
|
|
@@ -3726,7 +3805,7 @@ var stateAdminRoutes = (routes) => {
|
|
|
3726
3805
|
};
|
|
3727
3806
|
|
|
3728
3807
|
// ../core/dist/version.js
|
|
3729
|
-
var PACKAGE_VERSION = true ? "1.
|
|
3808
|
+
var PACKAGE_VERSION = true ? "1.11.1" : UNRELEASED_VERSION;
|
|
3730
3809
|
|
|
3731
3810
|
// ../core/dist/signing.js
|
|
3732
3811
|
var encoder = new TextEncoder();
|
|
@@ -10911,11 +10990,11 @@ var searchRecords = (records, params, options) => {
|
|
|
10911
10990
|
params.page
|
|
10912
10991
|
);
|
|
10913
10992
|
const offset = page === null ? 0 : Number(page[1]);
|
|
10914
|
-
const
|
|
10993
|
+
const window2 = matched.slice(offset, offset + limit);
|
|
10915
10994
|
const more = matched.length > offset + limit;
|
|
10916
10995
|
return {
|
|
10917
10996
|
object: "search_result",
|
|
10918
|
-
data:
|
|
10997
|
+
data: window2.map(options.render),
|
|
10919
10998
|
has_more: more,
|
|
10920
10999
|
next_page: more ? `page_${offset + limit}` : null,
|
|
10921
11000
|
...expandPathsOf(params.expand).includes("total_count") ? { total_count: matched.length } : {},
|
|
@@ -14167,11 +14246,11 @@ var invoiceHandlers = (services) => {
|
|
|
14167
14246
|
const cursor = stringOf(params, "starting_after");
|
|
14168
14247
|
const found = cursor === null ? 0 : data.findIndex((line) => line.id === cursor) + 1;
|
|
14169
14248
|
const from = Math.max(0, found);
|
|
14170
|
-
const
|
|
14249
|
+
const window2 = data.slice(from, from + limit);
|
|
14171
14250
|
return jsonRes(200, {
|
|
14172
14251
|
object: "list",
|
|
14173
|
-
data:
|
|
14174
|
-
has_more: from +
|
|
14252
|
+
data: window2,
|
|
14253
|
+
has_more: from + window2.length < data.length,
|
|
14175
14254
|
url: `/v1/invoices/${invoice.id}/lines`
|
|
14176
14255
|
});
|
|
14177
14256
|
},
|
|
@@ -19873,4 +19952,4 @@ export {
|
|
|
19873
19952
|
createRuntime2 as createRuntime,
|
|
19874
19953
|
StripeAPI
|
|
19875
19954
|
};
|
|
19876
|
-
//# sourceMappingURL=chunk-
|
|
19955
|
+
//# sourceMappingURL=chunk-EINNHTOB.js.map
|