@nodii/dev 0.6.88 → 0.6.89
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/core.js +4 -2
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -4,7 +4,7 @@ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
4
4
|
import { homedir, platform } from "node:os";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
|
|
7
|
-
export const VERSION = "0.6.
|
|
7
|
+
export const VERSION = "0.6.89";
|
|
8
8
|
export const configPath = () =>
|
|
9
9
|
process.env.NODII_DEV_CONFIG_PATH ??
|
|
10
10
|
join(homedir(), ".config/nodii-dev/config.json");
|
|
@@ -299,7 +299,9 @@ export async function devExchange(method, path, bodyText, { contentType = "appli
|
|
|
299
299
|
} catch {
|
|
300
300
|
payload = { message: raw };
|
|
301
301
|
}
|
|
302
|
-
|
|
302
|
+
// Dev answers pending work as 202 with its error envelope (FIGMA_PLACEMENT_PENDING):
|
|
303
|
+
// a 2xx alone doesn't mean the change was made.
|
|
304
|
+
if (!response.ok || payload.error === true)
|
|
303
305
|
throw new CliError(
|
|
304
306
|
payload.code ?? `HTTP_${response.status}`,
|
|
305
307
|
payload.message ?? `Dev returned HTTP ${response.status}`,
|