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