@logzio-node-toolbox/consul
Advanced tools
Comparing version 0.0.8 to 0.0.10
@@ -178,7 +178,7 @@ import retry from 'async-retry'; | ||
return module = { | ||
path: basedir, | ||
exports: {}, | ||
require: function (path, base) { | ||
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); | ||
} | ||
path: basedir, | ||
exports: {}, | ||
require: function (path, base) { | ||
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); | ||
} | ||
}, fn(module, module.exports), module.exports; | ||
@@ -198,3 +198,5 @@ } | ||
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func | ||
Function('return this')(); | ||
function () { | ||
return this; | ||
}() || Function('return this')(); | ||
@@ -409,3 +411,3 @@ var fails = function (exec) { | ||
})('versions', []).push({ | ||
version: '3.6.5', | ||
version: '3.7.0', | ||
mode: 'global', | ||
@@ -451,3 +453,3 @@ copyright: '© 2020 Denis Pushkarev (zloirock.ru)' | ||
if (nativeWeakMap) { | ||
var store$1 = new WeakMap$2(); | ||
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2()); | ||
var wmget = store$1.get; | ||
@@ -458,2 +460,3 @@ var wmhas = store$1.has; | ||
set = function (it, metadata) { | ||
metadata.facade = it; | ||
wmset.call(store$1, it, metadata); | ||
@@ -475,2 +478,3 @@ return metadata; | ||
set = function (it, metadata) { | ||
metadata.facade = it; | ||
createNonEnumerableProperty(it, STATE, metadata); | ||
@@ -505,6 +509,14 @@ return metadata; | ||
var noTargetGet = options ? !!options.noTargetGet : false; | ||
var state; | ||
if (typeof value == 'function') { | ||
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key); | ||
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
if (typeof key == 'string' && !has(value, 'name')) { | ||
createNonEnumerableProperty(value, 'name', key); | ||
} | ||
state = enforceInternalState(value); | ||
if (!state.source) { | ||
state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
} | ||
} | ||
@@ -878,16 +890,10 @@ | ||
// call something on iterator step with safe closing on error | ||
var iteratorClose = function (iterator) { | ||
var returnMethod = iterator['return']; | ||
var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) { | ||
try { | ||
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) | ||
} catch (error) { | ||
var returnMethod = iterator['return']; | ||
if (returnMethod !== undefined) anObject(returnMethod.call(iterator)); | ||
throw error; | ||
if (returnMethod !== undefined) { | ||
return anObject(returnMethod.call(iterator)).value; | ||
} | ||
}; | ||
var iterate_1 = createCommonjsModule(function (module) { | ||
var Result = function (stopped, result) { | ||
@@ -898,6 +904,24 @@ this.stopped = stopped; | ||
var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) { | ||
var boundFunction = functionBindContext(fn, that, AS_ENTRIES ? 2 : 1); | ||
var iterate = function (iterable, unboundFunction, options) { | ||
var that = options && options.that; | ||
var AS_ENTRIES = !!(options && options.AS_ENTRIES); | ||
var IS_ITERATOR = !!(options && options.IS_ITERATOR); | ||
var INTERRUPTED = !!(options && options.INTERRUPTED); | ||
var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED); | ||
var iterator, iterFn, index, length, result, next, step; | ||
var stop = function (condition) { | ||
if (iterator) iteratorClose(iterator); | ||
return new Result(true, condition); | ||
}; | ||
var callFn = function (value) { | ||
if (AS_ENTRIES) { | ||
anObject(value); | ||
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); | ||
} | ||
return INTERRUPTED ? fn(value, stop) : fn(value); | ||
}; | ||
if (IS_ITERATOR) { | ||
@@ -911,3 +935,3 @@ iterator = iterable; | ||
for (index = 0, length = toLength(iterable.length); length > index; index++) { | ||
result = AS_ENTRIES ? boundFunction(anObject(step = iterable[index])[0], step[1]) : boundFunction(iterable[index]); | ||
result = callFn(iterable[index]); | ||
if (result && result instanceof Result) return result; | ||
@@ -925,3 +949,9 @@ } | ||
while (!(step = next.call(iterator)).done) { | ||
result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES); | ||
try { | ||
result = callFn(step.value); | ||
} catch (error) { | ||
iteratorClose(iterator); | ||
throw error; | ||
} | ||
if (typeof result == 'object' && result && result instanceof Result) return result; | ||
@@ -933,7 +963,2 @@ } | ||
iterate.stop = function (result) { | ||
return new Result(true, result); | ||
}; | ||
}); | ||
// `Promise.allSettled` method | ||
@@ -957,3 +982,3 @@ // https://github.com/tc39/proposal-promise-allSettled | ||
var remaining = 1; | ||
iterate_1(iterable, function (promise) { | ||
iterate(iterable, function (promise) { | ||
var index = counter++; | ||
@@ -971,3 +996,3 @@ var alreadyCalled = false; | ||
--remaining || resolve(values); | ||
}, function (e) { | ||
}, function (error) { | ||
if (alreadyCalled) return; | ||
@@ -977,3 +1002,3 @@ alreadyCalled = true; | ||
status: 'rejected', | ||
reason: e | ||
reason: error | ||
}; | ||
@@ -980,0 +1005,0 @@ --remaining || resolve(values); |
{ | ||
"name": "@logzio-node-toolbox/consul", | ||
"version": "0.0.8", | ||
"version": "0.0.10", | ||
"description": "Consul easy use for json configs and service discovery", | ||
"main": "dist/index.js", | ||
"main": "dist/index.cjs", | ||
"exports": { | ||
"import": "./dist/index.es.js", | ||
"require": "./dist/index.js" | ||
"require": "./dist/index.cjs" | ||
}, | ||
@@ -30,5 +30,5 @@ "types": "dist/index.d.ts", | ||
"async-retry": "1.3.1", | ||
"consul": "0.37.0", | ||
"consul": "0.39.0", | ||
"deepmerge": "4.2.2" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
68901
1916
3
+ Addedconsul@0.39.0(transitive)
- Removedconsul@0.37.0(transitive)
Updatedconsul@0.39.0