@cerefox/memory 0.8.1 → 0.8.2
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/bin/cerefox.js +34 -15
- package/package.json +1 -1
package/dist/bin/cerefox.js
CHANGED
|
@@ -7184,7 +7184,7 @@ var exports_meta = {};
|
|
|
7184
7184
|
__export(exports_meta, {
|
|
7185
7185
|
PKG_VERSION: () => PKG_VERSION
|
|
7186
7186
|
});
|
|
7187
|
-
var PKG_VERSION = "0.8.
|
|
7187
|
+
var PKG_VERSION = "0.8.2";
|
|
7188
7188
|
var init_meta = () => {};
|
|
7189
7189
|
|
|
7190
7190
|
// ../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js
|
|
@@ -41799,6 +41799,17 @@ function commandSucceeds(cmd, args) {
|
|
|
41799
41799
|
return false;
|
|
41800
41800
|
}
|
|
41801
41801
|
}
|
|
41802
|
+
function parseProjectRef(supabaseUrl) {
|
|
41803
|
+
if (!supabaseUrl)
|
|
41804
|
+
return null;
|
|
41805
|
+
try {
|
|
41806
|
+
const host = new URL(supabaseUrl).hostname;
|
|
41807
|
+
const label = host.split(".")[0];
|
|
41808
|
+
return /^[a-z0-9]{20}$/.test(label) ? label : null;
|
|
41809
|
+
} catch {
|
|
41810
|
+
return null;
|
|
41811
|
+
}
|
|
41812
|
+
}
|
|
41802
41813
|
function listEdgeFunctions(functionsDir) {
|
|
41803
41814
|
if (!existsSync6(functionsDir))
|
|
41804
41815
|
return [];
|
|
@@ -41809,6 +41820,7 @@ async function action8(options) {
|
|
|
41809
41820
|
const assets = resolveServerAssets();
|
|
41810
41821
|
const doSchema = !options.functionsOnly;
|
|
41811
41822
|
const doFunctions = !options.schemaOnly;
|
|
41823
|
+
const projectRef = options.projectRef ?? parseProjectRef(settings.supabaseUrl);
|
|
41812
41824
|
const checks = [];
|
|
41813
41825
|
if (doSchema) {
|
|
41814
41826
|
checks.push({
|
|
@@ -41836,12 +41848,11 @@ async function action8(options) {
|
|
|
41836
41848
|
remediation: "Install Node 20+ (npx ships with it) from nodejs.org, then re-run. " + "`cerefox deploy-server` shells out to the Supabase CLI via npx."
|
|
41837
41849
|
});
|
|
41838
41850
|
checks.push({
|
|
41839
|
-
label: "Supabase project
|
|
41840
|
-
ok:
|
|
41841
|
-
remediation: `
|
|
41842
|
-
` + `
|
|
41843
|
-
` +
|
|
41844
|
-
` + " Your project ref is in the dashboard URL: " + "https://supabase.com/dashboard/project/<project-ref>"
|
|
41851
|
+
label: "Supabase project ref resolved (from CEREFOX_SUPABASE_URL)",
|
|
41852
|
+
ok: Boolean(projectRef),
|
|
41853
|
+
remediation: `Could not derive the project ref from CEREFOX_SUPABASE_URL.
|
|
41854
|
+
` + " Set CEREFOX_SUPABASE_URL to your project URL " + `(https://<project-ref>.supabase.co), or pass --project-ref <ref>.
|
|
41855
|
+
` + " Also make sure you're logged in once: npx supabase login"
|
|
41845
41856
|
});
|
|
41846
41857
|
}
|
|
41847
41858
|
const failed = checks.filter((ch) => !ch.ok);
|
|
@@ -41893,7 +41904,7 @@ async function action8(options) {
|
|
|
41893
41904
|
}
|
|
41894
41905
|
}
|
|
41895
41906
|
if (doFunctions) {
|
|
41896
|
-
planLines.push(` • Deploy ${efNames.length} Edge Function(s): ${efNames.join(", ")}`);
|
|
41907
|
+
planLines.push(` • Deploy ${efNames.length} Edge Function(s) to project ${projectRef}: ${efNames.join(", ")}`);
|
|
41897
41908
|
}
|
|
41898
41909
|
println(c.bold(`
|
|
41899
41910
|
Plan:`));
|
|
@@ -41960,7 +41971,10 @@ Proceed with deployment to Supabase?`, true);
|
|
|
41960
41971
|
for (const ef of efNames) {
|
|
41961
41972
|
info(` deploying ${ef}…`);
|
|
41962
41973
|
const workdir = assets.functionsDir.replace(/\/functions$/, "").replace(/\/supabase$/, "");
|
|
41963
|
-
const
|
|
41974
|
+
const args = ["--yes", "supabase", "functions", "deploy", ef];
|
|
41975
|
+
if (projectRef)
|
|
41976
|
+
args.push("--project-ref", projectRef);
|
|
41977
|
+
const r = spawnSync2("npx", args, {
|
|
41964
41978
|
encoding: "utf8",
|
|
41965
41979
|
stdio: "inherit",
|
|
41966
41980
|
cwd: workdir,
|
|
@@ -41984,7 +41998,7 @@ Proceed with deployment to Supabase?`, true);
|
|
|
41984
41998
|
println(c.dim("Verify with: cerefox doctor"));
|
|
41985
41999
|
}
|
|
41986
42000
|
function registerDeployServer(program2) {
|
|
41987
|
-
program2.command("deploy-server").description("Deploy/update the Cerefox server side (schema + RPCs + Edge Functions) on Supabase.").option("--dry-run", "Print the plan + pre-flight without deploying.").option("--schema-only", "Deploy/update only the schema + RPCs (skip Edge Functions).").option("--functions-only", "Deploy only the Edge Functions (skip the schema/RPCs).").action(action8);
|
|
42001
|
+
program2.command("deploy-server").description("Deploy/update the Cerefox server side (schema + RPCs + Edge Functions) on Supabase.").option("--dry-run", "Print the plan + pre-flight without deploying.").option("--schema-only", "Deploy/update only the schema + RPCs (skip Edge Functions).").option("--functions-only", "Deploy only the Edge Functions (skip the schema/RPCs).").option("--project-ref <ref>", "Supabase project ref for Edge Function deploys (default: derived from CEREFOX_SUPABASE_URL).").action(action8);
|
|
41988
42002
|
}
|
|
41989
42003
|
|
|
41990
42004
|
// src/cli/commands/docs.ts
|
|
@@ -45417,12 +45431,17 @@ init_cli_core();
|
|
|
45417
45431
|
|
|
45418
45432
|
// src/cli/util/checks.ts
|
|
45419
45433
|
init_meta();
|
|
45420
|
-
init_config();
|
|
45421
|
-
init_config();
|
|
45422
45434
|
import { existsSync as existsSync8, readFileSync as readFileSync6, realpathSync, statSync as statSync2 } from "node:fs";
|
|
45423
45435
|
import { homedir as homedir4 } from "node:os";
|
|
45424
45436
|
import { join as join7 } from "node:path";
|
|
45425
45437
|
|
|
45438
|
+
// ../../_shared/ef-meta/index.ts
|
|
45439
|
+
var EF_VERSION = "0.8.0";
|
|
45440
|
+
|
|
45441
|
+
// src/cli/util/checks.ts
|
|
45442
|
+
init_config();
|
|
45443
|
+
init_config();
|
|
45444
|
+
|
|
45426
45445
|
// ../../_shared/compatibility/index.ts
|
|
45427
45446
|
var COMPATIBILITY = {
|
|
45428
45447
|
minSchema: "0.3.1",
|
|
@@ -45888,7 +45907,7 @@ async function checkEdgeFunctionsCompat() {
|
|
|
45888
45907
|
compat = await checkServerCompatibility({
|
|
45889
45908
|
aggregatorUrl: aggregatorUrlFor(settings.supabaseUrl),
|
|
45890
45909
|
bearer: settings.supabaseAnonKey,
|
|
45891
|
-
bundledEf:
|
|
45910
|
+
bundledEf: EF_VERSION
|
|
45892
45911
|
});
|
|
45893
45912
|
} catch (err) {
|
|
45894
45913
|
return {
|
|
@@ -45917,7 +45936,7 @@ async function checkEdgeFunctionsCompat() {
|
|
|
45917
45936
|
return {
|
|
45918
45937
|
name: "edge functions",
|
|
45919
45938
|
status: "warn",
|
|
45920
|
-
detail: `Deployed EF v${deployed} works but is older than
|
|
45939
|
+
detail: `Deployed EF v${deployed} works but is older than the bundled Edge Functions (v${EF_VERSION}).`,
|
|
45921
45940
|
hint: "Update the Edge Functions (see remediation below)."
|
|
45922
45941
|
};
|
|
45923
45942
|
default:
|
|
@@ -52995,7 +53014,7 @@ async function assertServerCompatible() {
|
|
|
52995
53014
|
compat2 = await checkServerCompatibility({
|
|
52996
53015
|
aggregatorUrl: aggregatorUrlFor(settings.supabaseUrl),
|
|
52997
53016
|
bearer: settings.supabaseAnonKey,
|
|
52998
|
-
bundledEf:
|
|
53017
|
+
bundledEf: EF_VERSION
|
|
52999
53018
|
});
|
|
53000
53019
|
} catch {
|
|
53001
53020
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Cerefox — user-owned shared memory for AI agents. The local TypeScript runtime: stdio MCP server in v0.4; CLI binary added in v0.5; in-process web server in v0.6; ingestion pipeline in v0.7.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/fstamatelopoulos/cerefox",
|