Stripe integration flow

This commit is contained in:
metacryst
2026-03-05 00:29:34 -06:00
parent bdd260c2b5
commit 661bf86a1a
17 changed files with 303 additions and 117 deletions

View File

@@ -1,4 +1,4 @@
const IS_NODE =
export const IS_NODE =
typeof process !== "undefined" &&
process.versions?.node != null
@@ -9,9 +9,7 @@ async function bridgeSend(name, args) {
args: args
})
const json = await res.json()
if (!res.ok) throw new Error(json.error)
return json.result
return res
}
/**
@@ -24,8 +22,6 @@ export function createBridge(funcs) {
get(target, prop) {
const orig = target[prop]
if (typeof orig !== "function") return orig
return function (...args) {
if (IS_NODE) {
return orig(...args)