space-data-module-sdk 0.3.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "space-data-module-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Module SDK for building, validating, signing, and deploying WebAssembly modules on the Space Data Network.",
5
5
  "type": "module",
6
6
  "types": "./src/index.d.ts",
@@ -402,6 +402,9 @@ function buildMethodLookup(manifest) {
402
402
  }
403
403
 
404
404
  function buildExternalInterfaceLookup(manifest) {
405
+ if (!manifest || typeof manifest !== "object" || Array.isArray(manifest)) {
406
+ return null;
407
+ }
405
408
  const lookup = new Map();
406
409
  if (!Array.isArray(manifest?.externalInterfaces)) {
407
410
  return lookup;
@@ -427,6 +430,9 @@ function validateDeclaredInterface(
427
430
  externalInterfaceLookup,
428
431
  allowedDirections,
429
432
  ) {
433
+ if (!externalInterfaceLookup) {
434
+ return;
435
+ }
430
436
  const normalizedInterfaceId = normalizeString(interfaceId);
431
437
  if (!normalizedInterfaceId) {
432
438
  return;