@mirage-cli/contentdynamite-cli 0.0.0-stage → 1.0.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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +72 -2
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +7 -0
- package/dist/client.d.ts +24 -0
- package/dist/commands/articles.d.ts +7 -0
- package/dist/commands/auth.d.ts +6 -0
- package/dist/commands/batches.d.ts +3 -0
- package/dist/commands/evals.d.ts +3 -0
- package/dist/commands/gbp.d.ts +3 -0
- package/dist/commands/images.d.ts +9 -0
- package/dist/commands/landing-pages.d.ts +3 -0
- package/dist/commands/profiles.d.ts +4 -0
- package/dist/commands/revisions.d.ts +4 -0
- package/dist/commands/tokens.d.ts +3 -0
- package/dist/commands/users.d.ts +3 -0
- package/dist/config.d.ts +6 -0
- package/dist/context.d.ts +13 -0
- package/dist/credentials.d.ts +23 -0
- package/dist/files.d.ts +3 -0
- package/dist/helpers.d.ts +27 -0
- package/dist/index-b00ea6js.js +2158 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -0
- package/dist/jobs.d.ts +4 -0
- package/dist/options.d.ts +8 -0
- package/dist/output.d.ts +10 -0
- package/dist/program.d.ts +4 -0
- package/dist/version.d.ts +1 -0
- package/dist/wire.d.ts +64 -0
- package/package.json +59 -4
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/dist/jobs.d.ts
ADDED
package/dist/output.d.ts
ADDED
|
@@ -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 @@
|
|
|
1
|
+
export declare const VERSION = "1.0.0";
|
package/dist/wire.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
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 ArticlePendingRes = { article_id: number; status: 'pending' | 'failed' };
|
|
28
|
+
export type ArticleQaRes = { article_id: number; score: number; stored: boolean; report: { image: null; score: number; notes: string[]; 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[]; 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 } };
|
|
29
|
+
export type BatchRes = { batch_id: number; name: string; total_articles: number; completed_articles: number; failed_articles: number; created_at: string };
|
|
30
|
+
export type BatchWriteRes = { msg: string; batch_id: number; article_ids: number[]; total: number };
|
|
31
|
+
type CarrierCounts = { [key: string]: number };
|
|
32
|
+
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> };
|
|
33
|
+
export type CleanProvenanceRes = { msg: string; article_id: number; removed: Record<string, CarrierCounts>; rewrite: RewriteStats | { ran: false }; dewatermark_status: null | 'done' | 'failed' | 'skipped' };
|
|
34
|
+
type EditTurn = { instruction: string; image_url: string };
|
|
35
|
+
export type EditFeatImageJobRes = { job_id: string; status: 'pending' | 'done' | 'failed'; image_url: null | string; history: null | EditTurn[]; error: null | string };
|
|
36
|
+
type EmbedAuditItem = { article_id: number; title: string; company_name: string; interactive_type: null | 'quiz' | 'game' | 'calculator' | 'chart'; payload_stored: boolean };
|
|
37
|
+
export type EmbedAuditRes = { articles: EmbedAuditItem[]; found: number; total_success: number; page: number; limit: number };
|
|
38
|
+
export type ListicleResearchPromptRes = { prompt: string; company_name: string; profile_id: number };
|
|
39
|
+
export type PaginatedArticlesRes = { articles: (ArticleDoneRes | ArticlePendingRes)[]; total: number; page: number; limit: number; total_pages: number };
|
|
40
|
+
type ProvenanceAuditItem = { article_id: number; title: string; company_name: string; findings: Record<string, CarrierCounts>; total_findings: number; dewatermark_status: null | 'done' | 'failed' | 'skipped' };
|
|
41
|
+
export type ProvenanceAuditRes = { articles: ProvenanceAuditItem[]; checked: number; total_success: number; page: number; limit: number };
|
|
42
|
+
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> };
|
|
43
|
+
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 };
|
|
44
|
+
export type WriteArticleRes = { msg: string; article_id: number; status: 'pending' };
|
|
45
|
+
export type BatchGbpPostsRes = { msg: string; gbp_post_ids: number[]; total: number };
|
|
46
|
+
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 };
|
|
47
|
+
export type WriteGbpPostRes = { msg: string; gbp_post_id: number; status: 'pending' };
|
|
48
|
+
export type ImageAuditItem = { landing_page_id: number; keyword: string; company_name: string; image_failures: string[]; placeholder_failures: string[] };
|
|
49
|
+
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 };
|
|
50
|
+
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 } };
|
|
51
|
+
export type BatchJob = { [key: string]: unknown };
|
|
52
|
+
type IntroContent = { markdown: string };
|
|
53
|
+
type SectionContent = { heading: string; markdown: string };
|
|
54
|
+
type ImageContent = { url: string; alt: string };
|
|
55
|
+
type FaqContent = { html: string };
|
|
56
|
+
type VideoContent = { url: string };
|
|
57
|
+
type InteractiveContent = { type: 'quiz' | 'game' | 'calculator' | 'chart'; payload: JsonObject };
|
|
58
|
+
type PartContent = IntroContent | SectionContent | ImageContent | FaqContent | VideoContent | InteractiveContent;
|
|
59
|
+
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 | 'section' | 'heading' | 'passage' | 'question' | 'answer'; 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 };
|
|
60
|
+
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 | 'section' | 'heading' | 'passage' | 'question' | 'answer'; 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 };
|
|
61
|
+
export type VerdictRes = { revision: RevisionRes; applied: boolean; msg: string };
|
|
62
|
+
export type SetRoleRes = { msg: string; user: UserRes };
|
|
63
|
+
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 };
|
|
64
|
+
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": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.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
|
+
}
|