creght-cli 0.16.0 → 0.17.1
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
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Creght CLI is a thin local bridge for syncing site code between a local directory and Creght.
|
|
4
4
|
|
|
5
|
-
Creght remains responsible for cloud rendering, CMS, assets, and the preview environment. The CLI does not render sites locally; use `creght
|
|
5
|
+
Creght remains responsible for cloud rendering, CMS, assets, and the preview environment. The CLI does not render sites locally; use `creght url` to print the canonical remote preview address.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -338,18 +338,44 @@ content is backed up under `.creght/backup/<timestamp>-*/`.
|
|
|
338
338
|
`base_to_local_diff` / `base_to_remote_diff`, so agents can decide how to
|
|
339
339
|
resolve without extra round-trips.
|
|
340
340
|
|
|
341
|
-
##
|
|
341
|
+
## Site Addresses
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
Print every address a site answers on:
|
|
344
344
|
|
|
345
345
|
```bash
|
|
346
|
-
creght
|
|
346
|
+
creght url
|
|
347
347
|
```
|
|
348
348
|
|
|
349
|
+
```text
|
|
350
|
+
Preview: https://<site_id>.preview.creght.cn/
|
|
351
|
+
Live: https://demo.creght.cn/ v11
|
|
352
|
+
https://www.example.com/ v12 (pinned)
|
|
353
|
+
Editor: https://creght.cn/teditor/project/<project_id>/site/<site_id>
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
- **Preview** always serves the current remote workspace, so a `push` shows up
|
|
357
|
+
there immediately.
|
|
358
|
+
- **Live** lists each published domain and the version it serves. A pinned
|
|
359
|
+
domain stays on its own version instead of following the site default.
|
|
360
|
+
- **Editor** opens the site in the Creght web editor.
|
|
361
|
+
|
|
362
|
+
Nothing is opened unless you ask, so the command also works over SSH, in CI,
|
|
363
|
+
and under an agent:
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
creght url --open # print, then open the preview
|
|
367
|
+
creght url --json # {"preview":...,"live":[...],"editor":...}
|
|
368
|
+
creght url --site_id=<project_id>/<site_id>
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
`creght preview` is an alias of `creght url` and takes the same flags. Inside a
|
|
372
|
+
pulled workspace `--site_id` is optional; it is read from `.creght/state.json`
|
|
373
|
+
like `pull`/`push` do.
|
|
374
|
+
|
|
349
375
|
For local development:
|
|
350
376
|
|
|
351
377
|
```bash
|
|
352
|
-
CREGHT_API_HOST=http://localhost:8433 creght
|
|
378
|
+
CREGHT_API_HOST=http://localhost:8433 creght url --site_id=<project_id>/<site_id>
|
|
353
379
|
```
|
|
354
380
|
|
|
355
381
|
## Publish Site
|
|
@@ -376,7 +402,8 @@ CREGHT_API_HOST=http://localhost:8433 creght publish --site_id=<project_id>/<sit
|
|
|
376
402
|
|
|
377
403
|
```text
|
|
378
404
|
Published <project_id>/<site_id>
|
|
379
|
-
version 14 (id 458) is live on
|
|
405
|
+
version 14 (id 458) is live on:
|
|
406
|
+
https://demo.creght.cn/
|
|
380
407
|
```
|
|
381
408
|
|
|
382
409
|
## Site Versions
|
|
@@ -688,8 +715,8 @@ source of truth.
|
|
|
688
715
|
|
|
689
716
|
Creght CLI is a local bridge for Creght site code. It can authenticate with
|
|
690
717
|
Creght, list projects and sites, pull remote site files into a local directory
|
|
691
|
-
with three-way merge, push local files back to Creght, resolve conflicts,
|
|
692
|
-
|
|
718
|
+
with three-way merge, push local files back to Creght, resolve conflicts, print
|
|
719
|
+
a site's preview and live addresses, and publish a site.
|
|
693
720
|
|
|
694
721
|
It can also manage site versions: immutable snapshots of a site's source files,
|
|
695
722
|
created and published like git commits.
|
|
@@ -706,7 +733,7 @@ creght project list
|
|
|
706
733
|
creght pull --site_id=<project_id>/<site_id> --dir=./mysite
|
|
707
734
|
creght push --site_id=<project_id>/<site_id> --dir=./mysite
|
|
708
735
|
creght resolve --list
|
|
709
|
-
creght
|
|
736
|
+
creght url [--open] [--json] [--site_id=<project_id>/<site_id>]
|
|
710
737
|
creght publish --site_id=<project_id>/<site_id> [--note=<note>]
|
|
711
738
|
creght cms collections --site_id=<project_id>/<site_id>
|
|
712
739
|
creght cms collection create --site_id=<project_id>/<site_id> --key=<key> --name=<name> --schema=./schema.json
|
|
@@ -734,7 +761,7 @@ Command meanings:
|
|
|
734
761
|
- `push`: Push local workspace changes to the remote site/project after a three-way conflict check.
|
|
735
762
|
- `rm`: Delete one remote site file by path, including a file hidden by `.creghtignore` that `push --delete` cannot reach. Leaves the local copy on disk.
|
|
736
763
|
- `resolve`: List files with conflict markers, or resolve one by keeping the local (`--ours`) or remote (`--theirs`) side.
|
|
737
|
-
- `
|
|
764
|
+
- `url`: Print a site's preview, live and editor addresses; `--open` also opens the preview, `--json` prints them for scripting. `preview` is an alias.
|
|
738
765
|
- `publish`: Snapshot the current remote site source into a new version and make it live in one step.
|
|
739
766
|
- `cms`: Manage CMS collections.
|
|
740
767
|
- `content`: Manage CMS content entries.
|
package/package.json
CHANGED
|
Binary file
|
package/vendor/darwin-x64/creght
CHANGED
|
Binary file
|
|
Binary file
|
package/vendor/linux-x64/creght
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|