@harperfast/harper-pro 5.0.13 → 5.0.14

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.
@@ -291,7 +291,7 @@ function openRocksDb(path: string, options: RocksDatabaseOptions & { dupSort?: b
291
291
  }
292
292
  let db;
293
293
  if (options.dupSort) {
294
- db = RocksDatabase.open(new RocksIndexStore(path, options));
294
+ db = new RocksIndexStore(path, options).open();
295
295
  } else {
296
296
  db = RocksDatabase.open(path, options);
297
297
  db.encoder.name = options.name;
@@ -309,8 +309,10 @@ export async function migrateOnStart() {
309
309
  updateConfigValue(CONFIG_PARAMS.STORAGE_MIGRATEONSTART, false);
310
310
 
311
311
  try {
312
- for (const databaseName in databases) {
313
- if (databaseName === 'system') continue;
312
+ let databaseNames = Object.keys(databases);
313
+ // system is a dontenum property, so we have to manually add it
314
+ if (!databaseNames.includes('system')) databaseNames.push('system');
315
+ for (const databaseName of databaseNames) {
314
316
  if (databaseName.endsWith('-copy')) continue;
315
317
  let rootStore;
316
318
  for (const tableName in databases[databaseName]) {