@agenticmail/core 0.5.56 → 0.5.58

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.
package/dist/index.cjs CHANGED
@@ -1238,7 +1238,8 @@ var InboxWatcher = class extends import_node_events.EventEmitter {
1238
1238
  this.emit("close");
1239
1239
  this._scheduleReconnect();
1240
1240
  });
1241
- this._lock = lock;
1241
+ lock.release();
1242
+ this._lock = null;
1242
1243
  } catch (err) {
1243
1244
  lock.release();
1244
1245
  throw err;
@@ -1918,6 +1919,13 @@ var AccountManager = class {
1918
1919
  const principalName = options.name.toLowerCase();
1919
1920
  const email = `${principalName}@${domain}`;
1920
1921
  await this.stalwart.ensureDomain(domain);
1922
+ const existsInSqlite = await this.getByName(options.name) != null;
1923
+ if (!existsInSqlite) {
1924
+ try {
1925
+ await this.stalwart.deletePrincipal(principalName);
1926
+ } catch {
1927
+ }
1928
+ }
1921
1929
  await this.stalwart.createPrincipal({
1922
1930
  type: "individual",
1923
1931
  name: principalName,
package/dist/index.js CHANGED
@@ -484,7 +484,8 @@ var InboxWatcher = class extends EventEmitter {
484
484
  this.emit("close");
485
485
  this._scheduleReconnect();
486
486
  });
487
- this._lock = lock;
487
+ lock.release();
488
+ this._lock = null;
488
489
  } catch (err) {
489
490
  lock.release();
490
491
  throw err;
@@ -1164,6 +1165,13 @@ var AccountManager = class {
1164
1165
  const principalName = options.name.toLowerCase();
1165
1166
  const email = `${principalName}@${domain}`;
1166
1167
  await this.stalwart.ensureDomain(domain);
1168
+ const existsInSqlite = await this.getByName(options.name) != null;
1169
+ if (!existsInSqlite) {
1170
+ try {
1171
+ await this.stalwart.deletePrincipal(principalName);
1172
+ } catch {
1173
+ }
1174
+ }
1167
1175
  await this.stalwart.createPrincipal({
1168
1176
  type: "individual",
1169
1177
  name: principalName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/core",
3
- "version": "0.5.56",
3
+ "version": "0.5.58",
4
4
  "description": "Core SDK for AgenticMail — email, SMS, and phone number access for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",