@neopress/cli 4.10.0 → 4.10.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/README.md +1 -0
- package/dist/bin.cjs +5 -3
- package/dist/index.d.ts +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,6 +66,7 @@ neopress entries publish <entryId>
|
|
|
66
66
|
|
|
67
67
|
# Configure a reusable conversion event and funnel
|
|
68
68
|
neopress analytics events create --data '{"name":"Signup","eventType":"form","path":"*","formId":"3"}'
|
|
69
|
+
neopress analytics events create --data '{"name":"Outbound links","eventType":"outbound"}'
|
|
69
70
|
neopress analytics events update <eventId> --data '{"name":"Completed signup"}'
|
|
70
71
|
neopress analytics funnels create --data @funnel.json
|
|
71
72
|
|
package/dist/bin.cjs
CHANGED
|
@@ -4952,8 +4952,9 @@ Examples:
|
|
|
4952
4952
|
Examples:
|
|
4953
4953
|
$ neopress analytics events list
|
|
4954
4954
|
$ neopress analytics events create --data '{"name":"Signup","eventType":"form","path":"*","formId":"3"}'
|
|
4955
|
+
$ neopress analytics events create --data '{"name":"Outbound links","eventType":"outbound"}'
|
|
4955
4956
|
$ neopress analytics events update <eventId> --data '{"name":"New label"}'
|
|
4956
|
-
Event updates may rename an event with {name} or change display settings with {display}; tracking identity is immutable after creation. Create inputs use camelCase fields such as eventType, eventName, formId, scrollDepth, and dwellSeconds. The API returns persisted snake_case fields.`);
|
|
4957
|
+
Event updates may rename an event with {name} or change display settings with {display}; tracking identity is immutable after creation. Create inputs use camelCase fields such as eventType, eventName, formId, scrollDepth, and dwellSeconds. Outbound events need only name and eventType and match already-collected external link clicks. Historical visibility events remain readable but cannot be created. The API returns persisted snake_case fields.`);
|
|
4957
4958
|
events.command("list").description("List saved analytics event definitions").action(async () => {
|
|
4958
4959
|
output(await (await getClientAsync()).analytics.events.list());
|
|
4959
4960
|
});
|
|
@@ -5393,7 +5394,7 @@ function registerGuideCommands(program) {
|
|
|
5393
5394
|
* Designed for use with Claude Code and other AI tools via --json mode.
|
|
5394
5395
|
*/
|
|
5395
5396
|
const program = new Command();
|
|
5396
|
-
program.name("neopress").description("Neopress CLI — manage your site from the terminal").version("4.10.
|
|
5397
|
+
program.name("neopress").description("Neopress CLI — manage your site from the terminal").version("4.10.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) => {
|
|
5397
5398
|
const opts = thisCommand.optsWithGlobals();
|
|
5398
5399
|
if (opts.site) setSiteOverride(String(opts.site));
|
|
5399
5400
|
if (opts.json || !process.stdout.isTTY) setJsonMode(true);
|
|
@@ -5432,11 +5433,12 @@ Env vars:
|
|
|
5432
5433
|
NEOPRESS_BASE_URL API base URL (defaults to the hosted Neopress app)
|
|
5433
5434
|
`);
|
|
5434
5435
|
program.parseAsync(process.argv).catch((err) => {
|
|
5435
|
-
if (err?.code) console.error(JSON.stringify({
|
|
5436
|
+
if (err?.code) if (isJsonMode()) console.error(JSON.stringify({
|
|
5436
5437
|
ok: false,
|
|
5437
5438
|
error: err.message,
|
|
5438
5439
|
code: err.code
|
|
5439
5440
|
}));
|
|
5441
|
+
else console.error(`Error [${err.code}]: ${err.message}`);
|
|
5440
5442
|
else console.error(err.message || err);
|
|
5441
5443
|
process.exit(1);
|
|
5442
5444
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -191,11 +191,13 @@ interface SiteLayout {
|
|
|
191
191
|
draftTsx: string | null;
|
|
192
192
|
draftGlobalCss: string | null;
|
|
193
193
|
draftNotFoundTsx: string | null;
|
|
194
|
+
draftI18n: unknown;
|
|
194
195
|
prodTsx: string | null;
|
|
195
196
|
prodJs: string | null;
|
|
196
197
|
prodGlobalCss: string | null;
|
|
197
198
|
prodNotFoundTsx: string | null;
|
|
198
199
|
prodNotFoundJs: string | null;
|
|
200
|
+
prodI18n: unknown;
|
|
199
201
|
}
|
|
200
202
|
interface Headshot {
|
|
201
203
|
id: number;
|
|
@@ -282,7 +284,9 @@ interface SearchConsoleQueryResult {
|
|
|
282
284
|
};
|
|
283
285
|
error?: string;
|
|
284
286
|
}
|
|
285
|
-
type AnalyticsEventType = "custom" | "page" | "click" | "form" | "scroll" | "visibility" | "dwell";
|
|
287
|
+
type AnalyticsEventType = "custom" | "page" | "click" | "form" | "scroll" | "visibility" | "dwell" | "outbound";
|
|
288
|
+
/** `visibility` remains readable for historical definitions but cannot be created. */
|
|
289
|
+
type AnalyticsEventCreateType = Exclude<AnalyticsEventType, "visibility">;
|
|
286
290
|
type FunnelFilterField = "event.path" | "event.url" | "event.referrer" | "event.referrer_source" | "event.property" | "session.referrer" | "session.referrer_source" | "session.traffic_category" | "session.utm_source" | "session.utm_medium" | "session.utm_campaign" | "session.utm_content" | "session.utm_term";
|
|
287
291
|
type FunnelFilterOperator = "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "exists" | "not_exists" | "gt" | "gte" | "lt" | "lte";
|
|
288
292
|
type AnalyticsFunnelFilterCondition = {
|
|
@@ -308,6 +312,7 @@ interface AnalyticsEventDefinition {
|
|
|
308
312
|
name: string;
|
|
309
313
|
chart_visible: boolean;
|
|
310
314
|
is_pinned: boolean;
|
|
315
|
+
sort_order?: number | null;
|
|
311
316
|
event_type: AnalyticsEventType;
|
|
312
317
|
event_name: string;
|
|
313
318
|
path: string;
|
|
@@ -323,7 +328,7 @@ interface AnalyticsEventDefinitionInput {
|
|
|
323
328
|
/** Optional client UUID; reuse it with the same payload after an uncertain create response. */
|
|
324
329
|
id?: string;
|
|
325
330
|
name: string;
|
|
326
|
-
eventType:
|
|
331
|
+
eventType: AnalyticsEventCreateType;
|
|
327
332
|
eventName?: string;
|
|
328
333
|
path?: string;
|
|
329
334
|
selector?: string;
|
|
@@ -640,6 +645,8 @@ declare class SiteEndpoint {
|
|
|
640
645
|
draftTsx?: string;
|
|
641
646
|
draftNotFoundTsx?: string;
|
|
642
647
|
draftGlobalCss?: string;
|
|
648
|
+
/** Replaces draft translations; null clears them, omission preserves them. */
|
|
649
|
+
draftI18n?: unknown;
|
|
643
650
|
}): Promise<SiteLayout>;
|
|
644
651
|
delete(): Promise<{
|
|
645
652
|
siteId: number;
|