naro-cli 0.18.0 → 0.19.1

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/dist/deploy.d.ts CHANGED
@@ -53,6 +53,13 @@ export interface DeployOptions {
53
53
  teamSlug?: string | undefined;
54
54
  rootDirectory?: string | null;
55
55
  production?: boolean;
56
+ /**
57
+ * Deploy to this named environment (its slug) instead of preview. Not with
58
+ * `production`, and not `production` or `preview` themselves: those are
59
+ * `production: true` and the default. Each is refused with
60
+ * VALIDATION_FAILED before any request.
61
+ */
62
+ environment?: string | undefined;
56
63
  env?: Record<string, string> | undefined;
57
64
  branch?: string | undefined;
58
65
  /** Explicit token (--token / MCP config); wins over the stored session. */
@@ -84,6 +91,11 @@ export interface DeployResult {
84
91
  status: DeploymentStatus;
85
92
  url: string;
86
93
  production: boolean;
94
+ /**
95
+ * The named environment it went to, as the control plane confirmed; null
96
+ * for production and preview.
97
+ */
98
+ environment?: string | null;
87
99
  /** 끝까지 채워지지 않은 키. */
88
100
  missingEnvKeys: string[];
89
101
  /** 서버가 확정한 목적지 — 출력과 링크 파일이 이 값을 쓴다. */
package/dist/deploy.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  readProjectEnv,
8
8
  slugify,
9
9
  workingTreeNotices
10
- } from "./chunk-WLC42Y6U.js";
10
+ } from "./chunk-ZO2BEC46.js";
11
11
  import "./chunk-K3NQKI34.js";
12
12
  export {
13
13
  deployDirectory,
@@ -4,13 +4,21 @@ export interface EnvConsentContext {
4
4
  cwd: string;
5
5
  prompter: Prompter;
6
6
  output: Output;
7
+ /** 배포가 가는 이름 있는 환경의 slug. 없으면 production·preview 배포다. */
8
+ environment?: string;
7
9
  /** 테스트 주입용. 기본값은 SDK의 readProjectEnv. */
8
10
  readEnv?: (dir: string) => Record<string, string>;
9
11
  }
12
+ /** 비밀값은 앞 네 글자까지만 — 8자 이하면 하나도 보이지 않는다. */
13
+ export declare function maskSecretValue(value: string): string;
10
14
  export declare function maskEnvValue(key: string, value: string): string;
11
15
  /** 동의를 구하기 전에는 존재만 확인한다. 내용은 열지 않는다. */
12
16
  export declare function findDotenvFile(dir: string): string | null;
13
- export declare function envAddGuidance(keys: string[]): string[];
17
+ /**
18
+ * 값을 채우는 명령 안내. `env add KEY`만 쓰면 target이 `all`이라 production에도
19
+ * 닿으므로, 환경에 배포할 때는 그 환경의 slug를 붙여 그 환경에만 저장하게 한다.
20
+ */
21
+ export declare function envAddGuidance(keys: string[], environment?: string): string[];
14
22
  /**
15
23
  * 누락된 env 키를 채운다. dotenv 파일은 사용자가 명시적으로 동의한 뒤에만
16
24
  * 열리고, 그때도 요청된 키의 값만 꺼낸다 — 파일의 나머지 내용은 전송되지 않는다.
@@ -0,0 +1,12 @@
1
+ import type { EnvVarInfo } from "@next-deploy/sdk";
2
+ /**
3
+ * The values one surface gets, one per key, the way the server's
4
+ * `envForSurface` picks them for a deployment: the surface's own row beats
5
+ * `all` whichever the list shows first, and no other surface's row applies
6
+ * (preview's never reaches an environment). A row's target is its surface's
7
+ * name: `production`, `preview` or an environment's slug.
8
+ *
9
+ * A leaf module on purpose: `naro env pull` and the library deploy (which MCP
10
+ * imports) both read it, and neither should pull in the other's commands.
11
+ */
12
+ export declare function pullEnv(rows: EnvVarInfo[], surface: string): Record<string, string>;