orangeslice 1.7.13 → 1.7.14

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.
Files changed (2) hide show
  1. package/dist/api.js +11 -14
  2. package/package.json +1 -1
package/dist/api.js CHANGED
@@ -1,19 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.post = post;
4
- const RAW_BASE_URL = process.env.ORANGESLICE_API_URL || "https://orangeslice.ai/api/function";
5
- const BASE_URL = normalizeBaseUrl(RAW_BASE_URL);
6
- const RAW_DIRECT_BASE_URL = process.env.ORANGESLICE_DIRECT_API_URL || "https://orangeslice.ai/api/function";
7
- const DIRECT_BASE_URL = normalizeBaseUrl(RAW_DIRECT_BASE_URL);
8
- const POLL_TIMEOUT_MS = parseInt(process.env.ORANGESLICE_POLL_TIMEOUT_MS || "120000", 10);
9
- const DEFAULT_POLL_INTERVAL_MS = parseInt(process.env.ORANGESLICE_POLL_INTERVAL_MS || "1000", 10);
10
- function normalizeBaseUrl(input) {
11
- const url = new URL(input);
12
- const cleanPath = url.pathname.replace(/\/+$/, "");
13
- url.pathname = cleanPath.endsWith("/function") ? cleanPath : `${cleanPath}/function`;
14
- url.search = "";
15
- return url.toString();
16
- }
4
+ /**
5
+ * Runtime routing (hardcoded on purpose):
6
+ * - Non-direct calls -> Railway batch-service /function
7
+ * - Direct calls -> orangeslice.ai /api/function
8
+ * - Inngest polling -> batch-service (configured there)
9
+ */
10
+ const BASE_URL = "https://enrichly-production.up.railway.app/function";
11
+ const DIRECT_BASE_URL = "https://orangeslice.ai/api/function";
12
+ const POLL_TIMEOUT_MS = 120000;
13
+ const DEFAULT_POLL_INTERVAL_MS = 1000;
17
14
  function sleep(ms) {
18
15
  return new Promise((resolve) => setTimeout(resolve, ms));
19
16
  }
@@ -85,7 +82,7 @@ async function post(functionId, payload, options = {}) {
85
82
  const res = await fetchWithRedirect(url, {
86
83
  method: "POST",
87
84
  headers: { "Content-Type": "application/json" },
88
- body
85
+ body,
89
86
  });
90
87
  if (!res.ok) {
91
88
  let message = `${res.status}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orangeslice",
3
- "version": "1.7.13",
3
+ "version": "1.7.14",
4
4
  "description": "B2B LinkedIn database prospector - 1.15B profiles, 85M companies",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",