@neopress/cli 0.2.1 → 0.3.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 +21 -2
- package/dist/index.js +4 -0
- package/package.json +2 -2
package/dist/bin.cjs
CHANGED
|
@@ -4105,6 +4105,10 @@ var TemplatesEndpoint = class {
|
|
|
4105
4105
|
const res = await this.client.post(this.basePath, data);
|
|
4106
4106
|
return res.data;
|
|
4107
4107
|
}
|
|
4108
|
+
async delete() {
|
|
4109
|
+
const res = await this.client.delete(this.basePath);
|
|
4110
|
+
return res.data;
|
|
4111
|
+
}
|
|
4108
4112
|
};
|
|
4109
4113
|
|
|
4110
4114
|
// ../sdk/dist/client.js
|
|
@@ -4901,7 +4905,13 @@ function registerTemplateCommands(program3) {
|
|
|
4901
4905
|
const template = await client.templates.get();
|
|
4902
4906
|
output(template);
|
|
4903
4907
|
});
|
|
4904
|
-
templates.command("mark").description("Mark or update the active site as a template").requiredOption("--name <name>", "Template display name").requiredOption("--industry <industry>", "Template industry key").requiredOption("--category <category>", "Template category key").
|
|
4908
|
+
templates.command("mark").description("Mark or update the active site as a template").requiredOption("--name <name>", "Template display name").requiredOption("--industry <industry>", "Template industry key").requiredOption("--category <category>", "Template category key").requiredOption(
|
|
4909
|
+
"--structure-reference-url <url>",
|
|
4910
|
+
"Reference URL for template structure"
|
|
4911
|
+
).requiredOption(
|
|
4912
|
+
"--design-reference-url <url>",
|
|
4913
|
+
"Reference URL for template design"
|
|
4914
|
+
).option(
|
|
4905
4915
|
"--preview-img-url <url>",
|
|
4906
4916
|
"Preview image URL. Repeat for multiple images.",
|
|
4907
4917
|
collectPreviewImgUrl,
|
|
@@ -4912,15 +4922,24 @@ function registerTemplateCommands(program3) {
|
|
|
4912
4922
|
name: options.name,
|
|
4913
4923
|
industry: options.industry,
|
|
4914
4924
|
category: options.category,
|
|
4925
|
+
reference: {
|
|
4926
|
+
structure: options.structureReferenceUrl,
|
|
4927
|
+
design: options.designReferenceUrl
|
|
4928
|
+
},
|
|
4915
4929
|
previewImgUrls: options.previewImgUrl.length > 0 ? options.previewImgUrl : void 0
|
|
4916
4930
|
});
|
|
4917
4931
|
output(template);
|
|
4918
4932
|
});
|
|
4933
|
+
templates.command("delete").description("Delete the active template metadata row and linked site").action(async () => {
|
|
4934
|
+
const client = await getClientAsync();
|
|
4935
|
+
const result = await client.templates.delete();
|
|
4936
|
+
output(result);
|
|
4937
|
+
});
|
|
4919
4938
|
}
|
|
4920
4939
|
|
|
4921
4940
|
// src/bin.ts
|
|
4922
4941
|
var program2 = new Command();
|
|
4923
|
-
program2.name("neopress").description("Neopress CLI \u2014 manage your site from the terminal").version("0.
|
|
4942
|
+
program2.name("neopress").description("Neopress CLI \u2014 manage your site from the terminal").version("0.3.0").option("--json", "Output in JSON format (for AI tools and pipes)").option("--no-input", "Non-interactive mode").hook("preAction", (thisCommand) => {
|
|
4924
4943
|
const opts = thisCommand.optsWithGlobals();
|
|
4925
4944
|
if (opts.json) setJsonMode(true);
|
|
4926
4945
|
});
|
package/dist/index.js
CHANGED
|
@@ -424,6 +424,10 @@ var TemplatesEndpoint = class {
|
|
|
424
424
|
const res = await this.client.post(this.basePath, data);
|
|
425
425
|
return res.data;
|
|
426
426
|
}
|
|
427
|
+
async delete() {
|
|
428
|
+
const res = await this.client.delete(this.basePath);
|
|
429
|
+
return res.data;
|
|
430
|
+
}
|
|
427
431
|
};
|
|
428
432
|
|
|
429
433
|
// ../sdk/dist/client.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neopress/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Neopress CLI — manage your Neopress site from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"commander": "^13.0.0",
|
|
20
20
|
"tsup": "^8.5.1",
|
|
21
21
|
"typescript": "^5.7.0",
|
|
22
|
-
"@neopress/sdk": "0.
|
|
22
|
+
"@neopress/sdk": "0.3.0"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsup",
|