emdash-emit 0.1.9 → 0.1.10
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 +78 -9
- package/dist/bin/emit.d.ts.map +1 -1
- package/dist/bin/emit.js +6 -0
- package/dist/bin/emit.js.map +1 -1
- package/dist/cli/commands/conflicts.d.ts +4 -0
- package/dist/cli/commands/conflicts.d.ts.map +1 -0
- package/dist/cli/commands/conflicts.js +153 -0
- package/dist/cli/commands/conflicts.js.map +1 -0
- package/dist/cli/commands/delete.d.ts +4 -0
- package/dist/cli/commands/delete.d.ts.map +1 -0
- package/dist/cli/commands/delete.js +89 -0
- package/dist/cli/commands/delete.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +4 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +82 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/new.d.ts.map +1 -1
- package/dist/cli/commands/new.js +52 -22
- package/dist/cli/commands/new.js.map +1 -1
- package/dist/cli/commands/pull.d.ts.map +1 -1
- package/dist/cli/commands/pull.js +23 -0
- package/dist/cli/commands/pull.js.map +1 -1
- package/dist/cli/commands/push.d.ts.map +1 -1
- package/dist/cli/commands/push.js +22 -0
- package/dist/cli/commands/push.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +20 -4
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/context.d.ts +3 -1
- package/dist/cli/context.d.ts.map +1 -1
- package/dist/cli/context.js +17 -6
- package/dist/cli/context.js.map +1 -1
- package/dist/db/cache.d.ts +3 -0
- package/dist/db/cache.d.ts.map +1 -1
- package/dist/db/cache.js +39 -0
- package/dist/db/cache.js.map +1 -1
- package/dist/mcp/context.d.ts +7 -0
- package/dist/mcp/context.d.ts.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +39 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-errors.d.ts +7 -2
- package/dist/mcp/tool-errors.d.ts.map +1 -1
- package/dist/mcp/tool-errors.js +80 -5
- package/dist/mcp/tool-errors.js.map +1 -1
- package/dist/mcp/tools/profile.d.ts.map +1 -1
- package/dist/mcp/tools/profile.js +4 -0
- package/dist/mcp/tools/profile.js.map +1 -1
- package/dist/mcp/tools/sync-conflicts.d.ts +4 -0
- package/dist/mcp/tools/sync-conflicts.d.ts.map +1 -0
- package/dist/mcp/tools/sync-conflicts.js +100 -0
- package/dist/mcp/tools/sync-conflicts.js.map +1 -0
- package/dist/mcp/tools/sync-delete.d.ts +4 -0
- package/dist/mcp/tools/sync-delete.d.ts.map +1 -0
- package/dist/mcp/tools/sync-delete.js +77 -0
- package/dist/mcp/tools/sync-delete.js.map +1 -0
- package/dist/mcp/tools/sync-diff.d.ts.map +1 -1
- package/dist/mcp/tools/sync-diff.js +3 -2
- package/dist/mcp/tools/sync-diff.js.map +1 -1
- package/dist/mcp/tools/sync-doctor.d.ts +4 -0
- package/dist/mcp/tools/sync-doctor.d.ts.map +1 -0
- package/dist/mcp/tools/sync-doctor.js +57 -0
- package/dist/mcp/tools/sync-doctor.js.map +1 -0
- package/dist/mcp/tools/sync-new.d.ts.map +1 -1
- package/dist/mcp/tools/sync-new.js +16 -3
- package/dist/mcp/tools/sync-new.js.map +1 -1
- package/dist/mcp/tools/sync-pull.d.ts.map +1 -1
- package/dist/mcp/tools/sync-pull.js +41 -11
- package/dist/mcp/tools/sync-pull.js.map +1 -1
- package/dist/mcp/tools/sync-push.d.ts.map +1 -1
- package/dist/mcp/tools/sync-push.js +16 -2
- package/dist/mcp/tools/sync-push.js.map +1 -1
- package/dist/mcp/tools/sync-status.d.ts.map +1 -1
- package/dist/mcp/tools/sync-status.js +63 -22
- package/dist/mcp/tools/sync-status.js.map +1 -1
- package/dist/sync/conflicts.d.ts +89 -0
- package/dist/sync/conflicts.d.ts.map +1 -0
- package/dist/sync/conflicts.js +374 -0
- package/dist/sync/conflicts.js.map +1 -0
- package/dist/sync/delete.d.ts +58 -0
- package/dist/sync/delete.d.ts.map +1 -0
- package/dist/sync/delete.js +221 -0
- package/dist/sync/delete.js.map +1 -0
- package/dist/sync/diff.d.ts.map +1 -1
- package/dist/sync/diff.js +6 -3
- package/dist/sync/diff.js.map +1 -1
- package/dist/sync/doctor.d.ts +31 -0
- package/dist/sync/doctor.d.ts.map +1 -0
- package/dist/sync/doctor.js +224 -0
- package/dist/sync/doctor.js.map +1 -0
- package/dist/sync/media.d.ts +22 -0
- package/dist/sync/media.d.ts.map +1 -1
- package/dist/sync/media.js +342 -94
- package/dist/sync/media.js.map +1 -1
- package/dist/sync/new.d.ts +31 -0
- package/dist/sync/new.d.ts.map +1 -1
- package/dist/sync/new.js +139 -2
- package/dist/sync/new.js.map +1 -1
- package/dist/sync/orchestrator.d.ts.map +1 -1
- package/dist/sync/orchestrator.js +2 -0
- package/dist/sync/orchestrator.js.map +1 -1
- package/dist/sync/preflight.d.ts.map +1 -1
- package/dist/sync/preflight.js +29 -3
- package/dist/sync/preflight.js.map +1 -1
- package/dist/sync/pull.d.ts +4 -0
- package/dist/sync/pull.d.ts.map +1 -1
- package/dist/sync/pull.js +143 -52
- package/dist/sync/pull.js.map +1 -1
- package/dist/sync/push.d.ts +10 -0
- package/dist/sync/push.d.ts.map +1 -1
- package/dist/sync/push.js +49 -31
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/status.d.ts +10 -0
- package/dist/sync/status.d.ts.map +1 -1
- package/dist/sync/status.js +26 -0
- package/dist/sync/status.js.map +1 -1
- package/dist/sync/taxonomies.d.ts +14 -5
- package/dist/sync/taxonomies.d.ts.map +1 -1
- package/dist/sync/taxonomies.js +104 -6
- package/dist/sync/taxonomies.js.map +1 -1
- package/dist/utils/config.d.ts +12 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +27 -0
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/frontmatter.d.ts +40 -3
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +188 -5
- package/dist/utils/frontmatter.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,9 @@
|
|
|
39
39
|
- [`emit new`](#emit-new)
|
|
40
40
|
- [`emit pull`](#emit-pull)
|
|
41
41
|
- [`emit push`](#emit-push)
|
|
42
|
+
- [`emit delete`](#emit-delete)
|
|
43
|
+
- [`emit conflicts`](#emit-conflicts)
|
|
44
|
+
- [`emit doctor`](#emit-doctor)
|
|
42
45
|
- [`emit status`](#emit-status)
|
|
43
46
|
- [`emit diff`](#emit-diff)
|
|
44
47
|
- [`emit pull-taxonomies`](#emit-pull-taxonomies)
|
|
@@ -505,9 +508,9 @@ Whether you are a human developer or an autonomous AI agent (Antigravity, Claude
|
|
|
505
508
|
* To push a draft: `emit push posts/draft/<filename>.md`
|
|
506
509
|
* To publish live: update `status: published` and run `emit push posts/draft/<filename>.md --allow-publish`.
|
|
507
510
|
|
|
508
|
-
### Preflight Safety Guardrails (G1–
|
|
511
|
+
### Preflight Safety Guardrails (G1–G14)
|
|
509
512
|
|
|
510
|
-
To ensure autonomous AI agents and automated scripts cannot corrupt workspace state or accidentally publish unintended content, Emit enforces
|
|
513
|
+
To ensure autonomous AI agents and automated scripts cannot corrupt workspace state or accidentally publish unintended content, Emit enforces 14 strict preflight guardrails before executing any write operation:
|
|
511
514
|
|
|
512
515
|
| Guard | Code Name | Description | Severity |
|
|
513
516
|
| --- | --- | --- | --- |
|
|
@@ -523,6 +526,9 @@ To ensure autonomous AI agents and automated scripts cannot corrupt workspace st
|
|
|
523
526
|
| **G10** | `INVALID_FEATURED_IMAGE` | Verifies that `featuredImage` is a 26-character canonical media ULID (normalized to uppercase) or `null`. A remote media URL that contains a ULID is resolved with a warning; local file paths and malformed values are rejected | Error |
|
|
524
527
|
| **G11** | `LOCAL_IMAGE_AUTO_UPLOAD` (`MISSING_LOCAL_IMAGE_FILE` / `INVALID_LOCAL_IMAGE_TYPE` / `LOCAL_IMAGE_SIZE_EXCEEDED` / `PROMOTED_MEDIA_NOT_FOUND_REMOTE` / `[MEDIA_EXISTENCE_UNVERIFIED]`) | Detects standalone `media/drafts/<file>` image lines (or reuses an already-promoted `media/` asset across articles), validates file existence, extension, and size (≤ 50 MiB), queues them for automatic upload, URL rewrite, and `media/` promotion during `push`, and verifies every reused asset against `GET /_emdash/api/media/{id}` before its URL is baked into the body | Info / Warning / Error |
|
|
525
528
|
| **G12** | `QUARANTINED_COPY_NOT_PUSHABLE` | Refuses to push a rescue copy under `posts/conflicts/` (written by a pull that found divergent local content) before any network request, because it would overwrite the canonical article of the same ULID with stale content and recreate duplicate local files | Error |
|
|
529
|
+
| **G13** | `CANONICAL_HAS_UNPUSHED_EDITS` | Protects canonical articles from being silently overwritten during conflict resolution (`accept-local`) when unpushed local modifications exist; requires explicit `--force` (`force: true`) | Error |
|
|
530
|
+
| **G14** | `QUARANTINED_PATH_REQUIRED` | Restricts conflict resolution targets strictly within `<collection>/conflicts/`, preventing accidental overwrites or unlinks outside the quarantine directory | Error |
|
|
531
|
+
| **Guard** | `DUPLICATE_SLUG_GUARD` | Scans local drafts, published posts, cache index, and remote collection during `emit new` / `sync_new` to strictly block creating scaffold articles with already-existing slugs | Error |
|
|
526
532
|
|
|
527
533
|
---
|
|
528
534
|
|
|
@@ -715,6 +721,66 @@ emit push posts/draft/20261104_01M6...-my-article.md --allow-publish
|
|
|
715
721
|
|
|
716
722
|
---
|
|
717
723
|
|
|
724
|
+
### `emit delete`
|
|
725
|
+
|
|
726
|
+
Safely deletes a local Markdown article and its remote counterpart on EmDash.
|
|
727
|
+
|
|
728
|
+
```bash
|
|
729
|
+
emit delete <filePathOrId> [--allow-delete-published] [--dry-run] [-y, --yes] [-p, --profile <name>]
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
* `<filePathOrId>`: Relative/absolute path to the Markdown file, or 26-character article ULID.
|
|
733
|
+
* `--allow-delete-published`: Required when deleting a published article (safety guardrail).
|
|
734
|
+
* `--dry-run`: Previews the deletion, inspecting referenced media and lines without modifying disk or remote.
|
|
735
|
+
* `-y, --yes`: Skips interactive confirmation prompt.
|
|
736
|
+
* `-p, --profile <name>`: Explicitly target a specific connection profile.
|
|
737
|
+
|
|
738
|
+
> [!NOTE]
|
|
739
|
+
> **Rescue Backups on Deletion**: When an article is deleted, Emit automatically creates a safety rescue backup at `posts/conflicts/<name>.deleted.md` before removing the file, preserving your work in case of accidental deletion.
|
|
740
|
+
|
|
741
|
+
---
|
|
742
|
+
|
|
743
|
+
### `emit conflicts`
|
|
744
|
+
|
|
745
|
+
Inspects, diffs, and resolves quarantined sync conflict copies (`.conflict.md`) and deletion rescue backups (`.deleted.md`) residing in `posts/conflicts/`.
|
|
746
|
+
|
|
747
|
+
```bash
|
|
748
|
+
# List all quarantined copies with status labels and canonical file paths
|
|
749
|
+
emit conflicts list [-c, --collection <collection>]
|
|
750
|
+
|
|
751
|
+
# View line-by-line diff between quarantined copy and canonical article
|
|
752
|
+
emit conflicts diff <filePath> [-c, --collection <collection>]
|
|
753
|
+
|
|
754
|
+
# Resolve conflict with a specific strategy
|
|
755
|
+
emit conflicts resolve <filePath> --accept-local [-f, --force] [-c, --collection <collection>]
|
|
756
|
+
emit conflicts resolve <filePath> --accept-canonical [-c, --collection <collection>]
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
* `list`: Scans `<collection>/conflicts/`, classifying items as `⚠️ SYNC CONFLICT` or `🗑️ DELETED RESCUE`, showing sizes and dates.
|
|
760
|
+
* `diff`: Displays a unified diff against the current canonical article.
|
|
761
|
+
* `resolve --accept-local`: Restores the quarantined content to the canonical location and purges the quarantine file. Guard **G13** blocks overwriting canonical articles that contain unpushed local modifications unless `-f, --force` is explicitly provided.
|
|
762
|
+
* `resolve --accept-canonical`: Safely discards the quarantined copy, retaining the canonical version.
|
|
763
|
+
|
|
764
|
+
---
|
|
765
|
+
|
|
766
|
+
### `emit doctor`
|
|
767
|
+
|
|
768
|
+
Runs an automated diagnostic health check across the local workspace and cache database.
|
|
769
|
+
|
|
770
|
+
```bash
|
|
771
|
+
emit doctor [-c, --collection <collection>] [-p, --profile <name>]
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
Validates 6 critical health vectors:
|
|
775
|
+
1. **Version Compatibility**: Checks tool version against `createdWithVersion` / `lastSyncedVersion` in config.
|
|
776
|
+
2. **Origin Consistency**: Verifies `.emit/config.json`, profile origin, and environment variables.
|
|
777
|
+
3. **Frontmatter Integrity**: Ensures all local Markdown files have valid parseable frontmatter.
|
|
778
|
+
4. **Conflicts & Quarantine**: Flags unresolved conflict copies and deletion backups in `conflicts/`.
|
|
779
|
+
5. **Sync Status**: Verifies local baseline hash tracking.
|
|
780
|
+
6. **Referenced Media Existence**: Validates that all local media referenced in article Markdown bodies exist on disk.
|
|
781
|
+
|
|
782
|
+
---
|
|
783
|
+
|
|
718
784
|
### `emit status`
|
|
719
785
|
|
|
720
786
|
Displays the local workspace synchronization status compared against the baseline cache.
|
|
@@ -787,13 +853,13 @@ Available Tags:
|
|
|
787
853
|
|
|
788
854
|
### `emit pull-media`
|
|
789
855
|
|
|
790
|
-
Downloads media assets and their companion metadata YAML files into `media/`.
|
|
856
|
+
Downloads media assets and their companion metadata YAML files into `media/`. Supports pulling all media, a limited batch, or targeted media referenced by a specific article.
|
|
791
857
|
|
|
792
858
|
```bash
|
|
793
|
-
emit pull-media [-l, --limit <n>] [--all] [--prune] [--metadata-only]
|
|
794
|
-
|
|
859
|
+
emit pull-media [-a, --article <id-or-path>] [-l, --limit <n>] [--all] [--prune] [--metadata-only]
|
|
795
860
|
```
|
|
796
861
|
|
|
862
|
+
* `-a, --article <id-or-path>`: Pulls only media assets referenced by the specified article (featured image and body images), saving bandwidth and disk space.
|
|
797
863
|
* `-l, --limit <n>`: Maximum number of media items to fetch (default: `300`).
|
|
798
864
|
* `--all`: Fetch all media items without limit.
|
|
799
865
|
* `--prune`: Remove local media files that no longer exist on remote.
|
|
@@ -877,18 +943,21 @@ Emit features a first-class **Model Context Protocol (MCP)** server over stdio.
|
|
|
877
943
|
|
|
878
944
|
| Tool | Purpose | Key Parameters |
|
|
879
945
|
| --- | --- | --- |
|
|
880
|
-
| `sync_status` | Inspect local sync state (
|
|
946
|
+
| `sync_status` | Inspect local sync state (summary-first structure with capped actionRequired, articles, and search filters) | `collection`, `status`, `search`, `profile` |
|
|
881
947
|
| `sync_pull` | Pull remote articles **and taxonomies** into local workspace (includes taxonomy hints; preserves divergent local copies under `posts/conflicts/`) | `collection`, `id`, `filePath`, `status`, `force`, `noPrune`, `prune`, `postsOnly`, `includeMedia`, `metadataOnly`, `profile` |
|
|
882
|
-
| `sync_new` | Scaffold new article with canonical ULID, frontmatter, default byline, and taxonomy hints | `slug` (required), `title`, `collection`, `locale`, `byline`, `profile` |
|
|
948
|
+
| `sync_new` | Scaffold new article with canonical ULID, frontmatter, default byline, duplicate slug guard, and taxonomy hints | `slug` (required), `title`, `collection`, `locale`, `byline`, `profile` |
|
|
883
949
|
| `sync_push` | Push local article changes to remote with preflight checks and `media/drafts/*` auto-upload; refuses `posts/conflicts/` rescue copies (G12) | `filePath` (required), `allowPublish`, `profile` |
|
|
950
|
+
| `sync_delete` | Safely delete article locally and remotely with rescue backup (`.deleted.md`) and unpushed edit protection | `filePath`, `id`, `allowDeletePublished`, `dryRun`, `profile` |
|
|
951
|
+
| `sync_conflicts` | List, diff, and resolve quarantined conflict copies and deletion backups in `posts/conflicts/` (G13 unpushed edit guard with `force`) | `action` ("list"\|"diff"\|"resolve"), `filePath`, `strategy` ("accept-local"\|"accept-canonical"), `force`, `profile` |
|
|
952
|
+
| `sync_doctor` | Run comprehensive workspace diagnostics (version, origin, frontmatter, conflicts, sync, referenced media) | `collection`, `profile` |
|
|
884
953
|
| `sync_diff` | Inspect diff between working file and baseline snapshot | `filePath`, `id`, `profile` |
|
|
885
954
|
| `sync_pull_taxonomies` | Pull remote category and tag definitions (standalone; returns taxonomy hints) | `profile` |
|
|
886
|
-
| `sync_pull_media` | Pull remote media files and metadata into `media/` | `limit`, `all`, `downloadFiles`, `profile` |
|
|
955
|
+
| `sync_pull_media` | Pull remote media files and metadata into `media/` (supports batch or targeted article media) | `article`, `limit`, `all`, `downloadFiles`, `profile` |
|
|
887
956
|
| `profile_list` | List all configured connection profiles | (none) |
|
|
888
957
|
| `profile_switch` | Switch active profile for multi-site environments | `name` (required), `persist` |
|
|
889
958
|
|
|
890
959
|
> [!NOTE]
|
|
891
|
-
> **
|
|
960
|
+
> **Uniform `_meta` Context & Structured Diagnostics**: Every MCP tool response (success and error) includes structured `_meta` context containing `profile`, `workspace`, `origin`, and `resolvedBy` resolution rationale. Handlers return structured error payloads with actionable suggestions, HTTP status, and preflight codes rather than uncaught raw exceptions.
|
|
892
961
|
|
|
893
962
|
### Autonomous Agent Workflows
|
|
894
963
|
|
package/dist/bin/emit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../src/bin/emit.ts"],"names":[],"mappings":";AAwBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../src/bin/emit.ts"],"names":[],"mappings":";AAwBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,eAAO,MAAM,OAAO,SAAgB,CAAC;AA4BrC,wBAAgB,MAAM,CAAC,IAAI,WAAe,GAAG,IAAI,CAEhD"}
|
package/dist/bin/emit.js
CHANGED
|
@@ -28,6 +28,9 @@ import { registerNewCommand } from '../cli/commands/new.js';
|
|
|
28
28
|
import { registerPullCommands } from '../cli/commands/pull.js';
|
|
29
29
|
import { registerPushCommand } from '../cli/commands/push.js';
|
|
30
30
|
import { registerStatusInitCommands } from '../cli/commands/status.js';
|
|
31
|
+
import { registerDeleteCommand } from '../cli/commands/delete.js';
|
|
32
|
+
import { registerConflictsCommand } from '../cli/commands/conflicts.js';
|
|
33
|
+
import { registerDoctorCommand } from '../cli/commands/doctor.js';
|
|
31
34
|
import { getPackageVersion } from '../utils/version.js';
|
|
32
35
|
export const program = new Command();
|
|
33
36
|
program
|
|
@@ -41,6 +44,9 @@ registerNewCommand(program, resolveContext);
|
|
|
41
44
|
registerPullCommands(program, resolveContext);
|
|
42
45
|
registerPushCommand(program, resolveContext);
|
|
43
46
|
registerStatusInitCommands(program, resolveContext);
|
|
47
|
+
registerDeleteCommand(program, resolveContext);
|
|
48
|
+
registerConflictsCommand(program, resolveContext);
|
|
49
|
+
registerDoctorCommand(program, resolveContext);
|
|
44
50
|
// emit mcp
|
|
45
51
|
program
|
|
46
52
|
.command('mcp')
|
package/dist/bin/emit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit.js","sourceRoot":"","sources":["../../src/bin/emit.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAErC,OAAO;KACJ,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,2EAA2E,CAAC;KACxF,OAAO,CAAC,iBA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C;IACtB,MAAM,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conflicts.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/conflicts.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,kBAAkB,GACjC,IAAI,CAqJN"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2026 SPORT-SERVICE RS★R
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
* copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
* SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
import { ApiError } from '../../client/error.js';
|
|
23
|
+
import { listConflicts, diffConflict, resolveConflict, CanonicalHasUnpushedEditsError, QuarantinedPathRequiredError, } from '../../sync/conflicts.js';
|
|
24
|
+
export function registerConflictsCommand(program, resolveContext) {
|
|
25
|
+
const reportActionFailure = (error) => {
|
|
26
|
+
if (error instanceof CanonicalHasUnpushedEditsError) {
|
|
27
|
+
console.error(`❌ ${error.message}`);
|
|
28
|
+
console.error(`💡 Suggestion: ${error.suggestion}`);
|
|
29
|
+
}
|
|
30
|
+
else if (error instanceof QuarantinedPathRequiredError) {
|
|
31
|
+
console.error(`❌ Error: [QUARANTINED_PATH_REQUIRED] ${error.message}`);
|
|
32
|
+
console.error(`💡 Suggestion: ${error.suggestion}`);
|
|
33
|
+
}
|
|
34
|
+
else if (error instanceof ApiError) {
|
|
35
|
+
console.error(error.toActionableString());
|
|
36
|
+
}
|
|
37
|
+
else if (error instanceof Error) {
|
|
38
|
+
console.error(`❌ Error: ${error.message}`);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
console.error(`❌ Error: ${String(error)}`);
|
|
42
|
+
}
|
|
43
|
+
process.exit(1);
|
|
44
|
+
};
|
|
45
|
+
const conflicts = program
|
|
46
|
+
.command('conflicts')
|
|
47
|
+
.description('Manage quarantined sync conflict copies and deletion rescue backups in posts/conflicts/');
|
|
48
|
+
// emit conflicts list
|
|
49
|
+
conflicts
|
|
50
|
+
.command('list')
|
|
51
|
+
.description('List all quarantined conflict and deleted backup files')
|
|
52
|
+
.option('-c, --collection <collection>', 'Target collection (defaults to "posts")')
|
|
53
|
+
.option('-p, --profile <name>', 'Explicitly use a specific connection profile')
|
|
54
|
+
.action(async (options) => {
|
|
55
|
+
try {
|
|
56
|
+
const ctx = resolveContext(options.profile, { optionalAuth: true });
|
|
57
|
+
const collection = options.collection || ctx.config.defaultCollection || 'posts';
|
|
58
|
+
const items = listConflicts(ctx.root, collection);
|
|
59
|
+
if (items.length === 0) {
|
|
60
|
+
console.log(`✅ No conflicts or rescue backups found in ${collection}/conflicts/.`);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
console.log(`📁 Quarantined Files in ${collection}/conflicts/ (${items.length} total):\n`);
|
|
64
|
+
for (const item of items) {
|
|
65
|
+
const typeLabel = item.type === 'conflict'
|
|
66
|
+
? '⚠️ [SYNC CONFLICT]'
|
|
67
|
+
: item.type === 'deleted'
|
|
68
|
+
? '🗑️ [DELETED RESCUE]'
|
|
69
|
+
: '❓ [UNKNOWN]';
|
|
70
|
+
const titleStr = item.title ? ` - "${item.title}"` : '';
|
|
71
|
+
const canonicalStr = item.canonicalPath
|
|
72
|
+
? ` (canonical: ${item.canonicalPath})`
|
|
73
|
+
: ' (canonical: absent)';
|
|
74
|
+
console.log(` ${typeLabel} ${item.filePath}${titleStr}${canonicalStr}`);
|
|
75
|
+
console.log(` ID: ${item.id || 'unknown'} | Slug: ${item.slug || 'unknown'} | Size: ${item.sizeBytes} B | Created: ${item.createdAt}\n`);
|
|
76
|
+
}
|
|
77
|
+
console.log('Commands:');
|
|
78
|
+
console.log(' emit conflicts diff <filePath> Inspect differences');
|
|
79
|
+
console.log(' emit conflicts resolve <filePath> --accept-local Apply quarantined copy to canonical');
|
|
80
|
+
console.log(' emit conflicts resolve <filePath> --accept-canonical Discard quarantined copy\n');
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
reportActionFailure(err);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
// emit conflicts diff <filePath>
|
|
87
|
+
conflicts
|
|
88
|
+
.command('diff <filePath>')
|
|
89
|
+
.description('Inspect differences between a quarantined copy and the canonical article')
|
|
90
|
+
.option('-c, --collection <collection>', 'Target collection (defaults to "posts")')
|
|
91
|
+
.option('-p, --profile <name>', 'Explicitly use a specific connection profile')
|
|
92
|
+
.action(async (filePath, options) => {
|
|
93
|
+
try {
|
|
94
|
+
const ctx = resolveContext(options.profile, { optionalAuth: true });
|
|
95
|
+
const collection = options.collection || ctx.config.defaultCollection || 'posts';
|
|
96
|
+
const result = diffConflict({
|
|
97
|
+
workspaceRoot: ctx.root,
|
|
98
|
+
filePath,
|
|
99
|
+
collection,
|
|
100
|
+
});
|
|
101
|
+
console.log(`🔍 Diff for ${result.conflictFilePath} (${result.type}):`);
|
|
102
|
+
if (result.canonicalFilePath) {
|
|
103
|
+
console.log(` Canonical: ${result.canonicalFilePath}`);
|
|
104
|
+
console.log(` Changes: +${result.additions} / -${result.deletions} lines\n`);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
console.log(` Canonical: None (article was deleted or absent)\n`);
|
|
108
|
+
}
|
|
109
|
+
console.log(result.diffText);
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
reportActionFailure(err);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
// emit conflicts resolve <filePath>
|
|
116
|
+
conflicts
|
|
117
|
+
.command('resolve <filePath>')
|
|
118
|
+
.description('Resolve a quarantined conflict by accepting the local/quarantined copy or the canonical version')
|
|
119
|
+
.option('--accept-local', 'Replace canonical article with quarantined copy and delete quarantine')
|
|
120
|
+
.option('--accept-canonical', 'Discard the quarantined copy and keep canonical article')
|
|
121
|
+
.option('-f, --force', 'Force overwrite canonical article even if it has unpushed local modifications')
|
|
122
|
+
.option('-c, --collection <collection>', 'Target collection (defaults to "posts")')
|
|
123
|
+
.option('-p, --profile <name>', 'Explicitly use a specific connection profile')
|
|
124
|
+
.action(async (filePath, options) => {
|
|
125
|
+
try {
|
|
126
|
+
if (!options.acceptLocal && !options.acceptCanonical) {
|
|
127
|
+
console.error('❌ Error: Must specify either --accept-local or --accept-canonical');
|
|
128
|
+
process.exit(1);
|
|
129
|
+
}
|
|
130
|
+
const strategy = options.acceptLocal ? 'accept-local' : 'accept-canonical';
|
|
131
|
+
const ctx = resolveContext(options.profile, { optionalAuth: true });
|
|
132
|
+
const collection = options.collection || ctx.config.defaultCollection || 'posts';
|
|
133
|
+
const result = resolveConflict({
|
|
134
|
+
workspaceRoot: ctx.root,
|
|
135
|
+
cache: ctx.cache,
|
|
136
|
+
filePath,
|
|
137
|
+
strategy,
|
|
138
|
+
force: options.force,
|
|
139
|
+
collection,
|
|
140
|
+
});
|
|
141
|
+
console.log(`✅ ${result.message}`);
|
|
142
|
+
if (result.warnings && result.warnings.length > 0) {
|
|
143
|
+
for (const w of result.warnings) {
|
|
144
|
+
console.log(`⚠️ Warning: ${w}`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
reportActionFailure(err);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=conflicts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conflicts.js","sourceRoot":"","sources":["../../../src/cli/commands/conflicts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AAGjC,MAAM,UAAU,wBAAwB,CACtC,OAAgB,EAChB,cAAkC;IAElC,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAS,EAAE;QACpD,IAAI,KAAK,YAAY,8BAA8B,EAAE,CAAC;YACpD,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACpC,OAAO,CAAC,KAAK,CAAC,kBAAkB,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;QACtD,CAAC;aAAM,IAAI,KAAK,YAAY,4BAA4B,EAAE,CAAC;YACzD,OAAO,CAAC,KAAK,CAAC,wCAAwC,KAAK,CAAC,OAAO,EAAE,CAA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,MAAM,CAAC,QAAQ,EAAE,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;gBAClC,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,mBAAmB,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/delete.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,kBAAkB,GAAG,IAAI,CAkEhG"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2026 SPORT-SERVICE RS★R
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
* copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
* SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
import { deleteArticle } from '../../sync/delete.js';
|
|
23
|
+
import { ApiError } from '../../client/error.js';
|
|
24
|
+
export function registerDeleteCommand(program, resolveContext) {
|
|
25
|
+
const reportActionFailure = (error) => {
|
|
26
|
+
if (error instanceof ApiError) {
|
|
27
|
+
console.error(error.toActionableString());
|
|
28
|
+
}
|
|
29
|
+
else if (error instanceof Error) {
|
|
30
|
+
console.error(error.message);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
console.error(String(error));
|
|
34
|
+
}
|
|
35
|
+
process.exit(1);
|
|
36
|
+
};
|
|
37
|
+
program
|
|
38
|
+
.command('delete <target>')
|
|
39
|
+
.description('Safely delete an article from both local workspace and remote EmDash server')
|
|
40
|
+
.option('--allow-delete-published', 'Explicitly confirm deletion of a live published article')
|
|
41
|
+
.option('--dry-run', 'Preview deletion metadata without deleting anything')
|
|
42
|
+
.option('-y, --yes', 'Confirm deletion without interactive prompt')
|
|
43
|
+
.option('-c, --collection <collection>', 'Target collection (defaults to "posts")')
|
|
44
|
+
.option('-p, --profile <name>', 'Explicitly use a specific connection profile')
|
|
45
|
+
.action(async (target, options) => {
|
|
46
|
+
try {
|
|
47
|
+
// In non-interactive CLI environments, require --yes or treat as dry-run
|
|
48
|
+
const isDryRun = Boolean(options.dryRun || !options.yes);
|
|
49
|
+
const ctx = resolveContext(options.profile, { optionalAuth: isDryRun });
|
|
50
|
+
const collection = options.collection || ctx.config.defaultCollection;
|
|
51
|
+
const result = await deleteArticle({
|
|
52
|
+
workspaceRoot: ctx.root,
|
|
53
|
+
cache: ctx.cache,
|
|
54
|
+
filePath: target.endsWith('.md') || target.includes('/') ? target : undefined,
|
|
55
|
+
id: !target.endsWith('.md') && !target.includes('/') ? target : undefined,
|
|
56
|
+
collection,
|
|
57
|
+
allowDeletePublished: Boolean(options.allowDeletePublished),
|
|
58
|
+
dryRun: isDryRun,
|
|
59
|
+
origin: ctx.origin,
|
|
60
|
+
token: ctx.auth?.token,
|
|
61
|
+
refreshToken: ctx.auth?.refreshToken,
|
|
62
|
+
});
|
|
63
|
+
if (result.dryRun) {
|
|
64
|
+
console.log(`\n🔍 [DRY-RUN PREVIEW]`);
|
|
65
|
+
console.log(` ID: ${result.id}`);
|
|
66
|
+
console.log(` Slug: ${result.slug}`);
|
|
67
|
+
console.log(` Title: ${result.title}`);
|
|
68
|
+
console.log(` Status: ${result.status}`);
|
|
69
|
+
console.log(` File Path: ${result.filePath}`);
|
|
70
|
+
console.log(` Lines: ${result.bodyLineCount} lines`);
|
|
71
|
+
if (result.referencedMedia.length > 0) {
|
|
72
|
+
console.log(` Referenced Media (${result.referencedMedia.length} files preserved in media/):`);
|
|
73
|
+
for (const m of result.referencedMedia) {
|
|
74
|
+
console.log(` - ${m}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
console.log(`\n⚠️ To permanently delete this article, run again with --yes:`);
|
|
78
|
+
const pubFlag = result.status === 'published' ? ' --allow-delete-published' : '';
|
|
79
|
+
console.log(` emit delete ${target}${pubFlag} --yes\n`);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
console.log(`\n${result.message}\n`);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
reportActionFailure(error);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/cli/commands/delete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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yright (C) 2026 SPORT-SERVICE RS★R
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
* copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
* SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
import { ApiError } from '../../client/error.js';
|
|
23
|
+
import { runWorkspaceDoctor } from '../../sync/doctor.js';
|
|
24
|
+
export function registerDoctorCommand(program, resolveContext) {
|
|
25
|
+
const reportActionFailure = (error) => {
|
|
26
|
+
if (error instanceof ApiError) {
|
|
27
|
+
console.error(error.toActionableString());
|
|
28
|
+
}
|
|
29
|
+
else if (error instanceof Error) {
|
|
30
|
+
console.error(`❌ Error: ${error.message}`);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
console.error(`❌ Error: ${String(error)}`);
|
|
34
|
+
}
|
|
35
|
+
process.exit(1);
|
|
36
|
+
};
|
|
37
|
+
program
|
|
38
|
+
.command('doctor')
|
|
39
|
+
.description('Run comprehensive diagnostics on workspace configuration, cache, and content integrity')
|
|
40
|
+
.option('-c, --collection <collection>', 'Target collection (defaults to "posts")')
|
|
41
|
+
.option('-p, --profile <name>', 'Explicitly use a specific connection profile')
|
|
42
|
+
.action(async (options) => {
|
|
43
|
+
try {
|
|
44
|
+
const ctx = resolveContext(options.profile, { optionalAuth: true });
|
|
45
|
+
const collection = options.collection || ctx.config.defaultCollection || 'posts';
|
|
46
|
+
const report = await runWorkspaceDoctor({
|
|
47
|
+
workspaceRoot: ctx.root,
|
|
48
|
+
cache: ctx.cache,
|
|
49
|
+
config: ctx.config,
|
|
50
|
+
profileName: ctx.auth?.profileName,
|
|
51
|
+
profileOrigin: ctx.auth?.origin,
|
|
52
|
+
collection,
|
|
53
|
+
});
|
|
54
|
+
console.log(`🩺 Emit Workspace Doctor`);
|
|
55
|
+
console.log(` Workspace: ${report.workspace}`);
|
|
56
|
+
console.log(` Version: v${report.emitVersion}${report.createdWithVersion ? ` (created with v${report.createdWithVersion})` : ''}\n`);
|
|
57
|
+
for (const check of report.checks) {
|
|
58
|
+
const badge = check.status === 'ok'
|
|
59
|
+
? '✅ [PASS]'
|
|
60
|
+
: check.status === 'warning'
|
|
61
|
+
? '⚠️ [WARN]'
|
|
62
|
+
: '❌ [FAIL]';
|
|
63
|
+
console.log(` ${badge} ${check.name}: ${check.message}`);
|
|
64
|
+
}
|
|
65
|
+
console.log('');
|
|
66
|
+
if (report.overallStatus === 'healthy') {
|
|
67
|
+
console.log('🎉 Overall Status: HEALTHY — Workspace is in good condition.');
|
|
68
|
+
}
|
|
69
|
+
else if (report.overallStatus === 'warnings') {
|
|
70
|
+
console.log('⚠️ Overall Status: WARNINGS — Workspace is functional but has items to review.');
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
console.log('❌ Overall Status: ERRORS — Issues detected that need attention.');
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
reportActionFailure(err);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,UAAU,qBAAqB,CAAC,OAAgB,EAAE,cAAkC;IACxF,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAS,EAAE;QACpD,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAC;QAC5C,CAAC;aAAM,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAClC,OAAO,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,YAAY,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CACV,wFAAwF,CACzF;SACA,MAAM,CAAC,+BAA+B,EAAE,yCAAyC,CAAC;SAClF,MAAM,CAAC,sBAAsB,EAAE,8CAA8C,CAAC;SAC9E,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,OAA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G,CAAC,8DAA8D,CAAC,CAAC;YAC9E,CAAC;iBAAM,IAAI,MAAM,CAAC,aAAa,KAAK,UAAU,EAAE,CAAC;gBAC/C,OAAO,CAAC,GAAG,CACT,iFAAiF,CAClF,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC;gBAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,mBAAmB,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/new.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/new.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,kBAAkB,GAAG,IAAI,CAqE7F"}
|