@cheep/transport
Advanced tools
Comparing version 1.0.0-beta.27 to 1.0.0-beta.28
{ | ||
"name": "@cheep/transport", | ||
"version": "1.0.0-beta.27", | ||
"version": "1.0.0-beta.28", | ||
"main": "src/index.js", | ||
"typings": "src/index.d.ts" | ||
} |
@@ -8,6 +8,9 @@ export * from './lib/domain/normalizeError'; | ||
export * from './lib/metadataValidators/transactionDuration.validator'; | ||
export * from './lib/remote.error'; | ||
export * from './lib/rpcTimeout.error'; | ||
export * from './lib/errors/remote.error'; | ||
export * from './lib/errors/rpcTimeout.error'; | ||
export * from './lib/transport'; | ||
export * from './lib/transport.base'; | ||
export * from './lib/constants'; | ||
export * from './lib/api/createTransportApi'; | ||
export * from './lib/api/createTransportHandler'; | ||
export { Api, TransportApiOptions, TransportHandler, ExecutableApi, PublishableApi, RouteMap, RouteMapReturn, CheepOperators, ApiWithExecutableKeys, TransportApi, } from './lib/api/types'; |
@@ -11,7 +11,9 @@ "use strict"; | ||
tslib_1.__exportStar(require("./lib/metadataValidators/transactionDuration.validator"), exports); | ||
tslib_1.__exportStar(require("./lib/remote.error"), exports); | ||
tslib_1.__exportStar(require("./lib/rpcTimeout.error"), exports); | ||
tslib_1.__exportStar(require("./lib/errors/remote.error"), exports); | ||
tslib_1.__exportStar(require("./lib/errors/rpcTimeout.error"), exports); | ||
tslib_1.__exportStar(require("./lib/transport"), exports); | ||
tslib_1.__exportStar(require("./lib/transport.base"), exports); | ||
tslib_1.__exportStar(require("./lib/constants"), exports); | ||
tslib_1.__exportStar(require("./lib/api/createTransportApi"), exports); | ||
tslib_1.__exportStar(require("./lib/api/createTransportHandler"), exports); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.callStackValidator = void 0; | ||
const recursion_error_1 = require("../recursion.error"); | ||
const recursion_error_1 = require("../errors/recursion.error"); | ||
function callStackValidator(prefixesToCheck) { | ||
@@ -6,0 +6,0 @@ return (msg) => { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transactionDurationValidator = void 0; | ||
const transactionDuration_error_1 = require("../transactionDuration.error"); | ||
const transactionDuration_error_1 = require("../errors/transactionDuration.error"); | ||
function transactionDurationValidator(maxDuration, parseDate, dateNow) { | ||
@@ -6,0 +6,0 @@ return (msg) => { |
@@ -6,4 +6,4 @@ "use strict"; | ||
const normalizeError_1 = require("./domain/normalizeError"); | ||
const remote_error_1 = require("./remote.error"); | ||
const rpcTimeout_error_1 = require("./rpcTimeout.error"); | ||
const remote_error_1 = require("./errors/remote.error"); | ||
const rpcTimeout_error_1 = require("./errors/rpcTimeout.error"); | ||
const transport_1 = require("./transport"); | ||
@@ -140,3 +140,2 @@ const constants_1 = require("./constants"); | ||
const prefix = prefixes; | ||
// Reflect.defineMetadata(HANDLER_META, true, action) | ||
const handlers = (_a = this.rawHandlers.get(prefix)) !== null && _a !== void 0 ? _a : new Set(); | ||
@@ -204,9 +203,3 @@ handlers.add(action); | ||
const handlerSet = (_a = this.prefixHandlers.get(prefix)) !== null && _a !== void 0 ? _a : []; | ||
return ([...handlerSet] | ||
// .filter( | ||
// handler => | ||
// // only fire for handlers who DO NOT have the metadata | ||
// !Reflect.hasMetadata(HANDLER_META, handler), | ||
// ) | ||
.map(handler => { | ||
return [...handlerSet].map(handler => { | ||
return new Promise((resolve, reject) => { | ||
@@ -227,3 +220,3 @@ try { | ||
}); | ||
})); | ||
}); | ||
}); | ||
@@ -238,3 +231,2 @@ } | ||
}); | ||
// .filter(handler => Reflect.hasMetadata(HANDLER_META, handler)) | ||
// put the route prefix handlers last, so if there are more specific handlers provided, they will be the RPC call | ||
@@ -241,0 +233,0 @@ const routeHandlers = [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
71133
62
1091