New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@luvio/command-aura-network

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@luvio/command-aura-network - npm Package Compare versions

Comparing version 5.21.1-alpha.0 to 5.23.0

3

dist/types/v1/aura-network-command.d.ts
import { NetworkCommand } from '@luvio/command-network/v1';
import { type Result } from '@luvio/utils';
import type { NamedAuraNetworkService } from '@luvio/service-aura-network/v1';
import type { AuraRawResponseBody } from 'aura';
/**

@@ -18,3 +19,5 @@ * An implementation of NetworkCommand that uses Aura as the transport mechanism

};
protected coerceAuraErrors(auraErrors: any[]): Error;
protected convertAuraResponseToData<Data = unknown>(responsePromise: Promise<AuraRawResponseBody<any>>, coerceError: (errors: any[]) => Error): Promise<Result<Data, Error>>;
fetch(): PromiseLike<Result<Data, Error>>;
}

40

dist/v1/index.js

@@ -8,21 +8,4 @@ /**

import { NetworkCommand } from '@luvio/command-network/v1';
import { ok, err, toError } from '@luvio/utils';
import { toError, ok, err } from '@luvio/utils';
function convertAuraResponseToData(responsePromise) {
return responsePromise
.then((response) => {
return ok(response.getReturnValue());
})
.catch((error) => {
if (!error || !error.getError) {
return err(toError('Failed to get error from response'));
}
const actionErrors = error.getError();
if (actionErrors.length > 0) {
return err(toError(actionErrors[0]));
}
return err(toError('Error fetching component'));
});
}
/**

@@ -42,4 +25,23 @@ * An implementation of NetworkCommand that uses Aura as the transport mechanism

}
coerceAuraErrors(auraErrors) {
return toError(auraErrors[0]); // Default Implmentation stringifies the response
}
convertAuraResponseToData(responsePromise, coerceError) {
return responsePromise
.then((response) => {
return ok(response.getReturnValue());
})
.catch((error) => {
if (!error || !error.getError) {
return err(toError('Failed to get error from response'));
}
const actionErrors = error.getError();
if (actionErrors.length > 0) {
return err(coerceError(actionErrors));
}
return err(toError('Error fetching component'));
});
}
fetch() {
return convertAuraResponseToData(this.services.auraNetwork(this.endpoint, this.auraParams, this.actionConfig));
return this.convertAuraResponseToData(this.services.auraNetwork(this.endpoint, this.auraParams, this.actionConfig), this.coerceAuraErrors);
}

@@ -46,0 +48,0 @@ }

import { NetworkCommand } from '@luvio/command-network/v1';
import { type Result } from '@luvio/utils';
import type { NamedAuraNetworkService } from '@luvio/service-aura-network/v1';
import type { AuraRawResponseBody } from 'aura';
/**

@@ -18,3 +19,5 @@ * An implementation of NetworkCommand that uses Aura as the transport mechanism

};
protected coerceAuraErrors(auraErrors: any[]): Error;
protected convertAuraResponseToData<Data = unknown>(responsePromise: Promise<AuraRawResponseBody<any>>, coerceError: (errors: any[]) => Error): Promise<Result<Data, Error>>;
fetch(): PromiseLike<Result<Data, Error>>;
}
{
"name": "@luvio/command-aura-network",
"version": "5.21.1-alpha.0",
"version": "5.23.0",
"private": false,

@@ -33,5 +33,5 @@ "description": "Luvio Aura Network Command",

"dependencies": {
"@luvio/command-base": "5.21.1-alpha.0",
"@luvio/command-network": "5.21.1-alpha.0",
"@luvio/utils": "5.21.1-alpha.0"
"@luvio/command-base": "5.23.0",
"@luvio/command-network": "5.23.0",
"@luvio/utils": "5.23.0"
},

@@ -38,0 +38,0 @@ "volta": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc