@flareum/mcp 0.2.10 → 0.2.11

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.
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { mkdir, writeFile } from 'node:fs/promises';
3
3
  import { dirname, join, resolve } from 'node:path';
4
4
  import { CONFIG_PATH } from './config.js';
5
- import { pullStyles } from './pull.js';
5
+ import { isRetryable, pullStyles } from './pull.js';
6
6
  // Most specific first. A repo that keeps stylesheets in app/styles gets them there rather than in a
7
7
  // src/styles nobody in that project looks at.
8
8
  const STYLE_ROOTS = [
@@ -94,8 +94,10 @@ export const runFirstPull = async (client, cwd, env, configuredOut) => {
94
94
  if (!needsPull(exists, read, dir, published))
95
95
  return { ran: false, reason: 'up-to-date', dir };
96
96
  const result = await pullStyles(client, fileWriter(resolve(cwd, dir)));
97
- // Stamped only after the write, so a failed pull is retried on the next connection.
98
- await writeFile(resolve(cwd, dir, STAMP), `${result.publishedVersionId}\n`, 'utf8');
97
+ // Stamped only when the WHOLE version landed. pullStyles resolves even when files failed, so
98
+ // stamping on its return recorded a half-pulled folder as complete and never retried it.
99
+ if (!isRetryable(result))
100
+ await writeFile(resolve(cwd, dir, STAMP), `${result.publishedVersionId}\n`, 'utf8');
99
101
  return { ran: true, dir, result };
100
102
  }
101
103
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flareum/mcp",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Connect a coding agent to a Flareum project's design tokens.",
5
5
  "license": "MIT",
6
6
  "author": "Flareum",