naro-cli 0.1.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 ADDED
@@ -0,0 +1,8 @@
1
+ # naro-cli
2
+
3
+ Deploy Next.js apps to naro from your terminal.
4
+
5
+ npx naro-cli login
6
+ npx naro-cli deploy --name my-app
7
+
8
+ Auth is via `naro login` (GitHub). No Cloudflare credentials needed.
@@ -0,0 +1,38 @@
1
+ /** Mirrors the deployment status union from the internal core package. */
2
+ export type DeploymentStatus = "QUEUED" | "CLONING" | "INSTALLING" | "BUILDING" | "DEPLOYING" | "READY" | "FAILED";
3
+ /** Mirrors the artifact file shape from the internal build package. */
4
+ export interface ArtifactFile {
5
+ /** Module name relative to the OpenNext output root. */
6
+ name: string;
7
+ /** Immutable bytes retained after the isolated build workspace is removed. */
8
+ data: Uint8Array;
9
+ contentType: string;
10
+ }
11
+ /** Mirrors the deployment artifact shape from the internal build package. */
12
+ export interface DeploymentArtifact {
13
+ deploymentId: string;
14
+ projectId: string;
15
+ entrypoint: ArtifactFile;
16
+ modules: ArtifactFile[];
17
+ assets: ArtifactFile[];
18
+ compatibilityDate: string;
19
+ compatibilityFlags: string[];
20
+ assetsBinding: string;
21
+ }
22
+ /** Mirrors the build log shape from the internal build package. */
23
+ export interface BuildLog {
24
+ level: "INFO" | "WARN" | "ERROR";
25
+ stage: DeploymentStatus;
26
+ message: string;
27
+ }
28
+ /** Mirrors the build metadata shape from the internal build package. */
29
+ export interface BuildMetadata {
30
+ gitCommitSha?: string;
31
+ artifactKey?: string;
32
+ }
33
+ /** Mirrors the build observer shape from the internal build package. */
34
+ export interface BuildObserver {
35
+ onLog(log: BuildLog): void | Promise<void>;
36
+ onStatus?(status: DeploymentStatus): void | Promise<void>;
37
+ onMetadata?(metadata: BuildMetadata): void | Promise<void>;
38
+ }
@@ -0,0 +1,10 @@
1
+ export interface CallbackServer {
2
+ port: number;
3
+ waitForCode(timeoutMs: number): Promise<string>;
4
+ close(): void;
5
+ }
6
+ /**
7
+ * Starts a localhost HTTP callback server for OAuth redirects.
8
+ * The server resolves exactly one callback via `waitForCode()` — call it once per server.
9
+ */
10
+ export declare function startCallbackServer(): Promise<CallbackServer>;