naro-cli 0.24.0 → 0.25.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 +59 -19
- package/dist/args.d.ts +49 -0
- package/dist/{chunk-XJIWWZ2T.js → chunk-R4XGSZQL.js} +1173 -485
- package/dist/chunk-X5TUBMEU.js +35536 -0
- package/dist/commands/confirm.d.ts +10 -0
- package/dist/commands/db-lint.d.ts +16 -0
- package/dist/deploy.d.ts +2 -0
- package/dist/deploy.js +5 -1
- package/dist/functions/read-capped.d.ts +1 -0
- package/dist/index.js +8871 -7767
- package/package.json +5 -5
|
@@ -8,5 +8,15 @@ export declare function cannotAsk(context: CommandContext): boolean;
|
|
|
8
8
|
* Gate for destructive actions. Throws instead of silently returning so a
|
|
9
9
|
* declined/unavailable confirmation is a real failure (exit 1, structured
|
|
10
10
|
* JSON) — CI must never read "nothing happened" as success.
|
|
11
|
+
*
|
|
12
|
+
* What asks: removing or deleting something (`remove`, `delete`, `realtime
|
|
13
|
+
* tables remove`), and a change that reaches past the value typed — what
|
|
14
|
+
* production serves (`promote`, `rollback`, `cancel`), keys that stop working
|
|
15
|
+
* (`backend keys rotate`, `signing-key rotate`), a service turned off
|
|
16
|
+
* (`storage disable`), who can see the project (`protection disable`), or an
|
|
17
|
+
* address given up (`project set --subdomain`, `dns records update`). Adding
|
|
18
|
+
* or switching a setting whose value the person typed in full (`naro firewall
|
|
19
|
+
* add`, `naro flags on`) does not ask: MCP marks those destructive because no
|
|
20
|
+
* one watches its calls (PR #429 and #433 reviews).
|
|
11
21
|
*/
|
|
12
22
|
export declare function confirmOrAbort(context: CommandContext, question: string): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CommandContext } from "../context";
|
|
2
|
+
export { DIAGNOSTICS_SQL, lintDatabase, POLICY_READ_SQL, POLICY_TABLE_PROBE, type DatabaseLint, } from "@next-deploy/sdk";
|
|
3
|
+
/**
|
|
4
|
+
* `naro db lint [--json] [--strict]` — read-only diagnostics over the schema
|
|
5
|
+
* `GET /tables` describes and the checks D1 allows. The rules are the ones D1
|
|
6
|
+
* actually trips on (spec §17.3); there is no performance heuristic, because
|
|
7
|
+
* D1 keeps no execution statistics to base one on.
|
|
8
|
+
*
|
|
9
|
+
* A project with a backend also gets its row-level security checked: a table
|
|
10
|
+
* with no policy is a warning (the Data API refuses every request to it) and a
|
|
11
|
+
* policy that cannot work on today's schema is an error (spec P2-7b).
|
|
12
|
+
*
|
|
13
|
+
* The exit code is the point: an error fails the run so CI can gate on it, a
|
|
14
|
+
* warning does not unless `--strict` says it should.
|
|
15
|
+
*/
|
|
16
|
+
export declare function runDbLint(context: CommandContext): Promise<void>;
|
package/dist/deploy.d.ts
CHANGED
|
@@ -112,4 +112,6 @@ export interface DeployResult {
|
|
|
112
112
|
* Shared by `naro deploy` and the MCP `deploy` tool.
|
|
113
113
|
*/
|
|
114
114
|
export declare function deployDirectory(sourceDir: string, options: DeployOptions, log: (message: string) => void): Promise<DeployResult>;
|
|
115
|
+
export { lintDatabase, type DatabaseLint } from "./commands/db-lint";
|
|
116
|
+
export { readCapped } from "./functions/read-capped";
|
|
115
117
|
export { assertFunctionsNode, deployFunctions, type DeployedFunction, type DeployFunctionsOptions, type DeployFunctionsResult, } from "./functions/deploy";
|
package/dist/deploy.js
CHANGED
|
@@ -4,20 +4,24 @@ import {
|
|
|
4
4
|
deployDirectory,
|
|
5
5
|
deployFunctions,
|
|
6
6
|
eventsObserver,
|
|
7
|
+
lintDatabase,
|
|
7
8
|
localDependencies,
|
|
8
9
|
parseDotenv,
|
|
10
|
+
readCapped,
|
|
9
11
|
readProjectEnv,
|
|
10
12
|
slugify,
|
|
11
13
|
workingTreeNotices
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-X5TUBMEU.js";
|
|
13
15
|
import "./chunk-K3NQKI34.js";
|
|
14
16
|
export {
|
|
15
17
|
assertFunctionsNode,
|
|
16
18
|
deployDirectory,
|
|
17
19
|
deployFunctions,
|
|
18
20
|
eventsObserver,
|
|
21
|
+
lintDatabase,
|
|
19
22
|
localDependencies,
|
|
20
23
|
parseDotenv,
|
|
24
|
+
readCapped,
|
|
21
25
|
readProjectEnv,
|
|
22
26
|
slugify,
|
|
23
27
|
workingTreeNotices
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { readCapped } from "@next-deploy/core";
|