figmanage 1.0.0 → 1.0.1

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.
@@ -11,7 +11,7 @@ export async function handleWhoami() {
11
11
  if (hasCookie(config)) {
12
12
  authMethods.push('cookie');
13
13
  try {
14
- const res = await axios.get('https://www.figma.com/api/me', {
14
+ const res = await axios.get('https://www.figma.com/api/user/state', {
15
15
  headers: {
16
16
  'Cookie': `__Host-figma.authn=${config.cookie}`,
17
17
  'X-CSRF-Bypass': 'yes',
@@ -19,7 +19,8 @@ export async function handleWhoami() {
19
19
  },
20
20
  timeout: 15000,
21
21
  });
22
- const user = res.data;
22
+ const meta = res.data?.meta || res.data || {};
23
+ const user = meta.user || meta;
23
24
  console.log(`User: ${user.handle || user.email || config.userId}`);
24
25
  if (user.email)
25
26
  console.log(`Email: ${user.email}`);
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ else {
21
21
  program
22
22
  .name('figmanage')
23
23
  .description('Figma workspace management CLI')
24
- .version('0.3.0');
24
+ .version(JSON.parse((await import('node:fs')).readFileSync(new URL('../package.json', import.meta.url), 'utf-8')).version);
25
25
  registerCliCommands(program);
26
26
  // No subcommand given -- show help
27
27
  if (process.argv.length <= 2) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "figmanage",
3
3
  "mcpName": "io.github.dannykeane/figmanage",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "MCP server for managing your Figma workspace from the terminal.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",