@luvio/environments 0.154.7-dev7 → 0.154.7-dev9

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.
@@ -1,4 +1,4 @@
1
- import { StoreKeySet, deepFreeze, serializeStructuredKey, emitAdapterEvent, StringKeyInMemoryStore, Reader } from '@luvio/engine';
1
+ import { StoreKeySet, deepFreeze, serializeStructuredKey, emitAdapterEvent, StringKeyInMemoryStore, setBypassDeepFreeze, Reader } from '@luvio/engine';
2
2
 
3
3
  // the last version the metadata shape was altered
4
4
  const DURABLE_METADATA_VERSION = '0.111.0';
@@ -509,7 +509,9 @@ function isUnfulfilledSnapshot(cachedSnapshotResult) {
509
509
  * @param durableStore A DurableStore implementation
510
510
  * @param instrumentation An instrumentation function implementation
511
511
  */
512
- function makeDurable(environment, { durableStore, instrumentation, useRevivingStore, enableDurableMetadataRefresh = false, }) {
512
+ function makeDurable(environment, { durableStore, instrumentation, useRevivingStore, enableDurableMetadataRefresh = false, disableDeepFreeze = false, }) {
513
+ // runtimes can choose to disable deepFreeze, e.g. headless mobile runtime
514
+ setBypassDeepFreeze(disableDeepFreeze);
513
515
  let stagingStore = null;
514
516
  const durableTTLStore = new DurableTTLStore(durableStore);
515
517
  const mergeKeysPromiseMap = new Map();
@@ -674,7 +676,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
674
676
  // because we do not want some other code attempting to use the
675
677
  // in-memory values before the durable store onChanged handler
676
678
  // calls back and revives the values to in-memory
677
- environment.storeEvict(key);
679
+ environment.storeDealloc(key);
678
680
  };
679
681
  const publishStoreMetadata = function (recordId, storeMetadata) {
680
682
  validateNotDisposed();
@@ -41,6 +41,7 @@ interface MakeDurableOptions {
41
41
  instrumentation?: InstrumentationFunction;
42
42
  enableDurableMetadataRefresh?: boolean;
43
43
  useRevivingStore?: boolean;
44
+ disableDeepFreeze?: boolean;
44
45
  }
45
46
  /**
46
47
  * Configures the environment to persist data into a durable store and attempt to resolve
@@ -51,5 +52,5 @@ interface MakeDurableOptions {
51
52
  * @param durableStore A DurableStore implementation
52
53
  * @param instrumentation An instrumentation function implementation
53
54
  */
54
- export declare function makeDurable(environment: Environment, { durableStore, instrumentation, useRevivingStore, enableDurableMetadataRefresh, }: MakeDurableOptions): DurableEnvironment;
55
+ export declare function makeDurable(environment: Environment, { durableStore, instrumentation, useRevivingStore, enableDurableMetadataRefresh, disableDeepFreeze, }: MakeDurableOptions): DurableEnvironment;
55
56
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luvio/environments",
3
- "version": "0.154.7-dev7",
3
+ "version": "0.154.7-dev9",
4
4
  "description": "Luvio Environments",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "watch": "yarn build --watch"
28
28
  },
29
29
  "dependencies": {
30
- "@luvio/engine": "0.154.7-dev7"
30
+ "@luvio/engine": "0.154.7-dev9"
31
31
  },
32
32
  "volta": {
33
33
  "extends": "../../../package.json"