@forklaunch/universal-sdk 0.7.28 → 0.7.29

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/lib/index.js CHANGED
@@ -226,9 +226,19 @@ async function refreshOpenApi(host, registryOptions, existingRegistryOpenApiHash
226
226
  throw new Error("Raw OpenAPI JSON or registry information not provided");
227
227
  }
228
228
  const registryOpenApiHashFetch = await fetch(`${registry}-hash`);
229
+ if (!registryOpenApiHashFetch.ok) {
230
+ throw new Error(
231
+ `Failed to fetch OpenAPI registry hash: ${registryOpenApiHashFetch.status} ${registryOpenApiHashFetch.statusText}`
232
+ );
233
+ }
229
234
  const registryOpenApiHash = await registryOpenApiHashFetch.text();
230
235
  if (existingRegistryOpenApiHash == null || existingRegistryOpenApiHash !== registryOpenApiHash) {
231
236
  const registryOpenApiFetch = await fetch(registry);
237
+ if (!registryOpenApiFetch.ok) {
238
+ throw new Error(
239
+ `Failed to fetch OpenAPI registry: ${registryOpenApiFetch.status} ${registryOpenApiFetch.statusText}`
240
+ );
241
+ }
232
242
  const registryOpenApiJson = await registryOpenApiFetch.json();
233
243
  return {
234
244
  updateRequired: true,
package/lib/index.mjs CHANGED
@@ -194,9 +194,19 @@ async function refreshOpenApi(host, registryOptions, existingRegistryOpenApiHash
194
194
  throw new Error("Raw OpenAPI JSON or registry information not provided");
195
195
  }
196
196
  const registryOpenApiHashFetch = await fetch(`${registry}-hash`);
197
+ if (!registryOpenApiHashFetch.ok) {
198
+ throw new Error(
199
+ `Failed to fetch OpenAPI registry hash: ${registryOpenApiHashFetch.status} ${registryOpenApiHashFetch.statusText}`
200
+ );
201
+ }
197
202
  const registryOpenApiHash = await registryOpenApiHashFetch.text();
198
203
  if (existingRegistryOpenApiHash == null || existingRegistryOpenApiHash !== registryOpenApiHash) {
199
204
  const registryOpenApiFetch = await fetch(registry);
205
+ if (!registryOpenApiFetch.ok) {
206
+ throw new Error(
207
+ `Failed to fetch OpenAPI registry: ${registryOpenApiFetch.status} ${registryOpenApiFetch.statusText}`
208
+ );
209
+ }
200
210
  const registryOpenApiJson = await registryOpenApiFetch.json();
201
211
  return {
202
212
  updateRequired: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/universal-sdk",
3
- "version": "0.7.28",
3
+ "version": "0.7.29",
4
4
  "description": "Cross runtime fetch library for forklaunch router sdks",
5
5
  "keywords": [
6
6
  "fetch",
@@ -31,20 +31,20 @@
31
31
  "lib/**"
32
32
  ],
33
33
  "dependencies": {
34
- "ajv": "^8.17.1",
34
+ "ajv": "^8.18.0",
35
35
  "ajv-formats": "^3.0.1",
36
- "@forklaunch/common": "0.6.28"
36
+ "@forklaunch/common": "0.6.29"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/node": "^25.2.0",
40
- "@typescript/native-preview": "7.0.0-dev.20260204.1",
39
+ "@types/node": "^25.3.0",
40
+ "@typescript/native-preview": "7.0.0-dev.20260223.1",
41
41
  "fetch-mock": "^12.6.0",
42
42
  "jest": "^30.2.0",
43
43
  "openapi3-ts": "^4.5.0",
44
44
  "prettier": "^3.8.1",
45
45
  "ts-jest": "^29.4.6",
46
46
  "tsup": "^8.5.1",
47
- "typedoc": "^0.28.16"
47
+ "typedoc": "^0.28.17"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "tsgo --noEmit && tsup index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean",