flyspace-cli 0.1.0 → 0.1.4
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/{chunk-X7SJ653V.js → chunk-6PJ73XYW.js} +1 -1
- package/dist/{chunk-DCCECKHH.js → chunk-BZYTXXF7.js} +580 -248
- package/dist/{chunk-QZIN7MWV.js → chunk-ZBMYF5LX.js} +15 -1
- package/dist/cli.js +2428 -628
- package/dist/index.js +2 -2
- package/dist/{threads-EQGJZF44.js → threads-PAG4PKHR.js} +12 -6
- package/package.json +2 -2
|
@@ -149,7 +149,14 @@ function sweepScratchDir(now = Date.now()) {
|
|
|
149
149
|
|
|
150
150
|
// src/store/supabase-client.ts
|
|
151
151
|
import { createClient } from "@supabase/supabase-js";
|
|
152
|
+
var REQUEST_TIMEOUT_MS = 15e3;
|
|
152
153
|
var client;
|
|
154
|
+
function setSupabaseClient(replacement) {
|
|
155
|
+
client = replacement;
|
|
156
|
+
}
|
|
157
|
+
function hasSupabaseCredentials() {
|
|
158
|
+
return !!process.env["SUPABASE_URL"] && !!process.env["SUPABASE_SECRET_KEY"];
|
|
159
|
+
}
|
|
153
160
|
function getSupabaseClient() {
|
|
154
161
|
if (client) return client;
|
|
155
162
|
const url = process.env["SUPABASE_URL"];
|
|
@@ -157,7 +164,12 @@ function getSupabaseClient() {
|
|
|
157
164
|
if (!url || !key) {
|
|
158
165
|
throw new Error("SUPABASE_URL / SUPABASE_SECRET_KEY not set \u2014 check .env");
|
|
159
166
|
}
|
|
160
|
-
client = createClient(url, key, {
|
|
167
|
+
client = createClient(url, key, {
|
|
168
|
+
auth: { persistSession: false },
|
|
169
|
+
global: {
|
|
170
|
+
fetch: (input, init) => fetch(input, { ...init, signal: init?.signal ?? AbortSignal.timeout(REQUEST_TIMEOUT_MS) })
|
|
171
|
+
}
|
|
172
|
+
});
|
|
161
173
|
return client;
|
|
162
174
|
}
|
|
163
175
|
|
|
@@ -416,6 +428,8 @@ export {
|
|
|
416
428
|
paths,
|
|
417
429
|
ensureDirs,
|
|
418
430
|
sweepScratchDir,
|
|
431
|
+
setSupabaseClient,
|
|
432
|
+
hasSupabaseCredentials,
|
|
419
433
|
getSupabaseClient,
|
|
420
434
|
AGENT_AUTHOR,
|
|
421
435
|
SYNCED_BOT_AUTHOR,
|