@dynamic-labs/message-transport
Advanced tools
Comparing version 2.1.0-alpha.15 to 2.1.0-alpha.16
@@ -17,2 +17,14 @@ 'use client' | ||
function __rest(s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
} | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
@@ -33,2 +45,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
export { __awaiter }; | ||
export { __awaiter, __rest }; |
{ | ||
"name": "@dynamic-labs/message-transport", | ||
"version": "2.1.0-alpha.15", | ||
"version": "2.1.0-alpha.16", | ||
"repository": { | ||
@@ -30,5 +30,5 @@ "type": "git", | ||
"@vue/reactivity": "3.4.21", | ||
"@dynamic-labs/types": "2.1.0-alpha.15", | ||
"@dynamic-labs/types": "2.1.0-alpha.16", | ||
"eventemitter3": "5.0.1" | ||
} | ||
} |
export { applyDefaultMessageOrigin, createMessageTransport, makeWaitForInitEvent, makeWaitForUnblock, type BypassBlockCallback, type MessageTransport, type MessageTransportCallback, type MessageTransportData, type MessageTransportDataOptionalOrigin, type MessageTransportWithDefaultOrigin, } from './messageTransport'; | ||
export { createRequestChannel, type RequestChannel } from './requestChannel'; | ||
export { parseMessageTransportData } from './utils/parseMessageTransportData'; | ||
export { serializeErrorForTransport } from './utils/serializeErrorForTransport'; | ||
export { parseErrorFromTransport } from './utils/parseErrorFromTransport'; | ||
export { createEventEmitterForMessages, createStore, createStoreSetter, type MessagesForEventEmitter, } from './store'; | ||
export type { Store, StoreKeys, StoreSetter, StoreStateEvents, StoreStateGetters, StoreEventListeners, } from './store/types'; | ||
export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type OtpMessages, type SdkModuleMessages, type SdkModuleState, type WalletsModuleState, } from './messageTypes'; | ||
export type { Store, StoreEventListeners, StoreKeys, StoreSetter, StoreStateEvents, StoreStateGetters, } from './store/types'; | ||
export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type OtpMessages, type SdkModuleMessages, type SdkModuleState, type EthMessages, type WalletsModuleState, type ConsoleMessages, type WebViewVisibilityMessages, type UserInterfaceModuleMessages, } from './messageTypes'; |
@@ -8,2 +8,4 @@ 'use client' | ||
export { parseMessageTransportData } from './utils/parseMessageTransportData/parseMessageTransportData.js'; | ||
export { serializeErrorForTransport } from './utils/serializeErrorForTransport/serializeErrorForTransport.js'; | ||
export { parseErrorFromTransport } from './utils/parseErrorFromTransport/parseErrorFromTransport.js'; | ||
export { createEventEmitterForMessages } from './store/createEventEmitterForMessages/createEventEmitterForMessages.js'; | ||
@@ -10,0 +12,0 @@ export { createStore } from './store/store.js'; |
export * from './AuthModuleMessages'; | ||
export * from './EthMessages'; | ||
export * from './OtpMessages'; | ||
export * from './SdkModuleMessages'; | ||
export * from './WalletsModuleMessages'; | ||
export * from './ConsoleMessages'; | ||
export * from './WebViewVisibilityMessages'; | ||
export * from './UserInterfaceModuleMessages'; |
'use client' | ||
import { __awaiter } from '../../_virtual/_tslib.js'; | ||
import { parseErrorFromTransport } from '../utils/parseErrorFromTransport/parseErrorFromTransport.js'; | ||
import { serializeErrorForTransport } from '../utils/serializeErrorForTransport/serializeErrorForTransport.js'; | ||
import { isSerializedError } from '../utils/isSerializedError/isSerializedError.js'; | ||
@@ -64,3 +67,3 @@ /** Given a request event name, returns the event name for its resolve */ | ||
messageTransport.emit({ | ||
args: [error], | ||
args: [serializeErrorForTransport(error)], | ||
messageSessionId, | ||
@@ -92,3 +95,8 @@ type: getRejectMessageType(requestType), | ||
if (incomingType === rejectMessageType) { | ||
reject(result); | ||
if (isSerializedError(result)) { | ||
reject(parseErrorFromTransport(result)); | ||
} | ||
else { | ||
reject(result); | ||
} | ||
cleanup(); | ||
@@ -95,0 +103,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
337247
70
1349
+ Added@dynamic-labs/types@2.1.0-alpha.16(transitive)
- Removed@dynamic-labs/types@2.1.0-alpha.15(transitive)