@neopress/cli 4.7.0 → 4.8.0
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 +12 -13
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -6
- package/package.json +1 -1
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);
|
|
@@ -31312,7 +31308,8 @@ Examples:
|
|
|
31312
31308
|
webp: "image/webp",
|
|
31313
31309
|
svg: "image/svg+xml",
|
|
31314
31310
|
pdf: "application/pdf",
|
|
31315
|
-
mp4: "video/mp4"
|
|
31311
|
+
mp4: "video/mp4",
|
|
31312
|
+
webm: "video/webm"
|
|
31316
31313
|
}[fileName.split(".").pop()?.toLowerCase() || ""] || "application/octet-stream";
|
|
31317
31314
|
const fileKey = `${options.folder || "uploads"}/${Date.now()}-${fileName}`;
|
|
31318
31315
|
const { presignedUrl, publicUrl } = await client.assets.presign({
|
|
@@ -31559,12 +31556,14 @@ Examples:
|
|
|
31559
31556
|
Examples:
|
|
31560
31557
|
$ neopress templates mark --name "SaaS Landing" --reference-url https://example.com --preview-img-url https://cdn.example.com/1.png
|
|
31561
31558
|
$ 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
|
|
31559
|
+
$ 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
|
|
31560
|
+
--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
31561
|
output(await (await getClientAsync()).templates.mark({
|
|
31564
31562
|
name: options.name,
|
|
31565
31563
|
description: options.description,
|
|
31566
31564
|
referenceUrl: options.referenceUrl,
|
|
31567
|
-
previewImgUrls: options.previewImgUrl.length > 0 ? options.previewImgUrl : void 0
|
|
31565
|
+
previewImgUrls: options.previewImgUrl.length > 0 ? options.previewImgUrl : void 0,
|
|
31566
|
+
previewVideoUrl: options.previewVideoUrl
|
|
31568
31567
|
}));
|
|
31569
31568
|
});
|
|
31570
31569
|
templates.command("delete").description("Delete the active template metadata row and linked site").action(async () => {
|
|
@@ -31919,7 +31918,7 @@ function registerGuideCommands(program) {
|
|
|
31919
31918
|
* Designed for use with Claude Code and other AI tools via --json mode.
|
|
31920
31919
|
*/
|
|
31921
31920
|
const program = new Command();
|
|
31922
|
-
program.name("neopress").description("Neopress CLI — manage your site from the terminal").version("4.
|
|
31921
|
+
program.name("neopress").description("Neopress CLI — manage your site from the terminal").version("4.8.0").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
31922
|
const opts = thisCommand.optsWithGlobals();
|
|
31924
31923
|
if (opts.site) setSiteOverride(String(opts.site));
|
|
31925
31924
|
if (opts.json || !process.stdout.isTTY) setJsonMode(true);
|
package/dist/index.d.ts
CHANGED
|
@@ -596,6 +596,10 @@ interface TemplateMarkParams {
|
|
|
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;
|
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);
|