@orvello/sdk 0.2.0 → 0.2.1

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/index.cjs CHANGED
@@ -4,7 +4,7 @@
4
4
  var CONTRACT_SHA256 = "4efd4e4b669168c9cab5419fa04dd4e26a2029de2d4b10a59918e366189e1072";
5
5
 
6
6
  // src/diagnose.ts
7
- var SDK_VERSION = "0.2.0" ;
7
+ var SDK_VERSION = "0.2.1" ;
8
8
  function normalizeBaseUrl(raw) {
9
9
  const trimmed = raw.trim();
10
10
  if (!trimmed) throw new Error("Base URL cannot be empty");
@@ -708,7 +708,7 @@ function buildPath(operationId, params) {
708
708
  }
709
709
 
710
710
  // src/capabilities.ts
711
- var SDK_VERSION2 = "0.2.0" ;
711
+ var SDK_VERSION2 = "0.2.1" ;
712
712
  var CLIENT_MANAGEMENT_OPS = [
713
713
  "oauth2_external_clients_list",
714
714
  "oauth2_external_clients_get",
@@ -791,6 +791,7 @@ function orvelloCapabilities() {
791
791
  }
792
792
 
793
793
  // src/preflight.ts
794
+ var HEALTH_PATH = describeOperation("app_info_health")?.path ?? "/app-info/health";
794
795
  function step(name, ok, detail, skipped = false) {
795
796
  return { name, ok, skipped, detail };
796
797
  }
@@ -933,7 +934,7 @@ async function probeReachable(host, baseUrl, timeoutMs, signal) {
933
934
  const timer = setTimeout(() => controller.abort(new Error(`Reachability probe timed out after ${timeoutMs}ms`)), timeoutMs);
934
935
  const started = Date.now();
935
936
  try {
936
- const response = await doFetch(`${baseUrl}/health`, {
937
+ const response = await doFetch(`${baseUrl}${HEALTH_PATH}`, {
937
938
  method: "GET",
938
939
  headers: { accept: "application/json" },
939
940
  signal: controller.signal
@@ -1363,7 +1364,7 @@ var OrvelloClient = class _OrvelloClient {
1363
1364
  if (options.signal?.aborted) controller.abort(options.signal.reason);
1364
1365
  const timer = setTimeout(() => controller.abort(new Error(`Health check timed out after ${timeoutMs}ms`)), timeoutMs);
1365
1366
  try {
1366
- const response = await this.doFetch(`${baseUrl}/health`, {
1367
+ const response = await this.doFetch(`${baseUrl}${HEALTH_PATH}`, {
1367
1368
  method: "GET",
1368
1369
  headers: { accept: "application/json" },
1369
1370
  signal: controller.signal
@@ -1374,7 +1375,7 @@ var OrvelloClient = class _OrvelloClient {
1374
1375
  available: false,
1375
1376
  responseTimeMs: Date.now() - started,
1376
1377
  authenticated: null,
1377
- error: `orvello answered ${response.status} on /health`
1378
+ error: `orvello answered ${response.status} on ${HEALTH_PATH}`
1378
1379
  };
1379
1380
  }
1380
1381
  this.recordSuccess();
@@ -1789,6 +1790,7 @@ function createOrvelloClient(config) {
1789
1790
  }
1790
1791
 
1791
1792
  exports.CONTRACT_SHA256 = CONTRACT_SHA256;
1793
+ exports.HEALTH_PATH = HEALTH_PATH;
1792
1794
  exports.OrvelloApiError = OrvelloApiError;
1793
1795
  exports.OrvelloClient = OrvelloClient;
1794
1796
  exports.OrvelloOperationError = OrvelloOperationError;