Sign In

@papi-ai/shared

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@papi-ai/shared - npm Package Compare versions

Comparing version
0.2.2
to
0.2.3
+35
-0
dist/index.js

@@ -161,2 +161,36 @@ // src/core.ts

// src/deployment.ts
var HOSTED_APP_URL = "https://getpapi.ai";
var HOSTED_MCP_URL = "https://mcp.getpapi.ai";
var HOSTED_SUPABASE_URL = "https://guewgygcpcmrcoppihzx.supabase.co";
function optionalBoolean(value, fallback) {
if (value == null || value.trim() === "") return fallback;
return isSelfHostedDeployment(value);
}
function cleanUrl(value) {
const cleaned = value?.trim().replace(/\/+$/, "");
return cleaned || void 0;
}
function resolveDeploymentProfile(env) {
const selfHosted = isSelfHostedDeployment(env.selfHosted);
const hostedSupabaseUrl = cleanUrl(env.hostedSupabaseUrl);
return {
kind: selfHosted ? "self-hosted" : "hosted",
appUrl: cleanUrl(env.appUrl) ?? (selfHosted ? void 0 : HOSTED_APP_URL),
mcpUrl: cleanUrl(env.mcpUrl) ?? (selfHosted ? void 0 : HOSTED_MCP_URL),
dataEndpoint: cleanUrl(env.dataEndpoint) ?? (hostedSupabaseUrl ? `${hostedSupabaseUrl}/functions/v1/data-proxy` : void 0) ?? (selfHosted ? void 0 : `${HOSTED_SUPABASE_URL}/functions/v1/data-proxy`),
providers: {
vercel: optionalBoolean(env.vercelEnabled, !selfHosted),
railway: optionalBoolean(env.railwayEnabled, !selfHosted),
managedSupabase: optionalBoolean(env.managedSupabaseEnabled, !selfHosted)
},
auth: {
emailPassword: optionalBoolean(env.emailPasswordEnabled, true),
emailSignup: optionalBoolean(env.emailSignupEnabled, false),
google: optionalBoolean(env.googleAuthEnabled, !selfHosted),
github: optionalBoolean(env.githubAuthEnabled, !selfHosted)
}
};
}
// src/findings.ts

@@ -1365,2 +1399,3 @@ var SEVERITY_ORDER = {

renderCarryForward,
resolveDeploymentProfile,
serializeBuildHandoff,

@@ -1367,0 +1402,0 @@ serializeBuildReport,

+1
-1
{
"name": "@papi-ai/shared",
"version": "0.2.2",
"version": "0.2.3",
"description": "Shared PAPI contract: the PapiAdapter interface, every entity type, business rules and markdown parsers — used by the MCP server, the pg adapter and the dashboard",

@@ -5,0 +5,0 @@ "license": "Elastic-2.0",

Sorry, the diff of this file is too big to display