@clize/clize 0.32.0 → 0.33.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 +19 -17
- package/dist/cli.js +484 -373
- package/dist/cli.js.map +1 -1
- package/dist/core/addresses.js +12 -11
- package/dist/core/addresses.js.map +1 -1
- package/dist/core/analytics.js +6 -5
- package/dist/core/analytics.js.map +1 -1
- package/dist/core/authz.js +6 -5
- package/dist/core/authz.js.map +1 -1
- package/dist/core/billing.js +83 -12
- package/dist/core/billing.js.map +1 -1
- package/dist/core/credentials.js +3 -1
- package/dist/core/credentials.js.map +1 -1
- package/dist/core/dns.js +3 -2
- package/dist/core/dns.js.map +1 -1
- package/dist/core/domain-health.js +74 -50
- package/dist/core/domain-health.js.map +1 -1
- package/dist/core/domains.js +74 -44
- package/dist/core/domains.js.map +1 -1
- package/dist/core/email-tx.js +8 -6
- package/dist/core/email-tx.js.map +1 -1
- package/dist/core/email.js +13 -12
- package/dist/core/email.js.map +1 -1
- package/dist/core/env-detect.js +7 -14
- package/dist/core/env-detect.js.map +1 -1
- package/dist/core/handle.js +33 -30
- package/dist/core/handle.js.map +1 -1
- package/dist/core/install.js +114 -56
- package/dist/core/install.js.map +1 -1
- package/dist/core/media.js +37 -36
- package/dist/core/media.js.map +1 -1
- package/dist/core/payments.js +5 -4
- package/dist/core/payments.js.map +1 -1
- package/dist/core/projects.js +38 -26
- package/dist/core/projects.js.map +1 -1
- package/dist/core/redirect.js +4 -3
- package/dist/core/redirect.js.map +1 -1
- package/dist/core/serve.js +2 -1
- package/dist/core/serve.js.map +1 -1
- package/dist/core/setup.js +11 -9
- package/dist/core/setup.js.map +1 -1
- package/dist/core/shop.js +17 -16
- package/dist/core/shop.js.map +1 -1
- package/dist/core/site.js +2 -1
- package/dist/core/site.js.map +1 -1
- package/dist/core/sites.js +41 -40
- package/dist/core/sites.js.map +1 -1
- package/dist/core/triage.js +39 -5
- package/dist/core/triage.js.map +1 -1
- package/dist/core/video.js +45 -43
- package/dist/core/video.js.map +1 -1
- package/dist/github.js +4 -3
- package/dist/github.js.map +1 -1
- package/dist/i18n/t.js +65 -0
- package/dist/i18n/t.js.map +1 -0
- package/dist/i18n/zh.js +1265 -0
- package/dist/i18n/zh.js.map +1 -0
- package/dist/index.js +61 -40
- package/dist/index.js.map +1 -1
- package/dist/lib/cloudflare.js +8 -7
- package/dist/lib/cloudflare.js.map +1 -1
- package/dist/lib/crypto.js +2 -1
- package/dist/lib/crypto.js.map +1 -1
- package/dist/lib/vercel.js +2 -1
- package/dist/lib/vercel.js.map +1 -1
- package/dist/lib/zone.js +2 -1
- package/dist/lib/zone.js.map +1 -1
- package/dist/mcp-profiles.js +5 -1
- package/dist/mcp-profiles.js.map +1 -1
- package/dist/providers/deploy/cloudflare.js +3 -2
- package/dist/providers/deploy/cloudflare.js.map +1 -1
- package/dist/providers/email/cloudflare-inbound.js +4 -3
- package/dist/providers/email/cloudflare-inbound.js.map +1 -1
- package/dist/providers/email/cloudflare-outbound.js +2 -1
- package/dist/providers/email/cloudflare-outbound.js.map +1 -1
- package/dist/providers/email/resend.js +3 -2
- package/dist/providers/email/resend.js.map +1 -1
- package/dist/providers/email/ses.js +3 -2
- package/dist/providers/email/ses.js.map +1 -1
- package/dist/providers/index.js +3 -2
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/media/google.js +10 -9
- package/dist/providers/media/google.js.map +1 -1
- package/dist/providers/media/kie.js +12 -11
- package/dist/providers/media/kie.js.map +1 -1
- package/dist/providers/media/kunavo.js +10 -9
- package/dist/providers/media/kunavo.js.map +1 -1
- package/dist/providers/media/openai.js +5 -4
- package/dist/providers/media/openai.js.map +1 -1
- package/dist/providers/media/suno.js +7 -6
- package/dist/providers/media/suno.js.map +1 -1
- package/dist/providers/registrar/routing.js +2 -1
- package/dist/providers/registrar/routing.js.map +1 -1
- package/dist/providers/registrar/vercel.js +2 -1
- package/dist/providers/registrar/vercel.js.map +1 -1
- package/dist/providers/seo/dataforseo.js +5 -4
- package/dist/providers/seo/dataforseo.js.map +1 -1
- package/dist/providers/seo/gsc.js +5 -4
- package/dist/providers/seo/gsc.js.map +1 -1
- package/dist/remote.js +25 -22
- package/dist/remote.js.map +1 -1
- package/dist/selfcheck.js +23 -22
- package/dist/selfcheck.js.map +1 -1
- package/dist/state/file-store.js +17 -16
- package/dist/state/file-store.js.map +1 -1
- package/package.json +4 -3
- package/skills/clize/SKILL.md +171 -143
- package/skills/clize-seo/SKILL.md +2 -2
- package/skills/clize-site-build/SKILL.md +97 -41
- package/skills/clize-site-debug/SKILL.md +73 -45
|
@@ -1,92 +1,120 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clize-site-debug
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
Use when the user says a site or domain deployed with clize "does not open, is unreachable, was deployed
|
|
5
|
+
but nothing changed, still shows the placeholder page". Systematic diagnosis. clize site hosting = the
|
|
6
|
+
shared worker clize-handle-site + the KV namespace clize-sites, served by hostname; domains bind to the
|
|
7
|
+
worker as Cloudflare Workers custom domains. On v0.22.0+ run `clize domain check <domain>` first (one
|
|
8
|
+
command, four layers: registry delegation via DoH → zone → binding → content); if that does not locate
|
|
9
|
+
it, work by hand in the order proxy → content layer (KV) → binding layer (workers/domains) → DNS layer
|
|
10
|
+
(zone/NS); Vercel-registered domains need their NS moved to Cloudflare. Triggers: "my site does not
|
|
11
|
+
open", "X is unreachable", "deployed but no effect", "still the placeholder", "我的站打不开".
|
|
9
12
|
---
|
|
10
13
|
|
|
11
|
-
# clize
|
|
14
|
+
# A clize-hosted site does not open — systematic diagnosis
|
|
12
15
|
|
|
13
|
-
clize
|
|
16
|
+
clize site hosting = the shared worker **`clize-handle-site`** + the KV namespace **`clize-sites`**; the
|
|
17
|
+
worker reads `${host}${path}` from KV by hostname (no content → the placeholder page). A domain reaches the
|
|
18
|
+
worker through a **Cloudflare Workers custom domain**, which requires the zone to be on Cloudflare and
|
|
19
|
+
**active** (NS pointing at Cloudflare).
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
"Does not open" almost always means one link in that chain is broken.
|
|
16
22
|
|
|
17
|
-
##
|
|
23
|
+
## Try one command first (v0.22.0+)
|
|
18
24
|
|
|
19
25
|
```bash
|
|
20
|
-
clize domain check
|
|
21
|
-
clize domain check
|
|
26
|
+
clize domain check <domain> # four layers: registry delegation (public authoritative DoH) → CF zone → worker binding → KV content, with fix suggestions
|
|
27
|
+
clize domain check # no domain = a light check of every domain, listing the unreachable ones
|
|
22
28
|
```
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
It uses **public authoritative DNS** as the truth (immune to local proxy illusions and to CF's cached zone
|
|
31
|
+
status) and directly locates registry-delegation faults like the June 2026 outage (NXDOMAIN / NS pointing
|
|
32
|
+
elsewhere). Note that the `status` in `domain list` is the access mode (registered / external / handle /
|
|
33
|
+
pending), **not health**; do not judge by it. The platform also sweeps every 30 minutes and emails the
|
|
34
|
+
account address (set with `clize account email`) when a domain stays broken.
|
|
25
35
|
|
|
26
|
-
`domain check`
|
|
36
|
+
If `domain check` does not locate it, or you need TLS / edge / KV-key detail, go through the four manual
|
|
37
|
+
steps below. **In order; do not skip.**
|
|
27
38
|
|
|
28
|
-
## 0.
|
|
39
|
+
## 0. Rule out the local proxy first (the most common misdiagnosis; always step one)
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
If the user's machine runs Clash / Surge (TUN / fake-ip mode), `dig` resolves the domain to **`198.18.x.x`**
|
|
42
|
+
(the fake-ip range) or **cannot reach public DNS**. In that state every local `dig` / `curl` / browser
|
|
43
|
+
result is **untrustworthy** — the site may be perfectly fine and only blocked by the local proxy.
|
|
31
44
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- `WebFetch https
|
|
35
|
-
- `WebFetch "https://dns.google/resolve?name
|
|
36
|
-
-
|
|
45
|
+
- Signs: `dig +short A <domain>` returns `198.18.*` / `198.19.*`, or `dig @1.1.1.1 <domain>` times out.
|
|
46
|
+
- Fix: **verify from the cloud, not the machine**:
|
|
47
|
+
- `WebFetch https://<domain>` — fetch the real content from the cloud / see whether it responds.
|
|
48
|
+
- `WebFetch "https://dns.google/resolve?name=<domain>&type=NS"` — the authoritative NS.
|
|
49
|
+
- Have the user **turn off the proxy / switch to mobile data** and try once more; many "does not open"
|
|
50
|
+
reports end right here.
|
|
37
51
|
|
|
38
|
-
## 1.
|
|
52
|
+
## 1. Content layer: did the site actually land in KV?
|
|
39
53
|
|
|
40
54
|
```bash
|
|
41
55
|
NSID=$(curl -s ".../accounts/<ACCT>/storage/kv/namespaces?per_page=100" "${A[@]}" | jq -r '.result[]|select(.title=="clize-sites").id')
|
|
42
|
-
curl -s ".../accounts/<ACCT>/storage/kv/namespaces/$NSID/keys?limit=1000" "${A[@]}" | jq -r '.result[].name' | grep -i "
|
|
56
|
+
curl -s ".../accounts/<ACCT>/storage/kv/namespaces/$NSID/keys?limit=1000" "${A[@]}" | jq -r '.result[].name' | grep -i "<domain>"
|
|
43
57
|
```
|
|
44
|
-
|
|
58
|
+
Keys like `<domain>/index.html` exist → the deploy's KV write succeeded; go to step 2. Nothing → the site
|
|
59
|
+
was never deployed; run `clize deploy ./site --domain <domain>` again.
|
|
45
60
|
|
|
46
|
-
## 2.
|
|
61
|
+
## 2. Binding layer: is the domain bound to handle-site?
|
|
47
62
|
|
|
48
63
|
```bash
|
|
49
|
-
curl -s ".../accounts/<ACCT>/workers/domains" "${A[@]}" | jq -r '.result[]|select(.service=="clize-handle-site").hostname' | grep -i "
|
|
64
|
+
curl -s ".../accounts/<ACCT>/workers/domains" "${A[@]}" | jq -r '.result[]|select(.service=="clize-handle-site").hostname' | grep -i "<domain>"
|
|
50
65
|
```
|
|
51
|
-
|
|
66
|
+
Present → the binding is fine (if it still does not open, go back to step 0 or wait for SSL). **Absent →
|
|
67
|
+
the domain is not attached to the worker (the most common cause)**; go to step 3.
|
|
52
68
|
|
|
53
|
-
## 3. DNS
|
|
69
|
+
## 3. DNS layer: is the CF zone active / does the NS point at CF?
|
|
54
70
|
|
|
55
71
|
```bash
|
|
56
|
-
curl -s ".../zones?name
|
|
72
|
+
curl -s ".../zones?name=<domain>" "${A[@]}" | jq -r '.result[0]|{id, status, name_servers}'
|
|
57
73
|
```
|
|
58
|
-
- `status=active` → NS
|
|
59
|
-
- `status=pending` → **NS
|
|
74
|
+
- `status=active` → the NS is on CF; jump to step 5 and bind.
|
|
75
|
+
- `status=pending` → **the NS is not delegated to CF**; that is the break. A CF-registered domain should
|
|
76
|
+
already have its NS on CF (abnormal; check the NS records); a **Vercel-registered domain** defaults to
|
|
77
|
+
`vercel-dns.com` and must be switched → step 4.
|
|
60
78
|
|
|
61
|
-
## 4. ⚠️
|
|
79
|
+
## 4. ⚠️ The NS trap for Vercel-registered domains
|
|
62
80
|
|
|
63
|
-
Vercel
|
|
81
|
+
Vercel-registered domains (`boughtAt` set, `serviceType:"zeit.world"`) use Vercel DNS by default. Switch to CF:
|
|
64
82
|
```bash
|
|
65
|
-
# CF
|
|
66
|
-
curl -s -X PATCH ".../v1/registrar/domains
|
|
83
|
+
# the two CF nameservers = the name_servers from step 3
|
|
84
|
+
curl -s -X PATCH ".../v1/registrar/domains/<domain>/nameservers?teamId=<TEAM>" \
|
|
67
85
|
-H "Authorization: Bearer <VERCEL_TOKEN>" -H "Content-Type: application/json" \
|
|
68
86
|
-d '{"nameservers":["xxx.ns.cloudflare.com","yyy.ns.cloudflare.com"]}'
|
|
69
87
|
```
|
|
70
|
-
|
|
88
|
+
**The trap**: after switching, Vercel's own `nameservers` / `intendedNameservers` fields **lag** (still
|
|
89
|
+
showing vercel-dns); only `customNameservers` holds what you set. **Do not trust Vercel's fields** — check
|
|
90
|
+
the **registry's authoritative NS** with `WebFetch "https://dns.google/resolve?name=<domain>&type=NS"`;
|
|
91
|
+
seeing `cloudflare.com` means the switch worked. (Lesson: Vercel-registered domains **can** be switched to
|
|
92
|
+
CF; the earlier "NS locked" belief came from that lagging field.)
|
|
71
93
|
|
|
72
|
-
## 5.
|
|
94
|
+
## 5. Fix: activate the zone + bind the custom domain
|
|
73
95
|
|
|
74
96
|
```bash
|
|
75
|
-
#
|
|
97
|
+
# ask CF to re-check the NS now (pending → active)
|
|
76
98
|
curl -s -X PUT ".../zones/<ZID>/activation_check" "${A[@]}"
|
|
77
|
-
# zone active
|
|
99
|
+
# once the zone is active, bind the custom domain to handle-site
|
|
78
100
|
curl -s -X PUT ".../accounts/<ACCT>/workers/domains" "${A[@]}" \
|
|
79
101
|
-H "Content-Type: application/json" \
|
|
80
|
-
-d '{"hostname":"
|
|
102
|
+
-d '{"hostname":"<domain>","service":"clize-handle-site","environment":"production","zone_id":"<ZID>"}'
|
|
81
103
|
```
|
|
82
|
-
|
|
104
|
+
Binding succeeded + KV has content → the site is live immediately (SSL is issued automatically; the first
|
|
105
|
+
visit may take a few dozen seconds).
|
|
83
106
|
|
|
84
|
-
##
|
|
107
|
+
## Auth cheat sheet / placeholders
|
|
85
108
|
|
|
86
|
-
- CF API base
|
|
87
|
-
- Vercel base
|
|
88
|
-
- `<ACCT>` / `<ZID>` / `<NSID
|
|
109
|
+
- CF API base: `https://api.cloudflare.com/client/v4`; auth `A=(-H "X-Auth-Email: <email>" -H "X-Auth-Key: <CF global key>")`.
|
|
110
|
+
- Vercel base: `https://api.vercel.com`; auth `-H "Authorization: Bearer <VERCEL_TOKEN>"` + `?teamId=<TEAM>`.
|
|
111
|
+
- `<ACCT>` / `<ZID>` / `<NSID>`: look them up with the list endpoints above; never hard-code.
|
|
89
112
|
|
|
90
113
|
---
|
|
91
114
|
|
|
92
|
-
>
|
|
115
|
+
> **This diagnosis is now built into deploy**: `ensureZoneActiveForHandle` in
|
|
116
|
+
> [`src/core/sites.ts`](../../src/core/sites.ts) creates the zone / switches the NS (Vercel domains) /
|
|
117
|
+
> activates / binds during `clize deploy`, and a failed binding **is an error** (no more
|
|
118
|
+
> `.catch(() => {})` false success). New deploys therefore rarely hit this; the skill is mainly for
|
|
119
|
+
> **legacy sites** (from the period when the bug reported success without binding) and for **verifying**
|
|
120
|
+
> live domains after the fact. Building a site is the `clize-site-build` skill.
|