@luvio/environments 0.112.0 → 0.112.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.
|
@@ -630,9 +630,15 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
630
630
|
};
|
|
631
631
|
const withContext = function (adapter, options) {
|
|
632
632
|
validateNotDisposed();
|
|
633
|
-
const { contextId, onContextLoaded } = options;
|
|
633
|
+
const { contextId, contextVersion, onContextLoaded } = options;
|
|
634
634
|
let context = undefined;
|
|
635
|
-
|
|
635
|
+
let contextKey = `${contextId}`;
|
|
636
|
+
// if a context version is supplied, key with the version encoded
|
|
637
|
+
if (contextVersion !== undefined) {
|
|
638
|
+
contextKey += `::${contextVersion}`;
|
|
639
|
+
}
|
|
640
|
+
contextKey += ADAPTER_CONTEXT_ID_SUFFIX;
|
|
641
|
+
const contextAsPromise = reviveOrCreateContext(contextKey, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded);
|
|
636
642
|
return (config, requestContext) => {
|
|
637
643
|
if (context === undefined) {
|
|
638
644
|
return contextAsPromise.then((revivedContext) => {
|
|
@@ -634,9 +634,15 @@
|
|
|
634
634
|
};
|
|
635
635
|
const withContext = function (adapter, options) {
|
|
636
636
|
validateNotDisposed();
|
|
637
|
-
const { contextId, onContextLoaded } = options;
|
|
637
|
+
const { contextId, contextVersion, onContextLoaded } = options;
|
|
638
638
|
let context = undefined;
|
|
639
|
-
|
|
639
|
+
let contextKey = `${contextId}`;
|
|
640
|
+
// if a context version is supplied, key with the version encoded
|
|
641
|
+
if (contextVersion !== undefined) {
|
|
642
|
+
contextKey += `::${contextVersion}`;
|
|
643
|
+
}
|
|
644
|
+
contextKey += ADAPTER_CONTEXT_ID_SUFFIX;
|
|
645
|
+
const contextAsPromise = reviveOrCreateContext(contextKey, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded);
|
|
640
646
|
return (config, requestContext) => {
|
|
641
647
|
if (context === undefined) {
|
|
642
648
|
return contextAsPromise.then((revivedContext) => {
|
|
@@ -736,9 +736,15 @@
|
|
|
736
736
|
};
|
|
737
737
|
var withContext = function (adapter, options) {
|
|
738
738
|
validateNotDisposed();
|
|
739
|
-
var contextId = options.contextId, onContextLoaded = options.onContextLoaded;
|
|
739
|
+
var contextId = options.contextId, contextVersion = options.contextVersion, onContextLoaded = options.onContextLoaded;
|
|
740
740
|
var context = undefined;
|
|
741
|
-
var
|
|
741
|
+
var contextKey = "".concat(contextId);
|
|
742
|
+
// if a context version is supplied, key with the version encoded
|
|
743
|
+
if (contextVersion !== undefined) {
|
|
744
|
+
contextKey += "::".concat(contextVersion);
|
|
745
|
+
}
|
|
746
|
+
contextKey += ADAPTER_CONTEXT_ID_SUFFIX;
|
|
747
|
+
var contextAsPromise = reviveOrCreateContext(contextKey, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded);
|
|
742
748
|
return function (config, requestContext) {
|
|
743
749
|
if (context === undefined) {
|
|
744
750
|
return contextAsPromise.then(function (revivedContext) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luvio/environments",
|
|
3
|
-
"version": "0.112.
|
|
3
|
+
"version": "0.112.1",
|
|
4
4
|
"description": "Luvio Environments",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"watch": "yarn build --watch"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@luvio/engine": "0.112.
|
|
26
|
+
"@luvio/engine": "0.112.1"
|
|
27
27
|
},
|
|
28
28
|
"bundlesize": [
|
|
29
29
|
{
|