@neopress/cli 4.3.0 → 4.4.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 CHANGED
@@ -24917,7 +24917,6 @@ function serializeTemplate(t) {
24917
24917
  id: t.id,
24918
24918
  name: t.name,
24919
24919
  description: t.description ?? null,
24920
- industry: t.industry,
24921
24920
  referenceUrl: t.reference_url,
24922
24921
  previewImgUrls: t.preview_img_urls,
24923
24922
  previewVideoUrl: t.preview_video_url ?? null,
@@ -40435,7 +40434,7 @@ var RedirectsEndpoint = class {
40435
40434
  site_id: this.client.siteIdNumber,
40436
40435
  source: data.source,
40437
40436
  destination: data.destination,
40438
- redirect_type: data.redirectType ?? 307,
40437
+ redirect_type: data.redirectType ?? 308,
40439
40438
  include_children: data.includeChildren ?? false,
40440
40439
  preserve_path: data.preservePath ?? false,
40441
40440
  enabled: data.enabled !== false,
@@ -40648,13 +40647,10 @@ var TemplatesEndpoint = class {
40648
40647
  if (siteIds.length === 0)
40649
40648
  return [];
40650
40649
  const namePrefix = params?.namePrefix?.trim();
40651
- const industry = params?.industry?.trim();
40652
40650
  const limit = Math.min(Math.max(params?.limit ?? 100, 1), 500);
40653
- let query = this.client.db.from("templates").select("id, name, industry, reference_url, preview_img_urls, description, created_at").in("id", siteIds);
40651
+ let query = this.client.db.from("templates").select("id, name, reference_url, preview_img_urls, description, created_at").in("id", siteIds);
40654
40652
  if (namePrefix)
40655
40653
  query = query.ilike("name", `${namePrefix}%`);
40656
- if (industry)
40657
- query = query.eq("industry", industry);
40658
40654
  if (params?.order)
40659
40655
  query = query.order("created_at", { ascending: params.order === "asc" });
40660
40656
  query = query.limit(limit);
@@ -40668,7 +40664,6 @@ var TemplatesEndpoint = class {
40668
40664
  handle: siteMeta.get(siteId)?.handle ?? null,
40669
40665
  siteName: siteMeta.get(siteId)?.name ?? null,
40670
40666
  name: t.name,
40671
- industry: t.industry,
40672
40667
  referenceUrl: t.reference_url,
40673
40668
  previewImgUrls: t.preview_img_urls ?? null,
40674
40669
  description: t.description ?? null,
@@ -41577,7 +41572,7 @@ Rules are created enabled. delete <ruleId> removes a rule permanently.`);
41577
41572
  Examples:
41578
41573
  $ neopress redirects create --source /old --dest /about
41579
41574
  $ neopress redirects create --source /docs --dest /guide --type 308
41580
- --source and --dest are both required. --type is 307 (temporary, default) or 308 (permanent). The rule is created enabled.`).requiredOption("--source <path>", "Source path").requiredOption("--dest <path>", "Destination path").option("--type <type>", "Redirect type (307/308)", "307").action(async (options) => {
41575
+ --source and --dest are both required. --type is 307 (temporary) or 308 (permanent, default). The rule is created enabled.`).requiredOption("--source <path>", "Source path").requiredOption("--dest <path>", "Destination path").option("--type <type>", "Redirect type (307/308)", "308").action(async (options) => {
41581
41576
  const client = await getClientAsync();
41582
41577
  const rule = await client.redirects.create({
41583
41578
  source: options.source,
@@ -41796,15 +41791,14 @@ function collectPreviewImgUrl(value, previous = []) {
41796
41791
  function registerTemplateCommands(program3) {
41797
41792
  const templates = program3.command("templates").description("Manage template metadata for the active site").addHelpText("after", `
41798
41793
  Examples:
41799
- $ neopress templates mark --name "SaaS Landing" --industry saas --reference-url https://example.com --preview-img-url https://cdn.example.com/1.png
41800
- $ neopress templates list --industry saas --limit 50
41794
+ $ neopress templates mark --name "SaaS Landing" --reference-url https://example.com --preview-img-url https://cdn.example.com/1.png
41795
+ $ neopress templates list --limit 50
41801
41796
  $ neopress templates delete
41802
41797
  \`templates mark\` operates on the active site. \`templates delete\` permanently removes the template metadata AND the connected site \u2014 it is destructive and not recoverable.`);
41803
- templates.command("list").description("List templates across sites you can access").option("--name-prefix <prefix>", "Filter by template name prefix").option("--industry <industry>", "Filter by industry key").option("--order <asc|desc>", ORDER_OPTION_DESC).option("--limit <n>", "Max results (default 100, max 500)").action(async (options) => {
41798
+ templates.command("list").description("List templates across sites you can access").option("--name-prefix <prefix>", "Filter by template name prefix").option("--order <asc|desc>", ORDER_OPTION_DESC).option("--limit <n>", "Max results (default 100, max 500)").action(async (options) => {
41804
41799
  const client = await getGlobalClientAsync();
41805
41800
  const templates2 = await client.templates.list({
41806
41801
  namePrefix: options.namePrefix,
41807
- industry: options.industry,
41808
41802
  order: parseOrder(options.order),
41809
41803
  limit: options.limit ? parseInt(options.limit, 10) : void 0
41810
41804
  });
@@ -41817,9 +41811,9 @@ Examples:
41817
41811
  });
41818
41812
  templates.command("mark").description("Mark or update the active site as a template").addHelpText("after", `
41819
41813
  Examples:
41820
- $ neopress templates mark --name "SaaS Landing" --industry saas --reference-url https://example.com --preview-img-url https://cdn.example.com/1.png
41821
- $ neopress templates mark --name Portfolio --industry creative --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"
41822
- --name, --industry, and --reference-url are all required, and at least one --preview-img-url must be given (repeat the flag for multiple images). 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("--industry <industry>", "Template industry key").requiredOption(
41814
+ $ neopress templates mark --name "SaaS Landing" --reference-url https://example.com --preview-img-url https://cdn.example.com/1.png
41815
+ $ 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"
41816
+ --name and --reference-url are required, and at least one --preview-img-url must be given (repeat the flag for multiple images). 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(
41823
41817
  "--reference-url <url>",
41824
41818
  "Reference URL for template provenance"
41825
41819
  ).option(
@@ -41832,7 +41826,6 @@ Examples:
41832
41826
  const template = await client.templates.mark({
41833
41827
  name: options.name,
41834
41828
  description: options.description,
41835
- industry: options.industry,
41836
41829
  referenceUrl: options.referenceUrl,
41837
41830
  previewImgUrls: options.previewImgUrl.length > 0 ? options.previewImgUrl : void 0
41838
41831
  });
@@ -42065,7 +42058,7 @@ function registerGuideCommands(program3) {
42065
42058
 
42066
42059
  // src/bin.ts
42067
42060
  var program2 = new Command();
42068
- program2.name("neopress").description("Neopress CLI \u2014 manage your site from the terminal").version("4.3.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) => {
42061
+ program2.name("neopress").description("Neopress CLI \u2014 manage your site from the terminal").version("4.4.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) => {
42069
42062
  const opts = thisCommand.optsWithGlobals();
42070
42063
  if (opts.site) setSiteOverride(String(opts.site));
42071
42064
  if (opts.json || !process.stdout.isTTY) setJsonMode(true);
package/dist/index.js CHANGED
@@ -21139,7 +21139,6 @@ function serializeTemplate(t) {
21139
21139
  id: t.id,
21140
21140
  name: t.name,
21141
21141
  description: t.description ?? null,
21142
- industry: t.industry,
21143
21142
  referenceUrl: t.reference_url,
21144
21143
  previewImgUrls: t.preview_img_urls,
21145
21144
  previewVideoUrl: t.preview_video_url ?? null,
@@ -36657,7 +36656,7 @@ var RedirectsEndpoint = class {
36657
36656
  site_id: this.client.siteIdNumber,
36658
36657
  source: data.source,
36659
36658
  destination: data.destination,
36660
- redirect_type: data.redirectType ?? 307,
36659
+ redirect_type: data.redirectType ?? 308,
36661
36660
  include_children: data.includeChildren ?? false,
36662
36661
  preserve_path: data.preservePath ?? false,
36663
36662
  enabled: data.enabled !== false,
@@ -36870,13 +36869,10 @@ var TemplatesEndpoint = class {
36870
36869
  if (siteIds.length === 0)
36871
36870
  return [];
36872
36871
  const namePrefix = params?.namePrefix?.trim();
36873
- const industry = params?.industry?.trim();
36874
36872
  const limit = Math.min(Math.max(params?.limit ?? 100, 1), 500);
36875
- let query = this.client.db.from("templates").select("id, name, industry, reference_url, preview_img_urls, description, created_at").in("id", siteIds);
36873
+ let query = this.client.db.from("templates").select("id, name, reference_url, preview_img_urls, description, created_at").in("id", siteIds);
36876
36874
  if (namePrefix)
36877
36875
  query = query.ilike("name", `${namePrefix}%`);
36878
- if (industry)
36879
- query = query.eq("industry", industry);
36880
36876
  if (params?.order)
36881
36877
  query = query.order("created_at", { ascending: params.order === "asc" });
36882
36878
  query = query.limit(limit);
@@ -36890,7 +36886,6 @@ var TemplatesEndpoint = class {
36890
36886
  handle: siteMeta.get(siteId)?.handle ?? null,
36891
36887
  siteName: siteMeta.get(siteId)?.name ?? null,
36892
36888
  name: t.name,
36893
- industry: t.industry,
36894
36889
  referenceUrl: t.reference_url,
36895
36890
  previewImgUrls: t.preview_img_urls ?? null,
36896
36891
  description: t.description ?? null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neopress/cli",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "Neopress CLI — manage your Neopress site from the terminal",
5
5
  "type": "module",
6
6
  "keywords": [