@luvio/environments 0.73.3 → 0.73.8
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.
- package/dist/es/es2018/DurableTTLStore.d.ts +1 -1
- package/dist/es/es2018/environments.js +15 -1
- package/dist/es/es2018/makeDurable/error.d.ts +1 -1
- package/dist/es/es2018/makeDurable/flush.d.ts +3 -3
- package/dist/es/es2018/makeDurable/revive.d.ts +3 -3
- package/dist/es/es2018/makeDurable/utils.d.ts +1 -1
- package/dist/es/es2018/makeDurable.d.ts +5 -4
- package/dist/es/es2018/utils/selectors.d.ts +1 -1
- package/dist/umd/es2018/DurableTTLStore.d.ts +1 -1
- package/dist/umd/es2018/environments.js +15 -1
- package/dist/umd/es2018/makeDurable/error.d.ts +1 -1
- package/dist/umd/es2018/makeDurable/flush.d.ts +3 -3
- package/dist/umd/es2018/makeDurable/revive.d.ts +3 -3
- package/dist/umd/es2018/makeDurable/utils.d.ts +1 -1
- package/dist/umd/es2018/makeDurable.d.ts +5 -4
- package/dist/umd/es2018/utils/selectors.d.ts +1 -1
- package/dist/umd/es5/DurableTTLStore.d.ts +1 -1
- package/dist/umd/es5/environments.js +15 -1
- package/dist/umd/es5/makeDurable/error.d.ts +1 -1
- package/dist/umd/es5/makeDurable/flush.d.ts +3 -3
- package/dist/umd/es5/makeDurable/revive.d.ts +3 -3
- package/dist/umd/es5/makeDurable/utils.d.ts +1 -1
- package/dist/umd/es5/makeDurable.d.ts +5 -4
- package/dist/umd/es5/utils/selectors.d.ts +1 -1
- package/package.json +12 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DurableStore } from './DurableStore';
|
|
1
|
+
import type { DurableStore } from './DurableStore';
|
|
2
2
|
export declare const TTL_DURABLE_SEGMENT = "TTL_DURABLE_SEGMENT";
|
|
3
3
|
export interface DefaultDurableTTLOverride extends DurableTTLOverride {
|
|
4
4
|
namespace: 'TTL_DEFAULT_KEY';
|
|
@@ -713,7 +713,20 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
713
713
|
return snapshotFromMemoryIngest;
|
|
714
714
|
});
|
|
715
715
|
};
|
|
716
|
-
|
|
716
|
+
const getNotifyChangeStoreEntries = function (keys) {
|
|
717
|
+
validateNotDisposed();
|
|
718
|
+
return durableStore.getEntries(keys, DefaultDurableSegment).then((durableRecords) => {
|
|
719
|
+
const entries = {};
|
|
720
|
+
publishDurableStoreEntries(durableRecords, (key, record) => {
|
|
721
|
+
entries[key] = record;
|
|
722
|
+
}, () => { });
|
|
723
|
+
return entries;
|
|
724
|
+
});
|
|
725
|
+
};
|
|
726
|
+
environment.defaultCachePolicy = {
|
|
727
|
+
type: 'stale-while-revalidate',
|
|
728
|
+
implementation: buildStaleWhileRevalidateImplementation(Number.MAX_SAFE_INTEGER),
|
|
729
|
+
};
|
|
717
730
|
return create(environment, {
|
|
718
731
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
719
732
|
storeIngest: { value: storeIngest },
|
|
@@ -737,6 +750,7 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
737
750
|
getIngestStagingStoreMetadata: { value: getIngestStagingStoreMetadata },
|
|
738
751
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
739
752
|
handleErrorResponse: { value: handleErrorResponse },
|
|
753
|
+
getNotifyChangeStoreEntries: { value: getNotifyChangeStoreEntries },
|
|
740
754
|
});
|
|
741
755
|
}
|
|
742
756
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Luvio } from '@luvio/engine';
|
|
1
|
+
import type { Luvio } from '@luvio/engine';
|
|
2
2
|
export declare const DURABLE_STORE_ERROR = "durable-store-error";
|
|
3
3
|
export declare type InstrumentationFunction = Luvio['instrument'];
|
|
4
4
|
export declare type DurableStoreRejectionHandler = (e: any) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Store } from '@luvio/engine';
|
|
2
|
-
import { DurableStore } from '../DurableStore';
|
|
3
|
-
import { DurableStoreRejectionHandler } from './error';
|
|
1
|
+
import type { Store } from '@luvio/engine';
|
|
2
|
+
import type { DurableStore } from '../DurableStore';
|
|
3
|
+
import type { DurableStoreRejectionHandler } from './error';
|
|
4
4
|
export declare function flushStoreValuesToDurableStore(store: Store, durableStore: DurableStore, durableStoreErrorHandler: DurableStoreRejectionHandler): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Environment, Snapshot, UnAvailableSnapshot, StoreMetadata } from '@luvio/engine';
|
|
2
|
-
import { DurableStore, DurableStoreEntries } from '../DurableStore';
|
|
3
|
-
import { DurableStoreRejectionHandler } from './error';
|
|
1
|
+
import type { Environment, Snapshot, UnAvailableSnapshot, StoreMetadata } from '@luvio/engine';
|
|
2
|
+
import type { DurableStore, DurableStoreEntries } from '../DurableStore';
|
|
3
|
+
import type { DurableStoreRejectionHandler } from './error';
|
|
4
4
|
declare type ObjectAsSet = {
|
|
5
5
|
[key: string]: true;
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StoreRecordError } from '@luvio/engine';
|
|
1
|
+
import type { StoreRecordError } from '@luvio/engine';
|
|
2
2
|
export declare function isStoreEntryError(storeRecord: unknown): storeRecord is StoreRecordError;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { CacheKeySet, Environment, RecordSource, Snapshot
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { CacheKeySet, Environment, RecordSource, Snapshot } from '@luvio/engine';
|
|
2
|
+
import { Store } from '@luvio/engine';
|
|
3
|
+
import type { DurableStore } from './DurableStore';
|
|
4
|
+
import type { InstrumentationFunction } from './makeDurable/error';
|
|
5
|
+
import type { TTLOverridesMap } from './DurableTTLStore';
|
|
5
6
|
export interface DurableEnvironment extends Environment {
|
|
6
7
|
/**
|
|
7
8
|
* Disposes the environment and detaches the durable store listener
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Selector } from '@luvio/engine';
|
|
1
|
+
import type { Selector } from '@luvio/engine';
|
|
2
2
|
export declare function readPaginationKeysFromSelector(select?: Selector<unknown>): string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DurableStore } from './DurableStore';
|
|
1
|
+
import type { DurableStore } from './DurableStore';
|
|
2
2
|
export declare const TTL_DURABLE_SEGMENT = "TTL_DURABLE_SEGMENT";
|
|
3
3
|
export interface DefaultDurableTTLOverride extends DurableTTLOverride {
|
|
4
4
|
namespace: 'TTL_DEFAULT_KEY';
|
|
@@ -717,7 +717,20 @@
|
|
|
717
717
|
return snapshotFromMemoryIngest;
|
|
718
718
|
});
|
|
719
719
|
};
|
|
720
|
-
|
|
720
|
+
const getNotifyChangeStoreEntries = function (keys) {
|
|
721
|
+
validateNotDisposed();
|
|
722
|
+
return durableStore.getEntries(keys, DefaultDurableSegment).then((durableRecords) => {
|
|
723
|
+
const entries = {};
|
|
724
|
+
publishDurableStoreEntries(durableRecords, (key, record) => {
|
|
725
|
+
entries[key] = record;
|
|
726
|
+
}, () => { });
|
|
727
|
+
return entries;
|
|
728
|
+
});
|
|
729
|
+
};
|
|
730
|
+
environment.defaultCachePolicy = {
|
|
731
|
+
type: 'stale-while-revalidate',
|
|
732
|
+
implementation: engine.buildStaleWhileRevalidateImplementation(Number.MAX_SAFE_INTEGER),
|
|
733
|
+
};
|
|
721
734
|
return create(environment, {
|
|
722
735
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
723
736
|
storeIngest: { value: storeIngest },
|
|
@@ -741,6 +754,7 @@
|
|
|
741
754
|
getIngestStagingStoreMetadata: { value: getIngestStagingStoreMetadata },
|
|
742
755
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
743
756
|
handleErrorResponse: { value: handleErrorResponse },
|
|
757
|
+
getNotifyChangeStoreEntries: { value: getNotifyChangeStoreEntries },
|
|
744
758
|
});
|
|
745
759
|
}
|
|
746
760
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Luvio } from '@luvio/engine';
|
|
1
|
+
import type { Luvio } from '@luvio/engine';
|
|
2
2
|
export declare const DURABLE_STORE_ERROR = "durable-store-error";
|
|
3
3
|
export declare type InstrumentationFunction = Luvio['instrument'];
|
|
4
4
|
export declare type DurableStoreRejectionHandler = (e: any) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Store } from '@luvio/engine';
|
|
2
|
-
import { DurableStore } from '../DurableStore';
|
|
3
|
-
import { DurableStoreRejectionHandler } from './error';
|
|
1
|
+
import type { Store } from '@luvio/engine';
|
|
2
|
+
import type { DurableStore } from '../DurableStore';
|
|
3
|
+
import type { DurableStoreRejectionHandler } from './error';
|
|
4
4
|
export declare function flushStoreValuesToDurableStore(store: Store, durableStore: DurableStore, durableStoreErrorHandler: DurableStoreRejectionHandler): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Environment, Snapshot, UnAvailableSnapshot, StoreMetadata } from '@luvio/engine';
|
|
2
|
-
import { DurableStore, DurableStoreEntries } from '../DurableStore';
|
|
3
|
-
import { DurableStoreRejectionHandler } from './error';
|
|
1
|
+
import type { Environment, Snapshot, UnAvailableSnapshot, StoreMetadata } from '@luvio/engine';
|
|
2
|
+
import type { DurableStore, DurableStoreEntries } from '../DurableStore';
|
|
3
|
+
import type { DurableStoreRejectionHandler } from './error';
|
|
4
4
|
declare type ObjectAsSet = {
|
|
5
5
|
[key: string]: true;
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StoreRecordError } from '@luvio/engine';
|
|
1
|
+
import type { StoreRecordError } from '@luvio/engine';
|
|
2
2
|
export declare function isStoreEntryError(storeRecord: unknown): storeRecord is StoreRecordError;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { CacheKeySet, Environment, RecordSource, Snapshot
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { CacheKeySet, Environment, RecordSource, Snapshot } from '@luvio/engine';
|
|
2
|
+
import { Store } from '@luvio/engine';
|
|
3
|
+
import type { DurableStore } from './DurableStore';
|
|
4
|
+
import type { InstrumentationFunction } from './makeDurable/error';
|
|
5
|
+
import type { TTLOverridesMap } from './DurableTTLStore';
|
|
5
6
|
export interface DurableEnvironment extends Environment {
|
|
6
7
|
/**
|
|
7
8
|
* Disposes the environment and detaches the durable store listener
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Selector } from '@luvio/engine';
|
|
1
|
+
import type { Selector } from '@luvio/engine';
|
|
2
2
|
export declare function readPaginationKeysFromSelector(select?: Selector<unknown>): string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DurableStore } from './DurableStore';
|
|
1
|
+
import type { DurableStore } from './DurableStore';
|
|
2
2
|
export declare const TTL_DURABLE_SEGMENT = "TTL_DURABLE_SEGMENT";
|
|
3
3
|
export interface DefaultDurableTTLOverride extends DurableTTLOverride {
|
|
4
4
|
namespace: 'TTL_DEFAULT_KEY';
|
|
@@ -756,7 +756,20 @@
|
|
|
756
756
|
return snapshotFromMemoryIngest;
|
|
757
757
|
});
|
|
758
758
|
};
|
|
759
|
-
|
|
759
|
+
var getNotifyChangeStoreEntries = function (keys) {
|
|
760
|
+
validateNotDisposed();
|
|
761
|
+
return durableStore.getEntries(keys, DefaultDurableSegment).then(function (durableRecords) {
|
|
762
|
+
var entries = {};
|
|
763
|
+
publishDurableStoreEntries(durableRecords, function (key, record) {
|
|
764
|
+
entries[key] = record;
|
|
765
|
+
}, function () { });
|
|
766
|
+
return entries;
|
|
767
|
+
});
|
|
768
|
+
};
|
|
769
|
+
environment.defaultCachePolicy = {
|
|
770
|
+
type: 'stale-while-revalidate',
|
|
771
|
+
implementation: engine.buildStaleWhileRevalidateImplementation(Number.MAX_SAFE_INTEGER),
|
|
772
|
+
};
|
|
760
773
|
return create(environment, {
|
|
761
774
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
762
775
|
storeIngest: { value: storeIngest },
|
|
@@ -780,6 +793,7 @@
|
|
|
780
793
|
getIngestStagingStoreMetadata: { value: getIngestStagingStoreMetadata },
|
|
781
794
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
782
795
|
handleErrorResponse: { value: handleErrorResponse },
|
|
796
|
+
getNotifyChangeStoreEntries: { value: getNotifyChangeStoreEntries },
|
|
783
797
|
});
|
|
784
798
|
}
|
|
785
799
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Luvio } from '@luvio/engine';
|
|
1
|
+
import type { Luvio } from '@luvio/engine';
|
|
2
2
|
export declare const DURABLE_STORE_ERROR = "durable-store-error";
|
|
3
3
|
export declare type InstrumentationFunction = Luvio['instrument'];
|
|
4
4
|
export declare type DurableStoreRejectionHandler = (e: any) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Store } from '@luvio/engine';
|
|
2
|
-
import { DurableStore } from '../DurableStore';
|
|
3
|
-
import { DurableStoreRejectionHandler } from './error';
|
|
1
|
+
import type { Store } from '@luvio/engine';
|
|
2
|
+
import type { DurableStore } from '../DurableStore';
|
|
3
|
+
import type { DurableStoreRejectionHandler } from './error';
|
|
4
4
|
export declare function flushStoreValuesToDurableStore(store: Store, durableStore: DurableStore, durableStoreErrorHandler: DurableStoreRejectionHandler): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Environment, Snapshot, UnAvailableSnapshot, StoreMetadata } from '@luvio/engine';
|
|
2
|
-
import { DurableStore, DurableStoreEntries } from '../DurableStore';
|
|
3
|
-
import { DurableStoreRejectionHandler } from './error';
|
|
1
|
+
import type { Environment, Snapshot, UnAvailableSnapshot, StoreMetadata } from '@luvio/engine';
|
|
2
|
+
import type { DurableStore, DurableStoreEntries } from '../DurableStore';
|
|
3
|
+
import type { DurableStoreRejectionHandler } from './error';
|
|
4
4
|
declare type ObjectAsSet = {
|
|
5
5
|
[key: string]: true;
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StoreRecordError } from '@luvio/engine';
|
|
1
|
+
import type { StoreRecordError } from '@luvio/engine';
|
|
2
2
|
export declare function isStoreEntryError(storeRecord: unknown): storeRecord is StoreRecordError;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { CacheKeySet, Environment, RecordSource, Snapshot
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { CacheKeySet, Environment, RecordSource, Snapshot } from '@luvio/engine';
|
|
2
|
+
import { Store } from '@luvio/engine';
|
|
3
|
+
import type { DurableStore } from './DurableStore';
|
|
4
|
+
import type { InstrumentationFunction } from './makeDurable/error';
|
|
5
|
+
import type { TTLOverridesMap } from './DurableTTLStore';
|
|
5
6
|
export interface DurableEnvironment extends Environment {
|
|
6
7
|
/**
|
|
7
8
|
* Disposes the environment and detaches the durable store listener
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Selector } from '@luvio/engine';
|
|
1
|
+
import type { Selector } from '@luvio/engine';
|
|
2
2
|
export declare function readPaginationKeysFromSelector(select?: Selector<unknown>): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luvio/environments",
|
|
3
|
-
"version": "0.73.
|
|
3
|
+
"version": "0.73.8",
|
|
4
4
|
"description": "Luvio Environments",
|
|
5
5
|
"main": "dist/umd/es2018/environments.js",
|
|
6
6
|
"module": "dist/es/es2018/environments.js",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"build": "rollup --config rollup.config.js",
|
|
12
12
|
"watch": "yarn build --watch",
|
|
13
13
|
"test": "jest",
|
|
14
|
-
"test:debug": "node --inspect-brk ../../../node_modules/jest/bin/jest.js --config ./jest.config.js --runInBand"
|
|
14
|
+
"test:debug": "node --inspect-brk ../../../node_modules/jest/bin/jest.js --config ./jest.config.js --runInBand",
|
|
15
|
+
"test:size": "bundlesize"
|
|
15
16
|
},
|
|
16
17
|
"nx": {
|
|
17
18
|
"targets": {
|
|
@@ -26,6 +27,13 @@
|
|
|
26
27
|
"dist/"
|
|
27
28
|
],
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@luvio/engine": "0.73.
|
|
30
|
-
}
|
|
30
|
+
"@luvio/engine": "0.73.8"
|
|
31
|
+
},
|
|
32
|
+
"bundlesize": [
|
|
33
|
+
{
|
|
34
|
+
"path": "./dist/es/es2018/environments.js",
|
|
35
|
+
"maxSize": "9 kB",
|
|
36
|
+
"compression": "brotli"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
31
39
|
}
|