snapback4-expo 0.4.15 → 0.4.16

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/export-ios.mjs CHANGED
@@ -138,11 +138,22 @@ export async function main() {
138
138
  } finally {
139
139
  // After a publication attempt this path may be the displaced last good
140
140
  // export. Only the publisher, under its destination lock, may remove it.
141
- try { if (created && !publicationAttempted) fs.rmSync(artifacts, { recursive: true, force: true }); }
141
+ try {
142
+ if (created && !publicationAttempted) {
143
+ // Keep custody paths and the live wrapper journal while deleting bulk
144
+ // output. Other exports never wait for that I/O on initialization.lock.
145
+ for (const name of fs.readdirSync(artifacts)) {
146
+ if (!['run.lock', 'export.lock', 'live.json'].includes(name)) fs.rmSync(path.join(artifacts, name), { recursive: true, force: true });
147
+ }
148
+ // @ref LLP 3000.030#15 — final removal shares shell-repair custody.
149
+ // A worker cannot recreate a lease file after rm's final enumeration.
150
+ initialization ??= acquireExportLease(root, 'snapback4', true);
151
+ fs.rmSync(artifacts, { recursive: true, force: true });
152
+ }
153
+ }
142
154
  finally {
143
155
  try {
144
156
  if (lease !== undefined) fs.closeSync(lease);
145
- else if (created) fs.rmSync(artifacts, { recursive: true, force: true });
146
157
  } finally { if (initialization !== undefined) fs.closeSync(initialization); }
147
158
  }
148
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snapback4-expo",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "type": "module",
5
5
  "description": "Snapback 4's native module for Expo: the device in Rust (the partition in its own SQLite, the stream applied, the outbox kept, queries and predictions answered) behind one JSON call, and the opener `snapback4/native` takes.",
6
6
  "main": "src/index.ts",