embedoc 0.14.10 → 0.14.11
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 +2 -0
- package/cli-contract.yaml +1 -1
- package/dist/core/dependency.js +2 -2
- package/dist/core/dependency.js.map +1 -1
- package/dist/core/parser.d.ts +24 -2
- package/dist/core/parser.d.ts.map +1 -1
- package/dist/core/parser.js +76 -6
- package/dist/core/parser.js.map +1 -1
- package/dist/core/processor.d.ts.map +1 -1
- package/dist/core/processor.js +5 -3
- package/dist/core/processor.js.map +1 -1
- package/dist/embedoc.bundle.mjs +98 -97
- package/dist/embedoc.bundle.mjs.map +3 -3
- package/dist/generated/contract.js +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/docs/api/README.md +2 -2
- package/docs/cli-reference.md +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Auto-generated by cli-contracts. Do not edit.
|
|
2
2
|
// Embedded contract for the extract subcommand.
|
|
3
|
-
export const CONTRACT_YAML = "# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json\ncli_contracts: 0.1.0\n\ninfo:\n title: embedoc CLI\n version: 0.14.10\n description: >-\n In-place document generator that auto-updates marker blocks in documents\n and source code while preserving manually edited sections. Supports\n multiple datasources (SQLite, CSV, JSON, YAML, glob, TypeScript API), programmable\n TypeScript renderers, Handlebars file generation, and incremental builds\n with dependency tracking.\n license:\n name: MIT\n contact:\n name: foo-ogawa\n url: https://github.com/foo-ogawa/embedoc\n\nartifact_slots:\n config:\n direction: read\n description: embedoc.config.yaml configuration\n documents:\n direction: readwrite\n description: Target documents with @embedoc marker blocks\n templates:\n direction: read\n description: Handlebars templates for file generation\n datasources:\n direction: read\n description: Datasource files (SQLite, CSV, JSON, YAML, TypeScript sources)\n generated-files:\n direction: write\n description: Files generated by Handlebars templates\n\ncommand_sets:\n embedoc:\n summary: In-place document generator with marker-based embedding.\n executable: embedoc\n\n global_options:\n - name: version\n aliases: [V]\n description: Print version and exit.\n schema:\n type: boolean\n\n - name: help\n aliases: [h]\n description: Show help and exit.\n schema:\n type: boolean\n\n commands:\n # ── init ──────────────────────────────────────────\n init:\n summary: Initialize embedoc in the current project.\n description: >-\n Creates starter configuration and directory structure:\n embedoc.config.yaml, .embedoc/renderers/index.ts,\n .embedoc/datasources/index.ts, and .embedoc/templates/.\n If package.json exists, adds embedoc:build, embedoc:watch,\n and embedoc:generate npm scripts.\n usage:\n - embedoc init\n - embedoc init --force\n\n options:\n - name: force\n aliases: [f]\n description: Overwrite existing files.\n schema:\n type: boolean\n default: false\n\n exits:\n '0':\n description: Initialization succeeded.\n stdout:\n format: text\n files:\n - path: embedoc.config.yaml\n required: false\n media_type: application/yaml\n encoding: utf-8\n description: Configuration file.\n - path: .embedoc/renderers/index.ts\n required: false\n media_type: text/x-typescript\n encoding: utf-8\n description: Renderer registration file.\n - path: .embedoc/datasources/index.ts\n required: false\n media_type: text/x-typescript\n encoding: utf-8\n description: Custom datasource registration file.\n - path: .embedoc/templates/.gitkeep\n required: false\n description: Templates directory placeholder.\n\n '1':\n description: Initialization failed (write error).\n stderr:\n format: text\n\n x-agent:\n risk_level: low\n requires_confirmation: false\n idempotent: true\n side_effects:\n - file_write\n - directory_create\n\n # ── build ─────────────────────────────────────────\n build:\n summary: Build documents by replacing markers with rendered content.\n description: >-\n Loads configuration, initializes datasources, loads TypeScript\n renderers, and processes all target files (or specific files if\n provided). Each @embedoc marker block is re-rendered and the\n content between start/end markers is replaced in-place.\n usage:\n - embedoc build\n - embedoc build --config embedoc.config.yaml\n - embedoc build ./docs/tables/users.md\n - embedoc build --dry-run --verbose\n\n arguments:\n - name: files\n description: Specific file paths to process. If omitted, processes all targets from config.\n schema:\n type: array\n items:\n type: string\n variadic: true\n file:\n mode: readWrite\n exists: true\n\n options:\n - name: config\n aliases: [c]\n description: Path to config file (YAML or JSON).\n value_name: path\n schema:\n type: string\n default: embedoc.config.yaml\n file:\n mode: read\n exists: true\n media_type: application/yaml\n encoding: utf-8\n\n - name: dry-run\n aliases: [d]\n description: Preview changes without writing files.\n schema:\n type: boolean\n default: false\n\n - name: verbose\n aliases: [v]\n description: Enable verbose output.\n schema:\n type: boolean\n default: false\n\n exits:\n '0':\n description: Build succeeded. All markers were processed without errors.\n stdout:\n format: text\n\n '1':\n description: Build failed (config not found, datasource error, or marker processing error).\n stderr:\n format: text\n\n x-agent:\n risk_level: medium\n requires_confirmation: false\n idempotent: true\n side_effects:\n - file_write\n safe_dry_run_option: --dry-run\n recommended_before_use:\n - Ensure embedoc.config.yaml exists (run init if needed).\n - Verify datasource files are accessible.\n\n # ── generate ──────────────────────────────────────\n generate:\n summary: Generate new files from datasource records using Handlebars templates.\n description: >-\n Reads datasource records and generates new files using Handlebars\n templates defined in the generators config. Requires either\n --datasource to process a specific datasource or --all to process\n all datasources that have generators configured. Optionally filter\n by generator template name with --generator.\n usage:\n - embedoc generate --datasource tables\n - embedoc generate --all\n - embedoc generate --datasource tables --generator table_doc.hbs\n - embedoc generate --all --dry-run --verbose\n\n options:\n - name: config\n aliases: [c]\n description: Path to config file (YAML or JSON).\n value_name: path\n schema:\n type: string\n default: embedoc.config.yaml\n file:\n mode: read\n exists: true\n media_type: application/yaml\n encoding: utf-8\n\n - name: datasource\n aliases: [s]\n description: Specific datasource to process.\n value_name: name\n schema:\n type: string\n\n - name: generator\n aliases: [g]\n description: Specific generator template to use.\n value_name: name\n schema:\n type: string\n\n - name: all\n aliases: [a]\n description: Process all datasources that have generators configured.\n schema:\n type: boolean\n default: false\n\n - name: dry-run\n aliases: [d]\n description: Preview generation without writing files.\n schema:\n type: boolean\n default: false\n\n - name: verbose\n aliases: [v]\n description: Enable verbose output.\n schema:\n type: boolean\n default: false\n\n exits:\n '0':\n description: Generation succeeded.\n stdout:\n format: text\n\n '1':\n description: >-\n Generation failed (missing --datasource/--all, config not found,\n datasource error, or template error).\n stderr:\n format: text\n\n x-agent:\n risk_level: medium\n requires_confirmation: false\n idempotent: true\n side_effects:\n - file_write\n safe_dry_run_option: --dry-run\n recommended_before_use:\n - Ensure embedoc.config.yaml exists with generators configured.\n - Verify datasource files are accessible.\n - Ensure Handlebars templates exist in templates_dir.\n\n # ── watch ─────────────────────────────────────────\n watch:\n summary: Watch files and rebuild on changes with dependency tracking.\n description: >-\n Monitors target files, renderers, and datasource files for changes.\n When a change is detected, rebuilds only affected documents using\n the dependency graph. Renderer changes trigger a full renderer\n reload and dependency graph rebuild. Runs until interrupted with\n SIGINT (Ctrl+C).\n usage:\n - embedoc watch\n - embedoc watch --config embedoc.config.yaml\n - embedoc watch --verbose\n - embedoc watch --debug-deps\n\n options:\n - name: config\n aliases: [c]\n description: Path to config file (YAML or JSON).\n value_name: path\n schema:\n type: string\n default: embedoc.config.yaml\n file:\n mode: read\n exists: true\n media_type: application/yaml\n encoding: utf-8\n\n - name: verbose\n aliases: [v]\n description: Enable verbose rebuild output.\n schema:\n type: boolean\n default: false\n\n - name: debug-deps\n description: Print dependency graph at startup for debugging.\n schema:\n type: boolean\n default: false\n\n signals:\n SIGINT:\n description: Gracefully stops the watcher, closes datasources, and exits.\n\n exits:\n '0':\n description: Watcher stopped gracefully (via SIGINT).\n stdout:\n format: text\n\n '1':\n description: Watch failed (config not found or initialization error).\n stderr:\n format: text\n\n x-agent:\n risk_level: medium\n requires_confirmation: false\n idempotent: true\n side_effects:\n - file_write\n recommended_before_use:\n - Ensure embedoc.config.yaml exists (run init if needed).\n - Verify datasource files are accessible.\n";
|
|
4
|
-
export const CONTRACT_JSON_STR = "{\n \"cli_contracts\": \"0.1.0\",\n \"info\": {\n \"title\": \"embedoc CLI\",\n \"version\": \"0.14.10\",\n \"description\": \"In-place document generator that auto-updates marker blocks in documents and source code while preserving manually edited sections. Supports multiple datasources (SQLite, CSV, JSON, YAML, glob, TypeScript API), programmable TypeScript renderers, Handlebars file generation, and incremental builds with dependency tracking.\",\n \"license\": {\n \"name\": \"MIT\"\n },\n \"contact\": {\n \"name\": \"foo-ogawa\",\n \"url\": \"https://github.com/foo-ogawa/embedoc\"\n }\n },\n \"artifact_slots\": {\n \"config\": {\n \"direction\": \"read\",\n \"description\": \"embedoc.config.yaml configuration\"\n },\n \"documents\": {\n \"direction\": \"readwrite\",\n \"description\": \"Target documents with @embedoc marker blocks\"\n },\n \"templates\": {\n \"direction\": \"read\",\n \"description\": \"Handlebars templates for file generation\"\n },\n \"datasources\": {\n \"direction\": \"read\",\n \"description\": \"Datasource files (SQLite, CSV, JSON, YAML, TypeScript sources)\"\n },\n \"generated-files\": {\n \"direction\": \"write\",\n \"description\": \"Files generated by Handlebars templates\"\n }\n },\n \"command_sets\": {\n \"embedoc\": {\n \"summary\": \"In-place document generator with marker-based embedding.\",\n \"executable\": \"embedoc\",\n \"global_options\": [\n {\n \"name\": \"version\",\n \"aliases\": [\n \"V\"\n ],\n \"description\": \"Print version and exit.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"help\",\n \"aliases\": [\n \"h\"\n ],\n \"description\": \"Show help and exit.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n ],\n \"commands\": {\n \"init\": {\n \"summary\": \"Initialize embedoc in the current project.\",\n \"description\": \"Creates starter configuration and directory structure: embedoc.config.yaml, .embedoc/renderers/index.ts, .embedoc/datasources/index.ts, and .embedoc/templates/. If package.json exists, adds embedoc:build, embedoc:watch, and embedoc:generate npm scripts.\",\n \"usage\": [\n \"embedoc init\",\n \"embedoc init --force\"\n ],\n \"options\": [\n {\n \"name\": \"force\",\n \"aliases\": [\n \"f\"\n ],\n \"description\": \"Overwrite existing files.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Initialization succeeded.\",\n \"stdout\": {\n \"format\": \"text\"\n },\n \"files\": [\n {\n \"path\": \"embedoc.config.yaml\",\n \"required\": false,\n \"media_type\": \"application/yaml\",\n \"encoding\": \"utf-8\",\n \"description\": \"Configuration file.\"\n },\n {\n \"path\": \".embedoc/renderers/index.ts\",\n \"required\": false,\n \"media_type\": \"text/x-typescript\",\n \"encoding\": \"utf-8\",\n \"description\": \"Renderer registration file.\"\n },\n {\n \"path\": \".embedoc/datasources/index.ts\",\n \"required\": false,\n \"media_type\": \"text/x-typescript\",\n \"encoding\": \"utf-8\",\n \"description\": \"Custom datasource registration file.\"\n },\n {\n \"path\": \".embedoc/templates/.gitkeep\",\n \"required\": false,\n \"description\": \"Templates directory placeholder.\"\n }\n ]\n },\n \"1\": {\n \"description\": \"Initialization failed (write error).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"risk_level\": \"low\",\n \"requires_confirmation\": false,\n \"idempotent\": true,\n \"side_effects\": [\n \"file_write\",\n \"directory_create\"\n ]\n }\n },\n \"build\": {\n \"summary\": \"Build documents by replacing markers with rendered content.\",\n \"description\": \"Loads configuration, initializes datasources, loads TypeScript renderers, and processes all target files (or specific files if provided). Each @embedoc marker block is re-rendered and the content between start/end markers is replaced in-place.\",\n \"usage\": [\n \"embedoc build\",\n \"embedoc build --config embedoc.config.yaml\",\n \"embedoc build ./docs/tables/users.md\",\n \"embedoc build --dry-run --verbose\"\n ],\n \"arguments\": [\n {\n \"name\": \"files\",\n \"description\": \"Specific file paths to process. If omitted, processes all targets from config.\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"variadic\": true,\n \"file\": {\n \"mode\": \"readWrite\",\n \"exists\": true\n }\n }\n ],\n \"options\": [\n {\n \"name\": \"config\",\n \"aliases\": [\n \"c\"\n ],\n \"description\": \"Path to config file (YAML or JSON).\",\n \"value_name\": \"path\",\n \"schema\": {\n \"type\": \"string\",\n \"default\": \"embedoc.config.yaml\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/yaml\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"dry-run\",\n \"aliases\": [\n \"d\"\n ],\n \"description\": \"Preview changes without writing files.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n {\n \"name\": \"verbose\",\n \"aliases\": [\n \"v\"\n ],\n \"description\": \"Enable verbose output.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Build succeeded. All markers were processed without errors.\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Build failed (config not found, datasource error, or marker processing error).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"risk_level\": \"medium\",\n \"requires_confirmation\": false,\n \"idempotent\": true,\n \"side_effects\": [\n \"file_write\"\n ],\n \"safe_dry_run_option\": \"--dry-run\",\n \"recommended_before_use\": [\n \"Ensure embedoc.config.yaml exists (run init if needed).\",\n \"Verify datasource files are accessible.\"\n ]\n }\n },\n \"generate\": {\n \"summary\": \"Generate new files from datasource records using Handlebars templates.\",\n \"description\": \"Reads datasource records and generates new files using Handlebars templates defined in the generators config. Requires either --datasource to process a specific datasource or --all to process all datasources that have generators configured. Optionally filter by generator template name with --generator.\",\n \"usage\": [\n \"embedoc generate --datasource tables\",\n \"embedoc generate --all\",\n \"embedoc generate --datasource tables --generator table_doc.hbs\",\n \"embedoc generate --all --dry-run --verbose\"\n ],\n \"options\": [\n {\n \"name\": \"config\",\n \"aliases\": [\n \"c\"\n ],\n \"description\": \"Path to config file (YAML or JSON).\",\n \"value_name\": \"path\",\n \"schema\": {\n \"type\": \"string\",\n \"default\": \"embedoc.config.yaml\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/yaml\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"datasource\",\n \"aliases\": [\n \"s\"\n ],\n \"description\": \"Specific datasource to process.\",\n \"value_name\": \"name\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"generator\",\n \"aliases\": [\n \"g\"\n ],\n \"description\": \"Specific generator template to use.\",\n \"value_name\": \"name\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"all\",\n \"aliases\": [\n \"a\"\n ],\n \"description\": \"Process all datasources that have generators configured.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n {\n \"name\": \"dry-run\",\n \"aliases\": [\n \"d\"\n ],\n \"description\": \"Preview generation without writing files.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n {\n \"name\": \"verbose\",\n \"aliases\": [\n \"v\"\n ],\n \"description\": \"Enable verbose output.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Generation succeeded.\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Generation failed (missing --datasource/--all, config not found, datasource error, or template error).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"risk_level\": \"medium\",\n \"requires_confirmation\": false,\n \"idempotent\": true,\n \"side_effects\": [\n \"file_write\"\n ],\n \"safe_dry_run_option\": \"--dry-run\",\n \"recommended_before_use\": [\n \"Ensure embedoc.config.yaml exists with generators configured.\",\n \"Verify datasource files are accessible.\",\n \"Ensure Handlebars templates exist in templates_dir.\"\n ]\n }\n },\n \"watch\": {\n \"summary\": \"Watch files and rebuild on changes with dependency tracking.\",\n \"description\": \"Monitors target files, renderers, and datasource files for changes. When a change is detected, rebuilds only affected documents using the dependency graph. Renderer changes trigger a full renderer reload and dependency graph rebuild. Runs until interrupted with SIGINT (Ctrl+C).\",\n \"usage\": [\n \"embedoc watch\",\n \"embedoc watch --config embedoc.config.yaml\",\n \"embedoc watch --verbose\",\n \"embedoc watch --debug-deps\"\n ],\n \"options\": [\n {\n \"name\": \"config\",\n \"aliases\": [\n \"c\"\n ],\n \"description\": \"Path to config file (YAML or JSON).\",\n \"value_name\": \"path\",\n \"schema\": {\n \"type\": \"string\",\n \"default\": \"embedoc.config.yaml\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/yaml\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"verbose\",\n \"aliases\": [\n \"v\"\n ],\n \"description\": \"Enable verbose rebuild output.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n {\n \"name\": \"debug-deps\",\n \"description\": \"Print dependency graph at startup for debugging.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n ],\n \"signals\": {\n \"SIGINT\": {\n \"description\": \"Gracefully stops the watcher, closes datasources, and exits.\"\n }\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Watcher stopped gracefully (via SIGINT).\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Watch failed (config not found or initialization error).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"risk_level\": \"medium\",\n \"requires_confirmation\": false,\n \"idempotent\": true,\n \"side_effects\": [\n \"file_write\"\n ],\n \"recommended_before_use\": [\n \"Ensure embedoc.config.yaml exists (run init if needed).\",\n \"Verify datasource files are accessible.\"\n ]\n }\n }\n }\n }\n }\n}";
|
|
3
|
+
export const CONTRACT_YAML = "# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json\ncli_contracts: 0.1.0\n\ninfo:\n title: embedoc CLI\n version: 0.14.11\n description: >-\n In-place document generator that auto-updates marker blocks in documents\n and source code while preserving manually edited sections. Supports\n multiple datasources (SQLite, CSV, JSON, YAML, glob, TypeScript API), programmable\n TypeScript renderers, Handlebars file generation, and incremental builds\n with dependency tracking.\n license:\n name: MIT\n contact:\n name: foo-ogawa\n url: https://github.com/foo-ogawa/embedoc\n\nartifact_slots:\n config:\n direction: read\n description: embedoc.config.yaml configuration\n documents:\n direction: readwrite\n description: Target documents with @embedoc marker blocks\n templates:\n direction: read\n description: Handlebars templates for file generation\n datasources:\n direction: read\n description: Datasource files (SQLite, CSV, JSON, YAML, TypeScript sources)\n generated-files:\n direction: write\n description: Files generated by Handlebars templates\n\ncommand_sets:\n embedoc:\n summary: In-place document generator with marker-based embedding.\n executable: embedoc\n\n global_options:\n - name: version\n aliases: [V]\n description: Print version and exit.\n schema:\n type: boolean\n\n - name: help\n aliases: [h]\n description: Show help and exit.\n schema:\n type: boolean\n\n commands:\n # ── init ──────────────────────────────────────────\n init:\n summary: Initialize embedoc in the current project.\n description: >-\n Creates starter configuration and directory structure:\n embedoc.config.yaml, .embedoc/renderers/index.ts,\n .embedoc/datasources/index.ts, and .embedoc/templates/.\n If package.json exists, adds embedoc:build, embedoc:watch,\n and embedoc:generate npm scripts.\n usage:\n - embedoc init\n - embedoc init --force\n\n options:\n - name: force\n aliases: [f]\n description: Overwrite existing files.\n schema:\n type: boolean\n default: false\n\n exits:\n '0':\n description: Initialization succeeded.\n stdout:\n format: text\n files:\n - path: embedoc.config.yaml\n required: false\n media_type: application/yaml\n encoding: utf-8\n description: Configuration file.\n - path: .embedoc/renderers/index.ts\n required: false\n media_type: text/x-typescript\n encoding: utf-8\n description: Renderer registration file.\n - path: .embedoc/datasources/index.ts\n required: false\n media_type: text/x-typescript\n encoding: utf-8\n description: Custom datasource registration file.\n - path: .embedoc/templates/.gitkeep\n required: false\n description: Templates directory placeholder.\n\n '1':\n description: Initialization failed (write error).\n stderr:\n format: text\n\n x-agent:\n risk_level: low\n requires_confirmation: false\n idempotent: true\n side_effects:\n - file_write\n - directory_create\n\n # ── build ─────────────────────────────────────────\n build:\n summary: Build documents by replacing markers with rendered content.\n description: >-\n Loads configuration, initializes datasources, loads TypeScript\n renderers, and processes all target files (or specific files if\n provided). Each @embedoc marker block is re-rendered and the\n content between start/end markers is replaced in-place.\n usage:\n - embedoc build\n - embedoc build --config embedoc.config.yaml\n - embedoc build ./docs/tables/users.md\n - embedoc build --dry-run --verbose\n\n arguments:\n - name: files\n description: Specific file paths to process. If omitted, processes all targets from config.\n schema:\n type: array\n items:\n type: string\n variadic: true\n file:\n mode: readWrite\n exists: true\n\n options:\n - name: config\n aliases: [c]\n description: Path to config file (YAML or JSON).\n value_name: path\n schema:\n type: string\n default: embedoc.config.yaml\n file:\n mode: read\n exists: true\n media_type: application/yaml\n encoding: utf-8\n\n - name: dry-run\n aliases: [d]\n description: Preview changes without writing files.\n schema:\n type: boolean\n default: false\n\n - name: verbose\n aliases: [v]\n description: Enable verbose output.\n schema:\n type: boolean\n default: false\n\n exits:\n '0':\n description: Build succeeded. All markers were processed without errors.\n stdout:\n format: text\n\n '1':\n description: Build failed (config not found, datasource error, or marker processing error).\n stderr:\n format: text\n\n x-agent:\n risk_level: medium\n requires_confirmation: false\n idempotent: true\n side_effects:\n - file_write\n safe_dry_run_option: --dry-run\n recommended_before_use:\n - Ensure embedoc.config.yaml exists (run init if needed).\n - Verify datasource files are accessible.\n\n # ── generate ──────────────────────────────────────\n generate:\n summary: Generate new files from datasource records using Handlebars templates.\n description: >-\n Reads datasource records and generates new files using Handlebars\n templates defined in the generators config. Requires either\n --datasource to process a specific datasource or --all to process\n all datasources that have generators configured. Optionally filter\n by generator template name with --generator.\n usage:\n - embedoc generate --datasource tables\n - embedoc generate --all\n - embedoc generate --datasource tables --generator table_doc.hbs\n - embedoc generate --all --dry-run --verbose\n\n options:\n - name: config\n aliases: [c]\n description: Path to config file (YAML or JSON).\n value_name: path\n schema:\n type: string\n default: embedoc.config.yaml\n file:\n mode: read\n exists: true\n media_type: application/yaml\n encoding: utf-8\n\n - name: datasource\n aliases: [s]\n description: Specific datasource to process.\n value_name: name\n schema:\n type: string\n\n - name: generator\n aliases: [g]\n description: Specific generator template to use.\n value_name: name\n schema:\n type: string\n\n - name: all\n aliases: [a]\n description: Process all datasources that have generators configured.\n schema:\n type: boolean\n default: false\n\n - name: dry-run\n aliases: [d]\n description: Preview generation without writing files.\n schema:\n type: boolean\n default: false\n\n - name: verbose\n aliases: [v]\n description: Enable verbose output.\n schema:\n type: boolean\n default: false\n\n exits:\n '0':\n description: Generation succeeded.\n stdout:\n format: text\n\n '1':\n description: >-\n Generation failed (missing --datasource/--all, config not found,\n datasource error, or template error).\n stderr:\n format: text\n\n x-agent:\n risk_level: medium\n requires_confirmation: false\n idempotent: true\n side_effects:\n - file_write\n safe_dry_run_option: --dry-run\n recommended_before_use:\n - Ensure embedoc.config.yaml exists with generators configured.\n - Verify datasource files are accessible.\n - Ensure Handlebars templates exist in templates_dir.\n\n # ── watch ─────────────────────────────────────────\n watch:\n summary: Watch files and rebuild on changes with dependency tracking.\n description: >-\n Monitors target files, renderers, and datasource files for changes.\n When a change is detected, rebuilds only affected documents using\n the dependency graph. Renderer changes trigger a full renderer\n reload and dependency graph rebuild. Runs until interrupted with\n SIGINT (Ctrl+C).\n usage:\n - embedoc watch\n - embedoc watch --config embedoc.config.yaml\n - embedoc watch --verbose\n - embedoc watch --debug-deps\n\n options:\n - name: config\n aliases: [c]\n description: Path to config file (YAML or JSON).\n value_name: path\n schema:\n type: string\n default: embedoc.config.yaml\n file:\n mode: read\n exists: true\n media_type: application/yaml\n encoding: utf-8\n\n - name: verbose\n aliases: [v]\n description: Enable verbose rebuild output.\n schema:\n type: boolean\n default: false\n\n - name: debug-deps\n description: Print dependency graph at startup for debugging.\n schema:\n type: boolean\n default: false\n\n signals:\n SIGINT:\n description: Gracefully stops the watcher, closes datasources, and exits.\n\n exits:\n '0':\n description: Watcher stopped gracefully (via SIGINT).\n stdout:\n format: text\n\n '1':\n description: Watch failed (config not found or initialization error).\n stderr:\n format: text\n\n x-agent:\n risk_level: medium\n requires_confirmation: false\n idempotent: true\n side_effects:\n - file_write\n recommended_before_use:\n - Ensure embedoc.config.yaml exists (run init if needed).\n - Verify datasource files are accessible.\n";
|
|
4
|
+
export const CONTRACT_JSON_STR = "{\n \"cli_contracts\": \"0.1.0\",\n \"info\": {\n \"title\": \"embedoc CLI\",\n \"version\": \"0.14.11\",\n \"description\": \"In-place document generator that auto-updates marker blocks in documents and source code while preserving manually edited sections. Supports multiple datasources (SQLite, CSV, JSON, YAML, glob, TypeScript API), programmable TypeScript renderers, Handlebars file generation, and incremental builds with dependency tracking.\",\n \"license\": {\n \"name\": \"MIT\"\n },\n \"contact\": {\n \"name\": \"foo-ogawa\",\n \"url\": \"https://github.com/foo-ogawa/embedoc\"\n }\n },\n \"artifact_slots\": {\n \"config\": {\n \"direction\": \"read\",\n \"description\": \"embedoc.config.yaml configuration\"\n },\n \"documents\": {\n \"direction\": \"readwrite\",\n \"description\": \"Target documents with @embedoc marker blocks\"\n },\n \"templates\": {\n \"direction\": \"read\",\n \"description\": \"Handlebars templates for file generation\"\n },\n \"datasources\": {\n \"direction\": \"read\",\n \"description\": \"Datasource files (SQLite, CSV, JSON, YAML, TypeScript sources)\"\n },\n \"generated-files\": {\n \"direction\": \"write\",\n \"description\": \"Files generated by Handlebars templates\"\n }\n },\n \"command_sets\": {\n \"embedoc\": {\n \"summary\": \"In-place document generator with marker-based embedding.\",\n \"executable\": \"embedoc\",\n \"global_options\": [\n {\n \"name\": \"version\",\n \"aliases\": [\n \"V\"\n ],\n \"description\": \"Print version and exit.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n },\n {\n \"name\": \"help\",\n \"aliases\": [\n \"h\"\n ],\n \"description\": \"Show help and exit.\",\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n ],\n \"commands\": {\n \"init\": {\n \"summary\": \"Initialize embedoc in the current project.\",\n \"description\": \"Creates starter configuration and directory structure: embedoc.config.yaml, .embedoc/renderers/index.ts, .embedoc/datasources/index.ts, and .embedoc/templates/. If package.json exists, adds embedoc:build, embedoc:watch, and embedoc:generate npm scripts.\",\n \"usage\": [\n \"embedoc init\",\n \"embedoc init --force\"\n ],\n \"options\": [\n {\n \"name\": \"force\",\n \"aliases\": [\n \"f\"\n ],\n \"description\": \"Overwrite existing files.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Initialization succeeded.\",\n \"stdout\": {\n \"format\": \"text\"\n },\n \"files\": [\n {\n \"path\": \"embedoc.config.yaml\",\n \"required\": false,\n \"media_type\": \"application/yaml\",\n \"encoding\": \"utf-8\",\n \"description\": \"Configuration file.\"\n },\n {\n \"path\": \".embedoc/renderers/index.ts\",\n \"required\": false,\n \"media_type\": \"text/x-typescript\",\n \"encoding\": \"utf-8\",\n \"description\": \"Renderer registration file.\"\n },\n {\n \"path\": \".embedoc/datasources/index.ts\",\n \"required\": false,\n \"media_type\": \"text/x-typescript\",\n \"encoding\": \"utf-8\",\n \"description\": \"Custom datasource registration file.\"\n },\n {\n \"path\": \".embedoc/templates/.gitkeep\",\n \"required\": false,\n \"description\": \"Templates directory placeholder.\"\n }\n ]\n },\n \"1\": {\n \"description\": \"Initialization failed (write error).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"risk_level\": \"low\",\n \"requires_confirmation\": false,\n \"idempotent\": true,\n \"side_effects\": [\n \"file_write\",\n \"directory_create\"\n ]\n }\n },\n \"build\": {\n \"summary\": \"Build documents by replacing markers with rendered content.\",\n \"description\": \"Loads configuration, initializes datasources, loads TypeScript renderers, and processes all target files (or specific files if provided). Each @embedoc marker block is re-rendered and the content between start/end markers is replaced in-place.\",\n \"usage\": [\n \"embedoc build\",\n \"embedoc build --config embedoc.config.yaml\",\n \"embedoc build ./docs/tables/users.md\",\n \"embedoc build --dry-run --verbose\"\n ],\n \"arguments\": [\n {\n \"name\": \"files\",\n \"description\": \"Specific file paths to process. If omitted, processes all targets from config.\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"variadic\": true,\n \"file\": {\n \"mode\": \"readWrite\",\n \"exists\": true\n }\n }\n ],\n \"options\": [\n {\n \"name\": \"config\",\n \"aliases\": [\n \"c\"\n ],\n \"description\": \"Path to config file (YAML or JSON).\",\n \"value_name\": \"path\",\n \"schema\": {\n \"type\": \"string\",\n \"default\": \"embedoc.config.yaml\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/yaml\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"dry-run\",\n \"aliases\": [\n \"d\"\n ],\n \"description\": \"Preview changes without writing files.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n {\n \"name\": \"verbose\",\n \"aliases\": [\n \"v\"\n ],\n \"description\": \"Enable verbose output.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Build succeeded. All markers were processed without errors.\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Build failed (config not found, datasource error, or marker processing error).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"risk_level\": \"medium\",\n \"requires_confirmation\": false,\n \"idempotent\": true,\n \"side_effects\": [\n \"file_write\"\n ],\n \"safe_dry_run_option\": \"--dry-run\",\n \"recommended_before_use\": [\n \"Ensure embedoc.config.yaml exists (run init if needed).\",\n \"Verify datasource files are accessible.\"\n ]\n }\n },\n \"generate\": {\n \"summary\": \"Generate new files from datasource records using Handlebars templates.\",\n \"description\": \"Reads datasource records and generates new files using Handlebars templates defined in the generators config. Requires either --datasource to process a specific datasource or --all to process all datasources that have generators configured. Optionally filter by generator template name with --generator.\",\n \"usage\": [\n \"embedoc generate --datasource tables\",\n \"embedoc generate --all\",\n \"embedoc generate --datasource tables --generator table_doc.hbs\",\n \"embedoc generate --all --dry-run --verbose\"\n ],\n \"options\": [\n {\n \"name\": \"config\",\n \"aliases\": [\n \"c\"\n ],\n \"description\": \"Path to config file (YAML or JSON).\",\n \"value_name\": \"path\",\n \"schema\": {\n \"type\": \"string\",\n \"default\": \"embedoc.config.yaml\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/yaml\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"datasource\",\n \"aliases\": [\n \"s\"\n ],\n \"description\": \"Specific datasource to process.\",\n \"value_name\": \"name\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"generator\",\n \"aliases\": [\n \"g\"\n ],\n \"description\": \"Specific generator template to use.\",\n \"value_name\": \"name\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"all\",\n \"aliases\": [\n \"a\"\n ],\n \"description\": \"Process all datasources that have generators configured.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n {\n \"name\": \"dry-run\",\n \"aliases\": [\n \"d\"\n ],\n \"description\": \"Preview generation without writing files.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n {\n \"name\": \"verbose\",\n \"aliases\": [\n \"v\"\n ],\n \"description\": \"Enable verbose output.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n ],\n \"exits\": {\n \"0\": {\n \"description\": \"Generation succeeded.\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Generation failed (missing --datasource/--all, config not found, datasource error, or template error).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"risk_level\": \"medium\",\n \"requires_confirmation\": false,\n \"idempotent\": true,\n \"side_effects\": [\n \"file_write\"\n ],\n \"safe_dry_run_option\": \"--dry-run\",\n \"recommended_before_use\": [\n \"Ensure embedoc.config.yaml exists with generators configured.\",\n \"Verify datasource files are accessible.\",\n \"Ensure Handlebars templates exist in templates_dir.\"\n ]\n }\n },\n \"watch\": {\n \"summary\": \"Watch files and rebuild on changes with dependency tracking.\",\n \"description\": \"Monitors target files, renderers, and datasource files for changes. When a change is detected, rebuilds only affected documents using the dependency graph. Renderer changes trigger a full renderer reload and dependency graph rebuild. Runs until interrupted with SIGINT (Ctrl+C).\",\n \"usage\": [\n \"embedoc watch\",\n \"embedoc watch --config embedoc.config.yaml\",\n \"embedoc watch --verbose\",\n \"embedoc watch --debug-deps\"\n ],\n \"options\": [\n {\n \"name\": \"config\",\n \"aliases\": [\n \"c\"\n ],\n \"description\": \"Path to config file (YAML or JSON).\",\n \"value_name\": \"path\",\n \"schema\": {\n \"type\": \"string\",\n \"default\": \"embedoc.config.yaml\"\n },\n \"file\": {\n \"mode\": \"read\",\n \"exists\": true,\n \"media_type\": \"application/yaml\",\n \"encoding\": \"utf-8\"\n }\n },\n {\n \"name\": \"verbose\",\n \"aliases\": [\n \"v\"\n ],\n \"description\": \"Enable verbose rebuild output.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n {\n \"name\": \"debug-deps\",\n \"description\": \"Print dependency graph at startup for debugging.\",\n \"schema\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n ],\n \"signals\": {\n \"SIGINT\": {\n \"description\": \"Gracefully stops the watcher, closes datasources, and exits.\"\n }\n },\n \"exits\": {\n \"0\": {\n \"description\": \"Watcher stopped gracefully (via SIGINT).\",\n \"stdout\": {\n \"format\": \"text\"\n }\n },\n \"1\": {\n \"description\": \"Watch failed (config not found or initialization error).\",\n \"stderr\": {\n \"format\": \"text\"\n }\n }\n },\n \"x-agent\": {\n \"risk_level\": \"medium\",\n \"requires_confirmation\": false,\n \"idempotent\": true,\n \"side_effects\": [\n \"file_write\"\n ],\n \"recommended_before_use\": [\n \"Ensure embedoc.config.yaml exists (run init if needed).\",\n \"Verify datasource files are accessible.\"\n ]\n }\n }\n }\n }\n }\n}";
|
|
5
5
|
//# sourceMappingURL=contract.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
export type { CommentStyle, TargetConfig, GeneratorConfig, DatasourceConfig, OutputConfig, GithubConfig, EmbedocConfig, EmbedifyConfig, InlineDatasourceConfig, ParsedMarker, DetectedComment, QueryResult, Datasource, DatasourceFactory, BuiltinDatasourceType, CustomDatasourceDefinition, InlineFormatParser, TypeScriptDatasourceConfig, ApiSymbolKind, ApiMemberKind, ApiSource, ApiTag, ApiTypeParameter, ApiParameter, ApiSignature, ApiMember, ApiLinkTarget, ApiSymbol, MarkdownHelper, EmbedContext, EmbedResult, EmbedDefinition, DefineEmbedFn, ParsedFrontmatter, ProcessResult, GenerateResult, BuildResult, CLIOptions, } from './types/index.js';
|
|
18
18
|
export { build, processFile } from './core/processor.js';
|
|
19
19
|
export { generateAll, generateFromDatasource } from './core/generator.js';
|
|
20
|
-
export { parseMarkers, parseFrontmatter, parseAttributes, resolveVariables, getCommentStyle, guessCommentStyle, parseInlineDataMarkers, DEFAULT_COMMENT_STYLES, } from './core/parser.js';
|
|
20
|
+
export { parseMarkers, parseFrontmatter, parseAttributes, resolveVariables, getCommentStyle, guessCommentStyle, parseInlineDataMarkers, isMarkdownFile, codeFenceRanges, DEFAULT_COMMENT_STYLES, } from './core/parser.js';
|
|
21
|
+
export type { MarkerParseOptions } from './core/parser.js';
|
|
21
22
|
export { InlineDatasource, buildInlineDatasources, parseDotPath, resolveDotPath, setDotPath, getRootName, parseInlineContent, } from './core/inline-datasource.js';
|
|
22
23
|
export type { ParsedInlineData, ContentProcessingOptions, InlineDefinitionLocation } from './core/inline-datasource.js';
|
|
23
24
|
export { DependencyGraph } from './core/dependency.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,YAAY,EAEV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,sBAAsB,EAEtB,YAAY,EACZ,eAAe,EAEf,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB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;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,gBAAgB,GAC3B,YAAY,0BAA0B,KACrC,0BAAwC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// Core functions
|
|
18
18
|
export { build, processFile } from './core/processor.js';
|
|
19
19
|
export { generateAll, generateFromDatasource } from './core/generator.js';
|
|
20
|
-
export { parseMarkers, parseFrontmatter, parseAttributes, resolveVariables, getCommentStyle, guessCommentStyle, parseInlineDataMarkers, DEFAULT_COMMENT_STYLES, } from './core/parser.js';
|
|
20
|
+
export { parseMarkers, parseFrontmatter, parseAttributes, resolveVariables, getCommentStyle, guessCommentStyle, parseInlineDataMarkers, isMarkdownFile, codeFenceRanges, DEFAULT_COMMENT_STYLES, } from './core/parser.js';
|
|
21
21
|
// Inline datasource
|
|
22
22
|
export { InlineDatasource, buildInlineDatasources, parseDotPath, resolveDotPath, setDotPath, getRootName, parseInlineContent, } from './core/inline-datasource.js';
|
|
23
23
|
export { DependencyGraph } from './core/dependency.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAmDH,iBAAiB;AACjB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAmDH,iBAAiB;AACjB,OAAO,EAAE,KAAK,EAAE,WA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
1277
1277
|
```
|
|
1278
1278
|
|
|
1279
|
-
Defined in: [index.ts:
|
|
1279
|
+
Defined in: [index.ts:188](https://github.com/foo-ogawa/embedoc/blob/main/src/index.ts#L188)
|
|
1280
1280
|
|
|
1281
1281
|
Define a custom embed for generating content in documents.
|
|
1282
1282
|
|
|
@@ -1411,7 +1411,7 @@ Markdown
|
|
|
1411
1411
|
function defineDatasource(definition: CustomDatasourceDefinition): CustomDatasourceDefinition;
|
|
1412
1412
|
```
|
|
1413
1413
|
|
|
1414
|
-
Defined in: [index.ts:
|
|
1414
|
+
Defined in: [index.ts:226](https://github.com/foo-ogawa/embedoc/blob/main/src/index.ts#L226)
|
|
1415
1415
|
|
|
1416
1416
|
Define a custom datasource type for use in `embedoc.config.yaml`.
|
|
1417
1417
|
|
package/docs/cli-reference.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
In-place document generator that auto-updates marker blocks in documents and source code while preserving manually edited sections. Supports multiple datasources (SQLite, CSV, JSON, YAML, glob, TypeScript API), programmable TypeScript renderers, Handlebars file generation, and incremental builds with dependency tracking.
|
|
4
4
|
|
|
5
|
-
**Version:** 0.14.
|
|
5
|
+
**Version:** 0.14.11
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "embedoc",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.11",
|
|
4
4
|
"description": "In-place document generator that auto-updates marker blocks while preserving manual edits. Supports multiple datasources (SQLite, CSV, JSON, YAML, glob), programmable TypeScript embeds, and incremental builds with dependency tracking.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|