slidemind 0.3.0 → 0.3.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidemind",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Connect Claude Code to the slidemind PowerPoint add-in — build and edit native, on-brand PowerPoint decks against the active corporate design, from the terminal.",
5
5
  "author": {
6
6
  "name": "statworx",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidemind",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Connect Codex to the slidemind PowerPoint add-in — build and edit native, on-brand PowerPoint decks against the active corporate design. Requires the slidemind CLI (npm install -g slidemind); the skills explain the install when it is missing.",
5
5
  "author": {
6
6
  "name": "statworx",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidemind",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Connect Claude Code, Codex & opencode to the slidemind PowerPoint add-in — let your coding agent build and edit native, on-brand PowerPoint decks against your active corporate design, from the terminal.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2885,14 +2885,24 @@ export async function insertSlidesFromSearch({
2885
2885
  : [];
2886
2886
  insertedCount += landed.length || 1;
2887
2887
  insertedSlideIds.push(...landed);
2888
- fs.rmSync(slidePath, { force: true });
2888
+ bestEffortRm(slidePath);
2889
2889
  }
2890
2890
  return { ok: true, insertedCount, insertedSlideIds, presId: livePresId };
2891
2891
  } finally {
2892
- fs.rmSync(dir, { recursive: true, force: true });
2892
+ bestEffortRm(dir);
2893
2893
  }
2894
2894
  }
2895
2895
 
2896
+ // Remove a temp file/dir that bytes were JUST streamed into. Windows may still
2897
+ // hold a handle on it at cleanup time (antivirus scanning the fresh write), so
2898
+ // plain rmSync races into EBUSY/ENOTEMPTY there — retry, and swallow what's
2899
+ // left: cleanup failure must never mask an operation that succeeded.
2900
+ function bestEffortRm(p) {
2901
+ try {
2902
+ fs.rmSync(p, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 });
2903
+ } catch {}
2904
+ }
2905
+
2896
2906
  // Fetch a chosen slide-search result's thumbnail/preview as a data URI for
2897
2907
  // on-demand viewing (the agent doesn't have to extract the whole .pptx just to
2898
2908
  // look at a slide). Relayed through the pane.
@@ -2942,7 +2952,7 @@ export async function viewSlide({
2942
2952
  dataUri: `data:${mimeType};base64,${fs.readFileSync(tmp).toString("base64")}`,
2943
2953
  };
2944
2954
  } finally {
2945
- fs.rmSync(dir, { recursive: true, force: true });
2955
+ bestEffortRm(dir);
2946
2956
  }
2947
2957
  }
2948
2958
  const be = backendURL || (await resolveBackendForPres(presId));
@@ -419,8 +419,14 @@ function startLoopback({ state, timeoutMs, env }) {
419
419
  // when the wait later times out.
420
420
  settled.catch(() => {});
421
421
  resolveStart({
422
+ // redirect_uri says `localhost` — the spelling Entra treats as the
423
+ // loopback redirect for desktop apps — and browsers retry ::1 vs
424
+ // 127.0.0.1 themselves. startUrl is OUR page though, fetched by
425
+ // whatever opener we were handed: name the literal bound address so
426
+ // it works even where `localhost` resolves only to ::1 (or the
427
+ // client, like Node 18's, tries just one family).
422
428
  redirectUri: `http://localhost:${port}`,
423
- startUrl: `http://localhost:${port}/`,
429
+ startUrl: `http://127.0.0.1:${port}/`,
424
430
  setAuthorizeUrl: (value) => {
425
431
  authorizeUrl = value;
426
432
  },