@mirage-cli/contentdynamite-cli 0.0.0-stage → 1.1.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.
@@ -0,0 +1,3 @@
1
+ export type { CostReport, ProgramOptions } from './options.js';
2
+ export { buildProgram, run } from './program.js';
3
+ export { VERSION } from './version.js';
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ import {
2
+ VERSION2,
3
+ buildProgram2,
4
+ run2
5
+ } from "./index-3v4effdk.js";
6
+ export {
7
+ VERSION2 as VERSION,
8
+ buildProgram2 as buildProgram,
9
+ run2 as run
10
+ };
package/dist/jobs.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { z } from 'zod';
2
+ import type { BatchJob } from './wire.js';
3
+ export declare function readJobs(path: string): unknown[];
4
+ export declare function parseJobs(raw: unknown[], schema: z.ZodObject): BatchJob[];
@@ -0,0 +1,8 @@
1
+ export interface CostReport {
2
+ provider: 'contentdynamite';
3
+ units: number;
4
+ }
5
+ export interface ProgramOptions {
6
+ mount?: boolean;
7
+ reportCost?: (report: CostReport) => void;
8
+ }
@@ -0,0 +1,10 @@
1
+ export declare const io: {
2
+ stdout: (text: string) => undefined;
3
+ stderr: (text: string) => undefined;
4
+ };
5
+ export declare function out(data: unknown): void;
6
+ export declare function err(message: string): void;
7
+ export declare function line(message: string): void;
8
+ export declare function write(text: string): void;
9
+ export declare const isoNow: () => string;
10
+ export declare const isoFromMs: (ms: number) => string;
@@ -0,0 +1,4 @@
1
+ import { Command } from 'commander';
2
+ import type { ProgramOptions } from './options.js';
3
+ export declare function buildProgram(options?: ProgramOptions): Command;
4
+ export declare function run(argv: string[], options?: ProgramOptions): Promise<number>;
@@ -0,0 +1 @@
1
+ export declare const VERSION = "1.1.0";
package/dist/wire.d.ts ADDED
@@ -0,0 +1,69 @@
1
+ import type { z } from 'zod';
2
+
3
+ export declare const ICP_SECTIONS: readonly ['business_overview', 'customer_profile', 'channel_analysis', 'pain_points', 'intent_funnel', 'competitive_landscape'];
4
+ export declare const INTERACTIVE_TYPES: readonly ['quiz', 'game', 'calculator', 'chart'];
5
+ export declare const REVISION_PARTS: readonly ['intro', 'section', 'image', 'feat_image', 'faq', 'video', 'interactive'];
6
+ export declare const REVISION_STATUSES: readonly ['pending', 'ready', 'failed'];
7
+ export declare const REVISION_TARGETS: readonly ['section', 'heading', 'passage', 'question', 'answer'];
8
+ export declare const REVISION_VERDICTS: readonly ['better', 'same', 'worse'];
9
+ export declare const USER_ROLES: readonly ['admin', 'normal'];
10
+ export declare const wireDeliverable: (deliverable: string) => 'copy' | 'page';
11
+ export declare const wireLandingStatus: (status: undefined | null | string) => undefined | 'success' | 'pending' | 'failed';
12
+ export declare const articleJobsToCsv: (jobs: readonly BatchJob[], guidelineHint: string) => File;
13
+ export declare const batchArticleJob: z.ZodObject;
14
+ export declare const batchGbpJob: z.ZodObject;
15
+ export declare const gbpJobsToCsv: (jobs: readonly BatchJob[]) => File;
16
+ export declare const wireGbpSource: (source: undefined | null | string) => undefined | 'article' | 'topic';
17
+ export declare const wireGbpStatus: (status: undefined | null | string) => undefined | 'pending' | 'done' | 'failed';
18
+ export declare const wireStatus: (status: undefined | null | string) => undefined | 'success' | 'pending' | 'failed';
19
+ export declare const readCsvTable: (text: string) => CsvTable;
20
+
21
+ export type CreateApiTokenRes = { id: number; name: string; token: string; token_prefix: string; expires_at: null | string };
22
+ export type LoginRes = { email: string; username: string; profile: null | string; role: 'admin' | 'normal'; auth_token: string };
23
+ export type CompanyProfileResponseDto = { id: number; company_name: string; website_url: string; sitemap_url: null | string; writing_guide: null | string; icp: string; branding: null | { colors: Record<string, string>; logo: null | string; fonts: Record<string, unknown>[]; typography: Record<string, unknown>; spacing: Record<string, unknown>; components: Record<string, unknown>; color_scheme: null | string } };
24
+ type JsonObject = { [key: string]: unknown };
25
+ type OwnerSummary = { username: string; profile: null | string };
26
+ export type ArticleDoneRes = { article_id: number; status: 'success'; title: string; slug: string; meta_description: null | string; h1: null | string; intro: null | string; body: null | string; faqs: null | string; feat_image: null | string; is_internal_link_set: boolean; article_type: null | 'listicle'; video_url: null | string; video_status: null | 'pending' | 'done' | 'failed'; interactive_type: null | 'quiz' | 'game' | 'calculator' | 'chart'; interactive_status: null | 'pending' | 'done' | 'failed' | 'skipped'; interactive_payload: null | JsonObject; interactive_embed: null | string; gbp_content: null | string; gbp_image_url: null | string; gbp_status: null | 'pending' | 'done' | 'failed'; provenance_report: null | JsonObject; dewatermark_status: null | 'done' | 'failed' | 'skipped'; created_at: string; owner: null | OwnerSummary; gdoc_url: null | string; company_name: string };
27
+ export type ArticleGdocRes = { gdoc_id: string; gdoc_url: string; created: boolean; folder_path: string };
28
+ export type ArticlePendingRes = { article_id: number; status: 'pending' | 'failed' };
29
+ type CheckSource = 'code' | 'jev' | 'judge';
30
+ type ReportedFailure = { source: CheckSource; check: string; part: null | string; message: string };
31
+ type RubricScore = { asked: number; passed: number; failures: ReportedFailure[] };
32
+ type FormatEval = { format: 'listicle' | 'how-to' | 'answer' | 'explainer' | 'comparison' | 'troubleshooting' | 'cost'; code: ReportedFailure[]; rubric: null | RubricScore; rubric_error: null | string; notes: string[] };
33
+ export type ArticleQaRes = { article_id: number; score: number; stored: boolean; report: { image: null; score: number; notes: string[]; format?: undefined | FormatEval; article_id: null | number; title: null | string; article_type: null | string; company: string; content: { score_with_model: number; weights_applied: { code: number; model: number }; judge: null | { scores: Record<'answers_the_search' | 'helpful' | 'first_hand' | 'client_trust' | 'structure' | 'anti_slop' | 'faq_consistent' | 'specific_reader', number>; total: number; ceiling: number; score: number; verdict: string; violations: string[]; strengths: string[]; top_fixes: string[]; model: string; body_trimmed: boolean; thresholds: { pass_total: number; min_dimension: number; min_anti_slop: number } }; judge_error: null | string; score: number; blended: boolean; weights: { compliance: number; craft: number }; compliance: { name: string; budget: number; score: number; trusted: boolean; deductions: { points: number; code: string; origin: string; message: string; evidence: string }[]; skipped: string[] }; craft: { name: string; budget: number; score: number; trusted: boolean; deductions: { points: number; code: string; origin: string; message: string; evidence: string }[]; skipped: string[] } }; weights: { content: number; image: number }; model_checks: boolean } | { image: { scaled_score: number; name: string; budget: number; score: number; trusted: boolean; deductions: { points: number; code: string; origin: string; message: string; evidence: string }[]; skipped: string[] }; score: number; notes: string[]; format?: undefined | FormatEval; article_id: null | number; title: null | string; article_type: null | string; company: string; content: { score_with_model: number; weights_applied: { code: number; model: number }; judge: null | { scores: Record<'answers_the_search' | 'helpful' | 'first_hand' | 'client_trust' | 'structure' | 'anti_slop' | 'faq_consistent' | 'specific_reader', number>; total: number; ceiling: number; score: number; verdict: string; violations: string[]; strengths: string[]; top_fixes: string[]; model: string; body_trimmed: boolean; thresholds: { pass_total: number; min_dimension: number; min_anti_slop: number } }; judge_error: null | string; score: number; blended: boolean; weights: { compliance: number; craft: number }; compliance: { name: string; budget: number; score: number; trusted: boolean; deductions: { points: number; code: string; origin: string; message: string; evidence: string }[]; skipped: string[] }; craft: { name: string; budget: number; score: number; trusted: boolean; deductions: { points: number; code: string; origin: string; message: string; evidence: string }[]; skipped: string[] } }; weights: { content: number; image: number }; model_checks: boolean } };
34
+ export type BatchRes = { batch_id: number; name: string; total_articles: number; completed_articles: number; failed_articles: number; created_at: string };
35
+ export type BatchWriteRes = { msg: string; batch_id: number; article_ids: number[]; total: number };
36
+ type CarrierCounts = { [key: string]: number };
37
+ type RewriteStats = { ran: boolean; model: string; fields: string[]; protected_regions: number; chars_before: number; chars_after: number; rejected: Record<string, string>; skipped: Record<string, string> };
38
+ export type CleanProvenanceRes = { msg: string; article_id: number; removed: Record<string, CarrierCounts>; rewrite: RewriteStats | { ran: false }; dewatermark_status: null | 'done' | 'failed' | 'skipped' };
39
+ type EditTurn = { instruction: string; image_url: string };
40
+ export type EditFeatImageJobRes = { job_id: string; status: 'pending' | 'done' | 'failed'; image_url: null | string; history: null | EditTurn[]; error: null | string };
41
+ type EmbedAuditItem = { article_id: number; title: string; company_name: string; interactive_type: null | 'quiz' | 'game' | 'calculator' | 'chart'; payload_stored: boolean };
42
+ export type EmbedAuditRes = { articles: EmbedAuditItem[]; found: number; total_success: number; page: number; limit: number };
43
+ export type ListicleResearchPromptRes = { prompt: string; company_name: string; profile_id: number };
44
+ export type PaginatedArticlesRes = { articles: (ArticleDoneRes | ArticlePendingRes)[]; total: number; page: number; limit: number; total_pages: number };
45
+ type ProvenanceAuditItem = { article_id: number; title: string; company_name: string; findings: Record<string, CarrierCounts>; total_findings: number; dewatermark_status: null | 'done' | 'failed' | 'skipped' };
46
+ export type ProvenanceAuditRes = { articles: ProvenanceAuditItem[]; checked: number; total_success: number; page: number; limit: number };
47
+ type QaAuditItem = { article_id: number; title: string; company_name: string; score: number; content_score: number; image_score: null | number; lost_by_origin: Record<string, number> };
48
+ export type QaAuditRes = { articles: QaAuditItem[]; summary: { count: number; mean?: undefined; min?: undefined; max?: undefined; below_threshold?: undefined; threshold?: undefined; points_lost_by_origin?: undefined; mean_compliance_excluding_non_copy?: undefined } | { count: number; mean: number; min: number; max: number; below_threshold: number; threshold: number; points_lost_by_origin: { [key: string]: number }; mean_compliance_excluding_non_copy: number }; total_success: number; page: number; limit: number };
49
+ export type WriteArticleRes = { msg: string; article_id: number; status: 'pending' };
50
+ export type BatchGbpPostsRes = { msg: string; gbp_post_ids: number[]; total: number };
51
+ export type GbpPostRes = { id: number; article_id: null | number; article_title: null | string; article_slug: null | string; company_name: string; topic: null | string; source: 'article' | 'topic'; content: string; image_url: null | string; image_mode: null | 'article' | 'none' | 'supplied' | 'generate'; status: 'pending' | 'done' | 'failed'; created_at: null | string };
52
+ export type WriteGbpPostRes = { msg: string; gbp_post_id: number; status: 'pending' };
53
+ export type ImageAuditItem = { landing_page_id: number; keyword: string; company_name: string; image_failures: string[]; placeholder_failures: string[] };
54
+ export type LandingPageDoneRes = { landing_page_id: number; status: 'success'; keyword: string; secondary_keywords: null | string[]; page_type: string; deliverable: string; slug: null | string; title_tag: null | string; meta_description: null | string; h1: null | string; cta_label: string; cta_url: null | string; copy_payload: null | Record<string, unknown>; research_pool: null | Record<string, unknown>; artifact_url: null | string; word_count: null | number; eval_status: null | 'pass' | 'error' | 'needs_review'; eval_report: null | Record<string, unknown>; created_at: null | string; owner: null | OwnerSummary; company_name: string; version: number };
55
+ export type LandingPagePendingRes = { landing_page_id: number; status: string; version: number; keyword: null | string; secondary_keywords: null | string[]; deliverable: string; created_at: null | string; owner: null | OwnerSummary; company_name: null | string; inputs: null | { keyword: string; cta_label: null | string; secondary_keywords: null | string[]; image_urls: null | string[]; allowed_terms: null | string[]; mirror_sections: null | string[]; company_profile_id: number; page_brief: null | string; deliverable: 'copy' | 'page'; cta_url: null | string; intent: null | { who: string; want: string; achieve: string }; brand_facts: null | string; writing_guide: null | string; generate_images: boolean; golden_url: null | string; parent_url: null | string; social_proof: null | { text: string; rating: null | number }; design_zip_key: null | string; design_zip_url: null | string; design_zip_name: null | string; reader_criteria: null | string } };
56
+ export type BatchJob = { [key: string]: unknown };
57
+ type IntroContent = { markdown: string };
58
+ type SectionContent = { heading: string; markdown: string };
59
+ type ImageContent = { url: string; alt: string };
60
+ type FaqContent = { html: string };
61
+ type VideoContent = { url: string };
62
+ type InteractiveContent = { type: 'quiz' | 'game' | 'calculator' | 'chart'; payload: JsonObject };
63
+ type PartContent = IntroContent | SectionContent | ImageContent | FaqContent | VideoContent | InteractiveContent;
64
+ export type RevisionDetailRes = { refused_report: null | JsonObject; replacement_report: null | JsonObject; revision_id: number; article_id: null | number; company_profile_id: null | number; part: 'intro' | 'section' | 'image' | 'feat_image' | 'faq' | 'video' | 'interactive'; index: null | number; target: null | 'answer' | 'section' | 'heading' | 'passage' | 'question'; text: null | string; reason: null | string; status: 'pending' | 'failed' | 'ready'; error: null | string; refused: PartContent; replacement: null | IntroContent | SectionContent | ImageContent | FaqContent | VideoContent | InteractiveContent; refused_score: null | number; replacement_score: null | number; verdict: null | 'better' | 'same' | 'worse'; verdict_note: null | string; applied: boolean; created_at: string; ready_at: null | string; decided_at: null | string };
65
+ export type RevisionRes = { revision_id: number; article_id: null | number; company_profile_id: null | number; part: 'intro' | 'section' | 'image' | 'feat_image' | 'faq' | 'video' | 'interactive'; index: null | number; target: null | 'answer' | 'section' | 'heading' | 'passage' | 'question'; text: null | string; reason: null | string; status: 'pending' | 'failed' | 'ready'; error: null | string; refused: PartContent; replacement: null | IntroContent | SectionContent | ImageContent | FaqContent | VideoContent | InteractiveContent; refused_score: null | number; replacement_score: null | number; verdict: null | 'better' | 'same' | 'worse'; verdict_note: null | string; applied: boolean; created_at: string; ready_at: null | string; decided_at: null | string };
66
+ export type VerdictRes = { revision: RevisionRes; applied: boolean; msg: string };
67
+ export type SetRoleRes = { msg: string; user: UserRes };
68
+ export type UserRes = { user_id: number; full_name: string; username: string; email: string; profile: null | string; role: 'admin' | 'normal'; is_verified: boolean; created_at: string };
69
+ type CsvTable = { fieldnames: null | string[]; rows: Map<string, string>[] };
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
2
  "name": "@mirage-cli/contentdynamite-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "The Content Dynamite CLI (ve-dynamite): SEO articles, Google Business Profile posts, BOFU landing pages, company profiles, ICP, design systems, revisions and featured images over the Content Dynamite API.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/alexbruf/mirage-cli.git",
9
+ "directory": "packages/contentdynamite-cli"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/alexbruf/mirage-cli/issues"
13
+ },
14
+ "homepage": "https://github.com/alexbruf/mirage-cli/tree/main/packages/contentdynamite-cli#readme",
15
+ "keywords": [
16
+ "content-dynamite",
17
+ "ve-dynamite",
18
+ "seo",
19
+ "landing-pages",
20
+ "google-business-profile",
21
+ "cli",
22
+ "mirage"
23
+ ],
24
+ "type": "module",
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js"
31
+ },
32
+ "./package.json": "./package.json"
33
+ },
34
+ "bin": {
35
+ "ve-dynamite": "./dist/bin.js"
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "README.md",
40
+ "CHANGELOG.md",
41
+ "LICENSE"
42
+ ],
43
+ "scripts": {
44
+ "dev": "bun run src/bin.ts",
45
+ "build": "rm -rf dist && bun build src/index.ts src/bin.ts --target=node --outdir=dist --splitting --external commander --external zod && bun run build:types && bun run scripts/postbuild.ts",
46
+ "build:types": "tsc -p tsconfig.build.json",
47
+ "test": "bun test --reporter=dots",
48
+ "typecheck": "tsc --noEmit"
49
+ },
50
+ "dependencies": {
51
+ "commander": "^14.0.3",
52
+ "zod": "^4.6.5"
53
+ },
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
57
+ "engines": {
58
+ "bun": ">=1.1.0",
59
+ "node": ">=18.0.0"
60
+ }
61
+ }