@naylence/runtime 0.3.5-test.7 → 0.3.5-test.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.
@@ -4894,6 +4894,7 @@ const ENV_VAR_STORAGE_DB_DIRECTORY = 'FAME_STORAGE_DB_DIRECTORY';
4894
4894
  const ENV_VAR_STORAGE_MASTER_KEY = 'FAME_STORAGE_MASTER_KEY';
4895
4895
  const ENV_VAR_STORAGE_ENCRYPTED = 'FAME_STORAGE_ENCRYPTED';
4896
4896
  const PROFILE_NAME_MEMORY = 'memory';
4897
+ const PROFILE_NAME_INDEXEDDB = 'indexeddb';
4897
4898
  const PROFILE_NAME_SQLITE = 'sqlite';
4898
4899
  const PROFILE_NAME_ENCRYPTED_SQLITE = 'encrypted-sqlite';
4899
4900
  const storageProfileSchema = zod.z
@@ -4902,12 +4903,15 @@ const storageProfileSchema = zod.z
4902
4903
  profile: zod.z
4903
4904
  .string()
4904
4905
  .optional()
4905
- .describe('Storage profile name (memory | sqlite | encrypted-sqlite)'),
4906
+ .describe('Storage profile name (memory | indexeddb | sqlite | encrypted-sqlite)'),
4906
4907
  })
4907
4908
  .passthrough();
4908
4909
  const MEMORY_PROFILE_CONFIG = {
4909
4910
  type: 'InMemoryStorageProvider',
4910
4911
  };
4912
+ const INDEXEDDB_PROFILE_CONFIG = {
4913
+ type: 'IndexedDBStorageProvider',
4914
+ };
4911
4915
  const SQLITE_PROFILE_CONFIG = {
4912
4916
  type: 'SQLiteStorageProvider',
4913
4917
  dbDirectory: factory.Expressions.env(ENV_VAR_STORAGE_DB_DIRECTORY, './data/sqlite'),
@@ -4922,11 +4926,21 @@ const ENCRYPTED_SQLITE_PROFILE_CONFIG = {
4922
4926
  masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY),
4923
4927
  isCached: true,
4924
4928
  };
4925
- const PROFILE_MAP$1 = {
4929
+ // Base profile map with browser-safe options
4930
+ const BASE_PROFILE_MAP = {
4926
4931
  [PROFILE_NAME_MEMORY]: MEMORY_PROFILE_CONFIG,
4927
- [PROFILE_NAME_SQLITE]: SQLITE_PROFILE_CONFIG,
4928
- [PROFILE_NAME_ENCRYPTED_SQLITE]: ENCRYPTED_SQLITE_PROFILE_CONFIG,
4932
+ [PROFILE_NAME_INDEXEDDB]: INDEXEDDB_PROFILE_CONFIG,
4929
4933
  };
4934
+ // Extended profile map - can be augmented by Node.js environment
4935
+ const PROFILE_MAP$1 = {
4936
+ ...BASE_PROFILE_MAP,
4937
+ };
4938
+ // Register SQLite profiles if we're in Node.js environment
4939
+ // This check allows the code to work in both browser and Node.js
4940
+ if (typeof process !== 'undefined' && process.versions?.node) {
4941
+ PROFILE_MAP$1[PROFILE_NAME_SQLITE] = SQLITE_PROFILE_CONFIG;
4942
+ PROFILE_MAP$1[PROFILE_NAME_ENCRYPTED_SQLITE] = ENCRYPTED_SQLITE_PROFILE_CONFIG;
4943
+ }
4930
4944
  class StorageProfileFactory extends StorageProviderFactory {
4931
4945
  constructor() {
4932
4946
  super(...arguments);