@neopress/mcp 1.2.0 → 1.3.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.
- package/dist/bin.cjs +41 -79
- package/dist/http-bin.cjs +44 -82
- package/dist/index.d.ts +19 -15
- package/dist/index.js +29 -35
- package/package.json +2 -2
- package/scripts/check-dist-contract.mjs +4 -3
package/dist/bin.cjs
CHANGED
|
@@ -34,7 +34,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
34
34
|
}
|
|
35
35
|
return to;
|
|
36
36
|
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
38
38
|
value: mod,
|
|
39
39
|
enumerable: true
|
|
40
40
|
}) : target, mod));
|
|
@@ -9338,7 +9338,8 @@ var ZodPromise = class extends ZodType {
|
|
|
9338
9338
|
});
|
|
9339
9339
|
return INVALID;
|
|
9340
9340
|
}
|
|
9341
|
-
|
|
9341
|
+
const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
|
|
9342
|
+
return OK(promisified.then((data) => {
|
|
9342
9343
|
return this._def.type.parseAsync(data, {
|
|
9343
9344
|
path: ctx.path,
|
|
9344
9345
|
errorMap: ctx.common.contextualErrorMap
|
|
@@ -10073,9 +10074,7 @@ function parseBigintDef(def, refs) {
|
|
|
10073
10074
|
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
10074
10075
|
}
|
|
10075
10076
|
break;
|
|
10076
|
-
case "multipleOf":
|
|
10077
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
10078
|
-
break;
|
|
10077
|
+
case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
10079
10078
|
}
|
|
10080
10079
|
return res;
|
|
10081
10080
|
}
|
|
@@ -10122,9 +10121,7 @@ const integerDateParser = (def, refs) => {
|
|
|
10122
10121
|
case "min":
|
|
10123
10122
|
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
10124
10123
|
break;
|
|
10125
|
-
case "max":
|
|
10126
|
-
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
10127
|
-
break;
|
|
10124
|
+
case "max": setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
10128
10125
|
}
|
|
10129
10126
|
return res;
|
|
10130
10127
|
};
|
|
@@ -10276,9 +10273,7 @@ function parseStringDef(def, refs) {
|
|
|
10276
10273
|
case "format:idn-email":
|
|
10277
10274
|
addFormat(res, "idn-email", check.message, refs);
|
|
10278
10275
|
break;
|
|
10279
|
-
case "pattern:zod":
|
|
10280
|
-
addPattern(res, zodPatterns.email, check.message, refs);
|
|
10281
|
-
break;
|
|
10276
|
+
case "pattern:zod": addPattern(res, zodPatterns.email, check.message, refs);
|
|
10282
10277
|
}
|
|
10283
10278
|
break;
|
|
10284
10279
|
case "url":
|
|
@@ -10349,16 +10344,10 @@ function parseStringDef(def, refs) {
|
|
|
10349
10344
|
case "contentEncoding:base64":
|
|
10350
10345
|
setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs);
|
|
10351
10346
|
break;
|
|
10352
|
-
case "pattern:zod":
|
|
10353
|
-
addPattern(res, zodPatterns.base64, check.message, refs);
|
|
10354
|
-
break;
|
|
10347
|
+
case "pattern:zod": addPattern(res, zodPatterns.base64, check.message, refs);
|
|
10355
10348
|
}
|
|
10356
10349
|
break;
|
|
10357
10350
|
case "nanoid": addPattern(res, zodPatterns.nanoid, check.message, refs);
|
|
10358
|
-
case "toLowerCase":
|
|
10359
|
-
case "toUpperCase":
|
|
10360
|
-
case "trim": break;
|
|
10361
|
-
default:
|
|
10362
10351
|
}
|
|
10363
10352
|
return res;
|
|
10364
10353
|
}
|
|
@@ -10705,9 +10694,7 @@ function parseNumberDef(def, refs) {
|
|
|
10705
10694
|
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
10706
10695
|
}
|
|
10707
10696
|
break;
|
|
10708
|
-
case "multipleOf":
|
|
10709
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
10710
|
-
break;
|
|
10697
|
+
case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
10711
10698
|
}
|
|
10712
10699
|
return res;
|
|
10713
10700
|
}
|
|
@@ -18352,9 +18339,7 @@ var ExperimentalServerTasks = class {
|
|
|
18352
18339
|
case "url":
|
|
18353
18340
|
if (!clientCapabilities?.elicitation?.url) throw new Error("Client does not support url elicitation.");
|
|
18354
18341
|
break;
|
|
18355
|
-
case "form":
|
|
18356
|
-
if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
|
|
18357
|
-
break;
|
|
18342
|
+
case "form": if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
|
|
18358
18343
|
}
|
|
18359
18344
|
const normalizedParams = mode === "form" && params.mode === void 0 ? {
|
|
18360
18345
|
...params,
|
|
@@ -18436,10 +18421,7 @@ var ExperimentalServerTasks = class {
|
|
|
18436
18421
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
18437
18422
|
if (!requests) throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
18438
18423
|
switch (method) {
|
|
18439
|
-
case "tools/call":
|
|
18440
|
-
if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
18441
|
-
break;
|
|
18442
|
-
default: break;
|
|
18424
|
+
case "tools/call": if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
18443
18425
|
}
|
|
18444
18426
|
}
|
|
18445
18427
|
/**
|
|
@@ -18459,10 +18441,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
18459
18441
|
case "sampling/createMessage":
|
|
18460
18442
|
if (!requests.sampling?.createMessage) throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
|
|
18461
18443
|
break;
|
|
18462
|
-
case "elicitation/create":
|
|
18463
|
-
if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
18464
|
-
break;
|
|
18465
|
-
default: break;
|
|
18444
|
+
case "elicitation/create": if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
18466
18445
|
}
|
|
18467
18446
|
}
|
|
18468
18447
|
//#endregion
|
|
@@ -18590,10 +18569,7 @@ var Server = class extends Protocol {
|
|
|
18590
18569
|
case "elicitation/create":
|
|
18591
18570
|
if (!this._clientCapabilities?.elicitation) throw new Error(`Client does not support elicitation (required for ${method})`);
|
|
18592
18571
|
break;
|
|
18593
|
-
case "roots/list":
|
|
18594
|
-
if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
18595
|
-
break;
|
|
18596
|
-
case "ping": break;
|
|
18572
|
+
case "roots/list": if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
18597
18573
|
}
|
|
18598
18574
|
}
|
|
18599
18575
|
assertNotificationCapability(method) {
|
|
@@ -18611,11 +18587,7 @@ var Server = class extends Protocol {
|
|
|
18611
18587
|
case "notifications/prompts/list_changed":
|
|
18612
18588
|
if (!this._capabilities.prompts) throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
|
|
18613
18589
|
break;
|
|
18614
|
-
case "notifications/elicitation/complete":
|
|
18615
|
-
if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
18616
|
-
break;
|
|
18617
|
-
case "notifications/cancelled": break;
|
|
18618
|
-
case "notifications/progress": break;
|
|
18590
|
+
case "notifications/elicitation/complete": if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
18619
18591
|
}
|
|
18620
18592
|
}
|
|
18621
18593
|
assertRequestHandlerCapability(method) {
|
|
@@ -18643,11 +18615,7 @@ var Server = class extends Protocol {
|
|
|
18643
18615
|
case "tasks/get":
|
|
18644
18616
|
case "tasks/list":
|
|
18645
18617
|
case "tasks/result":
|
|
18646
|
-
case "tasks/cancel":
|
|
18647
|
-
if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
18648
|
-
break;
|
|
18649
|
-
case "ping":
|
|
18650
|
-
case "initialize": break;
|
|
18618
|
+
case "tasks/cancel": if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
18651
18619
|
}
|
|
18652
18620
|
}
|
|
18653
18621
|
assertTaskCapability(method) {
|
|
@@ -32873,7 +32841,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32873
32841
|
exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = void 0;
|
|
32874
32842
|
const version_1 = require_version();
|
|
32875
32843
|
/** Current session will be checked for refresh at this interval. */
|
|
32876
|
-
exports.AUTO_REFRESH_TICK_DURATION_MS =
|
|
32844
|
+
exports.AUTO_REFRESH_TICK_DURATION_MS = 3e4;
|
|
32877
32845
|
/**
|
|
32878
32846
|
* A token refresh will be attempted this many ticks before the current session expires. */
|
|
32879
32847
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -32892,7 +32860,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32892
32860
|
name: "2024-01-01"
|
|
32893
32861
|
} };
|
|
32894
32862
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
32895
|
-
exports.JWKS_TTL =
|
|
32863
|
+
exports.JWKS_TTL = 6e5;
|
|
32896
32864
|
}));
|
|
32897
32865
|
//#endregion
|
|
32898
32866
|
//#region ../../node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
@@ -39315,10 +39283,7 @@ var require_GoTrueClient = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39315
39283
|
case "implicit":
|
|
39316
39284
|
if (this.flowType === "pkce") throw new errors_1.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");
|
|
39317
39285
|
break;
|
|
39318
|
-
case "pkce":
|
|
39319
|
-
if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
39320
|
-
break;
|
|
39321
|
-
default:
|
|
39286
|
+
case "pkce": if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
39322
39287
|
}
|
|
39323
39288
|
if (callbackUrlType === "pkce") {
|
|
39324
39289
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
@@ -42326,7 +42291,7 @@ function shouldShowDeprecationWarning() {
|
|
|
42326
42291
|
}
|
|
42327
42292
|
if (shouldShowDeprecationWarning()) console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");
|
|
42328
42293
|
//#endregion
|
|
42329
|
-
//#region ../sdk/
|
|
42294
|
+
//#region ../sdk/src/errors.ts
|
|
42330
42295
|
/**
|
|
42331
42296
|
* SDK error classes
|
|
42332
42297
|
*/
|
|
@@ -42343,13 +42308,7 @@ var NeopressApiError = class extends Error {
|
|
|
42343
42308
|
}
|
|
42344
42309
|
};
|
|
42345
42310
|
//#endregion
|
|
42346
|
-
//#region ../sdk/
|
|
42347
|
-
/**
|
|
42348
|
-
* SDK serializers — convert DB snake_case rows to SDK camelCase shapes.
|
|
42349
|
-
*
|
|
42350
|
-
* Ported 1:1 from apps/neopress/src/lib/api/v1/serializers.ts.
|
|
42351
|
-
* Do NOT change field mappings without updating both files.
|
|
42352
|
-
*/
|
|
42311
|
+
//#region ../sdk/src/serializers.ts
|
|
42353
42312
|
function serializePageFull(page) {
|
|
42354
42313
|
return {
|
|
42355
42314
|
id: page.id,
|
|
@@ -42598,7 +42557,7 @@ function serializeSiteLayout(siteId, layout) {
|
|
|
42598
42557
|
};
|
|
42599
42558
|
}
|
|
42600
42559
|
//#endregion
|
|
42601
|
-
//#region ../sdk/
|
|
42560
|
+
//#region ../sdk/src/endpoints/pages.ts
|
|
42602
42561
|
var PagesEndpoint = class {
|
|
42603
42562
|
client;
|
|
42604
42563
|
constructor(client) {
|
|
@@ -42932,7 +42891,7 @@ function getDefaultLogLevel() {
|
|
|
42932
42891
|
}
|
|
42933
42892
|
getDefaultLogLevel();
|
|
42934
42893
|
//#endregion
|
|
42935
|
-
//#region ../sdk/
|
|
42894
|
+
//#region ../sdk/src/endpoints/collections.ts
|
|
42936
42895
|
var CollectionsEndpoint = class {
|
|
42937
42896
|
client;
|
|
42938
42897
|
constructor(client) {
|
|
@@ -42998,7 +42957,7 @@ var CollectionsEndpoint = class {
|
|
|
42998
42957
|
}
|
|
42999
42958
|
};
|
|
43000
42959
|
//#endregion
|
|
43001
|
-
//#region ../sdk/
|
|
42960
|
+
//#region ../sdk/src/endpoints/entries.ts
|
|
43002
42961
|
var EntriesEndpoint = class {
|
|
43003
42962
|
client;
|
|
43004
42963
|
constructor(client) {
|
|
@@ -43071,7 +43030,7 @@ var EntriesEndpoint = class {
|
|
|
43071
43030
|
}
|
|
43072
43031
|
};
|
|
43073
43032
|
//#endregion
|
|
43074
|
-
//#region ../sdk/
|
|
43033
|
+
//#region ../sdk/src/endpoints/forms.ts
|
|
43075
43034
|
var FormsEndpoint = class {
|
|
43076
43035
|
client;
|
|
43077
43036
|
constructor(client) {
|
|
@@ -43139,7 +43098,7 @@ var FormsEndpoint = class {
|
|
|
43139
43098
|
}
|
|
43140
43099
|
};
|
|
43141
43100
|
//#endregion
|
|
43142
|
-
//#region ../sdk/
|
|
43101
|
+
//#region ../sdk/src/endpoints/assets.ts
|
|
43143
43102
|
var AssetsEndpoint = class {
|
|
43144
43103
|
client;
|
|
43145
43104
|
constructor(client) {
|
|
@@ -43200,7 +43159,7 @@ var AssetsEndpoint = class {
|
|
|
43200
43159
|
}
|
|
43201
43160
|
};
|
|
43202
43161
|
//#endregion
|
|
43203
|
-
//#region ../sdk/
|
|
43162
|
+
//#region ../sdk/src/endpoints/site.ts
|
|
43204
43163
|
var SiteEndpoint = class {
|
|
43205
43164
|
client;
|
|
43206
43165
|
constructor(client) {
|
|
@@ -43245,7 +43204,7 @@ var SiteEndpoint = class {
|
|
|
43245
43204
|
}
|
|
43246
43205
|
};
|
|
43247
43206
|
//#endregion
|
|
43248
|
-
//#region ../sdk/
|
|
43207
|
+
//#region ../sdk/src/endpoints/redirects.ts
|
|
43249
43208
|
const DASHBOARD_ONLY_REWRITE_MESSAGE = "Rewrite proxy rules can only be managed in the dashboard.";
|
|
43250
43209
|
function rejectModeParam(data) {
|
|
43251
43210
|
if (data && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, "mode")) throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
|
|
@@ -43306,7 +43265,7 @@ var RedirectsEndpoint = class {
|
|
|
43306
43265
|
}
|
|
43307
43266
|
};
|
|
43308
43267
|
//#endregion
|
|
43309
|
-
//#region ../sdk/
|
|
43268
|
+
//#region ../sdk/src/endpoints/publish.ts
|
|
43310
43269
|
var PublishEndpoint = class {
|
|
43311
43270
|
client;
|
|
43312
43271
|
constructor(client) {
|
|
@@ -43320,7 +43279,7 @@ var PublishEndpoint = class {
|
|
|
43320
43279
|
}
|
|
43321
43280
|
};
|
|
43322
43281
|
//#endregion
|
|
43323
|
-
//#region ../sdk/
|
|
43282
|
+
//#region ../sdk/src/endpoints/entry-references.ts
|
|
43324
43283
|
var EntryReferencesEndpoint = class {
|
|
43325
43284
|
client;
|
|
43326
43285
|
constructor(client) {
|
|
@@ -43351,7 +43310,7 @@ var EntryReferencesEndpoint = class {
|
|
|
43351
43310
|
}
|
|
43352
43311
|
};
|
|
43353
43312
|
//#endregion
|
|
43354
|
-
//#region ../sdk/
|
|
43313
|
+
//#region ../sdk/src/endpoints/analytics.ts
|
|
43355
43314
|
const RESERVED_ANALYTICS_PARAMS = /* @__PURE__ */ new Set([
|
|
43356
43315
|
"pipe",
|
|
43357
43316
|
"site",
|
|
@@ -43436,7 +43395,7 @@ var AnalyticsEndpoint = class {
|
|
|
43436
43395
|
}
|
|
43437
43396
|
};
|
|
43438
43397
|
//#endregion
|
|
43439
|
-
//#region ../sdk/
|
|
43398
|
+
//#region ../sdk/src/endpoints/templates.ts
|
|
43440
43399
|
var TemplatesEndpoint = class {
|
|
43441
43400
|
client;
|
|
43442
43401
|
constructor(client) {
|
|
@@ -43500,7 +43459,7 @@ var TemplatesEndpoint = class {
|
|
|
43500
43459
|
}
|
|
43501
43460
|
};
|
|
43502
43461
|
//#endregion
|
|
43503
|
-
//#region ../sdk/
|
|
43462
|
+
//#region ../sdk/src/endpoints/headshots.ts
|
|
43504
43463
|
/**
|
|
43505
43464
|
* headshot_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to
|
|
43506
43465
|
* the super-admin user, so these direct-DB calls return empty/forbidden for any
|
|
@@ -43584,7 +43543,7 @@ var HeadshotsEndpoint = class {
|
|
|
43584
43543
|
}
|
|
43585
43544
|
};
|
|
43586
43545
|
//#endregion
|
|
43587
|
-
//#region ../sdk/
|
|
43546
|
+
//#region ../sdk/src/endpoints/logos.ts
|
|
43588
43547
|
/**
|
|
43589
43548
|
* logo_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to the
|
|
43590
43549
|
* super-admin user, so these direct-DB calls return empty/forbidden for any other
|
|
@@ -43674,7 +43633,7 @@ var LogosEndpoint = class {
|
|
|
43674
43633
|
}
|
|
43675
43634
|
};
|
|
43676
43635
|
//#endregion
|
|
43677
|
-
//#region ../sdk/
|
|
43636
|
+
//#region ../sdk/src/client.ts
|
|
43678
43637
|
/**
|
|
43679
43638
|
* @neopress/sdk — API Client
|
|
43680
43639
|
*
|
|
@@ -43751,7 +43710,8 @@ var NeopressClient = class {
|
|
|
43751
43710
|
* header so RLS applies. No session persistence/refresh — token freshness is the
|
|
43752
43711
|
* caller's responsibility (CLI getClientAsync / MCP per-request).
|
|
43753
43712
|
*
|
|
43754
|
-
* `@internal` (with `stripInternal`
|
|
43713
|
+
* `@internal` (with `stripInternal` in the cli/mcp dts configs — sdk itself no
|
|
43714
|
+
* longer emits) keeps this out of the published declarations:
|
|
43755
43715
|
* it is plumbing for the endpoints in this package, and typing it publicly would
|
|
43756
43716
|
* drag `SupabaseClient` + the generated `Database` into the published `.d.ts` of
|
|
43757
43717
|
* `@neopress/cli` / `@neopress/mcp` — packages that declare no dependencies, so
|
|
@@ -44009,7 +43969,7 @@ Use these rules before generating pages, collection schemas, entries, forms, or
|
|
|
44009
43969
|
- Reusable templates are normal Neopress sites marked by a \`templates\` metadata row.
|
|
44010
43970
|
- \`templates.id\` equals \`sites.id\`.
|
|
44011
43971
|
- Build layout, pages, collections, entries, forms, assets, compile, publish, and verify before marking a finished template.
|
|
44012
|
-
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\`.
|
|
43972
|
+
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\` and \`previewVideoUrl\`. The gallery card renders \`previewImgUrls[0]\` at rest and cross-fades to \`previewVideoUrl\` on hover, so the first preview image must be that video's first frame.
|
|
44013
43973
|
- \`referenceUrl\` is a single http(s) provenance URL. \`description\` is an optional summary of the template (max 150 characters).
|
|
44014
43974
|
- Template metadata does not replace page TSX, CMS content, forms, or publish state.
|
|
44015
43975
|
- Use \`neopress_template_delete\` only for explicit template-site hard deletion. It removes the metadata row and connected site.
|
|
@@ -44347,20 +44307,22 @@ const toolDefinitions = [
|
|
|
44347
44307
|
{
|
|
44348
44308
|
name: "neopress_template_mark",
|
|
44349
44309
|
title: "Mark Site As Template",
|
|
44350
|
-
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl.",
|
|
44310
|
+
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl. The gallery card shows previewImgUrls[0] at rest and plays previewVideoUrl on hover, so pass the video together with its own first frame as the first preview image.",
|
|
44351
44311
|
inputSchema: {
|
|
44352
44312
|
...siteIdShape,
|
|
44353
44313
|
name: string(),
|
|
44354
44314
|
description: string().max(150).optional(),
|
|
44355
44315
|
referenceUrl: httpUrlSchema,
|
|
44356
|
-
previewImgUrls: array(string()).min(1)
|
|
44316
|
+
previewImgUrls: array(string()).min(1),
|
|
44317
|
+
previewVideoUrl: httpUrlSchema.optional()
|
|
44357
44318
|
},
|
|
44358
44319
|
handler: async (input, context, extra) => {
|
|
44359
44320
|
return (await context.createClient({ siteId: siteId(input) }, extra)).templates.mark({
|
|
44360
44321
|
name: asString(input, "name"),
|
|
44361
44322
|
description: asOptionalString(input, "description"),
|
|
44362
44323
|
referenceUrl: asString(input, "referenceUrl"),
|
|
44363
|
-
previewImgUrls: input.previewImgUrls
|
|
44324
|
+
previewImgUrls: input.previewImgUrls,
|
|
44325
|
+
previewVideoUrl: asOptionalString(input, "previewVideoUrl")
|
|
44364
44326
|
});
|
|
44365
44327
|
}
|
|
44366
44328
|
},
|
package/dist/http-bin.cjs
CHANGED
|
@@ -34,7 +34,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
34
34
|
}
|
|
35
35
|
return to;
|
|
36
36
|
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
38
38
|
value: mod,
|
|
39
39
|
enumerable: true
|
|
40
40
|
}) : target, mod));
|
|
@@ -338,7 +338,7 @@ if (typeof global.crypto === "undefined") global.crypto = crypto$1.default;
|
|
|
338
338
|
var outgoingEnded = Symbol("outgoingEnded");
|
|
339
339
|
var incomingDraining = Symbol("incomingDraining");
|
|
340
340
|
var DRAIN_TIMEOUT_MS = 500;
|
|
341
|
-
var MAX_DRAIN_BYTES =
|
|
341
|
+
var MAX_DRAIN_BYTES = 67108864;
|
|
342
342
|
var drainIncoming = (incoming) => {
|
|
343
343
|
const incomingWithDrainState = incoming;
|
|
344
344
|
if (incoming.destroyed || incomingWithDrainState[incomingDraining]) return;
|
|
@@ -10447,7 +10447,8 @@ var ZodPromise = class extends ZodType {
|
|
|
10447
10447
|
});
|
|
10448
10448
|
return INVALID;
|
|
10449
10449
|
}
|
|
10450
|
-
|
|
10450
|
+
const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
|
|
10451
|
+
return OK(promisified.then((data) => {
|
|
10451
10452
|
return this._def.type.parseAsync(data, {
|
|
10452
10453
|
path: ctx.path,
|
|
10453
10454
|
errorMap: ctx.common.contextualErrorMap
|
|
@@ -11182,9 +11183,7 @@ function parseBigintDef(def, refs) {
|
|
|
11182
11183
|
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
11183
11184
|
}
|
|
11184
11185
|
break;
|
|
11185
|
-
case "multipleOf":
|
|
11186
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
11187
|
-
break;
|
|
11186
|
+
case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
11188
11187
|
}
|
|
11189
11188
|
return res;
|
|
11190
11189
|
}
|
|
@@ -11231,9 +11230,7 @@ const integerDateParser = (def, refs) => {
|
|
|
11231
11230
|
case "min":
|
|
11232
11231
|
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
11233
11232
|
break;
|
|
11234
|
-
case "max":
|
|
11235
|
-
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
11236
|
-
break;
|
|
11233
|
+
case "max": setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
11237
11234
|
}
|
|
11238
11235
|
return res;
|
|
11239
11236
|
};
|
|
@@ -11385,9 +11382,7 @@ function parseStringDef(def, refs) {
|
|
|
11385
11382
|
case "format:idn-email":
|
|
11386
11383
|
addFormat(res, "idn-email", check.message, refs);
|
|
11387
11384
|
break;
|
|
11388
|
-
case "pattern:zod":
|
|
11389
|
-
addPattern(res, zodPatterns.email, check.message, refs);
|
|
11390
|
-
break;
|
|
11385
|
+
case "pattern:zod": addPattern(res, zodPatterns.email, check.message, refs);
|
|
11391
11386
|
}
|
|
11392
11387
|
break;
|
|
11393
11388
|
case "url":
|
|
@@ -11458,16 +11453,10 @@ function parseStringDef(def, refs) {
|
|
|
11458
11453
|
case "contentEncoding:base64":
|
|
11459
11454
|
setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs);
|
|
11460
11455
|
break;
|
|
11461
|
-
case "pattern:zod":
|
|
11462
|
-
addPattern(res, zodPatterns.base64, check.message, refs);
|
|
11463
|
-
break;
|
|
11456
|
+
case "pattern:zod": addPattern(res, zodPatterns.base64, check.message, refs);
|
|
11464
11457
|
}
|
|
11465
11458
|
break;
|
|
11466
11459
|
case "nanoid": addPattern(res, zodPatterns.nanoid, check.message, refs);
|
|
11467
|
-
case "toLowerCase":
|
|
11468
|
-
case "toUpperCase":
|
|
11469
|
-
case "trim": break;
|
|
11470
|
-
default:
|
|
11471
11460
|
}
|
|
11472
11461
|
return res;
|
|
11473
11462
|
}
|
|
@@ -11814,9 +11803,7 @@ function parseNumberDef(def, refs) {
|
|
|
11814
11803
|
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
11815
11804
|
}
|
|
11816
11805
|
break;
|
|
11817
|
-
case "multipleOf":
|
|
11818
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
11819
|
-
break;
|
|
11806
|
+
case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
11820
11807
|
}
|
|
11821
11808
|
return res;
|
|
11822
11809
|
}
|
|
@@ -19461,9 +19448,7 @@ var ExperimentalServerTasks = class {
|
|
|
19461
19448
|
case "url":
|
|
19462
19449
|
if (!clientCapabilities?.elicitation?.url) throw new Error("Client does not support url elicitation.");
|
|
19463
19450
|
break;
|
|
19464
|
-
case "form":
|
|
19465
|
-
if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
|
|
19466
|
-
break;
|
|
19451
|
+
case "form": if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
|
|
19467
19452
|
}
|
|
19468
19453
|
const normalizedParams = mode === "form" && params.mode === void 0 ? {
|
|
19469
19454
|
...params,
|
|
@@ -19545,10 +19530,7 @@ var ExperimentalServerTasks = class {
|
|
|
19545
19530
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
19546
19531
|
if (!requests) throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
19547
19532
|
switch (method) {
|
|
19548
|
-
case "tools/call":
|
|
19549
|
-
if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
19550
|
-
break;
|
|
19551
|
-
default: break;
|
|
19533
|
+
case "tools/call": if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
19552
19534
|
}
|
|
19553
19535
|
}
|
|
19554
19536
|
/**
|
|
@@ -19568,10 +19550,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
19568
19550
|
case "sampling/createMessage":
|
|
19569
19551
|
if (!requests.sampling?.createMessage) throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
|
|
19570
19552
|
break;
|
|
19571
|
-
case "elicitation/create":
|
|
19572
|
-
if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
19573
|
-
break;
|
|
19574
|
-
default: break;
|
|
19553
|
+
case "elicitation/create": if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
19575
19554
|
}
|
|
19576
19555
|
}
|
|
19577
19556
|
//#endregion
|
|
@@ -19699,10 +19678,7 @@ var Server = class extends Protocol {
|
|
|
19699
19678
|
case "elicitation/create":
|
|
19700
19679
|
if (!this._clientCapabilities?.elicitation) throw new Error(`Client does not support elicitation (required for ${method})`);
|
|
19701
19680
|
break;
|
|
19702
|
-
case "roots/list":
|
|
19703
|
-
if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
19704
|
-
break;
|
|
19705
|
-
case "ping": break;
|
|
19681
|
+
case "roots/list": if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
19706
19682
|
}
|
|
19707
19683
|
}
|
|
19708
19684
|
assertNotificationCapability(method) {
|
|
@@ -19720,11 +19696,7 @@ var Server = class extends Protocol {
|
|
|
19720
19696
|
case "notifications/prompts/list_changed":
|
|
19721
19697
|
if (!this._capabilities.prompts) throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
|
|
19722
19698
|
break;
|
|
19723
|
-
case "notifications/elicitation/complete":
|
|
19724
|
-
if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
19725
|
-
break;
|
|
19726
|
-
case "notifications/cancelled": break;
|
|
19727
|
-
case "notifications/progress": break;
|
|
19699
|
+
case "notifications/elicitation/complete": if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
19728
19700
|
}
|
|
19729
19701
|
}
|
|
19730
19702
|
assertRequestHandlerCapability(method) {
|
|
@@ -19752,11 +19724,7 @@ var Server = class extends Protocol {
|
|
|
19752
19724
|
case "tasks/get":
|
|
19753
19725
|
case "tasks/list":
|
|
19754
19726
|
case "tasks/result":
|
|
19755
|
-
case "tasks/cancel":
|
|
19756
|
-
if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
19757
|
-
break;
|
|
19758
|
-
case "ping":
|
|
19759
|
-
case "initialize": break;
|
|
19727
|
+
case "tasks/cancel": if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
19760
19728
|
}
|
|
19761
19729
|
}
|
|
19762
19730
|
assertTaskCapability(method) {
|
|
@@ -33982,7 +33950,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
33982
33950
|
exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = void 0;
|
|
33983
33951
|
const version_1 = require_version();
|
|
33984
33952
|
/** Current session will be checked for refresh at this interval. */
|
|
33985
|
-
exports.AUTO_REFRESH_TICK_DURATION_MS =
|
|
33953
|
+
exports.AUTO_REFRESH_TICK_DURATION_MS = 3e4;
|
|
33986
33954
|
/**
|
|
33987
33955
|
* A token refresh will be attempted this many ticks before the current session expires. */
|
|
33988
33956
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -34001,7 +33969,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34001
33969
|
name: "2024-01-01"
|
|
34002
33970
|
} };
|
|
34003
33971
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
34004
|
-
exports.JWKS_TTL =
|
|
33972
|
+
exports.JWKS_TTL = 6e5;
|
|
34005
33973
|
}));
|
|
34006
33974
|
//#endregion
|
|
34007
33975
|
//#region ../../node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
@@ -40424,10 +40392,7 @@ var require_GoTrueClient = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
40424
40392
|
case "implicit":
|
|
40425
40393
|
if (this.flowType === "pkce") throw new errors_1.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");
|
|
40426
40394
|
break;
|
|
40427
|
-
case "pkce":
|
|
40428
|
-
if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
40429
|
-
break;
|
|
40430
|
-
default:
|
|
40395
|
+
case "pkce": if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
40431
40396
|
}
|
|
40432
40397
|
if (callbackUrlType === "pkce") {
|
|
40433
40398
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
@@ -43435,7 +43400,7 @@ function shouldShowDeprecationWarning() {
|
|
|
43435
43400
|
}
|
|
43436
43401
|
if (shouldShowDeprecationWarning()) console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");
|
|
43437
43402
|
//#endregion
|
|
43438
|
-
//#region ../sdk/
|
|
43403
|
+
//#region ../sdk/src/errors.ts
|
|
43439
43404
|
/**
|
|
43440
43405
|
* SDK error classes
|
|
43441
43406
|
*/
|
|
@@ -43452,13 +43417,7 @@ var NeopressApiError = class extends Error {
|
|
|
43452
43417
|
}
|
|
43453
43418
|
};
|
|
43454
43419
|
//#endregion
|
|
43455
|
-
//#region ../sdk/
|
|
43456
|
-
/**
|
|
43457
|
-
* SDK serializers — convert DB snake_case rows to SDK camelCase shapes.
|
|
43458
|
-
*
|
|
43459
|
-
* Ported 1:1 from apps/neopress/src/lib/api/v1/serializers.ts.
|
|
43460
|
-
* Do NOT change field mappings without updating both files.
|
|
43461
|
-
*/
|
|
43420
|
+
//#region ../sdk/src/serializers.ts
|
|
43462
43421
|
function serializePageFull(page) {
|
|
43463
43422
|
return {
|
|
43464
43423
|
id: page.id,
|
|
@@ -43707,7 +43666,7 @@ function serializeSiteLayout(siteId, layout) {
|
|
|
43707
43666
|
};
|
|
43708
43667
|
}
|
|
43709
43668
|
//#endregion
|
|
43710
|
-
//#region ../sdk/
|
|
43669
|
+
//#region ../sdk/src/endpoints/pages.ts
|
|
43711
43670
|
var PagesEndpoint = class {
|
|
43712
43671
|
client;
|
|
43713
43672
|
constructor(client) {
|
|
@@ -44041,7 +44000,7 @@ function getDefaultLogLevel() {
|
|
|
44041
44000
|
}
|
|
44042
44001
|
getDefaultLogLevel();
|
|
44043
44002
|
//#endregion
|
|
44044
|
-
//#region ../sdk/
|
|
44003
|
+
//#region ../sdk/src/endpoints/collections.ts
|
|
44045
44004
|
var CollectionsEndpoint = class {
|
|
44046
44005
|
client;
|
|
44047
44006
|
constructor(client) {
|
|
@@ -44107,7 +44066,7 @@ var CollectionsEndpoint = class {
|
|
|
44107
44066
|
}
|
|
44108
44067
|
};
|
|
44109
44068
|
//#endregion
|
|
44110
|
-
//#region ../sdk/
|
|
44069
|
+
//#region ../sdk/src/endpoints/entries.ts
|
|
44111
44070
|
var EntriesEndpoint = class {
|
|
44112
44071
|
client;
|
|
44113
44072
|
constructor(client) {
|
|
@@ -44180,7 +44139,7 @@ var EntriesEndpoint = class {
|
|
|
44180
44139
|
}
|
|
44181
44140
|
};
|
|
44182
44141
|
//#endregion
|
|
44183
|
-
//#region ../sdk/
|
|
44142
|
+
//#region ../sdk/src/endpoints/forms.ts
|
|
44184
44143
|
var FormsEndpoint = class {
|
|
44185
44144
|
client;
|
|
44186
44145
|
constructor(client) {
|
|
@@ -44248,7 +44207,7 @@ var FormsEndpoint = class {
|
|
|
44248
44207
|
}
|
|
44249
44208
|
};
|
|
44250
44209
|
//#endregion
|
|
44251
|
-
//#region ../sdk/
|
|
44210
|
+
//#region ../sdk/src/endpoints/assets.ts
|
|
44252
44211
|
var AssetsEndpoint = class {
|
|
44253
44212
|
client;
|
|
44254
44213
|
constructor(client) {
|
|
@@ -44309,7 +44268,7 @@ var AssetsEndpoint = class {
|
|
|
44309
44268
|
}
|
|
44310
44269
|
};
|
|
44311
44270
|
//#endregion
|
|
44312
|
-
//#region ../sdk/
|
|
44271
|
+
//#region ../sdk/src/endpoints/site.ts
|
|
44313
44272
|
var SiteEndpoint = class {
|
|
44314
44273
|
client;
|
|
44315
44274
|
constructor(client) {
|
|
@@ -44354,7 +44313,7 @@ var SiteEndpoint = class {
|
|
|
44354
44313
|
}
|
|
44355
44314
|
};
|
|
44356
44315
|
//#endregion
|
|
44357
|
-
//#region ../sdk/
|
|
44316
|
+
//#region ../sdk/src/endpoints/redirects.ts
|
|
44358
44317
|
const DASHBOARD_ONLY_REWRITE_MESSAGE = "Rewrite proxy rules can only be managed in the dashboard.";
|
|
44359
44318
|
function rejectModeParam(data) {
|
|
44360
44319
|
if (data && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, "mode")) throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
|
|
@@ -44415,7 +44374,7 @@ var RedirectsEndpoint = class {
|
|
|
44415
44374
|
}
|
|
44416
44375
|
};
|
|
44417
44376
|
//#endregion
|
|
44418
|
-
//#region ../sdk/
|
|
44377
|
+
//#region ../sdk/src/endpoints/publish.ts
|
|
44419
44378
|
var PublishEndpoint = class {
|
|
44420
44379
|
client;
|
|
44421
44380
|
constructor(client) {
|
|
@@ -44429,7 +44388,7 @@ var PublishEndpoint = class {
|
|
|
44429
44388
|
}
|
|
44430
44389
|
};
|
|
44431
44390
|
//#endregion
|
|
44432
|
-
//#region ../sdk/
|
|
44391
|
+
//#region ../sdk/src/endpoints/entry-references.ts
|
|
44433
44392
|
var EntryReferencesEndpoint = class {
|
|
44434
44393
|
client;
|
|
44435
44394
|
constructor(client) {
|
|
@@ -44460,7 +44419,7 @@ var EntryReferencesEndpoint = class {
|
|
|
44460
44419
|
}
|
|
44461
44420
|
};
|
|
44462
44421
|
//#endregion
|
|
44463
|
-
//#region ../sdk/
|
|
44422
|
+
//#region ../sdk/src/endpoints/analytics.ts
|
|
44464
44423
|
const RESERVED_ANALYTICS_PARAMS = /* @__PURE__ */ new Set([
|
|
44465
44424
|
"pipe",
|
|
44466
44425
|
"site",
|
|
@@ -44545,7 +44504,7 @@ var AnalyticsEndpoint = class {
|
|
|
44545
44504
|
}
|
|
44546
44505
|
};
|
|
44547
44506
|
//#endregion
|
|
44548
|
-
//#region ../sdk/
|
|
44507
|
+
//#region ../sdk/src/endpoints/templates.ts
|
|
44549
44508
|
var TemplatesEndpoint = class {
|
|
44550
44509
|
client;
|
|
44551
44510
|
constructor(client) {
|
|
@@ -44609,7 +44568,7 @@ var TemplatesEndpoint = class {
|
|
|
44609
44568
|
}
|
|
44610
44569
|
};
|
|
44611
44570
|
//#endregion
|
|
44612
|
-
//#region ../sdk/
|
|
44571
|
+
//#region ../sdk/src/endpoints/headshots.ts
|
|
44613
44572
|
/**
|
|
44614
44573
|
* headshot_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to
|
|
44615
44574
|
* the super-admin user, so these direct-DB calls return empty/forbidden for any
|
|
@@ -44693,7 +44652,7 @@ var HeadshotsEndpoint = class {
|
|
|
44693
44652
|
}
|
|
44694
44653
|
};
|
|
44695
44654
|
//#endregion
|
|
44696
|
-
//#region ../sdk/
|
|
44655
|
+
//#region ../sdk/src/endpoints/logos.ts
|
|
44697
44656
|
/**
|
|
44698
44657
|
* logo_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to the
|
|
44699
44658
|
* super-admin user, so these direct-DB calls return empty/forbidden for any other
|
|
@@ -44783,7 +44742,7 @@ var LogosEndpoint = class {
|
|
|
44783
44742
|
}
|
|
44784
44743
|
};
|
|
44785
44744
|
//#endregion
|
|
44786
|
-
//#region ../sdk/
|
|
44745
|
+
//#region ../sdk/src/client.ts
|
|
44787
44746
|
/**
|
|
44788
44747
|
* @neopress/sdk — API Client
|
|
44789
44748
|
*
|
|
@@ -44860,7 +44819,8 @@ var NeopressClient = class {
|
|
|
44860
44819
|
* header so RLS applies. No session persistence/refresh — token freshness is the
|
|
44861
44820
|
* caller's responsibility (CLI getClientAsync / MCP per-request).
|
|
44862
44821
|
*
|
|
44863
|
-
* `@internal` (with `stripInternal`
|
|
44822
|
+
* `@internal` (with `stripInternal` in the cli/mcp dts configs — sdk itself no
|
|
44823
|
+
* longer emits) keeps this out of the published declarations:
|
|
44864
44824
|
* it is plumbing for the endpoints in this package, and typing it publicly would
|
|
44865
44825
|
* drag `SupabaseClient` + the generated `Database` into the published `.d.ts` of
|
|
44866
44826
|
* `@neopress/cli` / `@neopress/mcp` — packages that declare no dependencies, so
|
|
@@ -45118,7 +45078,7 @@ Use these rules before generating pages, collection schemas, entries, forms, or
|
|
|
45118
45078
|
- Reusable templates are normal Neopress sites marked by a \`templates\` metadata row.
|
|
45119
45079
|
- \`templates.id\` equals \`sites.id\`.
|
|
45120
45080
|
- Build layout, pages, collections, entries, forms, assets, compile, publish, and verify before marking a finished template.
|
|
45121
|
-
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\`.
|
|
45081
|
+
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\` and \`previewVideoUrl\`. The gallery card renders \`previewImgUrls[0]\` at rest and cross-fades to \`previewVideoUrl\` on hover, so the first preview image must be that video's first frame.
|
|
45122
45082
|
- \`referenceUrl\` is a single http(s) provenance URL. \`description\` is an optional summary of the template (max 150 characters).
|
|
45123
45083
|
- Template metadata does not replace page TSX, CMS content, forms, or publish state.
|
|
45124
45084
|
- Use \`neopress_template_delete\` only for explicit template-site hard deletion. It removes the metadata row and connected site.
|
|
@@ -45456,20 +45416,22 @@ const toolDefinitions = [
|
|
|
45456
45416
|
{
|
|
45457
45417
|
name: "neopress_template_mark",
|
|
45458
45418
|
title: "Mark Site As Template",
|
|
45459
|
-
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl.",
|
|
45419
|
+
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl. The gallery card shows previewImgUrls[0] at rest and plays previewVideoUrl on hover, so pass the video together with its own first frame as the first preview image.",
|
|
45460
45420
|
inputSchema: {
|
|
45461
45421
|
...siteIdShape,
|
|
45462
45422
|
name: string(),
|
|
45463
45423
|
description: string().max(150).optional(),
|
|
45464
45424
|
referenceUrl: httpUrlSchema,
|
|
45465
|
-
previewImgUrls: array(string()).min(1)
|
|
45425
|
+
previewImgUrls: array(string()).min(1),
|
|
45426
|
+
previewVideoUrl: httpUrlSchema.optional()
|
|
45466
45427
|
},
|
|
45467
45428
|
handler: async (input, context, extra) => {
|
|
45468
45429
|
return (await context.createClient({ siteId: siteId(input) }, extra)).templates.mark({
|
|
45469
45430
|
name: asString(input, "name"),
|
|
45470
45431
|
description: asOptionalString(input, "description"),
|
|
45471
45432
|
referenceUrl: asString(input, "referenceUrl"),
|
|
45472
|
-
previewImgUrls: input.previewImgUrls
|
|
45433
|
+
previewImgUrls: input.previewImgUrls,
|
|
45434
|
+
previewVideoUrl: asOptionalString(input, "previewVideoUrl")
|
|
45473
45435
|
});
|
|
45474
45436
|
}
|
|
45475
45437
|
},
|
|
@@ -46342,7 +46304,7 @@ function createRemoteToolContext(options) {
|
|
|
46342
46304
|
}
|
|
46343
46305
|
};
|
|
46344
46306
|
}
|
|
46345
|
-
const DEFAULT_CLIENT_TTL_SECONDS =
|
|
46307
|
+
const DEFAULT_CLIENT_TTL_SECONDS = 2592e3;
|
|
46346
46308
|
let generatedClientSecret;
|
|
46347
46309
|
var OAuthProtocolError = class extends Error {
|
|
46348
46310
|
status;
|
|
@@ -46604,7 +46566,7 @@ async function readBody(request) {
|
|
|
46604
46566
|
for await (const chunk of request) {
|
|
46605
46567
|
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
46606
46568
|
size += buffer.byteLength;
|
|
46607
|
-
if (size >
|
|
46569
|
+
if (size > 1048576) throw new OAuthProtocolError(413, "invalid_request", "Request body is too large.");
|
|
46608
46570
|
chunks.push(buffer);
|
|
46609
46571
|
}
|
|
46610
46572
|
return Buffer.concat(chunks).toString("utf-8");
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Server } from "node:http";
|
|
|
4
4
|
import { ServerNotification, ServerRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
5
5
|
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
6
6
|
import { AddressInfo } from "node:net";
|
|
7
|
-
//#region ../sdk/
|
|
7
|
+
//#region ../sdk/src/types.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* @neopress/sdk — First-party API types
|
|
10
10
|
*
|
|
@@ -286,7 +286,7 @@ interface SearchConsoleQueryResult {
|
|
|
286
286
|
error?: string;
|
|
287
287
|
}
|
|
288
288
|
//#endregion
|
|
289
|
-
//#region ../sdk/
|
|
289
|
+
//#region ../sdk/src/endpoints/pages.d.ts
|
|
290
290
|
interface PageListParams {
|
|
291
291
|
page?: number;
|
|
292
292
|
limit?: number;
|
|
@@ -336,7 +336,7 @@ declare class PagesEndpoint {
|
|
|
336
336
|
}>;
|
|
337
337
|
}
|
|
338
338
|
//#endregion
|
|
339
|
-
//#region ../sdk/
|
|
339
|
+
//#region ../sdk/src/endpoints/collections.d.ts
|
|
340
340
|
interface CollectionCreateParams {
|
|
341
341
|
name: string;
|
|
342
342
|
presetType?: string;
|
|
@@ -369,7 +369,7 @@ declare class CollectionsEndpoint {
|
|
|
369
369
|
}>;
|
|
370
370
|
}
|
|
371
371
|
//#endregion
|
|
372
|
-
//#region ../sdk/
|
|
372
|
+
//#region ../sdk/src/endpoints/entries.d.ts
|
|
373
373
|
interface EntryListParams {
|
|
374
374
|
page?: number;
|
|
375
375
|
limit?: number;
|
|
@@ -419,7 +419,7 @@ declare class EntriesEndpoint {
|
|
|
419
419
|
}>;
|
|
420
420
|
}
|
|
421
421
|
//#endregion
|
|
422
|
-
//#region ../sdk/
|
|
422
|
+
//#region ../sdk/src/endpoints/forms.d.ts
|
|
423
423
|
interface FormCreateParams {
|
|
424
424
|
name: string;
|
|
425
425
|
draftSchema?: unknown;
|
|
@@ -459,7 +459,7 @@ declare class FormsEndpoint {
|
|
|
459
459
|
deleteResponse(formId: number, responseId: number): Promise<void>;
|
|
460
460
|
}
|
|
461
461
|
//#endregion
|
|
462
|
-
//#region ../sdk/
|
|
462
|
+
//#region ../sdk/src/endpoints/assets.d.ts
|
|
463
463
|
interface AssetRegisterParams {
|
|
464
464
|
assetUrl: string;
|
|
465
465
|
displayName?: string;
|
|
@@ -496,7 +496,7 @@ declare class AssetsEndpoint {
|
|
|
496
496
|
}>;
|
|
497
497
|
}
|
|
498
498
|
//#endregion
|
|
499
|
-
//#region ../sdk/
|
|
499
|
+
//#region ../sdk/src/endpoints/site.d.ts
|
|
500
500
|
interface SiteWithRole extends Site {
|
|
501
501
|
role: string;
|
|
502
502
|
}
|
|
@@ -531,7 +531,7 @@ declare class SiteEndpoint {
|
|
|
531
531
|
}>;
|
|
532
532
|
}
|
|
533
533
|
//#endregion
|
|
534
|
-
//#region ../sdk/
|
|
534
|
+
//#region ../sdk/src/endpoints/redirects.d.ts
|
|
535
535
|
interface RedirectCreateParams {
|
|
536
536
|
source: string;
|
|
537
537
|
destination: string;
|
|
@@ -553,7 +553,7 @@ declare class RedirectsEndpoint {
|
|
|
553
553
|
delete(ruleId: number): Promise<void>;
|
|
554
554
|
}
|
|
555
555
|
//#endregion
|
|
556
|
-
//#region ../sdk/
|
|
556
|
+
//#region ../sdk/src/endpoints/publish.d.ts
|
|
557
557
|
declare class PublishEndpoint {
|
|
558
558
|
private readonly client;
|
|
559
559
|
constructor(client: NeopressClient);
|
|
@@ -561,7 +561,7 @@ declare class PublishEndpoint {
|
|
|
561
561
|
site(): Promise<unknown>;
|
|
562
562
|
}
|
|
563
563
|
//#endregion
|
|
564
|
-
//#region ../sdk/
|
|
564
|
+
//#region ../sdk/src/endpoints/entry-references.d.ts
|
|
565
565
|
interface EntryReferenceListParams {
|
|
566
566
|
fromEntryId?: number;
|
|
567
567
|
toEntryId?: number;
|
|
@@ -581,7 +581,7 @@ declare class EntryReferencesEndpoint {
|
|
|
581
581
|
delete(referenceId: number): Promise<void>;
|
|
582
582
|
}
|
|
583
583
|
//#endregion
|
|
584
|
-
//#region ../sdk/
|
|
584
|
+
//#region ../sdk/src/endpoints/analytics.d.ts
|
|
585
585
|
declare class AnalyticsEndpoint {
|
|
586
586
|
private readonly client;
|
|
587
587
|
constructor(client: NeopressClient);
|
|
@@ -596,12 +596,16 @@ declare class AnalyticsEndpoint {
|
|
|
596
596
|
searchConsole(params: SearchConsoleQueryParams): Promise<SearchConsoleQueryResult>;
|
|
597
597
|
}
|
|
598
598
|
//#endregion
|
|
599
|
-
//#region ../sdk/
|
|
599
|
+
//#region ../sdk/src/endpoints/templates.d.ts
|
|
600
600
|
interface TemplateMarkParams {
|
|
601
601
|
name: string;
|
|
602
602
|
description?: string | null;
|
|
603
603
|
referenceUrl: string;
|
|
604
604
|
previewImgUrls?: string[] | null;
|
|
605
|
+
/** Gallery hover video. Pair it with the poster in `previewImgUrls[0]` — the
|
|
606
|
+
* card cross-fades from poster to video, so the poster must be the video's
|
|
607
|
+
* first frame. Omit to leave an existing value untouched; `null` clears it. */
|
|
608
|
+
previewVideoUrl?: string | null;
|
|
605
609
|
}
|
|
606
610
|
interface TemplateDeleteResult {
|
|
607
611
|
siteId: number;
|
|
@@ -628,7 +632,7 @@ declare class TemplatesEndpoint {
|
|
|
628
632
|
}): Promise<TemplateListItem[]>;
|
|
629
633
|
}
|
|
630
634
|
//#endregion
|
|
631
|
-
//#region ../sdk/
|
|
635
|
+
//#region ../sdk/src/endpoints/headshots.d.ts
|
|
632
636
|
type HeadshotAgeBand = 'young' | 'middle';
|
|
633
637
|
type HeadshotGender = 'male' | 'female';
|
|
634
638
|
type HeadshotEthnicity = 'asian' | 'white' | 'black' | 'latino';
|
|
@@ -695,7 +699,7 @@ declare class HeadshotsEndpoint {
|
|
|
695
699
|
delete(id: number): Promise<HeadshotDeleteResult>;
|
|
696
700
|
}
|
|
697
701
|
//#endregion
|
|
698
|
-
//#region ../sdk/
|
|
702
|
+
//#region ../sdk/src/endpoints/logos.d.ts
|
|
699
703
|
type LogoType = 'wordmark' | 'lockup' | 'signature';
|
|
700
704
|
type LogoTone = 'playful' | 'neutral' | 'serious';
|
|
701
705
|
interface LogoListParams {
|
|
@@ -766,7 +770,7 @@ declare class LogosEndpoint {
|
|
|
766
770
|
delete(id: number): Promise<LogoDeleteResult>;
|
|
767
771
|
}
|
|
768
772
|
//#endregion
|
|
769
|
-
//#region ../sdk/
|
|
773
|
+
//#region ../sdk/src/client.d.ts
|
|
770
774
|
interface NeopressClientOptions {
|
|
771
775
|
/** OAuth access token */
|
|
772
776
|
accessToken?: string;
|
package/dist/index.js
CHANGED
|
@@ -13359,7 +13359,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13359
13359
|
exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = void 0;
|
|
13360
13360
|
const version_1 = require_version();
|
|
13361
13361
|
/** Current session will be checked for refresh at this interval. */
|
|
13362
|
-
exports.AUTO_REFRESH_TICK_DURATION_MS =
|
|
13362
|
+
exports.AUTO_REFRESH_TICK_DURATION_MS = 3e4;
|
|
13363
13363
|
/**
|
|
13364
13364
|
* A token refresh will be attempted this many ticks before the current session expires. */
|
|
13365
13365
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -13378,7 +13378,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13378
13378
|
name: "2024-01-01"
|
|
13379
13379
|
} };
|
|
13380
13380
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
13381
|
-
exports.JWKS_TTL =
|
|
13381
|
+
exports.JWKS_TTL = 6e5;
|
|
13382
13382
|
}));
|
|
13383
13383
|
//#endregion
|
|
13384
13384
|
//#region ../../node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
@@ -19801,10 +19801,7 @@ var require_GoTrueClient = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19801
19801
|
case "implicit":
|
|
19802
19802
|
if (this.flowType === "pkce") throw new errors_1.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");
|
|
19803
19803
|
break;
|
|
19804
|
-
case "pkce":
|
|
19805
|
-
if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
19806
|
-
break;
|
|
19807
|
-
default:
|
|
19804
|
+
case "pkce": if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
19808
19805
|
}
|
|
19809
19806
|
if (callbackUrlType === "pkce") {
|
|
19810
19807
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
@@ -22812,7 +22809,7 @@ function shouldShowDeprecationWarning() {
|
|
|
22812
22809
|
}
|
|
22813
22810
|
if (shouldShowDeprecationWarning()) console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");
|
|
22814
22811
|
//#endregion
|
|
22815
|
-
//#region ../sdk/
|
|
22812
|
+
//#region ../sdk/src/errors.ts
|
|
22816
22813
|
/**
|
|
22817
22814
|
* SDK error classes
|
|
22818
22815
|
*/
|
|
@@ -22829,13 +22826,7 @@ var NeopressApiError = class extends Error {
|
|
|
22829
22826
|
}
|
|
22830
22827
|
};
|
|
22831
22828
|
//#endregion
|
|
22832
|
-
//#region ../sdk/
|
|
22833
|
-
/**
|
|
22834
|
-
* SDK serializers — convert DB snake_case rows to SDK camelCase shapes.
|
|
22835
|
-
*
|
|
22836
|
-
* Ported 1:1 from apps/neopress/src/lib/api/v1/serializers.ts.
|
|
22837
|
-
* Do NOT change field mappings without updating both files.
|
|
22838
|
-
*/
|
|
22829
|
+
//#region ../sdk/src/serializers.ts
|
|
22839
22830
|
function serializePageFull(page) {
|
|
22840
22831
|
return {
|
|
22841
22832
|
id: page.id,
|
|
@@ -23084,7 +23075,7 @@ function serializeSiteLayout(siteId, layout) {
|
|
|
23084
23075
|
};
|
|
23085
23076
|
}
|
|
23086
23077
|
//#endregion
|
|
23087
|
-
//#region ../sdk/
|
|
23078
|
+
//#region ../sdk/src/endpoints/pages.ts
|
|
23088
23079
|
var PagesEndpoint = class {
|
|
23089
23080
|
client;
|
|
23090
23081
|
constructor(client) {
|
|
@@ -23423,7 +23414,7 @@ function getDefaultLogLevel() {
|
|
|
23423
23414
|
}
|
|
23424
23415
|
getDefaultLogLevel();
|
|
23425
23416
|
//#endregion
|
|
23426
|
-
//#region ../sdk/
|
|
23417
|
+
//#region ../sdk/src/endpoints/collections.ts
|
|
23427
23418
|
var CollectionsEndpoint = class {
|
|
23428
23419
|
client;
|
|
23429
23420
|
constructor(client) {
|
|
@@ -23489,7 +23480,7 @@ var CollectionsEndpoint = class {
|
|
|
23489
23480
|
}
|
|
23490
23481
|
};
|
|
23491
23482
|
//#endregion
|
|
23492
|
-
//#region ../sdk/
|
|
23483
|
+
//#region ../sdk/src/endpoints/entries.ts
|
|
23493
23484
|
var EntriesEndpoint = class {
|
|
23494
23485
|
client;
|
|
23495
23486
|
constructor(client) {
|
|
@@ -23562,7 +23553,7 @@ var EntriesEndpoint = class {
|
|
|
23562
23553
|
}
|
|
23563
23554
|
};
|
|
23564
23555
|
//#endregion
|
|
23565
|
-
//#region ../sdk/
|
|
23556
|
+
//#region ../sdk/src/endpoints/forms.ts
|
|
23566
23557
|
var FormsEndpoint = class {
|
|
23567
23558
|
client;
|
|
23568
23559
|
constructor(client) {
|
|
@@ -23630,7 +23621,7 @@ var FormsEndpoint = class {
|
|
|
23630
23621
|
}
|
|
23631
23622
|
};
|
|
23632
23623
|
//#endregion
|
|
23633
|
-
//#region ../sdk/
|
|
23624
|
+
//#region ../sdk/src/endpoints/assets.ts
|
|
23634
23625
|
var AssetsEndpoint = class {
|
|
23635
23626
|
client;
|
|
23636
23627
|
constructor(client) {
|
|
@@ -23691,7 +23682,7 @@ var AssetsEndpoint = class {
|
|
|
23691
23682
|
}
|
|
23692
23683
|
};
|
|
23693
23684
|
//#endregion
|
|
23694
|
-
//#region ../sdk/
|
|
23685
|
+
//#region ../sdk/src/endpoints/site.ts
|
|
23695
23686
|
var SiteEndpoint = class {
|
|
23696
23687
|
client;
|
|
23697
23688
|
constructor(client) {
|
|
@@ -23736,7 +23727,7 @@ var SiteEndpoint = class {
|
|
|
23736
23727
|
}
|
|
23737
23728
|
};
|
|
23738
23729
|
//#endregion
|
|
23739
|
-
//#region ../sdk/
|
|
23730
|
+
//#region ../sdk/src/endpoints/redirects.ts
|
|
23740
23731
|
const DASHBOARD_ONLY_REWRITE_MESSAGE = "Rewrite proxy rules can only be managed in the dashboard.";
|
|
23741
23732
|
function rejectModeParam(data) {
|
|
23742
23733
|
if (data && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, "mode")) throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
|
|
@@ -23797,7 +23788,7 @@ var RedirectsEndpoint = class {
|
|
|
23797
23788
|
}
|
|
23798
23789
|
};
|
|
23799
23790
|
//#endregion
|
|
23800
|
-
//#region ../sdk/
|
|
23791
|
+
//#region ../sdk/src/endpoints/publish.ts
|
|
23801
23792
|
var PublishEndpoint = class {
|
|
23802
23793
|
client;
|
|
23803
23794
|
constructor(client) {
|
|
@@ -23811,7 +23802,7 @@ var PublishEndpoint = class {
|
|
|
23811
23802
|
}
|
|
23812
23803
|
};
|
|
23813
23804
|
//#endregion
|
|
23814
|
-
//#region ../sdk/
|
|
23805
|
+
//#region ../sdk/src/endpoints/entry-references.ts
|
|
23815
23806
|
var EntryReferencesEndpoint = class {
|
|
23816
23807
|
client;
|
|
23817
23808
|
constructor(client) {
|
|
@@ -23842,7 +23833,7 @@ var EntryReferencesEndpoint = class {
|
|
|
23842
23833
|
}
|
|
23843
23834
|
};
|
|
23844
23835
|
//#endregion
|
|
23845
|
-
//#region ../sdk/
|
|
23836
|
+
//#region ../sdk/src/endpoints/analytics.ts
|
|
23846
23837
|
const RESERVED_ANALYTICS_PARAMS = /* @__PURE__ */ new Set([
|
|
23847
23838
|
"pipe",
|
|
23848
23839
|
"site",
|
|
@@ -23927,7 +23918,7 @@ var AnalyticsEndpoint = class {
|
|
|
23927
23918
|
}
|
|
23928
23919
|
};
|
|
23929
23920
|
//#endregion
|
|
23930
|
-
//#region ../sdk/
|
|
23921
|
+
//#region ../sdk/src/endpoints/templates.ts
|
|
23931
23922
|
var TemplatesEndpoint = class {
|
|
23932
23923
|
client;
|
|
23933
23924
|
constructor(client) {
|
|
@@ -23991,7 +23982,7 @@ var TemplatesEndpoint = class {
|
|
|
23991
23982
|
}
|
|
23992
23983
|
};
|
|
23993
23984
|
//#endregion
|
|
23994
|
-
//#region ../sdk/
|
|
23985
|
+
//#region ../sdk/src/endpoints/headshots.ts
|
|
23995
23986
|
/**
|
|
23996
23987
|
* headshot_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to
|
|
23997
23988
|
* the super-admin user, so these direct-DB calls return empty/forbidden for any
|
|
@@ -24075,7 +24066,7 @@ var HeadshotsEndpoint = class {
|
|
|
24075
24066
|
}
|
|
24076
24067
|
};
|
|
24077
24068
|
//#endregion
|
|
24078
|
-
//#region ../sdk/
|
|
24069
|
+
//#region ../sdk/src/endpoints/logos.ts
|
|
24079
24070
|
/**
|
|
24080
24071
|
* logo_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to the
|
|
24081
24072
|
* super-admin user, so these direct-DB calls return empty/forbidden for any other
|
|
@@ -24165,7 +24156,7 @@ var LogosEndpoint = class {
|
|
|
24165
24156
|
}
|
|
24166
24157
|
};
|
|
24167
24158
|
//#endregion
|
|
24168
|
-
//#region ../sdk/
|
|
24159
|
+
//#region ../sdk/src/client.ts
|
|
24169
24160
|
/**
|
|
24170
24161
|
* @neopress/sdk — API Client
|
|
24171
24162
|
*
|
|
@@ -24242,7 +24233,8 @@ var NeopressClient = class {
|
|
|
24242
24233
|
* header so RLS applies. No session persistence/refresh — token freshness is the
|
|
24243
24234
|
* caller's responsibility (CLI getClientAsync / MCP per-request).
|
|
24244
24235
|
*
|
|
24245
|
-
* `@internal` (with `stripInternal`
|
|
24236
|
+
* `@internal` (with `stripInternal` in the cli/mcp dts configs — sdk itself no
|
|
24237
|
+
* longer emits) keeps this out of the published declarations:
|
|
24246
24238
|
* it is plumbing for the endpoints in this package, and typing it publicly would
|
|
24247
24239
|
* drag `SupabaseClient` + the generated `Database` into the published `.d.ts` of
|
|
24248
24240
|
* `@neopress/cli` / `@neopress/mcp` — packages that declare no dependencies, so
|
|
@@ -24500,7 +24492,7 @@ Use these rules before generating pages, collection schemas, entries, forms, or
|
|
|
24500
24492
|
- Reusable templates are normal Neopress sites marked by a \`templates\` metadata row.
|
|
24501
24493
|
- \`templates.id\` equals \`sites.id\`.
|
|
24502
24494
|
- Build layout, pages, collections, entries, forms, assets, compile, publish, and verify before marking a finished template.
|
|
24503
|
-
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\`.
|
|
24495
|
+
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\` and \`previewVideoUrl\`. The gallery card renders \`previewImgUrls[0]\` at rest and cross-fades to \`previewVideoUrl\` on hover, so the first preview image must be that video's first frame.
|
|
24504
24496
|
- \`referenceUrl\` is a single http(s) provenance URL. \`description\` is an optional summary of the template (max 150 characters).
|
|
24505
24497
|
- Template metadata does not replace page TSX, CMS content, forms, or publish state.
|
|
24506
24498
|
- Use \`neopress_template_delete\` only for explicit template-site hard deletion. It removes the metadata row and connected site.
|
|
@@ -24838,20 +24830,22 @@ const toolDefinitions = [
|
|
|
24838
24830
|
{
|
|
24839
24831
|
name: "neopress_template_mark",
|
|
24840
24832
|
title: "Mark Site As Template",
|
|
24841
|
-
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl.",
|
|
24833
|
+
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl. The gallery card shows previewImgUrls[0] at rest and plays previewVideoUrl on hover, so pass the video together with its own first frame as the first preview image.",
|
|
24842
24834
|
inputSchema: {
|
|
24843
24835
|
...siteIdShape,
|
|
24844
24836
|
name: z.string(),
|
|
24845
24837
|
description: z.string().max(150).optional(),
|
|
24846
24838
|
referenceUrl: httpUrlSchema,
|
|
24847
|
-
previewImgUrls: z.array(z.string()).min(1)
|
|
24839
|
+
previewImgUrls: z.array(z.string()).min(1),
|
|
24840
|
+
previewVideoUrl: httpUrlSchema.optional()
|
|
24848
24841
|
},
|
|
24849
24842
|
handler: async (input, context, extra) => {
|
|
24850
24843
|
return (await context.createClient({ siteId: siteId(input) }, extra)).templates.mark({
|
|
24851
24844
|
name: asString(input, "name"),
|
|
24852
24845
|
description: asOptionalString(input, "description"),
|
|
24853
24846
|
referenceUrl: asString(input, "referenceUrl"),
|
|
24854
|
-
previewImgUrls: input.previewImgUrls
|
|
24847
|
+
previewImgUrls: input.previewImgUrls,
|
|
24848
|
+
previewVideoUrl: asOptionalString(input, "previewVideoUrl")
|
|
24855
24849
|
});
|
|
24856
24850
|
}
|
|
24857
24851
|
},
|
|
@@ -25724,7 +25718,7 @@ function createRemoteToolContext(options) {
|
|
|
25724
25718
|
}
|
|
25725
25719
|
};
|
|
25726
25720
|
}
|
|
25727
|
-
const DEFAULT_CLIENT_TTL_SECONDS =
|
|
25721
|
+
const DEFAULT_CLIENT_TTL_SECONDS = 2592e3;
|
|
25728
25722
|
let generatedClientSecret;
|
|
25729
25723
|
var OAuthProtocolError = class extends Error {
|
|
25730
25724
|
status;
|
|
@@ -25986,7 +25980,7 @@ async function readBody(request) {
|
|
|
25986
25980
|
for await (const chunk of request) {
|
|
25987
25981
|
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
25988
25982
|
size += buffer.byteLength;
|
|
25989
|
-
if (size >
|
|
25983
|
+
if (size > 1048576) throw new OAuthProtocolError(413, "invalid_request", "Request body is too large.");
|
|
25990
25984
|
chunks.push(buffer);
|
|
25991
25985
|
}
|
|
25992
25986
|
return Buffer.concat(chunks).toString("utf-8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neopress/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Neopress MCP server for first-party AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@neopress/sdk": "0.4.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
-
"build": "tsdown && node ./scripts/check-dist-contract.mjs",
|
|
42
|
+
"build": "NODE_OPTIONS=--max-old-space-size=4096 tsdown && node ./scripts/check-dist-contract.mjs",
|
|
43
43
|
"mcpb:stage": "node ./scripts/prepare-mcpb-package.mjs",
|
|
44
44
|
"start:http": "node ./dist/http-bin.cjs",
|
|
45
45
|
"lint": "tsc --noEmit",
|
|
@@ -33,7 +33,7 @@ if (missing.length > 0) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// Every emitted bundle must have the workspace packages inlined. tsdown reports an
|
|
36
|
-
// unresolved import (
|
|
36
|
+
// unresolved import (an sdk src file that fails to resolve, say) as a *warning* and still exits 0,
|
|
37
37
|
// which would publish a binary carrying a bare require("@neopress/sdk") that no consumer
|
|
38
38
|
// can resolve. Checking the .d.ts alone does not see this.
|
|
39
39
|
for (const file of actualFiles.filter((f) => /\.(cjs|js|mjs)$/.test(f))) {
|
|
@@ -46,8 +46,9 @@ for (const file of actualFiles.filter((f) => /\.(cjs|js|mjs)$/.test(f))) {
|
|
|
46
46
|
if (leaked.length > 0) {
|
|
47
47
|
errors.push(
|
|
48
48
|
`dist/${file} still imports workspace packages at runtime: ${leaked.join(', ')}\n` +
|
|
49
|
-
` They must be bundled.
|
|
50
|
-
`
|
|
49
|
+
` They must be bundled. tsdown only warns on unresolved imports, so a bare\n` +
|
|
50
|
+
` require would ship — sdk exports src directly, so this means the import failed\n` +
|
|
51
|
+
` to resolve (renamed source file or export-map drift), not a missing prebuild.`
|
|
51
52
|
);
|
|
52
53
|
}
|
|
53
54
|
}
|