@papi-ai/shared
Advanced tools
+35
-0
@@ -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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
207738
2.25%4469
2.34%