@neopress/mcp 1.1.0 → 1.1.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.
package/dist/bin.cjs CHANGED
@@ -3838,7 +3838,7 @@ var require_fast_uri = __commonJS({
3838
3838
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
3839
3839
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
3840
3840
  try {
3841
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
3841
+ parsed.host = new URL("http://" + parsed.host).hostname;
3842
3842
  } catch (e) {
3843
3843
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
3844
3844
  }
@@ -51321,6 +51321,7 @@ function serializeRedirect(r) {
51321
51321
  siteId: r.site_id,
51322
51322
  source: r.source,
51323
51323
  destination: r.destination,
51324
+ mode: r.mode,
51324
51325
  redirectType: r.redirect_type,
51325
51326
  includeChildren: r.include_children,
51326
51327
  preservePath: r.preserve_path,
@@ -51372,6 +51373,30 @@ function serializeHeadshot(h) {
51372
51373
  updatedAt: h.updated_at
51373
51374
  };
51374
51375
  }
51376
+ function serializeLogo(l) {
51377
+ return {
51378
+ id: l.id,
51379
+ imageUrl: l.image_url,
51380
+ width: l.width,
51381
+ height: l.height,
51382
+ aspectRatio: l.aspect_ratio,
51383
+ mimeType: l.mime_type,
51384
+ byteSize: l.byte_size,
51385
+ type: l.type,
51386
+ font: l.font,
51387
+ color: l.color,
51388
+ hue: l.hue,
51389
+ tone: l.tone,
51390
+ toneScore: l.tone_score,
51391
+ name: l.name,
51392
+ variant: l.variant,
51393
+ sha256: l.sha256,
51394
+ tags: l.tags ?? [],
51395
+ isActive: l.is_active,
51396
+ createdAt: l.created_at,
51397
+ updatedAt: l.updated_at
51398
+ };
51399
+ }
51375
51400
  function serializeSite(site) {
51376
51401
  return {
51377
51402
  id: site.id,
@@ -53076,6 +53101,12 @@ var SiteEndpoint = class {
53076
53101
  };
53077
53102
 
53078
53103
  // ../sdk/dist/endpoints/redirects.js
53104
+ var DASHBOARD_ONLY_REWRITE_MESSAGE = "Rewrite proxy rules can only be managed in the dashboard.";
53105
+ function rejectModeParam(data) {
53106
+ if (data && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, "mode")) {
53107
+ throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
53108
+ }
53109
+ }
53079
53110
  var RedirectsEndpoint = class {
53080
53111
  client;
53081
53112
  constructor(client) {
@@ -53090,6 +53121,7 @@ var RedirectsEndpoint = class {
53090
53121
  return (data ?? []).map((r) => serializeRedirect(r));
53091
53122
  }
53092
53123
  async create(data) {
53124
+ rejectModeParam(data);
53093
53125
  const values = {
53094
53126
  site_id: this.client.siteIdNumber,
53095
53127
  source: data.source,
@@ -53105,7 +53137,21 @@ var RedirectsEndpoint = class {
53105
53137
  throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53106
53138
  return serializeRedirect(row);
53107
53139
  }
53140
+ async assertRedirectRuleWritable(ruleId) {
53141
+ const { data, error: error48 } = await this.client.db.from("redirect_rules").select("id, mode").eq("site_id", this.client.siteIdNumber).eq("id", ruleId).maybeSingle();
53142
+ if (error48)
53143
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53144
+ if (!data) {
53145
+ throw new NeopressApiError("REDIRECT_RULE_NOT_FOUND", `Redirect rule ${ruleId} not found for this site`, 404);
53146
+ }
53147
+ const row = data;
53148
+ if (row.mode === "proxy") {
53149
+ throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
53150
+ }
53151
+ }
53108
53152
  async update(ruleId, data) {
53153
+ rejectModeParam(data);
53154
+ await this.assertRedirectRuleWritable(ruleId);
53109
53155
  const values = {};
53110
53156
  if ("source" in data)
53111
53157
  values.source = data.source;
@@ -53127,6 +53173,7 @@ var RedirectsEndpoint = class {
53127
53173
  return serializeRedirect(row);
53128
53174
  }
53129
53175
  async delete(ruleId) {
53176
+ await this.assertRedirectRuleWritable(ruleId);
53130
53177
  const { error: error48 } = await this.client.db.from("redirect_rules").delete().eq("site_id", this.client.siteIdNumber).eq("id", ruleId);
53131
53178
  if (error48)
53132
53179
  throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
@@ -53445,6 +53492,128 @@ var HeadshotsEndpoint = class {
53445
53492
  }
53446
53493
  };
53447
53494
 
53495
+ // ../sdk/dist/endpoints/logos.js
53496
+ var LogosEndpoint = class {
53497
+ client;
53498
+ constructor(client) {
53499
+ this.client = client;
53500
+ }
53501
+ async list(params) {
53502
+ const { page, limit, offset } = this.client.resolvePagination(params);
53503
+ let query = this.client.db.from("logo_pool").select("*", { count: "exact" });
53504
+ if (params?.type)
53505
+ query = query.eq("type", params.type);
53506
+ if (params?.tone)
53507
+ query = query.eq("tone", params.tone);
53508
+ if (params?.font)
53509
+ query = query.eq("font", params.font);
53510
+ if (params?.hue !== void 0)
53511
+ query = query.eq("hue", params.hue);
53512
+ if (params?.isActive !== void 0)
53513
+ query = query.eq("is_active", params.isActive);
53514
+ if (params?.order) {
53515
+ query = query.order("created_at", { ascending: params.order === "asc" });
53516
+ } else {
53517
+ query = query.order("type", { ascending: true }).order("hue", { ascending: true }).order("name", { ascending: true });
53518
+ }
53519
+ const { data, error: error48, count } = await query.range(offset, offset + limit - 1);
53520
+ if (error48)
53521
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53522
+ return {
53523
+ data: (data ?? []).map((r) => serializeLogo(r)),
53524
+ pagination: this.client.paginationMeta(page, limit, offset, count ?? 0)
53525
+ };
53526
+ }
53527
+ async get(id) {
53528
+ const { data, error: error48 } = await this.client.db.from("logo_pool").select("*").eq("id", id).single();
53529
+ if (error48)
53530
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53531
+ return serializeLogo(data);
53532
+ }
53533
+ async create(params) {
53534
+ const values = {
53535
+ image_url: params.imageUrl,
53536
+ type: params.type,
53537
+ font: params.font,
53538
+ color: params.color,
53539
+ hue: params.hue,
53540
+ tone: params.tone,
53541
+ name: params.name
53542
+ };
53543
+ if (params.toneScore !== void 0)
53544
+ values.tone_score = params.toneScore;
53545
+ if (params.variant !== void 0)
53546
+ values.variant = params.variant;
53547
+ if (params.sha256 !== void 0)
53548
+ values.sha256 = params.sha256;
53549
+ if (params.width !== void 0)
53550
+ values.width = params.width;
53551
+ if (params.height !== void 0)
53552
+ values.height = params.height;
53553
+ if (params.aspectRatio !== void 0)
53554
+ values.aspect_ratio = params.aspectRatio;
53555
+ if (params.mimeType !== void 0)
53556
+ values.mime_type = params.mimeType;
53557
+ if (params.byteSize !== void 0)
53558
+ values.byte_size = params.byteSize;
53559
+ if (params.tags !== void 0)
53560
+ values.tags = params.tags;
53561
+ if (params.isActive !== void 0)
53562
+ values.is_active = params.isActive;
53563
+ const { data, error: error48 } = await this.client.db.from("logo_pool").insert(values).select().single();
53564
+ if (error48)
53565
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53566
+ return serializeLogo(data);
53567
+ }
53568
+ async update(id, params) {
53569
+ const values = {};
53570
+ if (params.imageUrl !== void 0)
53571
+ values.image_url = params.imageUrl;
53572
+ if (params.type !== void 0)
53573
+ values.type = params.type;
53574
+ if (params.font !== void 0)
53575
+ values.font = params.font;
53576
+ if (params.color !== void 0)
53577
+ values.color = params.color;
53578
+ if (params.hue !== void 0)
53579
+ values.hue = params.hue;
53580
+ if (params.tone !== void 0)
53581
+ values.tone = params.tone;
53582
+ if (params.name !== void 0)
53583
+ values.name = params.name;
53584
+ if (params.toneScore !== void 0)
53585
+ values.tone_score = params.toneScore;
53586
+ if (params.variant !== void 0)
53587
+ values.variant = params.variant;
53588
+ if (params.sha256 !== void 0)
53589
+ values.sha256 = params.sha256;
53590
+ if (params.width !== void 0)
53591
+ values.width = params.width;
53592
+ if (params.height !== void 0)
53593
+ values.height = params.height;
53594
+ if (params.aspectRatio !== void 0)
53595
+ values.aspect_ratio = params.aspectRatio;
53596
+ if (params.mimeType !== void 0)
53597
+ values.mime_type = params.mimeType;
53598
+ if (params.byteSize !== void 0)
53599
+ values.byte_size = params.byteSize;
53600
+ if (params.tags !== void 0)
53601
+ values.tags = params.tags;
53602
+ if (params.isActive !== void 0)
53603
+ values.is_active = params.isActive;
53604
+ const { data, error: error48 } = await this.client.db.from("logo_pool").update(values).eq("id", id).select().single();
53605
+ if (error48)
53606
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53607
+ return serializeLogo(data);
53608
+ }
53609
+ async delete(id) {
53610
+ const { error: error48 } = await this.client.db.from("logo_pool").delete().eq("id", id);
53611
+ if (error48)
53612
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53613
+ return { id, deleted: true };
53614
+ }
53615
+ };
53616
+
53448
53617
  // ../sdk/dist/client.js
53449
53618
  var NeopressClient = class {
53450
53619
  baseUrl;
@@ -53466,6 +53635,7 @@ var NeopressClient = class {
53466
53635
  analytics;
53467
53636
  templates;
53468
53637
  headshots;
53638
+ logos;
53469
53639
  constructor(options) {
53470
53640
  this.baseUrl = (options.baseUrl || "https://app.neopress.ai").replace(/\/$/, "");
53471
53641
  this.accessToken = options.accessToken || "";
@@ -53485,6 +53655,7 @@ var NeopressClient = class {
53485
53655
  this.analytics = new AnalyticsEndpoint(this);
53486
53656
  this.templates = new TemplatesEndpoint(this);
53487
53657
  this.headshots = new HeadshotsEndpoint(this);
53658
+ this.logos = new LogosEndpoint(this);
53488
53659
  }
53489
53660
  get siteBasePath() {
53490
53661
  return `/api/v1/sites/${this.siteId}`;
@@ -53765,7 +53936,8 @@ Use these rules before generating pages, collection schemas, entries, forms, or
53765
53936
 
53766
53937
  - Layout owns header, footer, global CSS, and 404. Page TSX starts at page content.
53767
53938
  - Generated page TSX is sandboxed. Do not import Supabase, create API clients, read env vars, use filesystem/process APIs, or assume arbitrary npm packages.
53768
- - Use allowed runtime packages only: React/Next basics, shadcn UI imports, lucide-react, @radix-ui/react-slot, @neopress/youtube, @neopress/map, clsx, class-variance-authority, tailwind-merge, date-fns, framer-motion, gsap (including \`gsap/ScrollTrigger\`, driven via \`@gsap/react\`'s \`useGSAP\`), react-hook-form, zod, @hookform/resolvers, @hookform/resolvers/zod, @neopress/content, @neopress/routing, @neopress/i18n, and @neopress/forms.
53939
+ - Use allowed runtime packages only: React/Next basics, shadcn UI imports, lucide-react, @radix-ui/react-slot, @radix-ui/react-select, @neopress/youtube, @neopress/map, clsx, class-variance-authority, tailwind-merge, date-fns, motion/react (never \`framer-motion\` \u2014 old package name, not on the allowlist), gsap (including \`gsap/ScrollTrigger\`, driven via \`@gsap/react\`'s \`useGSAP\`), react-hook-form, zod, @hookform/resolvers, @hookform/resolvers/zod, @neopress/content, @neopress/routing, @neopress/i18n, and @neopress/forms.
53940
+ - @radix-ui/react-select is a single-value listbox/dropdown (replaces a native \`<select>\`, whose popup is unstyled OS chrome). Compose its parts directly in page TSX; every \`<Select.Item value>\` must be a non-empty string (an empty-string value throws at runtime and blanks the page \u2014 use a sentinel like \`"all"\`); use \`position="popper"\` with an explicit z-index and a non-transparent background on \`<Select.Content>\` (it portals to \`document.body\`).
53769
53941
 
53770
53942
  ## Templates
53771
53943
 
package/dist/http-bin.cjs CHANGED
@@ -3838,7 +3838,7 @@ var require_fast_uri = __commonJS({
3838
3838
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
3839
3839
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
3840
3840
  try {
3841
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
3841
+ parsed.host = new URL("http://" + parsed.host).hostname;
3842
3842
  } catch (e) {
3843
3843
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
3844
3844
  }
@@ -52559,6 +52559,7 @@ function serializeRedirect(r) {
52559
52559
  siteId: r.site_id,
52560
52560
  source: r.source,
52561
52561
  destination: r.destination,
52562
+ mode: r.mode,
52562
52563
  redirectType: r.redirect_type,
52563
52564
  includeChildren: r.include_children,
52564
52565
  preservePath: r.preserve_path,
@@ -52610,6 +52611,30 @@ function serializeHeadshot(h) {
52610
52611
  updatedAt: h.updated_at
52611
52612
  };
52612
52613
  }
52614
+ function serializeLogo(l) {
52615
+ return {
52616
+ id: l.id,
52617
+ imageUrl: l.image_url,
52618
+ width: l.width,
52619
+ height: l.height,
52620
+ aspectRatio: l.aspect_ratio,
52621
+ mimeType: l.mime_type,
52622
+ byteSize: l.byte_size,
52623
+ type: l.type,
52624
+ font: l.font,
52625
+ color: l.color,
52626
+ hue: l.hue,
52627
+ tone: l.tone,
52628
+ toneScore: l.tone_score,
52629
+ name: l.name,
52630
+ variant: l.variant,
52631
+ sha256: l.sha256,
52632
+ tags: l.tags ?? [],
52633
+ isActive: l.is_active,
52634
+ createdAt: l.created_at,
52635
+ updatedAt: l.updated_at
52636
+ };
52637
+ }
52613
52638
  function serializeSite(site) {
52614
52639
  return {
52615
52640
  id: site.id,
@@ -54314,6 +54339,12 @@ var SiteEndpoint = class {
54314
54339
  };
54315
54340
 
54316
54341
  // ../sdk/dist/endpoints/redirects.js
54342
+ var DASHBOARD_ONLY_REWRITE_MESSAGE = "Rewrite proxy rules can only be managed in the dashboard.";
54343
+ function rejectModeParam(data) {
54344
+ if (data && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, "mode")) {
54345
+ throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
54346
+ }
54347
+ }
54317
54348
  var RedirectsEndpoint = class {
54318
54349
  client;
54319
54350
  constructor(client) {
@@ -54328,6 +54359,7 @@ var RedirectsEndpoint = class {
54328
54359
  return (data ?? []).map((r) => serializeRedirect(r));
54329
54360
  }
54330
54361
  async create(data) {
54362
+ rejectModeParam(data);
54331
54363
  const values = {
54332
54364
  site_id: this.client.siteIdNumber,
54333
54365
  source: data.source,
@@ -54343,7 +54375,21 @@ var RedirectsEndpoint = class {
54343
54375
  throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
54344
54376
  return serializeRedirect(row);
54345
54377
  }
54378
+ async assertRedirectRuleWritable(ruleId) {
54379
+ const { data, error: error48 } = await this.client.db.from("redirect_rules").select("id, mode").eq("site_id", this.client.siteIdNumber).eq("id", ruleId).maybeSingle();
54380
+ if (error48)
54381
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
54382
+ if (!data) {
54383
+ throw new NeopressApiError("REDIRECT_RULE_NOT_FOUND", `Redirect rule ${ruleId} not found for this site`, 404);
54384
+ }
54385
+ const row = data;
54386
+ if (row.mode === "proxy") {
54387
+ throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
54388
+ }
54389
+ }
54346
54390
  async update(ruleId, data) {
54391
+ rejectModeParam(data);
54392
+ await this.assertRedirectRuleWritable(ruleId);
54347
54393
  const values = {};
54348
54394
  if ("source" in data)
54349
54395
  values.source = data.source;
@@ -54365,6 +54411,7 @@ var RedirectsEndpoint = class {
54365
54411
  return serializeRedirect(row);
54366
54412
  }
54367
54413
  async delete(ruleId) {
54414
+ await this.assertRedirectRuleWritable(ruleId);
54368
54415
  const { error: error48 } = await this.client.db.from("redirect_rules").delete().eq("site_id", this.client.siteIdNumber).eq("id", ruleId);
54369
54416
  if (error48)
54370
54417
  throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
@@ -54683,6 +54730,128 @@ var HeadshotsEndpoint = class {
54683
54730
  }
54684
54731
  };
54685
54732
 
54733
+ // ../sdk/dist/endpoints/logos.js
54734
+ var LogosEndpoint = class {
54735
+ client;
54736
+ constructor(client) {
54737
+ this.client = client;
54738
+ }
54739
+ async list(params) {
54740
+ const { page, limit, offset } = this.client.resolvePagination(params);
54741
+ let query = this.client.db.from("logo_pool").select("*", { count: "exact" });
54742
+ if (params?.type)
54743
+ query = query.eq("type", params.type);
54744
+ if (params?.tone)
54745
+ query = query.eq("tone", params.tone);
54746
+ if (params?.font)
54747
+ query = query.eq("font", params.font);
54748
+ if (params?.hue !== void 0)
54749
+ query = query.eq("hue", params.hue);
54750
+ if (params?.isActive !== void 0)
54751
+ query = query.eq("is_active", params.isActive);
54752
+ if (params?.order) {
54753
+ query = query.order("created_at", { ascending: params.order === "asc" });
54754
+ } else {
54755
+ query = query.order("type", { ascending: true }).order("hue", { ascending: true }).order("name", { ascending: true });
54756
+ }
54757
+ const { data, error: error48, count } = await query.range(offset, offset + limit - 1);
54758
+ if (error48)
54759
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
54760
+ return {
54761
+ data: (data ?? []).map((r) => serializeLogo(r)),
54762
+ pagination: this.client.paginationMeta(page, limit, offset, count ?? 0)
54763
+ };
54764
+ }
54765
+ async get(id) {
54766
+ const { data, error: error48 } = await this.client.db.from("logo_pool").select("*").eq("id", id).single();
54767
+ if (error48)
54768
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
54769
+ return serializeLogo(data);
54770
+ }
54771
+ async create(params) {
54772
+ const values = {
54773
+ image_url: params.imageUrl,
54774
+ type: params.type,
54775
+ font: params.font,
54776
+ color: params.color,
54777
+ hue: params.hue,
54778
+ tone: params.tone,
54779
+ name: params.name
54780
+ };
54781
+ if (params.toneScore !== void 0)
54782
+ values.tone_score = params.toneScore;
54783
+ if (params.variant !== void 0)
54784
+ values.variant = params.variant;
54785
+ if (params.sha256 !== void 0)
54786
+ values.sha256 = params.sha256;
54787
+ if (params.width !== void 0)
54788
+ values.width = params.width;
54789
+ if (params.height !== void 0)
54790
+ values.height = params.height;
54791
+ if (params.aspectRatio !== void 0)
54792
+ values.aspect_ratio = params.aspectRatio;
54793
+ if (params.mimeType !== void 0)
54794
+ values.mime_type = params.mimeType;
54795
+ if (params.byteSize !== void 0)
54796
+ values.byte_size = params.byteSize;
54797
+ if (params.tags !== void 0)
54798
+ values.tags = params.tags;
54799
+ if (params.isActive !== void 0)
54800
+ values.is_active = params.isActive;
54801
+ const { data, error: error48 } = await this.client.db.from("logo_pool").insert(values).select().single();
54802
+ if (error48)
54803
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
54804
+ return serializeLogo(data);
54805
+ }
54806
+ async update(id, params) {
54807
+ const values = {};
54808
+ if (params.imageUrl !== void 0)
54809
+ values.image_url = params.imageUrl;
54810
+ if (params.type !== void 0)
54811
+ values.type = params.type;
54812
+ if (params.font !== void 0)
54813
+ values.font = params.font;
54814
+ if (params.color !== void 0)
54815
+ values.color = params.color;
54816
+ if (params.hue !== void 0)
54817
+ values.hue = params.hue;
54818
+ if (params.tone !== void 0)
54819
+ values.tone = params.tone;
54820
+ if (params.name !== void 0)
54821
+ values.name = params.name;
54822
+ if (params.toneScore !== void 0)
54823
+ values.tone_score = params.toneScore;
54824
+ if (params.variant !== void 0)
54825
+ values.variant = params.variant;
54826
+ if (params.sha256 !== void 0)
54827
+ values.sha256 = params.sha256;
54828
+ if (params.width !== void 0)
54829
+ values.width = params.width;
54830
+ if (params.height !== void 0)
54831
+ values.height = params.height;
54832
+ if (params.aspectRatio !== void 0)
54833
+ values.aspect_ratio = params.aspectRatio;
54834
+ if (params.mimeType !== void 0)
54835
+ values.mime_type = params.mimeType;
54836
+ if (params.byteSize !== void 0)
54837
+ values.byte_size = params.byteSize;
54838
+ if (params.tags !== void 0)
54839
+ values.tags = params.tags;
54840
+ if (params.isActive !== void 0)
54841
+ values.is_active = params.isActive;
54842
+ const { data, error: error48 } = await this.client.db.from("logo_pool").update(values).eq("id", id).select().single();
54843
+ if (error48)
54844
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
54845
+ return serializeLogo(data);
54846
+ }
54847
+ async delete(id) {
54848
+ const { error: error48 } = await this.client.db.from("logo_pool").delete().eq("id", id);
54849
+ if (error48)
54850
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
54851
+ return { id, deleted: true };
54852
+ }
54853
+ };
54854
+
54686
54855
  // ../sdk/dist/client.js
54687
54856
  var NeopressClient = class {
54688
54857
  baseUrl;
@@ -54704,6 +54873,7 @@ var NeopressClient = class {
54704
54873
  analytics;
54705
54874
  templates;
54706
54875
  headshots;
54876
+ logos;
54707
54877
  constructor(options) {
54708
54878
  this.baseUrl = (options.baseUrl || "https://app.neopress.ai").replace(/\/$/, "");
54709
54879
  this.accessToken = options.accessToken || "";
@@ -54723,6 +54893,7 @@ var NeopressClient = class {
54723
54893
  this.analytics = new AnalyticsEndpoint(this);
54724
54894
  this.templates = new TemplatesEndpoint(this);
54725
54895
  this.headshots = new HeadshotsEndpoint(this);
54896
+ this.logos = new LogosEndpoint(this);
54726
54897
  }
54727
54898
  get siteBasePath() {
54728
54899
  return `/api/v1/sites/${this.siteId}`;
@@ -55003,7 +55174,8 @@ Use these rules before generating pages, collection schemas, entries, forms, or
55003
55174
 
55004
55175
  - Layout owns header, footer, global CSS, and 404. Page TSX starts at page content.
55005
55176
  - Generated page TSX is sandboxed. Do not import Supabase, create API clients, read env vars, use filesystem/process APIs, or assume arbitrary npm packages.
55006
- - Use allowed runtime packages only: React/Next basics, shadcn UI imports, lucide-react, @radix-ui/react-slot, @neopress/youtube, @neopress/map, clsx, class-variance-authority, tailwind-merge, date-fns, framer-motion, gsap (including \`gsap/ScrollTrigger\`, driven via \`@gsap/react\`'s \`useGSAP\`), react-hook-form, zod, @hookform/resolvers, @hookform/resolvers/zod, @neopress/content, @neopress/routing, @neopress/i18n, and @neopress/forms.
55177
+ - Use allowed runtime packages only: React/Next basics, shadcn UI imports, lucide-react, @radix-ui/react-slot, @radix-ui/react-select, @neopress/youtube, @neopress/map, clsx, class-variance-authority, tailwind-merge, date-fns, motion/react (never \`framer-motion\` \u2014 old package name, not on the allowlist), gsap (including \`gsap/ScrollTrigger\`, driven via \`@gsap/react\`'s \`useGSAP\`), react-hook-form, zod, @hookform/resolvers, @hookform/resolvers/zod, @neopress/content, @neopress/routing, @neopress/i18n, and @neopress/forms.
55178
+ - @radix-ui/react-select is a single-value listbox/dropdown (replaces a native \`<select>\`, whose popup is unstyled OS chrome). Compose its parts directly in page TSX; every \`<Select.Item value>\` must be a non-empty string (an empty-string value throws at runtime and blanks the page \u2014 use a sentinel like \`"all"\`); use \`position="popper"\` with an explicit z-index and a non-transparent background on \`<Select.Content>\` (it portals to \`document.body\`).
55007
55179
 
55008
55180
  ## Templates
55009
55181
 
package/dist/index.js CHANGED
@@ -3836,7 +3836,7 @@ var require_fast_uri = __commonJS({
3836
3836
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
3837
3837
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
3838
3838
  try {
3839
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
3839
+ parsed.host = new URL("http://" + parsed.host).hostname;
3840
3840
  } catch (e) {
3841
3841
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
3842
3842
  }
@@ -51229,6 +51229,7 @@ function serializeRedirect(r) {
51229
51229
  siteId: r.site_id,
51230
51230
  source: r.source,
51231
51231
  destination: r.destination,
51232
+ mode: r.mode,
51232
51233
  redirectType: r.redirect_type,
51233
51234
  includeChildren: r.include_children,
51234
51235
  preservePath: r.preserve_path,
@@ -51280,6 +51281,30 @@ function serializeHeadshot(h) {
51280
51281
  updatedAt: h.updated_at
51281
51282
  };
51282
51283
  }
51284
+ function serializeLogo(l) {
51285
+ return {
51286
+ id: l.id,
51287
+ imageUrl: l.image_url,
51288
+ width: l.width,
51289
+ height: l.height,
51290
+ aspectRatio: l.aspect_ratio,
51291
+ mimeType: l.mime_type,
51292
+ byteSize: l.byte_size,
51293
+ type: l.type,
51294
+ font: l.font,
51295
+ color: l.color,
51296
+ hue: l.hue,
51297
+ tone: l.tone,
51298
+ toneScore: l.tone_score,
51299
+ name: l.name,
51300
+ variant: l.variant,
51301
+ sha256: l.sha256,
51302
+ tags: l.tags ?? [],
51303
+ isActive: l.is_active,
51304
+ createdAt: l.created_at,
51305
+ updatedAt: l.updated_at
51306
+ };
51307
+ }
51283
51308
  function serializeSite(site) {
51284
51309
  return {
51285
51310
  id: site.id,
@@ -52984,6 +53009,12 @@ var SiteEndpoint = class {
52984
53009
  };
52985
53010
 
52986
53011
  // ../sdk/dist/endpoints/redirects.js
53012
+ var DASHBOARD_ONLY_REWRITE_MESSAGE = "Rewrite proxy rules can only be managed in the dashboard.";
53013
+ function rejectModeParam(data) {
53014
+ if (data && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, "mode")) {
53015
+ throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
53016
+ }
53017
+ }
52987
53018
  var RedirectsEndpoint = class {
52988
53019
  client;
52989
53020
  constructor(client) {
@@ -52998,6 +53029,7 @@ var RedirectsEndpoint = class {
52998
53029
  return (data ?? []).map((r) => serializeRedirect(r));
52999
53030
  }
53000
53031
  async create(data) {
53032
+ rejectModeParam(data);
53001
53033
  const values = {
53002
53034
  site_id: this.client.siteIdNumber,
53003
53035
  source: data.source,
@@ -53013,7 +53045,21 @@ var RedirectsEndpoint = class {
53013
53045
  throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53014
53046
  return serializeRedirect(row);
53015
53047
  }
53048
+ async assertRedirectRuleWritable(ruleId) {
53049
+ const { data, error: error48 } = await this.client.db.from("redirect_rules").select("id, mode").eq("site_id", this.client.siteIdNumber).eq("id", ruleId).maybeSingle();
53050
+ if (error48)
53051
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53052
+ if (!data) {
53053
+ throw new NeopressApiError("REDIRECT_RULE_NOT_FOUND", `Redirect rule ${ruleId} not found for this site`, 404);
53054
+ }
53055
+ const row = data;
53056
+ if (row.mode === "proxy") {
53057
+ throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
53058
+ }
53059
+ }
53016
53060
  async update(ruleId, data) {
53061
+ rejectModeParam(data);
53062
+ await this.assertRedirectRuleWritable(ruleId);
53017
53063
  const values = {};
53018
53064
  if ("source" in data)
53019
53065
  values.source = data.source;
@@ -53035,6 +53081,7 @@ var RedirectsEndpoint = class {
53035
53081
  return serializeRedirect(row);
53036
53082
  }
53037
53083
  async delete(ruleId) {
53084
+ await this.assertRedirectRuleWritable(ruleId);
53038
53085
  const { error: error48 } = await this.client.db.from("redirect_rules").delete().eq("site_id", this.client.siteIdNumber).eq("id", ruleId);
53039
53086
  if (error48)
53040
53087
  throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
@@ -53353,6 +53400,128 @@ var HeadshotsEndpoint = class {
53353
53400
  }
53354
53401
  };
53355
53402
 
53403
+ // ../sdk/dist/endpoints/logos.js
53404
+ var LogosEndpoint = class {
53405
+ client;
53406
+ constructor(client) {
53407
+ this.client = client;
53408
+ }
53409
+ async list(params) {
53410
+ const { page, limit, offset } = this.client.resolvePagination(params);
53411
+ let query = this.client.db.from("logo_pool").select("*", { count: "exact" });
53412
+ if (params?.type)
53413
+ query = query.eq("type", params.type);
53414
+ if (params?.tone)
53415
+ query = query.eq("tone", params.tone);
53416
+ if (params?.font)
53417
+ query = query.eq("font", params.font);
53418
+ if (params?.hue !== void 0)
53419
+ query = query.eq("hue", params.hue);
53420
+ if (params?.isActive !== void 0)
53421
+ query = query.eq("is_active", params.isActive);
53422
+ if (params?.order) {
53423
+ query = query.order("created_at", { ascending: params.order === "asc" });
53424
+ } else {
53425
+ query = query.order("type", { ascending: true }).order("hue", { ascending: true }).order("name", { ascending: true });
53426
+ }
53427
+ const { data, error: error48, count } = await query.range(offset, offset + limit - 1);
53428
+ if (error48)
53429
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53430
+ return {
53431
+ data: (data ?? []).map((r) => serializeLogo(r)),
53432
+ pagination: this.client.paginationMeta(page, limit, offset, count ?? 0)
53433
+ };
53434
+ }
53435
+ async get(id) {
53436
+ const { data, error: error48 } = await this.client.db.from("logo_pool").select("*").eq("id", id).single();
53437
+ if (error48)
53438
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53439
+ return serializeLogo(data);
53440
+ }
53441
+ async create(params) {
53442
+ const values = {
53443
+ image_url: params.imageUrl,
53444
+ type: params.type,
53445
+ font: params.font,
53446
+ color: params.color,
53447
+ hue: params.hue,
53448
+ tone: params.tone,
53449
+ name: params.name
53450
+ };
53451
+ if (params.toneScore !== void 0)
53452
+ values.tone_score = params.toneScore;
53453
+ if (params.variant !== void 0)
53454
+ values.variant = params.variant;
53455
+ if (params.sha256 !== void 0)
53456
+ values.sha256 = params.sha256;
53457
+ if (params.width !== void 0)
53458
+ values.width = params.width;
53459
+ if (params.height !== void 0)
53460
+ values.height = params.height;
53461
+ if (params.aspectRatio !== void 0)
53462
+ values.aspect_ratio = params.aspectRatio;
53463
+ if (params.mimeType !== void 0)
53464
+ values.mime_type = params.mimeType;
53465
+ if (params.byteSize !== void 0)
53466
+ values.byte_size = params.byteSize;
53467
+ if (params.tags !== void 0)
53468
+ values.tags = params.tags;
53469
+ if (params.isActive !== void 0)
53470
+ values.is_active = params.isActive;
53471
+ const { data, error: error48 } = await this.client.db.from("logo_pool").insert(values).select().single();
53472
+ if (error48)
53473
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53474
+ return serializeLogo(data);
53475
+ }
53476
+ async update(id, params) {
53477
+ const values = {};
53478
+ if (params.imageUrl !== void 0)
53479
+ values.image_url = params.imageUrl;
53480
+ if (params.type !== void 0)
53481
+ values.type = params.type;
53482
+ if (params.font !== void 0)
53483
+ values.font = params.font;
53484
+ if (params.color !== void 0)
53485
+ values.color = params.color;
53486
+ if (params.hue !== void 0)
53487
+ values.hue = params.hue;
53488
+ if (params.tone !== void 0)
53489
+ values.tone = params.tone;
53490
+ if (params.name !== void 0)
53491
+ values.name = params.name;
53492
+ if (params.toneScore !== void 0)
53493
+ values.tone_score = params.toneScore;
53494
+ if (params.variant !== void 0)
53495
+ values.variant = params.variant;
53496
+ if (params.sha256 !== void 0)
53497
+ values.sha256 = params.sha256;
53498
+ if (params.width !== void 0)
53499
+ values.width = params.width;
53500
+ if (params.height !== void 0)
53501
+ values.height = params.height;
53502
+ if (params.aspectRatio !== void 0)
53503
+ values.aspect_ratio = params.aspectRatio;
53504
+ if (params.mimeType !== void 0)
53505
+ values.mime_type = params.mimeType;
53506
+ if (params.byteSize !== void 0)
53507
+ values.byte_size = params.byteSize;
53508
+ if (params.tags !== void 0)
53509
+ values.tags = params.tags;
53510
+ if (params.isActive !== void 0)
53511
+ values.is_active = params.isActive;
53512
+ const { data, error: error48 } = await this.client.db.from("logo_pool").update(values).eq("id", id).select().single();
53513
+ if (error48)
53514
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53515
+ return serializeLogo(data);
53516
+ }
53517
+ async delete(id) {
53518
+ const { error: error48 } = await this.client.db.from("logo_pool").delete().eq("id", id);
53519
+ if (error48)
53520
+ throw new NeopressApiError("DB_ERROR", error48.message, 0, error48);
53521
+ return { id, deleted: true };
53522
+ }
53523
+ };
53524
+
53356
53525
  // ../sdk/dist/client.js
53357
53526
  var NeopressClient = class {
53358
53527
  baseUrl;
@@ -53374,6 +53543,7 @@ var NeopressClient = class {
53374
53543
  analytics;
53375
53544
  templates;
53376
53545
  headshots;
53546
+ logos;
53377
53547
  constructor(options) {
53378
53548
  this.baseUrl = (options.baseUrl || "https://app.neopress.ai").replace(/\/$/, "");
53379
53549
  this.accessToken = options.accessToken || "";
@@ -53393,6 +53563,7 @@ var NeopressClient = class {
53393
53563
  this.analytics = new AnalyticsEndpoint(this);
53394
53564
  this.templates = new TemplatesEndpoint(this);
53395
53565
  this.headshots = new HeadshotsEndpoint(this);
53566
+ this.logos = new LogosEndpoint(this);
53396
53567
  }
53397
53568
  get siteBasePath() {
53398
53569
  return `/api/v1/sites/${this.siteId}`;
@@ -53673,7 +53844,8 @@ Use these rules before generating pages, collection schemas, entries, forms, or
53673
53844
 
53674
53845
  - Layout owns header, footer, global CSS, and 404. Page TSX starts at page content.
53675
53846
  - Generated page TSX is sandboxed. Do not import Supabase, create API clients, read env vars, use filesystem/process APIs, or assume arbitrary npm packages.
53676
- - Use allowed runtime packages only: React/Next basics, shadcn UI imports, lucide-react, @radix-ui/react-slot, @neopress/youtube, @neopress/map, clsx, class-variance-authority, tailwind-merge, date-fns, framer-motion, gsap (including \`gsap/ScrollTrigger\`, driven via \`@gsap/react\`'s \`useGSAP\`), react-hook-form, zod, @hookform/resolvers, @hookform/resolvers/zod, @neopress/content, @neopress/routing, @neopress/i18n, and @neopress/forms.
53847
+ - Use allowed runtime packages only: React/Next basics, shadcn UI imports, lucide-react, @radix-ui/react-slot, @radix-ui/react-select, @neopress/youtube, @neopress/map, clsx, class-variance-authority, tailwind-merge, date-fns, motion/react (never \`framer-motion\` \u2014 old package name, not on the allowlist), gsap (including \`gsap/ScrollTrigger\`, driven via \`@gsap/react\`'s \`useGSAP\`), react-hook-form, zod, @hookform/resolvers, @hookform/resolvers/zod, @neopress/content, @neopress/routing, @neopress/i18n, and @neopress/forms.
53848
+ - @radix-ui/react-select is a single-value listbox/dropdown (replaces a native \`<select>\`, whose popup is unstyled OS chrome). Compose its parts directly in page TSX; every \`<Select.Item value>\` must be a non-empty string (an empty-string value throws at runtime and blanks the page \u2014 use a sentinel like \`"all"\`); use \`position="popper"\` with an explicit z-index and a non-transparent background on \`<Select.Content>\` (it portals to \`document.body\`).
53677
53849
 
53678
53850
  ## Templates
53679
53851
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neopress/mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Neopress MCP server for first-party AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,9 +29,9 @@
29
29
  "zod": "^4.1.12"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/node": "^22.0.0",
32
+ "@types/node": "^22",
33
33
  "tsup": "^8.5.1",
34
- "typescript": "^5.7.0",
34
+ "typescript": "^5.9.3",
35
35
  "vitest": "^4.1.5",
36
36
  "@neopress/sdk": "0.4.0"
37
37
  },