farseer-cli 1.3.0 → 1.5.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/README.md +102 -30
- package/dist/commands/checkout.js +3 -8
- package/dist/commands/checkout.js.map +2 -2
- package/dist/commands/dimensions.js +8 -8
- package/dist/commands/dimensions.js.map +2 -2
- package/dist/commands/model.js +29 -13
- package/dist/commands/model.js.map +2 -2
- package/dist/commands/pull.js +159 -46
- package/dist/commands/pull.js.map +2 -2
- package/dist/commands/push.js +185 -75
- package/dist/commands/push.js.map +2 -2
- package/dist/commands/run.js +31 -30
- package/dist/commands/run.js.map +2 -2
- package/dist/commands/status.js +26 -33
- package/dist/commands/status.js.map +2 -2
- package/dist/commands/variables.js +2 -2
- package/dist/commands/variables.js.map +2 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +2 -2
- package/dist/mcp/tools/appTools.js +6 -20
- package/dist/mcp/tools/appTools.js.map +2 -2
- package/dist/mcp/tools/authTools.js +2 -1
- package/dist/mcp/tools/authTools.js.map +2 -2
- package/dist/mcp/tools/cellTools.js +2 -10
- package/dist/mcp/tools/cellTools.js.map +2 -2
- package/dist/mcp/tools/dashboardTools.js +12 -23
- package/dist/mcp/tools/dashboardTools.js.map +2 -2
- package/dist/mcp/tools/dataTools.js +5 -16
- package/dist/mcp/tools/dataTools.js.map +2 -2
- package/dist/mcp/tools/folderTools.js +3 -11
- package/dist/mcp/tools/folderTools.js.map +2 -2
- package/dist/mcp/tools/modelTools.js +61 -69
- package/dist/mcp/tools/modelTools.js.map +2 -2
- package/dist/mcp/tools/runTools.js +3 -8
- package/dist/mcp/tools/runTools.js.map +2 -2
- package/dist/mcp/tools/sheetTools.js +11 -22
- package/dist/mcp/tools/sheetTools.js.map +2 -2
- package/dist/mcp/tools/syncTools.js +132 -47
- package/dist/mcp/tools/syncTools.js.map +2 -2
- package/dist/mcp/utils/helpers.js +2 -2
- package/dist/mcp/utils/helpers.js.map +2 -2
- package/dist/services/appSyncService.js +3 -2
- package/dist/services/appSyncService.js.map +2 -2
- package/dist/services/farseerApi.js +120 -72
- package/dist/services/farseerApi.js.map +2 -2
- package/dist/services/farseerFactory.js +1 -1
- package/dist/services/farseerFactory.js.map +2 -2
- package/dist/services/farseerService.js +87 -47
- package/dist/services/farseerService.js.map +2 -2
- package/dist/services/syncService.js +322 -182
- package/dist/services/syncService.js.map +3 -3
- package/dist/utils/cliOptions.js +36 -0
- package/dist/utils/cliOptions.js.map +7 -0
- package/dist/utils/errorFormatter.js +152 -0
- package/dist/utils/errorFormatter.js.map +7 -0
- package/dist/utils/fileLogger.js +13 -0
- package/dist/utils/fileLogger.js.map +2 -2
- package/dist/utils/fileValidation.js +180 -0
- package/dist/utils/fileValidation.js.map +7 -0
- package/dist/utils/helpers.js +85 -14
- package/dist/utils/helpers.js.map +2 -2
- package/docs/cli-guide.md +49 -4
- package/package.json +1 -1
package/docs/cli-guide.md
CHANGED
|
@@ -34,13 +34,30 @@ Checkout sets a default tenant so you don't need to specify it in every command.
|
|
|
34
34
|
# Pull scripts (.ts/.js files) and app configs
|
|
35
35
|
farseer pull
|
|
36
36
|
|
|
37
|
+
# Skip the dirty-tree confirmation
|
|
38
|
+
farseer pull -y
|
|
39
|
+
|
|
37
40
|
# Pull all files (not just scripts)
|
|
38
41
|
farseer pull --all
|
|
39
42
|
|
|
40
|
-
#
|
|
43
|
+
# Hard-reset local to match remote: overwrites edits, deletes local-only files (always asks for confirmation)
|
|
41
44
|
farseer pull --force
|
|
42
45
|
```
|
|
43
46
|
|
|
47
|
+
`pull` keeps your local edits and merges remote-side changes around them.
|
|
48
|
+
If local has uncommitted changes, it asks before merging (use `-y` to skip).
|
|
49
|
+
`pull --force` is destructive — it makes the local working tree exactly
|
|
50
|
+
mirror remote — and ALWAYS asks for confirmation, even with `-y`.
|
|
51
|
+
|
|
52
|
+
**Conflict resolution.** When a file is edited on both sides, the prompt
|
|
53
|
+
offers four choices: `Keep local`, `Use remote`, `Keep both` (writes
|
|
54
|
+
`<file>.remote.<ext>` next to your local), or **`Merge with markers`** —
|
|
55
|
+
the file gets git-style `<<<<<<< LOCAL` / `=======` / `>>>>>>> REMOTE`
|
|
56
|
+
blocks around both versions; you open it in your editor, pick what you
|
|
57
|
+
want, remove the marker lines, and `farseer push` uploads the cleaned
|
|
58
|
+
version. If you push a file that still has markers, push pre-flight
|
|
59
|
+
catches it and refuses with a clear hint.
|
|
60
|
+
|
|
44
61
|
### 4. Install Dependencies
|
|
45
62
|
|
|
46
63
|
```bash
|
|
@@ -56,19 +73,47 @@ This runs `npm install` in the tenant directory (`farseer-apps/<tenant>/`).
|
|
|
56
73
|
Edit scripts in `farseer-apps/<tenant>/files/Scripts/`. Check status and push:
|
|
57
74
|
|
|
58
75
|
```bash
|
|
59
|
-
# See what changed
|
|
76
|
+
# See what changed (fast — trusts last sync for remote)
|
|
60
77
|
farseer status
|
|
61
78
|
|
|
79
|
+
# Also detect remote-side edits made by other users since last pull
|
|
80
|
+
farseer status --deep
|
|
81
|
+
|
|
62
82
|
# See diffs
|
|
63
83
|
farseer diff
|
|
64
84
|
|
|
65
|
-
# Push changes to remote
|
|
85
|
+
# Push changes to remote (asks for confirmation)
|
|
66
86
|
farseer push
|
|
67
87
|
|
|
68
|
-
# Push without confirmation
|
|
88
|
+
# Push without confirmation (still pre-flights and refuses drift)
|
|
69
89
|
farseer push -y
|
|
90
|
+
|
|
91
|
+
# Mirror local → remote: overwrite drift AND delete remote-only files
|
|
92
|
+
farseer push --force
|
|
70
93
|
```
|
|
71
94
|
|
|
95
|
+
Pre-flight catches files the backend would refuse anyway before any HTTP
|
|
96
|
+
call:
|
|
97
|
+
- Extension not on the backend whitelist (`.ts`, `.js`, `.json`, etc.)
|
|
98
|
+
- Filename longer than 256 chars or empty after trimming
|
|
99
|
+
- File body empty (0 bytes)
|
|
100
|
+
- Unresolved git-style merge markers from a `merge_markers` pull resolution
|
|
101
|
+
|
|
102
|
+
You see a single grouped report and the push exits non-zero so nothing
|
|
103
|
+
reaches the network until you fix them.
|
|
104
|
+
|
|
105
|
+
The drift check (also pre-flight) tells you exactly which remote files
|
|
106
|
+
are blocking, plus the matching `farseer pull` command with the same
|
|
107
|
+
`--include-ext` / `--include-folder` flags so it actually fetches them.
|
|
108
|
+
|
|
109
|
+
`push --force` is destructive — it makes remote exactly mirror local
|
|
110
|
+
(includes deleting remote-only files within scope) — and ALWAYS asks
|
|
111
|
+
for confirmation, even with `-y`.
|
|
112
|
+
|
|
113
|
+
`farseer status` and the preview that `farseer push` shows before its
|
|
114
|
+
confirmation are guaranteed to agree on which files are added/modified/
|
|
115
|
+
deleted (they share the same status engine).
|
|
116
|
+
|
|
72
117
|
## App Management
|
|
73
118
|
|
|
74
119
|
### Creating an App
|