naro-cli 0.6.1 → 0.7.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
@@ -27,6 +27,13 @@ Values you register are encrypted at rest, and `naro env pull` /
27
27
  `naro env list --reveal` can read them back — your account credentials are
28
28
  effectively your env credentials.
29
29
 
30
+ ## Requirements
31
+
32
+ Next.js **15 or newer**. Next 14 and below are not supported — they stop at the
33
+ version gate right after install with `NEXT_VERSION_UNSUPPORTED`.
34
+
35
+ Vite, Create React App and plain static sites deploy too.
36
+
30
37
  ## Build cache
31
38
 
32
39
  Deploys reuse the dependency and framework caches from your previous build,
@@ -55,6 +62,7 @@ naro project inspect Show the linked project
55
62
  naro deploy [--prod] Build locally and deploy
56
63
  naro deployments List deployments
57
64
  naro inspect <deployment-id> One deployment + build logs
65
+ naro cancel <deployment-id> Stop a build that is still running
58
66
 
59
67
  naro logs Runtime logs (production)
60
68
  naro logs <deployment-id> Build logs of a deployment
@@ -68,12 +76,38 @@ naro env pull [.env.local]
68
76
 
69
77
  naro domains list
70
78
  naro domains add www.example.com Prints the DNS records to create
79
+ naro domains add example.com Apex: also connects www.example.com and
80
+ redirects the apex to it (--no-www to skip)
81
+ naro domains verify [host] Re-check DNS now and print what is missing
82
+ naro domains verify --wait Poll until it goes live (10 min budget)
71
83
  naro domains remove www.example.com
72
84
 
85
+ naro db enable Create the project's database (Cloudflare D1)
86
+ naro db info Status, size, table count, limits
87
+ naro db query "select 1" Run SQL; --file query.sql, or pipe stdin
88
+ naro db push [--dry-run] Apply pending ./migrations (asks first; --yes in CI)
89
+ naro migration new create_users Creates migrations/0001_create_users.sql
90
+ naro migration list Local files vs the d1_migrations ledger
91
+ naro gen types --output src/db.d.ts TypeScript types for the schema
92
+
73
93
  naro promote <deployment-id> Publish a build to production
74
94
  naro rollback [deployment-id] Back to the previous production build
75
95
  ```
76
96
 
97
+ `naro domains list` reads the stored status; `naro domains verify` is the one
98
+ that asks Cloudflare and the DNS again, so it is what turns a stuck "pending"
99
+ into the reason it is stuck. It exits non-zero while a domain is not live —
100
+ with or without `--wait` — so CI can gate on it:
101
+
102
+ ```bash
103
+ naro domains verify www.example.com --wait --json || exit 1
104
+ ```
105
+
106
+ An apex (`example.com`) is added as a pair by default because most registrars
107
+ (Gabia, Whois, Cafe24, GoDaddy) cannot put a CNAME on an apex at all: the CNAME
108
+ goes on `www.example.com` and the apex answers with a 308 redirect to it.
109
+ `--no-www` registers the apex alone.
110
+
77
111
  ## Machine-readable output (CI / AI agents)
78
112
 
79
113
  Every command supports `--json`: stdout carries exactly one JSON object,
@@ -93,10 +127,10 @@ $ naro deploy --prod --yes --json
93
127
 
94
128
  Failures carry stable codes (`NOT_LOGGED_IN`, `PROJECT_NOT_LINKED`,
95
129
  `FRAMEWORK_UNSUPPORTED`, `BUILD_FAILED`, `DEPLOYMENT_NOT_FOUND`,
96
- `ENV_NOT_FOUND`, `VALIDATION_FAILED`, `CONFIRMATION_REQUIRED`,
97
- `CANCELED`, …). A destructive command run non-interactively without
98
- `--yes` fails with `CONFIRMATION_REQUIRED` instead of silently doing
99
- nothing:
130
+ `ENV_NOT_FOUND`, `DOMAIN_NOT_FOUND`, `DOMAIN_NOT_READY`,
131
+ `VALIDATION_FAILED`, `CONFIRMATION_REQUIRED`, `CANCELED`, …). A destructive
132
+ command run non-interactively without `--yes` fails with
133
+ `CONFIRMATION_REQUIRED` instead of silently doing nothing:
100
134
 
101
135
  ```json
102
136
  {
@@ -40,3 +40,18 @@ export interface BuildObserver {
40
40
  onStatus?(status: DeploymentStatus): void | Promise<void>;
41
41
  onMetadata?(metadata: BuildMetadata): void | Promise<void>;
42
42
  }
43
+ /**
44
+ * Mirrors the persisted deployment strategy record from the internal core
45
+ * package: what a previous deploy resolved for the project, handed back to
46
+ * the next build so it can skip the strategy ladder while the record's
47
+ * fingerprint still matches.
48
+ */
49
+ export interface DeploymentStrategyRecord {
50
+ strategy: "vinext-cloudflare" | "opennext-cloudflare" | "split-cloudflare" | "aws-middleware-cloudflare-app" | "opennext-aws";
51
+ priority: number;
52
+ nextMajor: number;
53
+ variant?: string;
54
+ fingerprint: string;
55
+ resolvedAt: string;
56
+ deploymentId: string;
57
+ }