@deepdynamic/cli 0.1.0 → 0.1.2
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/agents/content.js +1 -1
- package/dist/agents/install.js +28 -12
- package/dist/agents/refresh.js +20 -0
- package/dist/agents/setup.js +7 -7
- package/dist/cli.js +8 -8
- package/dist/commands/account.js +19 -19
- package/dist/commands/activity.js +13 -13
- package/dist/commands/blocked.js +16 -16
- package/dist/commands/deploy/index.js +16 -16
- package/dist/commands/deploy/ship.js +8 -8
- package/dist/commands/deployments.js +8 -7
- package/dist/commands/dns.js +229 -243
- package/dist/commands/domains.js +188 -260
- package/dist/commands/emails.js +64 -26
- package/dist/commands/env.js +38 -38
- package/dist/commands/help.js +18 -19
- package/dist/commands/keys.js +84 -90
- package/dist/commands/login/flow.js +11 -11
- package/dist/commands/login/index.js +3 -3
- package/dist/commands/logout.js +11 -11
- package/dist/commands/mail.js +82 -69
- package/dist/commands/notifications.js +30 -29
- package/dist/commands/plan.js +109 -125
- package/dist/commands/projects.js +159 -157
- package/dist/commands/reference.js +139 -112
- package/dist/commands/search.js +29 -18
- package/dist/commands/server.js +100 -112
- package/dist/commands/sessions.js +38 -44
- package/dist/commands/sites.js +16 -16
- package/dist/commands/sms.js +31 -17
- package/dist/commands/status.js +9 -9
- package/dist/commands/support.js +19 -19
- package/dist/commands/update.js +18 -16
- package/dist/commands/usage.js +12 -12
- package/dist/commands/verify.js +16 -16
- package/dist/guide.js +9 -48
- package/dist/http/request.js +3 -3
- package/dist/pretty.js +4 -4
- package/dist/refresh-skills.js +5 -0
- package/dist/registry.js +74 -146
- package/dist/runtime/card-request.js +6 -6
- package/dist/runtime/confirm.js +1 -1
- package/dist/runtime/development.js +1 -1
- package/dist/runtime/dry-run.js +2 -2
- package/dist/runtime/env-file.js +6 -9
- package/dist/runtime/flags.js +11 -13
- package/dist/runtime/login-screen.js +5 -5
- package/dist/runtime/page.js +4 -4
- package/dist/runtime/server-options.js +4 -8
- package/dist/runtime/spinner.js +3 -1
- package/dist/runtime/support.js +2 -3
- package/dist/runtime/text-file.js +5 -5
- package/dist/runtime/timeout.js +2 -2
- package/dist/runtime/update-check.js +48 -14
- package/dist/runtime/update-install.js +40 -5
- package/dist/runtime/usage-error.js +2 -2
- package/dist/setup-agents.js +9 -2
- package/package.json +1 -1
|
@@ -7,16 +7,17 @@ import { plannedRequest, splitDryRun } from "../runtime/dry-run.js";
|
|
|
7
7
|
import { parseCommand } from "../runtime/flags.js";
|
|
8
8
|
import { DEPLOYMENT_ID, parseProgress } from "./deploy/progress.js";
|
|
9
9
|
import { publishFailure } from "./deploy/ship.js";
|
|
10
|
-
const { name: COMMAND, usage
|
|
11
|
-
const
|
|
10
|
+
const { name: COMMAND, usage } = spec('deployments');
|
|
11
|
+
const NOT_FOUND_MESSAGE = 'You have no deployment with that ID. Take the id from the deepdynamic projects deploy or deepdynamic projects rollback output.';
|
|
12
|
+
const NOT_FOUND = { code: 'deployment_not_found', message: NOT_FOUND_MESSAGE, display: NOT_FOUND_MESSAGE };
|
|
12
13
|
export async function runDeployments(args, pretty, depth, deps = defaultAuthDeps(pretty, depth)) {
|
|
13
14
|
const { args: rest, dryRun } = splitDryRun(args);
|
|
14
|
-
const parsed = parseCommand(rest, []
|
|
15
|
+
const parsed = parseCommand(rest, []);
|
|
15
16
|
const [id] = 'error' in parsed ? [] : parsed.names;
|
|
16
17
|
if ('error' in parsed || parsed.names.length !== 1 || !DEPLOYMENT_ID.test(id)) {
|
|
17
|
-
const message = 'error' in parsed ? parsed.error :
|
|
18
|
+
const message = 'error' in parsed ? parsed.error : 'Specify exactly one deployment id from the deepdynamic projects deploy output.';
|
|
18
19
|
return pretty
|
|
19
|
-
? prettyResult(2, depth, COMMAND, message, [['
|
|
20
|
+
? prettyResult(2, depth, COMMAND, message, [['Usage', usage]])
|
|
20
21
|
: agentResult(2, { command: COMMAND, error: { code: 'invalid_arguments', message }, usage });
|
|
21
22
|
}
|
|
22
23
|
const statusUrl = (siteUrl) => new URL(`/api/v1/deployments/${id}`, siteUrl).href;
|
|
@@ -40,7 +41,7 @@ export async function runDeployments(args, pretty, depth, deps = defaultAuthDeps
|
|
|
40
41
|
if (!progress) {
|
|
41
42
|
const shown = failure ?? UNEXPECTED;
|
|
42
43
|
return pretty
|
|
43
|
-
? prettyResult(1, depth, COMMAND, '
|
|
44
|
+
? prettyResult(1, depth, COMMAND, 'Could not load the deploy progress.', [['Server', session.siteUrl], ['Deployment ID', id], ['Reason', shown.display]])
|
|
44
45
|
: agentResult(1, { command: COMMAND, siteUrl: session.siteUrl, id, error: failureError(shown) });
|
|
45
46
|
}
|
|
46
47
|
const { ok: _, ...snapshot } = progress;
|
|
@@ -48,7 +49,7 @@ export async function runDeployments(args, pretty, depth, deps = defaultAuthDeps
|
|
|
48
49
|
const code = failed ? 1 : 0;
|
|
49
50
|
if (pretty) {
|
|
50
51
|
return prettyResult(code, depth, COMMAND, `[${snapshot.percent}%] ${snapshot.forHuman.message} ${snapshot.forHuman.detail}`, [
|
|
51
|
-
['
|
|
52
|
+
['Server', session.siteUrl], ['Project', snapshot.project], ...(snapshot.publicUrl ? [['URL', snapshot.publicUrl]] : [])
|
|
52
53
|
]);
|
|
53
54
|
}
|
|
54
55
|
const errorCode = snapshot.forAgent.errorCode ?? 'publish_failed';
|