@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.
@@ -3332,6 +3332,7 @@ const ENV_VAR_STORAGE_DB_DIRECTORY = 'FAME_STORAGE_DB_DIRECTORY';
3332
3332
  const ENV_VAR_STORAGE_MASTER_KEY = 'FAME_STORAGE_MASTER_KEY';
3333
3333
  const ENV_VAR_STORAGE_ENCRYPTED = 'FAME_STORAGE_ENCRYPTED';
3334
3334
  const PROFILE_NAME_MEMORY = 'memory';
3335
+ const PROFILE_NAME_INDEXEDDB = 'indexeddb';
3335
3336
  const PROFILE_NAME_SQLITE = 'sqlite';
3336
3337
  const PROFILE_NAME_ENCRYPTED_SQLITE = 'encrypted-sqlite';
3337
3338
  const storageProfileSchema = z
@@ -3340,12 +3341,15 @@ const storageProfileSchema = z
3340
3341
  profile: z
3341
3342
  .string()
3342
3343
  .optional()
3343
- .describe('Storage profile name (memory | sqlite | encrypted-sqlite)'),
3344
+ .describe('Storage profile name (memory | indexeddb | sqlite | encrypted-sqlite)'),
3344
3345
  })
3345
3346
  .passthrough();
3346
3347
  const MEMORY_PROFILE_CONFIG = {
3347
3348
  type: 'InMemoryStorageProvider',
3348
3349
  };
3350
+ const INDEXEDDB_PROFILE_CONFIG = {
3351
+ type: 'IndexedDBStorageProvider',
3352
+ };
3349
3353
  const SQLITE_PROFILE_CONFIG = {
3350
3354
  type: 'SQLiteStorageProvider',
3351
3355
  dbDirectory: Expressions.env(ENV_VAR_STORAGE_DB_DIRECTORY, './data/sqlite'),
@@ -3360,11 +3364,21 @@ const ENCRYPTED_SQLITE_PROFILE_CONFIG = {
3360
3364
  masterKey: Expressions.env(ENV_VAR_STORAGE_MASTER_KEY),
3361
3365
  isCached: true,
3362
3366
  };
3363
- const PROFILE_MAP$1 = {
3367
+ // Base profile map with browser-safe options
3368
+ const BASE_PROFILE_MAP = {
3364
3369
  [PROFILE_NAME_MEMORY]: MEMORY_PROFILE_CONFIG,
3365
- [PROFILE_NAME_SQLITE]: SQLITE_PROFILE_CONFIG,
3366
- [PROFILE_NAME_ENCRYPTED_SQLITE]: ENCRYPTED_SQLITE_PROFILE_CONFIG,
3370
+ [PROFILE_NAME_INDEXEDDB]: INDEXEDDB_PROFILE_CONFIG,
3367
3371
  };
3372
+ // Extended profile map - can be augmented by Node.js environment
3373
+ const PROFILE_MAP$1 = {
3374
+ ...BASE_PROFILE_MAP,
3375
+ };
3376
+ // Register SQLite profiles if we're in Node.js environment
3377
+ // This check allows the code to work in both browser and Node.js
3378
+ if (typeof process !== 'undefined' && process.versions?.node) {
3379
+ PROFILE_MAP$1[PROFILE_NAME_SQLITE] = SQLITE_PROFILE_CONFIG;
3380
+ PROFILE_MAP$1[PROFILE_NAME_ENCRYPTED_SQLITE] = ENCRYPTED_SQLITE_PROFILE_CONFIG;
3381
+ }
3368
3382
  class StorageProfileFactory extends StorageProviderFactory {
3369
3383
  constructor() {
3370
3384
  super(...arguments);