@42ws/cli 0.0.13 → 0.0.14
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 +50 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,9 +39,52 @@ Options:
|
|
|
39
39
|
- `--build <cmd>` — Build command to run before publishing
|
|
40
40
|
- `--no-build` — Skip the build step
|
|
41
41
|
- `--message <text>` — Deployment message
|
|
42
|
-
- `--yes` — Skip confirmation prompts
|
|
42
|
+
- `--yes` — Skip non-destructive confirmation prompts
|
|
43
|
+
- `--allow-detach` — Allow publish even when it would remove an embedded form
|
|
43
44
|
- `--json` — Output results as JSON
|
|
44
45
|
|
|
46
|
+
Embed protection: if any AI-imported form is linked to this site (`linkedSite`), the CLI refuses to publish when the local source no longer contains the embed snippet (looking for `data-api-key="<form-key>"`). Use `--allow-detach` to override.
|
|
47
|
+
|
|
48
|
+
### `42ws pull`
|
|
49
|
+
|
|
50
|
+
Download the live published files of a site to a local directory. Useful before re-publishing a site that has linked forms — pull, merge your changes, then publish.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
42ws pull --site my-site --dir ./live
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `42ws sites`
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
42ws sites list
|
|
60
|
+
42ws sites create <name>
|
|
61
|
+
42ws sites delete <name> --force
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`sites delete` is destructive and requires `--force` (not just `--yes`). If the site has linked forms, the CLI prints them and asks whether to also delete them. Use `--delete-forms` / `--keep-forms` for non-interactive control.
|
|
65
|
+
|
|
66
|
+
### `42ws forms import`
|
|
67
|
+
|
|
68
|
+
Extract a form from existing HTML and create a 42ws form (Claude Haiku is used to identify fields, theme color, and CSS).
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
42ws forms import --site my-site --page contact.html --notify you@example.com --inject
|
|
72
|
+
42ws forms import --url https://example.com/contact --notify you@example.com
|
|
73
|
+
42ws forms import --file ./contact.html --notify you@example.com --inject
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Source (one required):
|
|
77
|
+
- `--site <name> --page <html>` — Pull from a 42ws-hosted site page
|
|
78
|
+
- `--url <url>` — Fetch from any URL
|
|
79
|
+
- `--file <path>` — Read from a local HTML file
|
|
80
|
+
|
|
81
|
+
Options:
|
|
82
|
+
- `--notify <email>` — Notification email (required)
|
|
83
|
+
- `--name <name>` — Override the AI-extracted form name
|
|
84
|
+
- `--inject` — Replace the source `<form>` with the embed snippet
|
|
85
|
+
- `--site` mode: re-publishes the page
|
|
86
|
+
- `--file` mode: overwrites the local file
|
|
87
|
+
|
|
45
88
|
### `42ws whoami`
|
|
46
89
|
|
|
47
90
|
Show the currently logged-in user.
|
|
@@ -50,6 +93,10 @@ Show the currently logged-in user.
|
|
|
50
93
|
42ws whoami
|
|
51
94
|
```
|
|
52
95
|
|
|
96
|
+
## Localization
|
|
97
|
+
|
|
98
|
+
The CLI auto-detects locale from `LANG` / `LC_ALL` env vars and falls back to the OS locale via `Intl`. Override explicitly with `--lang ja` or `--lang en`. Currently supports English and Japanese.
|
|
99
|
+
|
|
53
100
|
## Configuration file
|
|
54
101
|
|
|
55
102
|
Place a `42ws.json` in your project root:
|
|
@@ -129,6 +176,8 @@ npx @42ws/cli@latest publish --yes --json
|
|
|
129
176
|
| `BLOCKED_FILE` | Secret file would be uploaded | Remove the file or add to `.gitignore` |
|
|
130
177
|
| `BUILD_FAILED` | Build command exited non-zero | Fix the build error first |
|
|
131
178
|
| `FORBIDDEN` | License not enabled or not site owner | Ask the account owner |
|
|
179
|
+
| `EMBED_DETACH_BLOCKED` | Publish would remove an embedded form | Pull the live first (`42ws pull`) and merge, or pass `--allow-detach` |
|
|
180
|
+
| `CONFIRMATION_REQUIRED` | Destructive op needs explicit confirmation | Add `--force` |
|
|
132
181
|
|
|
133
182
|
### Suggested user-facing prompt
|
|
134
183
|
|