creght-cli 0.2.1 → 0.4.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 CHANGED
@@ -121,25 +121,21 @@ The command writes a file-based workspace:
121
121
  ```text
122
122
  mysite/
123
123
  AGENTS.md
124
- frontend/
125
- page/...
126
- component/...
127
- talizen.config.ts
124
+ page/...
125
+ component/...
126
+ talizen.config.ts
128
127
  backend/
129
128
  func/
130
129
  booking.ts
131
130
  profile/settings.ts
132
131
  ```
133
132
 
134
- Remote site files map to the local workspace with an asymmetric rule:
133
+ Local paths mirror remote site paths exactly: `page/Index.tsx` maps to
134
+ `/page/Index.tsx` and `backend/func/booking.ts` maps to
135
+ `/backend/func/booking.ts`.
135
136
 
136
- - `frontend/<p>` <-> remote `/<p>`: the `frontend/` root is stripped, so
137
- `frontend/page/Index.tsx` maps to `/page/Index.tsx`.
138
- - `backend/<p>` <-> remote `/backend/<p>`: the `backend/` prefix is kept, so
139
- `backend/func/booking.ts` maps to `/backend/func/booking.ts`.
140
-
141
- Everything under `frontend/` and `backend/` is an ordinary site file. Func
142
- backend code is simply the set of site files under `backend/func/`; for example
137
+ Every file in the workspace is an ordinary site file. Func backend code is
138
+ simply the set of site files under `backend/func/`; for example
143
139
  `backend/func/booking.ts` is the Func with key `booking`, and
144
140
  `backend/func/profile/settings.ts` is `profile/settings`.
145
141
 
@@ -149,9 +145,9 @@ Creght projects pulled by the CLI usually do not have their own `package.json`
149
145
  or `node_modules`. The local preview plugin therefore uses Vite only for local
150
146
  file serving and TSX transpilation; third-party packages continue to resolve
151
147
  through the Creght import map, matching the Web editor preview model. In
152
- `creght dev`, the CLI serves the `frontend/` directory when present, loads the
153
- platform import map from server system info, and passes it to the Vite plugin;
154
- the plugin's local map is only a fallback.
148
+ `creght dev`, the CLI serves the workspace directory, loads the platform import
149
+ map from server system info, and passes it to the Vite plugin; the plugin's
150
+ local map is only a fallback.
155
151
 
156
152
  Install Vite in the local project folder:
157
153
 
@@ -205,14 +201,11 @@ For local development:
205
201
  CREGHT_API_HOST=http://localhost:8433 creght push --site_id=<project_id>/<site_id> --dir=./mysite
206
202
  ```
207
203
 
208
- The CLI scans the local workspace and diffs every file under `frontend/` and
209
- `backend/` against the remote site files:
210
-
211
- - `frontend/**` is synced to Creght site files with the `frontend/` root stripped.
212
- - `backend/**` is synced to Creght site files keeping the `backend/` prefix, so
213
- `backend/func/**/*.ts` becomes `/backend/func/**/*.ts`.
204
+ The CLI scans the local workspace and diffs every file against the remote site
205
+ files. Local paths map to remote paths as-is, so `page/Index.tsx` becomes
206
+ `/page/Index.tsx` and `backend/func/**/*.ts` becomes `/backend/func/**/*.ts`.
214
207
 
215
- Both trees flow through the same site file mechanism (`file_list` /
208
+ All files flow through the same site file mechanism (`file_list` /
216
209
  `site_action`). Func code is not a separate resource; creating, editing,
217
210
  renaming, or deleting a file under `backend/func/` creates, updates, renames, or
218
211
  deletes the corresponding site file, and Func code is versioned and published
@@ -233,10 +226,10 @@ CREGHT_API_HOST=http://localhost:8433 creght sync --site_id=<project_id>/<site_i
233
226
  ```
234
227
 
235
228
  `sync` first pushes the current local snapshot, then keeps running and
236
- automatically listens for local file changes. When any file under `frontend/`
237
- or `backend/` (including Func code under `backend/func/`) changes locally, the
238
- CLI updates the corresponding remote site file in realtime. The command also
239
- prints the remote preview URL when available.
229
+ automatically listens for local file changes. When any workspace file
230
+ (including Func code under `backend/func/`) changes locally, the CLI updates
231
+ the corresponding remote site file in realtime. The command also prints the
232
+ remote preview URL when available.
240
233
 
241
234
  ## Local Web Editor Bidirectional Sync
242
235
 
@@ -575,7 +568,7 @@ Command meanings:
575
568
  - `login`: Authenticate this machine with Creght and save a CLI token for the current API host.
576
569
  - `logout`: Remove the saved CLI login for the current API host.
577
570
  - `project`: List available projects and sites. Use `project_id/site_id` with site commands. Also supports `project create`.
578
- - `pull`: Download site files (both `frontend/` and `backend/`, including Func code) into a local workspace.
571
+ - `pull`: Download site files (including Func code under `backend/func/`) into a local workspace.
579
572
  - `push`: Push the current local workspace snapshot to the remote site/project.
580
573
  - `sync`: Watch mode; push the current snapshot, then keep listening for local changes.
581
574
  - `dev`: Bidirectionally sync local files with cloud realtime files and the online Web editor.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creght-cli",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "description": "Creght CLI for syncing local site code with Creght.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/creght-dev/creght-cli#readme",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file