@neopress/cli 4.7.0 → 4.8.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 +30 -36
- package/dist/index.d.ts +19 -15
- package/dist/index.js +21 -29
- package/package.json +2 -2
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));
|
|
@@ -115,7 +115,6 @@ var require_argument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
115
115
|
default:
|
|
116
116
|
this.required = true;
|
|
117
117
|
this._name = name;
|
|
118
|
-
break;
|
|
119
118
|
}
|
|
120
119
|
if (this._name.length > 3 && this._name.slice(-3) === "...") {
|
|
121
120
|
this.variadic = true;
|
|
@@ -3181,7 +3180,7 @@ function generateCodeChallenge(verifier) {
|
|
|
3181
3180
|
* 3. Shows success page in browser
|
|
3182
3181
|
* 4. Returns code to the CLI process
|
|
3183
3182
|
*/
|
|
3184
|
-
const TIMEOUT_MS =
|
|
3183
|
+
const TIMEOUT_MS = 3e5;
|
|
3185
3184
|
const SUCCESS_HTML = `<!DOCTYPE html>
|
|
3186
3185
|
<html>
|
|
3187
3186
|
<head><meta charset="utf-8"><title>Neopress CLI</title>
|
|
@@ -16780,7 +16779,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16780
16779
|
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;
|
|
16781
16780
|
const version_1 = require_version();
|
|
16782
16781
|
/** Current session will be checked for refresh at this interval. */
|
|
16783
|
-
exports.AUTO_REFRESH_TICK_DURATION_MS =
|
|
16782
|
+
exports.AUTO_REFRESH_TICK_DURATION_MS = 3e4;
|
|
16784
16783
|
/**
|
|
16785
16784
|
* A token refresh will be attempted this many ticks before the current session expires. */
|
|
16786
16785
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -16799,7 +16798,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16799
16798
|
name: "2024-01-01"
|
|
16800
16799
|
} };
|
|
16801
16800
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
16802
|
-
exports.JWKS_TTL =
|
|
16801
|
+
exports.JWKS_TTL = 6e5;
|
|
16803
16802
|
}));
|
|
16804
16803
|
//#endregion
|
|
16805
16804
|
//#region ../../node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
@@ -23222,10 +23221,7 @@ var require_GoTrueClient = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
23222
23221
|
case "implicit":
|
|
23223
23222
|
if (this.flowType === "pkce") throw new errors_1.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");
|
|
23224
23223
|
break;
|
|
23225
|
-
case "pkce":
|
|
23226
|
-
if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
23227
|
-
break;
|
|
23228
|
-
default:
|
|
23224
|
+
case "pkce": if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
23229
23225
|
}
|
|
23230
23226
|
if (callbackUrlType === "pkce") {
|
|
23231
23227
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
@@ -26233,7 +26229,7 @@ function shouldShowDeprecationWarning() {
|
|
|
26233
26229
|
}
|
|
26234
26230
|
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");
|
|
26235
26231
|
//#endregion
|
|
26236
|
-
//#region ../sdk/
|
|
26232
|
+
//#region ../sdk/src/errors.ts
|
|
26237
26233
|
/**
|
|
26238
26234
|
* SDK error classes
|
|
26239
26235
|
*/
|
|
@@ -26250,13 +26246,7 @@ var NeopressApiError = class extends Error {
|
|
|
26250
26246
|
}
|
|
26251
26247
|
};
|
|
26252
26248
|
//#endregion
|
|
26253
|
-
//#region ../sdk/
|
|
26254
|
-
/**
|
|
26255
|
-
* SDK serializers — convert DB snake_case rows to SDK camelCase shapes.
|
|
26256
|
-
*
|
|
26257
|
-
* Ported 1:1 from apps/neopress/src/lib/api/v1/serializers.ts.
|
|
26258
|
-
* Do NOT change field mappings without updating both files.
|
|
26259
|
-
*/
|
|
26249
|
+
//#region ../sdk/src/serializers.ts
|
|
26260
26250
|
function serializePageFull(page) {
|
|
26261
26251
|
return {
|
|
26262
26252
|
id: page.id,
|
|
@@ -26505,7 +26495,7 @@ function serializeSiteLayout(siteId, layout) {
|
|
|
26505
26495
|
};
|
|
26506
26496
|
}
|
|
26507
26497
|
//#endregion
|
|
26508
|
-
//#region ../sdk/
|
|
26498
|
+
//#region ../sdk/src/endpoints/pages.ts
|
|
26509
26499
|
var PagesEndpoint = class {
|
|
26510
26500
|
client;
|
|
26511
26501
|
constructor(client) {
|
|
@@ -29902,7 +29892,7 @@ function getDefaultLogLevel() {
|
|
|
29902
29892
|
}
|
|
29903
29893
|
getDefaultLogLevel();
|
|
29904
29894
|
//#endregion
|
|
29905
|
-
//#region ../sdk/
|
|
29895
|
+
//#region ../sdk/src/endpoints/collections.ts
|
|
29906
29896
|
var CollectionsEndpoint = class {
|
|
29907
29897
|
client;
|
|
29908
29898
|
constructor(client) {
|
|
@@ -29968,7 +29958,7 @@ var CollectionsEndpoint = class {
|
|
|
29968
29958
|
}
|
|
29969
29959
|
};
|
|
29970
29960
|
//#endregion
|
|
29971
|
-
//#region ../sdk/
|
|
29961
|
+
//#region ../sdk/src/endpoints/entries.ts
|
|
29972
29962
|
var EntriesEndpoint = class {
|
|
29973
29963
|
client;
|
|
29974
29964
|
constructor(client) {
|
|
@@ -30041,7 +30031,7 @@ var EntriesEndpoint = class {
|
|
|
30041
30031
|
}
|
|
30042
30032
|
};
|
|
30043
30033
|
//#endregion
|
|
30044
|
-
//#region ../sdk/
|
|
30034
|
+
//#region ../sdk/src/endpoints/forms.ts
|
|
30045
30035
|
var FormsEndpoint = class {
|
|
30046
30036
|
client;
|
|
30047
30037
|
constructor(client) {
|
|
@@ -30109,7 +30099,7 @@ var FormsEndpoint = class {
|
|
|
30109
30099
|
}
|
|
30110
30100
|
};
|
|
30111
30101
|
//#endregion
|
|
30112
|
-
//#region ../sdk/
|
|
30102
|
+
//#region ../sdk/src/endpoints/assets.ts
|
|
30113
30103
|
var AssetsEndpoint = class {
|
|
30114
30104
|
client;
|
|
30115
30105
|
constructor(client) {
|
|
@@ -30170,7 +30160,7 @@ var AssetsEndpoint = class {
|
|
|
30170
30160
|
}
|
|
30171
30161
|
};
|
|
30172
30162
|
//#endregion
|
|
30173
|
-
//#region ../sdk/
|
|
30163
|
+
//#region ../sdk/src/endpoints/site.ts
|
|
30174
30164
|
var SiteEndpoint = class {
|
|
30175
30165
|
client;
|
|
30176
30166
|
constructor(client) {
|
|
@@ -30215,7 +30205,7 @@ var SiteEndpoint = class {
|
|
|
30215
30205
|
}
|
|
30216
30206
|
};
|
|
30217
30207
|
//#endregion
|
|
30218
|
-
//#region ../sdk/
|
|
30208
|
+
//#region ../sdk/src/endpoints/redirects.ts
|
|
30219
30209
|
const DASHBOARD_ONLY_REWRITE_MESSAGE = "Rewrite proxy rules can only be managed in the dashboard.";
|
|
30220
30210
|
function rejectModeParam(data) {
|
|
30221
30211
|
if (data && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, "mode")) throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
|
|
@@ -30276,7 +30266,7 @@ var RedirectsEndpoint = class {
|
|
|
30276
30266
|
}
|
|
30277
30267
|
};
|
|
30278
30268
|
//#endregion
|
|
30279
|
-
//#region ../sdk/
|
|
30269
|
+
//#region ../sdk/src/endpoints/publish.ts
|
|
30280
30270
|
var PublishEndpoint = class {
|
|
30281
30271
|
client;
|
|
30282
30272
|
constructor(client) {
|
|
@@ -30290,7 +30280,7 @@ var PublishEndpoint = class {
|
|
|
30290
30280
|
}
|
|
30291
30281
|
};
|
|
30292
30282
|
//#endregion
|
|
30293
|
-
//#region ../sdk/
|
|
30283
|
+
//#region ../sdk/src/endpoints/entry-references.ts
|
|
30294
30284
|
var EntryReferencesEndpoint = class {
|
|
30295
30285
|
client;
|
|
30296
30286
|
constructor(client) {
|
|
@@ -30321,7 +30311,7 @@ var EntryReferencesEndpoint = class {
|
|
|
30321
30311
|
}
|
|
30322
30312
|
};
|
|
30323
30313
|
//#endregion
|
|
30324
|
-
//#region ../sdk/
|
|
30314
|
+
//#region ../sdk/src/endpoints/analytics.ts
|
|
30325
30315
|
const RESERVED_ANALYTICS_PARAMS = /* @__PURE__ */ new Set([
|
|
30326
30316
|
"pipe",
|
|
30327
30317
|
"site",
|
|
@@ -30406,7 +30396,7 @@ var AnalyticsEndpoint = class {
|
|
|
30406
30396
|
}
|
|
30407
30397
|
};
|
|
30408
30398
|
//#endregion
|
|
30409
|
-
//#region ../sdk/
|
|
30399
|
+
//#region ../sdk/src/endpoints/templates.ts
|
|
30410
30400
|
var TemplatesEndpoint = class {
|
|
30411
30401
|
client;
|
|
30412
30402
|
constructor(client) {
|
|
@@ -30470,7 +30460,7 @@ var TemplatesEndpoint = class {
|
|
|
30470
30460
|
}
|
|
30471
30461
|
};
|
|
30472
30462
|
//#endregion
|
|
30473
|
-
//#region ../sdk/
|
|
30463
|
+
//#region ../sdk/src/endpoints/headshots.ts
|
|
30474
30464
|
/**
|
|
30475
30465
|
* headshot_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to
|
|
30476
30466
|
* the super-admin user, so these direct-DB calls return empty/forbidden for any
|
|
@@ -30554,7 +30544,7 @@ var HeadshotsEndpoint = class {
|
|
|
30554
30544
|
}
|
|
30555
30545
|
};
|
|
30556
30546
|
//#endregion
|
|
30557
|
-
//#region ../sdk/
|
|
30547
|
+
//#region ../sdk/src/endpoints/logos.ts
|
|
30558
30548
|
/**
|
|
30559
30549
|
* logo_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to the
|
|
30560
30550
|
* super-admin user, so these direct-DB calls return empty/forbidden for any other
|
|
@@ -30644,7 +30634,7 @@ var LogosEndpoint = class {
|
|
|
30644
30634
|
}
|
|
30645
30635
|
};
|
|
30646
30636
|
//#endregion
|
|
30647
|
-
//#region ../sdk/
|
|
30637
|
+
//#region ../sdk/src/client.ts
|
|
30648
30638
|
/**
|
|
30649
30639
|
* @neopress/sdk — API Client
|
|
30650
30640
|
*
|
|
@@ -30721,7 +30711,8 @@ var NeopressClient = class {
|
|
|
30721
30711
|
* header so RLS applies. No session persistence/refresh — token freshness is the
|
|
30722
30712
|
* caller's responsibility (CLI getClientAsync / MCP per-request).
|
|
30723
30713
|
*
|
|
30724
|
-
* `@internal` (with `stripInternal`
|
|
30714
|
+
* `@internal` (with `stripInternal` in the cli/mcp dts configs — sdk itself no
|
|
30715
|
+
* longer emits) keeps this out of the published declarations:
|
|
30725
30716
|
* it is plumbing for the endpoints in this package, and typing it publicly would
|
|
30726
30717
|
* drag `SupabaseClient` + the generated `Database` into the published `.d.ts` of
|
|
30727
30718
|
* `@neopress/cli` / `@neopress/mcp` — packages that declare no dependencies, so
|
|
@@ -31312,7 +31303,8 @@ Examples:
|
|
|
31312
31303
|
webp: "image/webp",
|
|
31313
31304
|
svg: "image/svg+xml",
|
|
31314
31305
|
pdf: "application/pdf",
|
|
31315
|
-
mp4: "video/mp4"
|
|
31306
|
+
mp4: "video/mp4",
|
|
31307
|
+
webm: "video/webm"
|
|
31316
31308
|
}[fileName.split(".").pop()?.toLowerCase() || ""] || "application/octet-stream";
|
|
31317
31309
|
const fileKey = `${options.folder || "uploads"}/${Date.now()}-${fileName}`;
|
|
31318
31310
|
const { presignedUrl, publicUrl } = await client.assets.presign({
|
|
@@ -31559,12 +31551,14 @@ Examples:
|
|
|
31559
31551
|
Examples:
|
|
31560
31552
|
$ neopress templates mark --name "SaaS Landing" --reference-url https://example.com --preview-img-url https://cdn.example.com/1.png
|
|
31561
31553
|
$ neopress templates mark --name Portfolio --reference-url https://example.com --preview-img-url https://cdn.example.com/a.png --preview-img-url https://cdn.example.com/b.png --description "Minimal portfolio"
|
|
31562
|
-
--name
|
|
31554
|
+
$ neopress templates mark --name "SaaS Landing" --reference-url https://example.com --preview-img-url https://cdn.example.com/poster.webp --preview-video-url https://cdn.example.com/preview.webm
|
|
31555
|
+
--name and --reference-url are required, and at least one --preview-img-url must be given (repeat the flag for multiple images). --preview-video-url is the gallery hover video; pair it with the poster (its first frame) as the first --preview-img-url. Upserts the template metadata for the active site and sets the site status to active; running it again updates the existing template.`).requiredOption("--name <name>", "Template display name").option("--description <description>", "Template description, up to 150 characters").requiredOption("--reference-url <url>", "Reference URL for template provenance").option("--preview-img-url <url>", "Preview image URL (required — at least one). Repeat for multiple images.", collectPreviewImgUrl, []).option("--preview-video-url <url>", "Preview video URL played on gallery hover. The first --preview-img-url should be this video's first frame.").action(async (options) => {
|
|
31563
31556
|
output(await (await getClientAsync()).templates.mark({
|
|
31564
31557
|
name: options.name,
|
|
31565
31558
|
description: options.description,
|
|
31566
31559
|
referenceUrl: options.referenceUrl,
|
|
31567
|
-
previewImgUrls: options.previewImgUrl.length > 0 ? options.previewImgUrl : void 0
|
|
31560
|
+
previewImgUrls: options.previewImgUrl.length > 0 ? options.previewImgUrl : void 0,
|
|
31561
|
+
previewVideoUrl: options.previewVideoUrl
|
|
31568
31562
|
}));
|
|
31569
31563
|
});
|
|
31570
31564
|
templates.command("delete").description("Delete the active template metadata row and linked site").action(async () => {
|
|
@@ -31919,7 +31913,7 @@ function registerGuideCommands(program) {
|
|
|
31919
31913
|
* Designed for use with Claude Code and other AI tools via --json mode.
|
|
31920
31914
|
*/
|
|
31921
31915
|
const program = new Command();
|
|
31922
|
-
program.name("neopress").description("Neopress CLI — manage your site from the terminal").version("4.
|
|
31916
|
+
program.name("neopress").description("Neopress CLI — manage your site from the terminal").version("4.8.1").option("--json", "Output in JSON format (for AI tools and pipes)").option("--site <idOrHandle>", "Target a specific site (overrides active site; not persisted)").option("--no-input", "Non-interactive mode").hook("preAction", (thisCommand) => {
|
|
31923
31917
|
const opts = thisCommand.optsWithGlobals();
|
|
31924
31918
|
if (opts.site) setSiteOverride(String(opts.site));
|
|
31925
31919
|
if (opts.json || !process.stdout.isTTY) setJsonMode(true);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../sdk/
|
|
1
|
+
//#region ../sdk/src/types.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* @neopress/sdk — First-party API types
|
|
4
4
|
*
|
|
@@ -280,7 +280,7 @@ interface SearchConsoleQueryResult {
|
|
|
280
280
|
error?: string;
|
|
281
281
|
}
|
|
282
282
|
//#endregion
|
|
283
|
-
//#region ../sdk/
|
|
283
|
+
//#region ../sdk/src/endpoints/pages.d.ts
|
|
284
284
|
interface PageListParams {
|
|
285
285
|
page?: number;
|
|
286
286
|
limit?: number;
|
|
@@ -330,7 +330,7 @@ declare class PagesEndpoint {
|
|
|
330
330
|
}>;
|
|
331
331
|
}
|
|
332
332
|
//#endregion
|
|
333
|
-
//#region ../sdk/
|
|
333
|
+
//#region ../sdk/src/endpoints/collections.d.ts
|
|
334
334
|
interface CollectionCreateParams {
|
|
335
335
|
name: string;
|
|
336
336
|
presetType?: string;
|
|
@@ -363,7 +363,7 @@ declare class CollectionsEndpoint {
|
|
|
363
363
|
}>;
|
|
364
364
|
}
|
|
365
365
|
//#endregion
|
|
366
|
-
//#region ../sdk/
|
|
366
|
+
//#region ../sdk/src/endpoints/entries.d.ts
|
|
367
367
|
interface EntryListParams {
|
|
368
368
|
page?: number;
|
|
369
369
|
limit?: number;
|
|
@@ -413,7 +413,7 @@ declare class EntriesEndpoint {
|
|
|
413
413
|
}>;
|
|
414
414
|
}
|
|
415
415
|
//#endregion
|
|
416
|
-
//#region ../sdk/
|
|
416
|
+
//#region ../sdk/src/endpoints/forms.d.ts
|
|
417
417
|
interface FormCreateParams {
|
|
418
418
|
name: string;
|
|
419
419
|
draftSchema?: unknown;
|
|
@@ -453,7 +453,7 @@ declare class FormsEndpoint {
|
|
|
453
453
|
deleteResponse(formId: number, responseId: number): Promise<void>;
|
|
454
454
|
}
|
|
455
455
|
//#endregion
|
|
456
|
-
//#region ../sdk/
|
|
456
|
+
//#region ../sdk/src/endpoints/assets.d.ts
|
|
457
457
|
interface AssetRegisterParams {
|
|
458
458
|
assetUrl: string;
|
|
459
459
|
displayName?: string;
|
|
@@ -490,7 +490,7 @@ declare class AssetsEndpoint {
|
|
|
490
490
|
}>;
|
|
491
491
|
}
|
|
492
492
|
//#endregion
|
|
493
|
-
//#region ../sdk/
|
|
493
|
+
//#region ../sdk/src/endpoints/site.d.ts
|
|
494
494
|
interface SiteWithRole extends Site {
|
|
495
495
|
role: string;
|
|
496
496
|
}
|
|
@@ -525,7 +525,7 @@ declare class SiteEndpoint {
|
|
|
525
525
|
}>;
|
|
526
526
|
}
|
|
527
527
|
//#endregion
|
|
528
|
-
//#region ../sdk/
|
|
528
|
+
//#region ../sdk/src/endpoints/redirects.d.ts
|
|
529
529
|
interface RedirectCreateParams {
|
|
530
530
|
source: string;
|
|
531
531
|
destination: string;
|
|
@@ -547,7 +547,7 @@ declare class RedirectsEndpoint {
|
|
|
547
547
|
delete(ruleId: number): Promise<void>;
|
|
548
548
|
}
|
|
549
549
|
//#endregion
|
|
550
|
-
//#region ../sdk/
|
|
550
|
+
//#region ../sdk/src/endpoints/publish.d.ts
|
|
551
551
|
declare class PublishEndpoint {
|
|
552
552
|
private readonly client;
|
|
553
553
|
constructor(client: NeopressClient);
|
|
@@ -555,7 +555,7 @@ declare class PublishEndpoint {
|
|
|
555
555
|
site(): Promise<unknown>;
|
|
556
556
|
}
|
|
557
557
|
//#endregion
|
|
558
|
-
//#region ../sdk/
|
|
558
|
+
//#region ../sdk/src/endpoints/entry-references.d.ts
|
|
559
559
|
interface EntryReferenceListParams {
|
|
560
560
|
fromEntryId?: number;
|
|
561
561
|
toEntryId?: number;
|
|
@@ -575,7 +575,7 @@ declare class EntryReferencesEndpoint {
|
|
|
575
575
|
delete(referenceId: number): Promise<void>;
|
|
576
576
|
}
|
|
577
577
|
//#endregion
|
|
578
|
-
//#region ../sdk/
|
|
578
|
+
//#region ../sdk/src/endpoints/analytics.d.ts
|
|
579
579
|
declare class AnalyticsEndpoint {
|
|
580
580
|
private readonly client;
|
|
581
581
|
constructor(client: NeopressClient);
|
|
@@ -590,12 +590,16 @@ declare class AnalyticsEndpoint {
|
|
|
590
590
|
searchConsole(params: SearchConsoleQueryParams): Promise<SearchConsoleQueryResult>;
|
|
591
591
|
}
|
|
592
592
|
//#endregion
|
|
593
|
-
//#region ../sdk/
|
|
593
|
+
//#region ../sdk/src/endpoints/templates.d.ts
|
|
594
594
|
interface TemplateMarkParams {
|
|
595
595
|
name: string;
|
|
596
596
|
description?: string | null;
|
|
597
597
|
referenceUrl: string;
|
|
598
598
|
previewImgUrls?: string[] | null;
|
|
599
|
+
/** Gallery hover video. Pair it with the poster in `previewImgUrls[0]` — the
|
|
600
|
+
* card cross-fades from poster to video, so the poster must be the video's
|
|
601
|
+
* first frame. Omit to leave an existing value untouched; `null` clears it. */
|
|
602
|
+
previewVideoUrl?: string | null;
|
|
599
603
|
}
|
|
600
604
|
interface TemplateDeleteResult {
|
|
601
605
|
siteId: number;
|
|
@@ -622,7 +626,7 @@ declare class TemplatesEndpoint {
|
|
|
622
626
|
}): Promise<TemplateListItem[]>;
|
|
623
627
|
}
|
|
624
628
|
//#endregion
|
|
625
|
-
//#region ../sdk/
|
|
629
|
+
//#region ../sdk/src/endpoints/headshots.d.ts
|
|
626
630
|
type HeadshotAgeBand = 'young' | 'middle';
|
|
627
631
|
type HeadshotGender = 'male' | 'female';
|
|
628
632
|
type HeadshotEthnicity = 'asian' | 'white' | 'black' | 'latino';
|
|
@@ -689,7 +693,7 @@ declare class HeadshotsEndpoint {
|
|
|
689
693
|
delete(id: number): Promise<HeadshotDeleteResult>;
|
|
690
694
|
}
|
|
691
695
|
//#endregion
|
|
692
|
-
//#region ../sdk/
|
|
696
|
+
//#region ../sdk/src/endpoints/logos.d.ts
|
|
693
697
|
type LogoType = 'wordmark' | 'lockup' | 'signature';
|
|
694
698
|
type LogoTone = 'playful' | 'neutral' | 'serious';
|
|
695
699
|
interface LogoListParams {
|
|
@@ -760,7 +764,7 @@ declare class LogosEndpoint {
|
|
|
760
764
|
delete(id: number): Promise<LogoDeleteResult>;
|
|
761
765
|
}
|
|
762
766
|
//#endregion
|
|
763
|
-
//#region ../sdk/
|
|
767
|
+
//#region ../sdk/src/client.d.ts
|
|
764
768
|
interface NeopressClientOptions {
|
|
765
769
|
/** OAuth access token */
|
|
766
770
|
accessToken?: string;
|
package/dist/index.js
CHANGED
|
@@ -13354,7 +13354,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13354
13354
|
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;
|
|
13355
13355
|
const version_1 = require_version();
|
|
13356
13356
|
/** Current session will be checked for refresh at this interval. */
|
|
13357
|
-
exports.AUTO_REFRESH_TICK_DURATION_MS =
|
|
13357
|
+
exports.AUTO_REFRESH_TICK_DURATION_MS = 3e4;
|
|
13358
13358
|
/**
|
|
13359
13359
|
* A token refresh will be attempted this many ticks before the current session expires. */
|
|
13360
13360
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -13373,7 +13373,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13373
13373
|
name: "2024-01-01"
|
|
13374
13374
|
} };
|
|
13375
13375
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
13376
|
-
exports.JWKS_TTL =
|
|
13376
|
+
exports.JWKS_TTL = 6e5;
|
|
13377
13377
|
}));
|
|
13378
13378
|
//#endregion
|
|
13379
13379
|
//#region ../../node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
@@ -19796,10 +19796,7 @@ var require_GoTrueClient = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19796
19796
|
case "implicit":
|
|
19797
19797
|
if (this.flowType === "pkce") throw new errors_1.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");
|
|
19798
19798
|
break;
|
|
19799
|
-
case "pkce":
|
|
19800
|
-
if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
19801
|
-
break;
|
|
19802
|
-
default:
|
|
19799
|
+
case "pkce": if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
19803
19800
|
}
|
|
19804
19801
|
if (callbackUrlType === "pkce") {
|
|
19805
19802
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
@@ -22807,7 +22804,7 @@ function shouldShowDeprecationWarning() {
|
|
|
22807
22804
|
}
|
|
22808
22805
|
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");
|
|
22809
22806
|
//#endregion
|
|
22810
|
-
//#region ../sdk/
|
|
22807
|
+
//#region ../sdk/src/errors.ts
|
|
22811
22808
|
/**
|
|
22812
22809
|
* SDK error classes
|
|
22813
22810
|
*/
|
|
@@ -22824,13 +22821,7 @@ var NeopressApiError = class extends Error {
|
|
|
22824
22821
|
}
|
|
22825
22822
|
};
|
|
22826
22823
|
//#endregion
|
|
22827
|
-
//#region ../sdk/
|
|
22828
|
-
/**
|
|
22829
|
-
* SDK serializers — convert DB snake_case rows to SDK camelCase shapes.
|
|
22830
|
-
*
|
|
22831
|
-
* Ported 1:1 from apps/neopress/src/lib/api/v1/serializers.ts.
|
|
22832
|
-
* Do NOT change field mappings without updating both files.
|
|
22833
|
-
*/
|
|
22824
|
+
//#region ../sdk/src/serializers.ts
|
|
22834
22825
|
function serializePageFull(page) {
|
|
22835
22826
|
return {
|
|
22836
22827
|
id: page.id,
|
|
@@ -23079,7 +23070,7 @@ function serializeSiteLayout(siteId, layout) {
|
|
|
23079
23070
|
};
|
|
23080
23071
|
}
|
|
23081
23072
|
//#endregion
|
|
23082
|
-
//#region ../sdk/
|
|
23073
|
+
//#region ../sdk/src/endpoints/pages.ts
|
|
23083
23074
|
var PagesEndpoint = class {
|
|
23084
23075
|
client;
|
|
23085
23076
|
constructor(client) {
|
|
@@ -26476,7 +26467,7 @@ function getDefaultLogLevel() {
|
|
|
26476
26467
|
}
|
|
26477
26468
|
getDefaultLogLevel();
|
|
26478
26469
|
//#endregion
|
|
26479
|
-
//#region ../sdk/
|
|
26470
|
+
//#region ../sdk/src/endpoints/collections.ts
|
|
26480
26471
|
var CollectionsEndpoint = class {
|
|
26481
26472
|
client;
|
|
26482
26473
|
constructor(client) {
|
|
@@ -26542,7 +26533,7 @@ var CollectionsEndpoint = class {
|
|
|
26542
26533
|
}
|
|
26543
26534
|
};
|
|
26544
26535
|
//#endregion
|
|
26545
|
-
//#region ../sdk/
|
|
26536
|
+
//#region ../sdk/src/endpoints/entries.ts
|
|
26546
26537
|
var EntriesEndpoint = class {
|
|
26547
26538
|
client;
|
|
26548
26539
|
constructor(client) {
|
|
@@ -26615,7 +26606,7 @@ var EntriesEndpoint = class {
|
|
|
26615
26606
|
}
|
|
26616
26607
|
};
|
|
26617
26608
|
//#endregion
|
|
26618
|
-
//#region ../sdk/
|
|
26609
|
+
//#region ../sdk/src/endpoints/forms.ts
|
|
26619
26610
|
var FormsEndpoint = class {
|
|
26620
26611
|
client;
|
|
26621
26612
|
constructor(client) {
|
|
@@ -26683,7 +26674,7 @@ var FormsEndpoint = class {
|
|
|
26683
26674
|
}
|
|
26684
26675
|
};
|
|
26685
26676
|
//#endregion
|
|
26686
|
-
//#region ../sdk/
|
|
26677
|
+
//#region ../sdk/src/endpoints/assets.ts
|
|
26687
26678
|
var AssetsEndpoint = class {
|
|
26688
26679
|
client;
|
|
26689
26680
|
constructor(client) {
|
|
@@ -26744,7 +26735,7 @@ var AssetsEndpoint = class {
|
|
|
26744
26735
|
}
|
|
26745
26736
|
};
|
|
26746
26737
|
//#endregion
|
|
26747
|
-
//#region ../sdk/
|
|
26738
|
+
//#region ../sdk/src/endpoints/site.ts
|
|
26748
26739
|
var SiteEndpoint = class {
|
|
26749
26740
|
client;
|
|
26750
26741
|
constructor(client) {
|
|
@@ -26789,7 +26780,7 @@ var SiteEndpoint = class {
|
|
|
26789
26780
|
}
|
|
26790
26781
|
};
|
|
26791
26782
|
//#endregion
|
|
26792
|
-
//#region ../sdk/
|
|
26783
|
+
//#region ../sdk/src/endpoints/redirects.ts
|
|
26793
26784
|
const DASHBOARD_ONLY_REWRITE_MESSAGE = "Rewrite proxy rules can only be managed in the dashboard.";
|
|
26794
26785
|
function rejectModeParam(data) {
|
|
26795
26786
|
if (data && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, "mode")) throw new NeopressApiError("REDIRECT_RULE_DASHBOARD_ONLY", DASHBOARD_ONLY_REWRITE_MESSAGE, 400);
|
|
@@ -26850,7 +26841,7 @@ var RedirectsEndpoint = class {
|
|
|
26850
26841
|
}
|
|
26851
26842
|
};
|
|
26852
26843
|
//#endregion
|
|
26853
|
-
//#region ../sdk/
|
|
26844
|
+
//#region ../sdk/src/endpoints/publish.ts
|
|
26854
26845
|
var PublishEndpoint = class {
|
|
26855
26846
|
client;
|
|
26856
26847
|
constructor(client) {
|
|
@@ -26864,7 +26855,7 @@ var PublishEndpoint = class {
|
|
|
26864
26855
|
}
|
|
26865
26856
|
};
|
|
26866
26857
|
//#endregion
|
|
26867
|
-
//#region ../sdk/
|
|
26858
|
+
//#region ../sdk/src/endpoints/entry-references.ts
|
|
26868
26859
|
var EntryReferencesEndpoint = class {
|
|
26869
26860
|
client;
|
|
26870
26861
|
constructor(client) {
|
|
@@ -26895,7 +26886,7 @@ var EntryReferencesEndpoint = class {
|
|
|
26895
26886
|
}
|
|
26896
26887
|
};
|
|
26897
26888
|
//#endregion
|
|
26898
|
-
//#region ../sdk/
|
|
26889
|
+
//#region ../sdk/src/endpoints/analytics.ts
|
|
26899
26890
|
const RESERVED_ANALYTICS_PARAMS = /* @__PURE__ */ new Set([
|
|
26900
26891
|
"pipe",
|
|
26901
26892
|
"site",
|
|
@@ -26980,7 +26971,7 @@ var AnalyticsEndpoint = class {
|
|
|
26980
26971
|
}
|
|
26981
26972
|
};
|
|
26982
26973
|
//#endregion
|
|
26983
|
-
//#region ../sdk/
|
|
26974
|
+
//#region ../sdk/src/endpoints/templates.ts
|
|
26984
26975
|
var TemplatesEndpoint = class {
|
|
26985
26976
|
client;
|
|
26986
26977
|
constructor(client) {
|
|
@@ -27044,7 +27035,7 @@ var TemplatesEndpoint = class {
|
|
|
27044
27035
|
}
|
|
27045
27036
|
};
|
|
27046
27037
|
//#endregion
|
|
27047
|
-
//#region ../sdk/
|
|
27038
|
+
//#region ../sdk/src/endpoints/headshots.ts
|
|
27048
27039
|
/**
|
|
27049
27040
|
* headshot_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to
|
|
27050
27041
|
* the super-admin user, so these direct-DB calls return empty/forbidden for any
|
|
@@ -27128,7 +27119,7 @@ var HeadshotsEndpoint = class {
|
|
|
27128
27119
|
}
|
|
27129
27120
|
};
|
|
27130
27121
|
//#endregion
|
|
27131
|
-
//#region ../sdk/
|
|
27122
|
+
//#region ../sdk/src/endpoints/logos.ts
|
|
27132
27123
|
/**
|
|
27133
27124
|
* logo_pool is a GLOBAL (not site-scoped) admin table. RLS exposes it only to the
|
|
27134
27125
|
* super-admin user, so these direct-DB calls return empty/forbidden for any other
|
|
@@ -27218,7 +27209,7 @@ var LogosEndpoint = class {
|
|
|
27218
27209
|
}
|
|
27219
27210
|
};
|
|
27220
27211
|
//#endregion
|
|
27221
|
-
//#region ../sdk/
|
|
27212
|
+
//#region ../sdk/src/client.ts
|
|
27222
27213
|
/**
|
|
27223
27214
|
* @neopress/sdk — API Client
|
|
27224
27215
|
*
|
|
@@ -27295,7 +27286,8 @@ var NeopressClient = class {
|
|
|
27295
27286
|
* header so RLS applies. No session persistence/refresh — token freshness is the
|
|
27296
27287
|
* caller's responsibility (CLI getClientAsync / MCP per-request).
|
|
27297
27288
|
*
|
|
27298
|
-
* `@internal` (with `stripInternal`
|
|
27289
|
+
* `@internal` (with `stripInternal` in the cli/mcp dts configs — sdk itself no
|
|
27290
|
+
* longer emits) keeps this out of the published declarations:
|
|
27299
27291
|
* it is plumbing for the endpoints in this package, and typing it publicly would
|
|
27300
27292
|
* drag `SupabaseClient` + the generated `Database` into the published `.d.ts` of
|
|
27301
27293
|
* `@neopress/cli` / `@neopress/mcp` — packages that declare no dependencies, so
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neopress/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.1",
|
|
4
4
|
"description": "Neopress CLI — manage your Neopress site from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@neopress/sdk": "0.4.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
|
-
"build": "tsdown && node ./scripts/check-dist-contract.mjs",
|
|
39
|
+
"build": "NODE_OPTIONS=--max-old-space-size=4096 tsdown && node ./scripts/check-dist-contract.mjs",
|
|
40
40
|
"dev": "tsdown --watch",
|
|
41
41
|
"lint": "tsc --noEmit",
|
|
42
42
|
"test": "vitest run"
|