@deepdynamic/cli 0.1.0 → 0.1.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.
Files changed (58) hide show
  1. package/dist/agents/content.js +1 -1
  2. package/dist/agents/install.js +22 -12
  3. package/dist/agents/refresh.js +20 -0
  4. package/dist/agents/setup.js +7 -7
  5. package/dist/cli.js +8 -8
  6. package/dist/commands/account.js +19 -19
  7. package/dist/commands/activity.js +13 -13
  8. package/dist/commands/blocked.js +16 -16
  9. package/dist/commands/deploy/index.js +16 -16
  10. package/dist/commands/deploy/ship.js +8 -8
  11. package/dist/commands/deployments.js +8 -7
  12. package/dist/commands/dns.js +228 -242
  13. package/dist/commands/domains.js +188 -260
  14. package/dist/commands/emails.js +17 -17
  15. package/dist/commands/env.js +38 -38
  16. package/dist/commands/help.js +18 -19
  17. package/dist/commands/keys.js +83 -89
  18. package/dist/commands/login/flow.js +11 -11
  19. package/dist/commands/login/index.js +3 -3
  20. package/dist/commands/logout.js +11 -11
  21. package/dist/commands/mail.js +62 -62
  22. package/dist/commands/notifications.js +30 -29
  23. package/dist/commands/plan.js +109 -125
  24. package/dist/commands/projects.js +159 -157
  25. package/dist/commands/reference.js +109 -102
  26. package/dist/commands/search.js +29 -18
  27. package/dist/commands/server.js +99 -112
  28. package/dist/commands/sessions.js +38 -44
  29. package/dist/commands/sites.js +16 -16
  30. package/dist/commands/sms.js +14 -14
  31. package/dist/commands/status.js +9 -9
  32. package/dist/commands/support.js +19 -19
  33. package/dist/commands/update.js +18 -16
  34. package/dist/commands/usage.js +12 -12
  35. package/dist/commands/verify.js +16 -16
  36. package/dist/guide.js +9 -48
  37. package/dist/http/request.js +3 -3
  38. package/dist/pretty.js +4 -4
  39. package/dist/refresh-skills.js +5 -0
  40. package/dist/registry.js +72 -144
  41. package/dist/runtime/card-request.js +6 -6
  42. package/dist/runtime/confirm.js +1 -1
  43. package/dist/runtime/development.js +1 -1
  44. package/dist/runtime/dry-run.js +2 -2
  45. package/dist/runtime/env-file.js +6 -9
  46. package/dist/runtime/flags.js +11 -13
  47. package/dist/runtime/login-screen.js +5 -5
  48. package/dist/runtime/page.js +4 -4
  49. package/dist/runtime/server-options.js +4 -8
  50. package/dist/runtime/spinner.js +3 -1
  51. package/dist/runtime/support.js +2 -3
  52. package/dist/runtime/text-file.js +5 -5
  53. package/dist/runtime/timeout.js +2 -2
  54. package/dist/runtime/update-check.js +48 -14
  55. package/dist/runtime/update-install.js +34 -4
  56. package/dist/runtime/usage-error.js +2 -2
  57. package/dist/setup-agents.js +9 -2
  58. package/package.json +1 -1
@@ -7,34 +7,34 @@ import { splitDryRun } from "../runtime/dry-run.js";
7
7
  import { parseFlags } from "../runtime/flags.js";
8
8
  import { readText } from "../runtime/text-file.js";
9
9
  export const EMAILS_PATH = '/api/v1/emails';
10
- const { name: command, usage, prettyUsage } = spec('emails send');
10
+ const { name: command, usage } = spec('emails send');
11
11
  const FLAGS = ['--to', '--title', '--body', '--body-file'];
12
12
  const BODY_ESCAPE_RE = /\\(\\|r\\n|n|t)/g;
13
13
  function unescapeBody(body) {
14
14
  return body.replace(BODY_ESCAPE_RE, (_, escape) => (escape === '\\' ? '\\' : escape === 't' ? '\t' : '\n'));
15
15
  }
16
- async function parseSendArgs(args, pretty) {
17
- const parsed = parseFlags(args, FLAGS, pretty);
16
+ async function parseSendArgs(args) {
17
+ const parsed = parseFlags(args, FLAGS);
18
18
  if ('error' in parsed)
19
19
  return parsed;
20
20
  const values = Object.fromEntries(parsed.entries);
21
21
  const { '--to': to, '--title': title, '--body': body, '--body-file': bodyFile } = values;
22
22
  if (to === undefined || title === undefined) {
23
23
  const missing = to === undefined ? '--to' : '--title';
24
- return { error: pretty ? `${missing} 를 지정하세요.` : `${missing} is required.` };
24
+ return { error: `${missing} is required.` };
25
25
  }
26
- const content = await readText('--body', body === undefined ? undefined : unescapeBody(body), bodyFile, pretty);
26
+ const content = await readText('--body', body === undefined ? undefined : unescapeBody(body), bodyFile);
27
27
  return 'error' in content ? content : { to, title, body: content.text };
28
28
  }
29
29
  export async function runEmailSend(args, pretty, depth, deps = defaultAuthDeps(pretty, depth)) {
30
30
  const { args: rest, dryRun } = splitDryRun(args);
31
- const parsed = await parseSendArgs(rest, pretty);
31
+ const parsed = await parseSendArgs(rest);
32
32
  if ('error' in parsed) {
33
33
  return pretty
34
- ? prettyResult(2, depth, command, parsed.error, [['사용법', prettyUsage]])
34
+ ? prettyResult(2, depth, command, parsed.error, [['Usage', usage]])
35
35
  : agentResult(2, { command, error: { code: 'invalid_arguments', message: parsed.error }, usage });
36
36
  }
37
- const sent = await authorized(deps, ({ siteUrl, token }) => postJson(new URL(EMAILS_PATH, siteUrl).href, token, dryRun ? { ...parsed, dryRun } : parsed, deps, pretty ? (dryRun ? '메일을 검증하고 있습니다.' : '메일을 보내고 있습니다.') : null));
37
+ const sent = await authorized(deps, ({ siteUrl, token }) => postJson(new URL(EMAILS_PATH, siteUrl).href, token, dryRun ? { ...parsed, dryRun } : parsed, deps, pretty ? (dryRun ? 'Validating the email.' : 'Sending the email.') : null));
38
38
  if ('login' in sent)
39
39
  return sent.login;
40
40
  const { session: { siteUrl }, result } = sent;
@@ -49,26 +49,26 @@ export async function runEmailSend(args, pretty, depth, deps = defaultAuthDeps(p
49
49
  else if (!accepted(result)) {
50
50
  rejected = result.status === 400 && result.body?.rejected === true;
51
51
  failure = rejected
52
- ? { code: 'spam_rejected', message: 'The server rejected the email as advertising or spam. The account may be blocked if this continues.', display: '광고·스팸으로 보이는 내용이라 거절되었습니다.' }
52
+ ? { code: 'spam_rejected', message: 'The server rejected the email as advertising or spam. The account may be blocked if this continues.', display: 'The server rejected the email as advertising or spam. The account may be blocked if this continues.' }
53
53
  : result.status === 429
54
- ? { code: 'rate_limited', message: 'Too many emails. Try again later.', display: '요청이 너무 많습니다.' }
54
+ ? { code: 'rate_limited', message: 'Too many emails. Try again later.', display: 'Too many emails. Try again later.' }
55
55
  : result.status === 400
56
- ? { code: 'rejected', message: 'The server rejected the email. Check the recipient, title and body.', display: '받는 사람·제목·본문을 확인하세요.' }
56
+ ? { code: 'rejected', message: 'The server rejected the email. Check the recipient, title and body.', display: 'The server rejected the email. Check the recipient, title and body.' }
57
57
  : httpFailure(result.status);
58
58
  }
59
59
  if (failure) {
60
60
  return pretty
61
- ? prettyResult(1, depth, command, rejected ? '메일이 거절되었습니다.' : dryRun ? '메일을 검증하지 못했습니다.' : '메일을 보내지 못했습니다.', [['서버', siteUrl], ['원인', failure.display]])
61
+ ? prettyResult(1, depth, command, rejected ? 'The email was rejected.' : dryRun ? 'Could not validate the email.' : 'Could not send the email.', [['Server', siteUrl], ['Reason', failure.display]])
62
62
  : agentResult(1, { command, siteUrl, delivered: false, ...(rejected ? { rejected } : {}), error: sendFailureError(result, failure) });
63
63
  }
64
64
  const { dryRun: checked, delivered, id, from, to, replyTo, bcc } = result.body;
65
65
  if (!pretty) {
66
66
  return agentResult(0, { command, siteUrl, ...(checked === true ? { dryRun: true } : {}), delivered, rejected, id, from, to, replyTo, bcc });
67
67
  }
68
- return prettyResult(0, depth, command, checked === true ? '메일을 검증했습니다. 보내지 않았습니다.' : '메일을 보냈습니다.', [
69
- ['서버', siteUrl],
70
- ['보낸 사람', from],
71
- ['받는 사람', to],
72
- ['답장 주소', replyTo]
68
+ return prettyResult(0, depth, command, checked === true ? 'Validated the email. Nothing was sent.' : 'Sent the email.', [
69
+ ['Server', siteUrl],
70
+ ['From', from],
71
+ ['To', to],
72
+ ['Reply-To', replyTo]
73
73
  ]);
74
74
  }
@@ -9,17 +9,17 @@ import { plannedChange, plannedRequest, splitDryRun } from "../runtime/dry-run.j
9
9
  import { readEnv, sealEnv, validSeal } from "../runtime/env-file.js";
10
10
  import { parseCommand } from "../runtime/flags.js";
11
11
  import { PROJECT } from "../runtime/project-name.js";
12
- import { supportDisplay, supportFailure } from "../runtime/support.js";
12
+ import { supportFailure, supportMessage } from "../runtime/support.js";
13
13
  import { usageError } from "../runtime/usage-error.js";
14
14
  export const ENV_FILE = '.env';
15
- const NEXT_DEPLOY = '다음 배포·되돌리기부터 빌드와 앱 서버에 적용됩니다.';
16
- const NAME_ERROR = [
17
- 'The project name must be 1-63 lowercase letters, digits or hyphens that start and end with a letter or digit.',
18
- '프로젝트 이름은 영문 소문자·숫자로 시작하고 끝나는 1~63자의 소문자·숫자·하이픈입니다.'
19
- ];
20
- const PROJECT_NOT_FOUND = { code: 'project_not_found', message: 'You have no project with that name. Check the name with deepdynamic projects.', display: '그 이름의 내 프로젝트가 없습니다.' };
21
- const ENV_UNAVAILABLE = supportFailure('env_unavailable', { note: { en: 'Nothing was sent.', ko: '보낸 값은 없습니다.' } });
22
- const SEAL_KEY_CHANGED = { code: 'seal_key_changed', message: 'The variables could not be saved. Run the same command again.', display: '환경변수를 저장하지 못했습니다. 같은 명령을 다시 실행하세요.' };
15
+ const NEXT_DEPLOY = 'Changes apply to builds and the app server from the next deploy or rollback.';
16
+ const NAME_ERROR = 'The project name must be 1-63 lowercase letters, digits or hyphens that start and end with a letter or digit.';
17
+ const NOT_FOUND_MESSAGE = 'You have no project with that name. Check the name with deepdynamic projects.';
18
+ const SEAL_KEY_MESSAGE = 'The variables could not be saved. Run the same command again.';
19
+ const variableCount = (count) => `${count.toLocaleString('en-US')} environment variable${count === 1 ? '' : 's'}`;
20
+ const PROJECT_NOT_FOUND = { code: 'project_not_found', message: NOT_FOUND_MESSAGE, display: NOT_FOUND_MESSAGE };
21
+ const ENV_UNAVAILABLE = supportFailure('env_unavailable', { note: 'Nothing was sent.' });
22
+ const SEAL_KEY_CHANGED = { code: 'seal_key_changed', message: SEAL_KEY_MESSAGE, display: SEAL_KEY_MESSAGE };
23
23
  const envUrl = (siteUrl, project, action = '') => new URL(`/api/v1/projects/${project}/env${action}`, siteUrl).href;
24
24
  function envState(body, project) {
25
25
  const value = body;
@@ -43,16 +43,16 @@ function failureOf(result) {
43
43
  }
44
44
  function failed(command, pretty, depth, siteUrl, project, message, failure) {
45
45
  return pretty
46
- ? prettyResult(1, depth, command, message, [['서버', siteUrl], ['프로젝트', project], ['원인', failure.display]])
46
+ ? prettyResult(1, depth, command, message, [['Server', siteUrl], ['Project', project], ['Reason', failure.display]])
47
47
  : agentResult(1, { command, siteUrl, project, error: failureError(failure) });
48
48
  }
49
49
  function parseProject(command, names, max, pretty, depth) {
50
50
  if (names.length < 1 || names.length > max) {
51
51
  return usageError(command, max === 1
52
- ? pretty ? '프로젝트 이름을 하나만 지정하세요.' : 'Specify exactly one project name.'
53
- : pretty ? '프로젝트 이름과 환경변수 파일을 차례로 지정하세요.' : 'Specify the project name and at most one env file.', pretty, depth);
52
+ ? 'Specify exactly one project name.'
53
+ : 'Specify the project name and at most one env file.', pretty, depth);
54
54
  }
55
- return PROJECT.test(names[0]) ? names[0] : usageError(command, NAME_ERROR[pretty ? 1 : 0], pretty, depth);
55
+ return PROJECT.test(names[0]) ? names[0] : usageError(command, NAME_ERROR, pretty, depth);
56
56
  }
57
57
  const getEnv = (session, project, deps, spinner) => request(envUrl(session.siteUrl, project), { method: 'GET', headers: { authorization: `Bearer ${session.token}` } }, deps, spinner);
58
58
  async function readVars(command, path, pretty, depth) {
@@ -64,7 +64,7 @@ async function readVars(command, path, pretty, depth) {
64
64
  const reason = error.code ?? String(error);
65
65
  return {
66
66
  result: pretty
67
- ? prettyResult(1, depth, command, '환경변수 파일을 읽지 못했습니다.', [['파일', path], ['원인', reason]])
67
+ ? prettyResult(1, depth, command, 'Could not read the env file.', [['File', path], ['Reason', reason]])
68
68
  : agentResult(1, { command, file: path, error: { code: 'env_file_unreadable', message: `Cannot read the env file (${reason}).` } })
69
69
  };
70
70
  }
@@ -73,14 +73,14 @@ async function readVars(command, path, pretty, depth) {
73
73
  return read;
74
74
  return {
75
75
  result: pretty
76
- ? prettyResult(1, depth, command, '환경변수 파일을 확인하세요.', [['파일', path], ['원인', read.error[1]]])
77
- : agentResult(1, { command, file: path, error: { code: 'invalid_env', message: read.error[0] } })
76
+ ? prettyResult(1, depth, command, 'Check the env file.', [['File', path], ['Reason', read.error]])
77
+ : agentResult(1, { command, file: path, error: { code: 'invalid_env', message: read.error } })
78
78
  };
79
79
  }
80
80
  export async function runEnvPush(args, pretty, depth, deps = defaultAuthDeps(pretty, depth)) {
81
81
  const command = 'projects env push';
82
82
  const { args: rest, dryRun } = splitDryRun(args);
83
- const parsed = parseCommand(rest, [], pretty);
83
+ const parsed = parseCommand(rest, []);
84
84
  if ('error' in parsed)
85
85
  return usageError(command, parsed.error, pretty, depth);
86
86
  const project = parseProject(command, parsed.names, 2, pretty, depth);
@@ -95,38 +95,38 @@ export async function runEnvPush(args, pretty, depth, deps = defaultAuthDeps(pre
95
95
  const session = await signedIn(deps);
96
96
  if ('login' in session)
97
97
  return session.login;
98
- return plannedChange(command, pretty, depth, session.siteUrl, { url: envUrl(session.siteUrl, project), body: { names } }, `환경변수 ${names.length}개를 확인했습니다. 봉인하거나 보내지 않았습니다.`, [['프로젝트', project], ['파일', file], ['변수', names.join(', ')]], { project, file, names });
98
+ return plannedChange(command, pretty, depth, session.siteUrl, { url: envUrl(session.siteUrl, project), body: { names } }, `Checked ${variableCount(names.length)}. Nothing was sealed or sent.`, [['Project', project], ['File', file], ['Variables', names.join(', ')]], { project, file, names });
99
99
  }
100
- const sent = await authorized(deps, (session) => getEnv(session, project, deps, pretty ? '환경변수 저장을 준비하고 있습니다.' : null));
100
+ const sent = await authorized(deps, (session) => getEnv(session, project, deps, pretty ? 'Preparing to save the environment variables.' : null));
101
101
  if ('login' in sent)
102
102
  return sent.login;
103
103
  const { session } = sent;
104
104
  const current = failureOf(sent.result) ? null : envState(sent.result.body, project);
105
105
  const keyFailure = failureOf(sent.result) ?? (current ? current.seal ? null : ENV_UNAVAILABLE : UNEXPECTED);
106
106
  if (keyFailure)
107
- return failed(command, pretty, depth, session.siteUrl, project, '환경변수를 저장하지 못했습니다.', keyFailure);
107
+ return failed(command, pretty, depth, session.siteUrl, project, 'Could not save the environment variables.', keyFailure);
108
108
  let sealed;
109
109
  try {
110
110
  sealed = sealEnv(read.vars, current.seal);
111
111
  }
112
112
  catch {
113
- return failed(command, pretty, depth, session.siteUrl, project, '환경변수를 저장하지 못했습니다.', UNEXPECTED);
113
+ return failed(command, pretty, depth, session.siteUrl, project, 'Could not save the environment variables.', UNEXPECTED);
114
114
  }
115
- const saved = await postJson(envUrl(session.siteUrl, project), session.token, { sealed, names }, deps, pretty ? '환경변수를 봉인해 보내고 있습니다.' : null);
115
+ const saved = await postJson(envUrl(session.siteUrl, project), session.token, { sealed, names }, deps, pretty ? 'Sealing and sending the environment variables.' : null);
116
116
  const state = failureOf(saved) ? null : envState(saved.body, project);
117
117
  const saveFailure = failureOf(saved) ?? (state ? null : UNEXPECTED);
118
118
  if (saveFailure)
119
- return failed(command, pretty, depth, session.siteUrl, project, '환경변수를 저장하지 못했습니다.', saveFailure);
119
+ return failed(command, pretty, depth, session.siteUrl, project, 'Could not save the environment variables.', saveFailure);
120
120
  if (!pretty)
121
121
  return agentResult(0, { command, siteUrl: session.siteUrl, project, file, names: state.names, updatedAt: state.updatedAt, appliesFrom: 'next_deploy' });
122
- return prettyResult(0, depth, command, `환경변수 ${state.names.length}개를 봉인해 저장했습니다. ${NEXT_DEPLOY}`, [
123
- ['서버', session.siteUrl], ['프로젝트', project], ['파일', file], ['변수', state.names.join(', ')]
122
+ return prettyResult(0, depth, command, `Sealed and saved ${variableCount(state.names.length)}. ${NEXT_DEPLOY}`, [
123
+ ['Server', session.siteUrl], ['Project', project], ['File', file], ['Variables', state.names.join(', ')]
124
124
  ]);
125
125
  }
126
126
  export async function runEnvList(args, pretty, depth, deps = defaultAuthDeps(pretty, depth)) {
127
127
  const command = 'projects env list';
128
128
  const { args: rest, dryRun } = splitDryRun(args);
129
- const parsed = parseCommand(rest, [], pretty);
129
+ const parsed = parseCommand(rest, []);
130
130
  if ('error' in parsed)
131
131
  return usageError(command, parsed.error, pretty, depth);
132
132
  const project = parseProject(command, parsed.names, 1, pretty, depth);
@@ -138,28 +138,28 @@ export async function runEnvList(args, pretty, depth, deps = defaultAuthDeps(pre
138
138
  return session.login;
139
139
  return plannedRequest(command, pretty, depth, session.siteUrl, envUrl(session.siteUrl, project));
140
140
  }
141
- const sent = await authorized(deps, (session) => getEnv(session, project, deps, pretty ? '환경변수 목록을 불러오고 있습니다.' : null));
141
+ const sent = await authorized(deps, (session) => getEnv(session, project, deps, pretty ? 'Loading the environment variables.' : null));
142
142
  if ('login' in sent)
143
143
  return sent.login;
144
144
  const { session, result } = sent;
145
145
  const state = failureOf(result) ? null : envState(result.body, project);
146
146
  const failure = failureOf(result) ?? (state ? null : UNEXPECTED);
147
147
  if (failure)
148
- return failed(command, pretty, depth, session.siteUrl, project, '환경변수 목록을 확인하지 못했습니다.', failure);
148
+ return failed(command, pretty, depth, session.siteUrl, project, 'Could not load the environment variables.', failure);
149
149
  const { names, updatedAt, seal } = state;
150
150
  if (!pretty)
151
151
  return agentResult(0, { command, siteUrl: session.siteUrl, project, names, updatedAt, enabled: seal !== null });
152
- return prettyResult(0, depth, command, names.length ? `저장한 환경변수 ${names.length}개입니다. 값은 서버도 볼 수 없어 이름만 보여 줍니다.` : '저장한 환경변수가 없습니다.', [
153
- ['서버', session.siteUrl], ['프로젝트', project],
154
- ...(names.length ? [['변수', names.join(', ')], ['저장 시각', updatedAt ?? '']] : []),
155
- ...(seal ? [] : [['안내', supportDisplay('env_unavailable')]])
152
+ return prettyResult(0, depth, command, names.length ? `Found ${variableCount(names.length)}. Only names are shown because not even the server can read the values.` : 'No environment variables are saved.', [
153
+ ['Server', session.siteUrl], ['Project', project],
154
+ ...(names.length ? [['Variables', names.join(', ')], ['Saved at', updatedAt ?? '']] : []),
155
+ ...(seal ? [] : [['Notice', supportMessage('env_unavailable')]])
156
156
  ]);
157
157
  }
158
158
  export async function runEnvClear(args, pretty, depth, deps = defaultAuthDeps(pretty, depth)) {
159
159
  const command = 'projects env clear';
160
160
  const { args: plain, dryRun } = splitDryRun(args);
161
161
  const { args: rest, yes } = splitYes(plain);
162
- const parsed = parseCommand(rest, [], pretty);
162
+ const parsed = parseCommand(rest, []);
163
163
  if ('error' in parsed)
164
164
  return usageError(command, parsed.error, pretty, depth);
165
165
  const project = parseProject(command, parsed.names, 1, pretty, depth);
@@ -169,26 +169,26 @@ export async function runEnvClear(args, pretty, depth, deps = defaultAuthDeps(pr
169
169
  const session = await signedIn(deps);
170
170
  if ('login' in session)
171
171
  return session.login;
172
- return plannedChange(command, pretty, depth, session.siteUrl, { url: envUrl(session.siteUrl, project, '/clear') }, '환경변수 지우기를 확인했습니다. 지우지 않았습니다.', [['프로젝트', project]], { project });
172
+ return plannedChange(command, pretty, depth, session.siteUrl, { url: envUrl(session.siteUrl, project, '/clear') }, 'Checked clearing the environment variables. Nothing was cleared.', [['Project', project]], { project });
173
173
  }
174
174
  if (!yes) {
175
175
  return confirmationRequired(command, plain, pretty, depth, {
176
176
  message: 'Clearing removes every stored environment variable of the project; the next deploy builds and runs without them.',
177
- display: '지우면 저장한 환경변수가 모두 사라지고 다음 배포부터 환경변수 없이 빌드·실행됩니다. 사용자에게 확인한 뒤 --yes 를 붙여 실행하세요.'
177
+ display: 'Clearing removes every saved environment variable; the next deploy builds and runs without them. Confirm with the user, then run the command with --yes.'
178
178
  }, { project });
179
179
  }
180
180
  const sent = await authorized(deps, (session) => request(envUrl(session.siteUrl, project, '/clear'), {
181
181
  method: 'POST', headers: { authorization: `Bearer ${session.token}` }
182
- }, deps, pretty ? '환경변수를 지우고 있습니다.' : null));
182
+ }, deps, pretty ? 'Clearing the environment variables.' : null));
183
183
  if ('login' in sent)
184
184
  return sent.login;
185
185
  const { session, result } = sent;
186
186
  const value = failureOf(result) ? null : result.body;
187
187
  const failure = failureOf(result) ?? (value?.ok === true && value.project === project && typeof value.cleared === 'boolean' ? null : UNEXPECTED);
188
188
  if (failure)
189
- return failed(command, pretty, depth, session.siteUrl, project, '환경변수를 지우지 못했습니다.', failure);
189
+ return failed(command, pretty, depth, session.siteUrl, project, 'Could not clear the environment variables.', failure);
190
190
  const cleared = value.cleared;
191
191
  if (!pretty)
192
192
  return agentResult(0, { command, siteUrl: session.siteUrl, project, cleared, appliesFrom: 'next_deploy' });
193
- return prettyResult(0, depth, command, cleared ? `저장한 환경변수를 모두 지웠습니다. ${NEXT_DEPLOY}` : '지울 환경변수가 없습니다.', [['서버', session.siteUrl], ['프로젝트', project]]);
193
+ return prettyResult(0, depth, command, cleared ? `Cleared all saved environment variables. ${NEXT_DEPLOY}` : 'There were no environment variables to clear.', [['Server', session.siteUrl], ['Project', project]]);
194
194
  }
@@ -8,22 +8,21 @@ import { usageError } from "../runtime/usage-error.js";
8
8
  import { LOGIN_TIMEOUT_MS } from "./login/flow.js";
9
9
  import { HELP_USAGE, details } from "./reference.js";
10
10
  export const CLI_USAGE = 'deepdynamic [--pretty] [--login-timeout <seconds>] <command> [options]';
11
- export const CLI_PRETTY_USAGE = 'deepdynamic [--pretty] [--login-timeout <초>] <명령> [옵션]';
12
11
  const options = [
13
- ['-h, --help', '도움말 표시'],
14
- ['-v, --version', '버전 표시'],
15
- [' --pretty', '사용자용 화면 표시'],
16
- [' --login-timeout', `로그인 창 대기 최대 초, 1~${LOGIN_TIMEOUT_MS / 1000} (기본 ${LOGIN_TIMEOUT_MS / 1000})`]
12
+ ['-h, --help', 'Show help'],
13
+ ['-v, --version', 'Show the CLI version'],
14
+ [' --pretty', 'Show human-readable output instead of JSON'],
15
+ [' --login-timeout', `Seconds to wait for the login window, 1-${LOGIN_TIMEOUT_MS / 1000} (default ${LOGIN_TIMEOUT_MS / 1000})`]
17
16
  ];
18
17
  const docs = [
19
- ['에이전트', `${SITE_URL}/llms.txt`],
20
- ['개발자', `${SITE_URL}/docs/dev`],
18
+ ['Agents', `${SITE_URL}/llms.txt`],
19
+ ['Developers', `${SITE_URL}/docs/dev`],
21
20
  ['CLI', `${SITE_URL}/cli.md`]
22
21
  ];
23
22
  export function runHelp(args, version, depth, pretty) {
24
23
  const rest = args.filter((arg) => arg !== '--all');
25
24
  if (rest.length) {
26
- return usageError('help', unknownArgument(rest[0], pretty), pretty, depth);
25
+ return usageError('help', unknownArgument(rest[0]), pretty, depth);
27
26
  }
28
27
  if (args.length)
29
28
  return runCommands([], version, depth, pretty);
@@ -60,10 +59,10 @@ export function commandTree() {
60
59
  export function runCommands(args, version, depth, pretty) {
61
60
  const command = 'commands';
62
61
  if (args.length)
63
- return usageError(command, unknownArgument(args[0], pretty), pretty, depth);
62
+ return usageError(command, unknownArgument(args[0]), pretty, depth);
64
63
  if (!pretty)
65
64
  return agentResult(0, { command, version, commands: commandTree() });
66
- return prettyResult(0, depth, command, '전체 명령을 표시했습니다.', commands.map(({ name, summary }) => [`deepdynamic ${name}`, summary]));
65
+ return prettyResult(0, depth, command, 'Listed all commands.', commands.map(({ name, summary }) => [`deepdynamic ${name}`, summary]));
67
66
  }
68
67
  export function runCommandHelp(args, pretty, depth) {
69
68
  const length = args.findIndex((arg) => arg === '-h' || arg === '--help');
@@ -90,7 +89,7 @@ export function runCommandHelp(args, pretty, depth) {
90
89
  });
91
90
  }
92
91
  const stdout = entries
93
- .map((entry) => prettyResult(0, depth, entry.name, '도움말을 표시했습니다.', [['사용법', entry.prettyUsage], ...details[entry.name].prettyOptions]).stdout)
92
+ .map((entry) => prettyResult(0, depth, entry.name, 'Showed the help.', [['Usage', entry.usage], ...details[entry.name].prettyOptions]).stdout)
94
93
  .join('');
95
94
  return { code: 0, stdout, stderr: '' };
96
95
  }
@@ -114,7 +113,7 @@ export function agentHome(version) {
114
113
  options: [
115
114
  { flags: ['-h', '--help'], description: 'Show help.' },
116
115
  { flags: ['-v', '--version'], description: 'Show the CLI version.' },
117
- { flags: ['--pretty'], description: 'Use the human-readable Korean interface instead of JSON.' },
116
+ { flags: ['--pretty'], description: 'Use the human-readable interface instead of JSON.' },
118
117
  {
119
118
  flags: [LOGIN_TIMEOUT_OPTION],
120
119
  description: `Seconds to wait for the browser sign-in window, 1-${LOGIN_TIMEOUT_MS / 1000} (default ${LOGIN_TIMEOUT_MS / 1000}). The window still opens. When the seconds run out the command fails with login_timeout and that window can no longer sign in. Set it below the time limit of your shell.`
@@ -126,23 +125,23 @@ export function agentHome(version) {
126
125
  }
127
126
  export function renderHome(depth) {
128
127
  const { bold } = paint(depth);
129
- const lines = commands.map(({ prettyUsage, summary }) => [requiredUsage(prettyUsage), summary]);
128
+ const lines = commands.map(({ usage, summary }) => [requiredUsage(usage), summary]);
130
129
  const labels = [...lines.map(([label]) => label), ...[...options, ...docs].map(([label]) => label)];
131
130
  const labelWidth = Math.max(...labels.map(displayWidth));
132
131
  const item = (label, text) => ` ${pad(label, labelWidth)} ${text}`;
133
132
  return [
134
- '정적·동적 사이트를 DeepDynamic Cloud에 배포하는 공식 CLI입니다.',
133
+ 'The official CLI for deploying static and dynamic sites to DeepDynamic Cloud.',
135
134
  '',
136
- bold('사용법'),
137
- ' deepdynamic <명령> [옵션]',
135
+ bold('Usage'),
136
+ ' deepdynamic <command> [options]',
138
137
  '',
139
- bold('명령'),
138
+ bold('Commands'),
140
139
  ...lines.map(([label, summary]) => item(label, summary)),
141
140
  '',
142
- bold('옵션'),
141
+ bold('Options'),
143
142
  ...options.map(([label, text]) => item(label, text)),
144
143
  '',
145
- bold('문서'),
144
+ bold('Docs'),
146
145
  ...docs.map(([label, url]) => item(label, url)),
147
146
  ''
148
147
  ].join('\n');