@epilot/cli 0.1.3 → 0.1.5
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 +18 -4
- package/dist/{access-token-F2VH6TNQ.js → access-token-BDNU3ZFC.js} +3 -3
- package/dist/{address-YBOAFFFH.js → address-ZCYZYRP4.js} +3 -3
- package/dist/{address-suggestions-ITPRYJSF.js → address-suggestions-RP5N7NVQ.js} +3 -3
- package/dist/{ai-agents-EBWNYR5R.js → ai-agents-PLUGVZTI.js} +3 -3
- package/dist/{app-WOAQAMSE.js → app-HZECIN6N.js} +3 -3
- package/dist/{audit-logs-OAUUPKTJ.js → audit-logs-JWKGNHPP.js} +3 -3
- package/dist/{auth-NEBRZ66K.js → auth-O5LQZAG7.js} +3 -3
- package/dist/auth-login-NM74PQRP.js +332 -0
- package/dist/{auth-token-W6GXKHXB.js → auth-token-VSNRXUBI.js} +1 -1
- package/dist/{automation-52ONEM6D.js → automation-73BC4PYK.js} +3 -3
- package/dist/{billing-2RED3OVH.js → billing-GQDSK4H2.js} +3 -3
- package/dist/bin/epilot.js +60 -59
- package/dist/{blueprint-manifest-4VTVMR42.js → blueprint-manifest-4M7DNWYE.js} +3 -3
- package/dist/{chunk-TKZLQD2B.js → chunk-6RBLA5YE.js} +3 -1
- package/dist/{chunk-5CTRM3JQ.js → chunk-BJOXXFMA.js} +12 -11
- package/dist/{chunk-4VITQVW2.js → chunk-HN4QDJOJ.js} +19 -16
- package/dist/{completion-XN3BD2LS.js → completion-RCVUCEMM.js} +77 -9
- package/dist/{consent-25X3PFNT.js → consent-OJBGOI54.js} +3 -3
- package/dist/{customer-portal-T6VNRPQY.js → customer-portal-BDKNWKHA.js} +3 -3
- package/dist/{dashboard-MBTUKEVN.js → dashboard-IAEU3JFY.js} +3 -3
- package/dist/{data-management-ZHPS67MI.js → data-management-UEDSGAKB.js} +3 -3
- package/dist/{deduplication-L2UABHUX.js → deduplication-JJS3TOJ2.js} +3 -3
- package/dist/{design-ELKIZCND.js → design-WKSDZFBJ.js} +3 -3
- package/dist/{document-VF2C5OPK.js → document-P5OL4NYY.js} +3 -3
- package/dist/{email-settings-TM6TIDZQ.js → email-settings-743JHCKS.js} +3 -3
- package/dist/{email-template-S7NLUNON.js → email-template-MW4IVDPM.js} +3 -3
- package/dist/{entity-5AAD2R3S.js → entity-K5X6FWJI.js} +3 -3
- package/dist/{entity-mapping-UOFXQLQ2.js → entity-mapping-QBJ2I2VR.js} +3 -3
- package/dist/{environments-STU24LWT.js → environments-VUR7ME42.js} +3 -3
- package/dist/{erp-integration-DMPYQNVW.js → erp-integration-A2KAIXUQ.js} +3 -3
- package/dist/{event-catalog-HGSD3RZW.js → event-catalog-6YEG5CEM.js} +3 -3
- package/dist/{file-G355J7IL.js → file-J6PHZ447.js} +3 -3
- package/dist/{iban-FIL4TCSN.js → iban-DJSUCRU6.js} +3 -3
- package/dist/{interactive-RWCSFGXL.js → interactive-XXYFAJEI.js} +2 -2
- package/dist/{journey-4IZDKDY7.js → journey-QJZKU3PZ.js} +3 -3
- package/dist/{kanban-DNIP4AAI.js → kanban-ZF4IIG7Q.js} +3 -3
- package/dist/{message-W4TZ32YH.js → message-WH4GD5SC.js} +3 -3
- package/dist/{metering-GKGJZTDF.js → metering-FCWUZ2TC.js} +3 -3
- package/dist/{notes-AS7BD3B6.js → notes-KKVPGK7K.js} +3 -3
- package/dist/{notification-N4ACDEK7.js → notification-4MVAZTRP.js} +3 -3
- package/dist/{organization-IYNBC4SB.js → organization-2UT2KFMB.js} +3 -3
- package/dist/{partner-directory-DZX32S4J.js → partner-directory-SUNW4XN7.js} +3 -3
- package/dist/{permissions-Z7KVPSVL.js → permissions-36VGB4BQ.js} +3 -3
- package/dist/{pricing-OLSQRQZN.js → pricing-RCNFEEHO.js} +3 -3
- package/dist/{pricing-tier-IP274TML.js → pricing-tier-MNCLLXD5.js} +3 -3
- package/dist/{profile-PPVSNNBG.js → profile-MZ3VK7PO.js} +1 -1
- package/dist/{purpose-YCIEYFCH.js → purpose-3JN63WTQ.js} +3 -3
- package/dist/{sandbox-AKFR5LEQ.js → sandbox-C676YDRV.js} +3 -3
- package/dist/{submission-XONDJGXI.js → submission-5XTNMMCK.js} +3 -3
- package/dist/{targeting-QWHVJCWI.js → targeting-C52KV6IW.js} +3 -3
- package/dist/{template-variables-Q3J3IPSF.js → template-variables-5SKJEJF4.js} +3 -3
- package/dist/upgrade-VJCKIUNZ.js +124 -0
- package/dist/{user-QNPACYI3.js → user-DYAR3N6L.js} +3 -3
- package/dist/{validation-rules-XT3SRBJ3.js → validation-rules-LDAOUPOO.js} +3 -3
- package/dist/{webhooks-RH5VYEY6.js → webhooks-MT2P33A2.js} +3 -3
- package/dist/{workflow-BKSEFDUM.js → workflow-YGWGE6L4.js} +3 -3
- package/dist/{workflow-definition-DGEBEIGG.js → workflow-definition-JG54ZWGL.js} +3 -3
- package/package.json +1 -1
- package/dist/auth-login-QQBH7BVA.js +0 -140
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ npm install -g @epilot/cli # scoped package (same thing)
|
|
|
16
16
|
|
|
17
17
|
<!-- usage-help -->
|
|
18
18
|
```
|
|
19
|
-
epilot v0.1.
|
|
19
|
+
epilot v0.1.5 — CLI for epilot APIs
|
|
20
20
|
|
|
21
21
|
USAGE
|
|
22
22
|
epilot <api> <operationId> [params...] [flags]
|
|
@@ -252,7 +252,23 @@ When running in a TTY without required arguments, the CLI prompts interactively:
|
|
|
252
252
|
|
|
253
253
|
Disable with `--no-interactive` for CI/scripts.
|
|
254
254
|
|
|
255
|
-
## Shell
|
|
255
|
+
## Shell Completions
|
|
256
|
+
|
|
257
|
+
Tab completion for API names, operation IDs, and flags.
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Auto-install for your current shell
|
|
261
|
+
epilot completion --install
|
|
262
|
+
|
|
263
|
+
# Or install for a specific shell
|
|
264
|
+
epilot completion --install bash
|
|
265
|
+
epilot completion --install zsh
|
|
266
|
+
epilot completion --install fish
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
This adds the completion script to your shell config (`~/.bashrc`, `~/.zshrc`, or `~/.config/fish/completions/epilot.fish`). Restart your shell or source the config file to activate.
|
|
270
|
+
|
|
271
|
+
You can also set up completions manually:
|
|
256
272
|
|
|
257
273
|
```bash
|
|
258
274
|
# Bash — add to ~/.bashrc
|
|
@@ -265,8 +281,6 @@ eval "$(epilot completion zsh)"
|
|
|
265
281
|
epilot completion fish > ~/.config/fish/completions/epilot.fish
|
|
266
282
|
```
|
|
267
283
|
|
|
268
|
-
Provides tab completion for API names, operation IDs, and flags.
|
|
269
|
-
|
|
270
284
|
## API Reference
|
|
271
285
|
|
|
272
286
|
Full documentation with sample calls and responses for all APIs:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJOXXFMA.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HN4QDJOJ.js";
|
|
8
|
+
import "./chunk-6RBLA5YE.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/access-token.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJOXXFMA.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HN4QDJOJ.js";
|
|
8
|
+
import "./chunk-6RBLA5YE.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/address.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJOXXFMA.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HN4QDJOJ.js";
|
|
8
|
+
import "./chunk-6RBLA5YE.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/address-suggestions.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJOXXFMA.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HN4QDJOJ.js";
|
|
8
|
+
import "./chunk-6RBLA5YE.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/ai-agents.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJOXXFMA.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HN4QDJOJ.js";
|
|
8
|
+
import "./chunk-6RBLA5YE.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/app.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJOXXFMA.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HN4QDJOJ.js";
|
|
8
|
+
import "./chunk-6RBLA5YE.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/audit-logs.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
RED,
|
|
12
12
|
RESET,
|
|
13
13
|
YELLOW
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6RBLA5YE.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/auth.ts
|
|
17
17
|
import { defineCommand } from "citty";
|
|
@@ -21,8 +21,8 @@ var auth_default = defineCommand({
|
|
|
21
21
|
description: "Manage authentication"
|
|
22
22
|
},
|
|
23
23
|
subCommands: {
|
|
24
|
-
login: () => import("./auth-login-
|
|
25
|
-
token: () => import("./auth-token-
|
|
24
|
+
login: () => import("./auth-login-NM74PQRP.js").then((m) => m.default),
|
|
25
|
+
token: () => import("./auth-token-VSNRXUBI.js").then((m) => m.default),
|
|
26
26
|
logout: defineCommand({
|
|
27
27
|
meta: { name: "logout", description: "Remove stored credentials" },
|
|
28
28
|
run: () => {
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
saveCredentials
|
|
4
|
+
} from "./chunk-RSA7K5HB.js";
|
|
5
|
+
import "./chunk-PDMWUCWD.js";
|
|
6
|
+
import {
|
|
7
|
+
BOLD,
|
|
8
|
+
CYAN,
|
|
9
|
+
DIM,
|
|
10
|
+
GREEN,
|
|
11
|
+
RED,
|
|
12
|
+
RESET,
|
|
13
|
+
YELLOW
|
|
14
|
+
} from "./chunk-6RBLA5YE.js";
|
|
15
|
+
|
|
16
|
+
// src/commands/auth-login.ts
|
|
17
|
+
import { defineCommand } from "citty";
|
|
18
|
+
import { randomBytes } from "crypto";
|
|
19
|
+
import { createServer } from "http";
|
|
20
|
+
var auth_login_default = defineCommand({
|
|
21
|
+
meta: { name: "login", description: "Authenticate with epilot" },
|
|
22
|
+
args: {
|
|
23
|
+
token: { type: "string", description: "Manually provide a token instead of browser login" },
|
|
24
|
+
profile: { type: "string", description: "Save credentials to this profile" }
|
|
25
|
+
},
|
|
26
|
+
run: async ({ args }) => {
|
|
27
|
+
const profileName = args.profile || process.env.EPILOT_PROFILE;
|
|
28
|
+
if (args.token) {
|
|
29
|
+
saveCredentials({ token: args.token }, profileName);
|
|
30
|
+
const suffix = profileName ? ` to profile "${profileName}"` : "";
|
|
31
|
+
process.stdout.write(`${GREEN}Token saved${suffix}.${RESET}
|
|
32
|
+
`);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (!process.stdin.isTTY) {
|
|
36
|
+
process.stderr.write(`${RED}Browser login requires an interactive terminal.${RESET}
|
|
37
|
+
`);
|
|
38
|
+
process.stderr.write(
|
|
39
|
+
`Use ${BOLD}epilot auth login --token <token>${RESET} or ${BOLD}epilot auth token${RESET} instead.
|
|
40
|
+
`
|
|
41
|
+
);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
const token = await browserLogin(profileName);
|
|
45
|
+
if (token) {
|
|
46
|
+
process.stdout.write(`${GREEN}${BOLD}Login successful!${RESET}
|
|
47
|
+
`);
|
|
48
|
+
} else {
|
|
49
|
+
process.stderr.write(`${RED}Login failed or was cancelled.${RESET}
|
|
50
|
+
`);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
var browserLogin = async (profileName) => {
|
|
56
|
+
const state = randomBytes(32).toString("hex");
|
|
57
|
+
const verificationCode = randomBytes(3).toString("hex").toUpperCase();
|
|
58
|
+
const suffix = profileName ? ` ${DIM}(profile: ${profileName})${RESET}` : "";
|
|
59
|
+
process.stdout.write(`
|
|
60
|
+
${BOLD}epilot CLI Login${RESET}${suffix}
|
|
61
|
+
|
|
62
|
+
`);
|
|
63
|
+
process.stdout.write("This will open your browser to authenticate with epilot.\n");
|
|
64
|
+
process.stdout.write("\n");
|
|
65
|
+
process.stdout.write(` ${YELLOW}Verification code: ${BOLD}${verificationCode}${RESET}
|
|
66
|
+
`);
|
|
67
|
+
process.stdout.write("\n");
|
|
68
|
+
process.stdout.write(`${DIM}Verify this code matches what is shown in your browser after login.${RESET}
|
|
69
|
+
`);
|
|
70
|
+
process.stdout.write(`${DIM}This ensures you are logging into the correct CLI session.${RESET}
|
|
71
|
+
`);
|
|
72
|
+
process.stdout.write("\n");
|
|
73
|
+
const { confirm } = await import("@inquirer/prompts");
|
|
74
|
+
const proceed = await confirm({ message: "Open browser to log in?", default: true });
|
|
75
|
+
if (!proceed) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
return new Promise((resolve) => {
|
|
79
|
+
let settled = false;
|
|
80
|
+
let timeoutId;
|
|
81
|
+
let tokenPromptController;
|
|
82
|
+
const done = (token) => {
|
|
83
|
+
if (settled) return;
|
|
84
|
+
settled = true;
|
|
85
|
+
clearTimeout(timeoutId);
|
|
86
|
+
tokenPromptController?.abort();
|
|
87
|
+
server.close();
|
|
88
|
+
resolve(token);
|
|
89
|
+
};
|
|
90
|
+
const onServerListening = async () => {
|
|
91
|
+
const address = server.address();
|
|
92
|
+
if (!address || typeof address === "string") {
|
|
93
|
+
done(null);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const port = address.port;
|
|
97
|
+
const callbackUrl = `http://localhost:${port}/callback`;
|
|
98
|
+
const loginUrl = `https://portal.epilot.cloud/login?cli_callback=${encodeURIComponent(callbackUrl)}&state=${state}&code=${verificationCode}`;
|
|
99
|
+
process.stdout.write(`
|
|
100
|
+
${DIM}Login URL: ${loginUrl}${RESET}
|
|
101
|
+
|
|
102
|
+
`);
|
|
103
|
+
try {
|
|
104
|
+
const open = (await import("open")).default;
|
|
105
|
+
await open(loginUrl);
|
|
106
|
+
process.stdout.write(`${CYAN}Browser opened.${RESET} Waiting for authentication...
|
|
107
|
+
`);
|
|
108
|
+
} catch {
|
|
109
|
+
process.stdout.write(`Could not open browser. Please visit this URL manually:
|
|
110
|
+
|
|
111
|
+
${loginUrl}
|
|
112
|
+
|
|
113
|
+
`);
|
|
114
|
+
}
|
|
115
|
+
process.stdout.write(`
|
|
116
|
+
${DIM}Or paste a token manually:${RESET}
|
|
117
|
+
`);
|
|
118
|
+
try {
|
|
119
|
+
const { password } = await import("@inquirer/prompts");
|
|
120
|
+
tokenPromptController = new AbortController();
|
|
121
|
+
const token = await password(
|
|
122
|
+
{ message: "Token:", theme: { prefix: "" } },
|
|
123
|
+
{ signal: tokenPromptController.signal }
|
|
124
|
+
);
|
|
125
|
+
if (token?.trim()) {
|
|
126
|
+
saveCredentials({ token: token.trim() }, profileName);
|
|
127
|
+
done(token.trim());
|
|
128
|
+
}
|
|
129
|
+
} catch {
|
|
130
|
+
}
|
|
131
|
+
timeoutId = setTimeout(
|
|
132
|
+
() => {
|
|
133
|
+
process.stderr.write(`
|
|
134
|
+
${RED}Login timed out after 5 minutes.${RESET}
|
|
135
|
+
`);
|
|
136
|
+
done(null);
|
|
137
|
+
},
|
|
138
|
+
5 * 60 * 1e3
|
|
139
|
+
);
|
|
140
|
+
timeoutId.unref();
|
|
141
|
+
};
|
|
142
|
+
const server = createServer((req, res) => {
|
|
143
|
+
const url = new URL(req.url, "http://localhost");
|
|
144
|
+
if (url.pathname === "/callback") {
|
|
145
|
+
const token = url.searchParams.get("token");
|
|
146
|
+
const returnedState = url.searchParams.get("state");
|
|
147
|
+
const orgId = url.searchParams.get("org_id");
|
|
148
|
+
const userId = url.searchParams.get("user_id");
|
|
149
|
+
const name = url.searchParams.get("name");
|
|
150
|
+
if (returnedState && returnedState !== state) {
|
|
151
|
+
res.writeHead(403, { "Content-Type": "text/html; charset=utf-8" });
|
|
152
|
+
res.end(
|
|
153
|
+
renderPage("Login Failed", "Invalid session. This request may not have originated from your CLI.", "error")
|
|
154
|
+
);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (!returnedState) {
|
|
158
|
+
process.stderr.write(
|
|
159
|
+
`${YELLOW}Warning: Login portal did not return state parameter. CSRF protection is not active.${RESET}
|
|
160
|
+
`
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
if (token) {
|
|
164
|
+
saveCredentials(
|
|
165
|
+
{
|
|
166
|
+
token,
|
|
167
|
+
org_id: orgId ?? void 0,
|
|
168
|
+
user_id: userId ?? void 0,
|
|
169
|
+
name: name ?? void 0
|
|
170
|
+
},
|
|
171
|
+
profileName
|
|
172
|
+
);
|
|
173
|
+
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
|
|
174
|
+
res.end(
|
|
175
|
+
renderPage(
|
|
176
|
+
"Login Successful",
|
|
177
|
+
"You can close this tab and return to your terminal.",
|
|
178
|
+
"success",
|
|
179
|
+
verificationCode
|
|
180
|
+
)
|
|
181
|
+
);
|
|
182
|
+
done(token);
|
|
183
|
+
} else {
|
|
184
|
+
res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
|
|
185
|
+
res.end(renderPage("Login Failed", "No token was received. Please try again.", "error"));
|
|
186
|
+
done(null);
|
|
187
|
+
}
|
|
188
|
+
} else {
|
|
189
|
+
res.writeHead(404);
|
|
190
|
+
res.end();
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
server.unref();
|
|
194
|
+
server.listen(0, () => {
|
|
195
|
+
onServerListening().catch(() => done(null));
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
var renderPage = (title, message, status, code) => {
|
|
200
|
+
const icon = status === "success" ? "\u2713" : "\u2715";
|
|
201
|
+
const iconBg = status === "success" ? "#e8f5e9" : "#ffeef0";
|
|
202
|
+
const iconColor = status === "success" ? "#2e7d32" : "#c62828";
|
|
203
|
+
const titleColor = status === "success" ? "#1b5e20" : "#b71c1c";
|
|
204
|
+
const codeBlock = code ? `
|
|
205
|
+
<div class="code-section">
|
|
206
|
+
<p class="code-label">Verification code</p>
|
|
207
|
+
<div class="code">${escapeHtml(code)}</div>
|
|
208
|
+
</div>` : "";
|
|
209
|
+
return `<!DOCTYPE html>
|
|
210
|
+
<html lang="en">
|
|
211
|
+
<head>
|
|
212
|
+
<meta charset="utf-8" />
|
|
213
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
214
|
+
<title>${escapeHtml(title)} \u2014 epilot CLI</title>
|
|
215
|
+
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;900&display=swap" rel="stylesheet" />
|
|
216
|
+
<style>
|
|
217
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
218
|
+
body {
|
|
219
|
+
font-family: 'Nunito Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
220
|
+
background: #f0f4f8;
|
|
221
|
+
color: #172b4d;
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
min-height: 100vh;
|
|
226
|
+
padding: 2rem;
|
|
227
|
+
}
|
|
228
|
+
.card {
|
|
229
|
+
background: #fff;
|
|
230
|
+
border-radius: 24px;
|
|
231
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
|
|
232
|
+
padding: 3rem 2.5rem;
|
|
233
|
+
max-width: 420px;
|
|
234
|
+
width: 100%;
|
|
235
|
+
text-align: center;
|
|
236
|
+
}
|
|
237
|
+
.logo {
|
|
238
|
+
margin-bottom: 2rem;
|
|
239
|
+
}
|
|
240
|
+
.logo svg {
|
|
241
|
+
height: 32px;
|
|
242
|
+
width: auto;
|
|
243
|
+
}
|
|
244
|
+
.icon-circle {
|
|
245
|
+
width: 96px;
|
|
246
|
+
height: 96px;
|
|
247
|
+
border-radius: 50%;
|
|
248
|
+
background: ${iconBg};
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
justify-content: center;
|
|
252
|
+
margin: 0 auto 1.5rem;
|
|
253
|
+
}
|
|
254
|
+
.icon {
|
|
255
|
+
font-size: 48px;
|
|
256
|
+
color: ${iconColor};
|
|
257
|
+
line-height: 1;
|
|
258
|
+
}
|
|
259
|
+
h1 {
|
|
260
|
+
font-size: 28px;
|
|
261
|
+
font-weight: 900;
|
|
262
|
+
color: ${titleColor};
|
|
263
|
+
margin-bottom: 0.5rem;
|
|
264
|
+
}
|
|
265
|
+
.message {
|
|
266
|
+
font-size: 16px;
|
|
267
|
+
color: #5e6c84;
|
|
268
|
+
line-height: 1.5;
|
|
269
|
+
margin-bottom: 1.5rem;
|
|
270
|
+
}
|
|
271
|
+
.code-section {
|
|
272
|
+
margin: 1.5rem 0;
|
|
273
|
+
}
|
|
274
|
+
.code-label {
|
|
275
|
+
font-size: 13px;
|
|
276
|
+
color: #8993a4;
|
|
277
|
+
margin-bottom: 0.5rem;
|
|
278
|
+
text-transform: uppercase;
|
|
279
|
+
letter-spacing: 0.05em;
|
|
280
|
+
}
|
|
281
|
+
.code {
|
|
282
|
+
font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
|
|
283
|
+
font-size: 28px;
|
|
284
|
+
font-weight: 700;
|
|
285
|
+
letter-spacing: 0.25em;
|
|
286
|
+
color: #172b4d;
|
|
287
|
+
background: #f4f5f7;
|
|
288
|
+
border: 2px solid #dfe1e6;
|
|
289
|
+
border-radius: 12px;
|
|
290
|
+
padding: 0.75rem 1.5rem;
|
|
291
|
+
display: inline-block;
|
|
292
|
+
}
|
|
293
|
+
.footer {
|
|
294
|
+
font-size: 13px;
|
|
295
|
+
color: #8993a4;
|
|
296
|
+
margin-top: 1.5rem;
|
|
297
|
+
}
|
|
298
|
+
.footer a {
|
|
299
|
+
color: #005eb4;
|
|
300
|
+
text-decoration: none;
|
|
301
|
+
}
|
|
302
|
+
</style>
|
|
303
|
+
</head>
|
|
304
|
+
<body>
|
|
305
|
+
<div class="card">
|
|
306
|
+
<div class="logo">
|
|
307
|
+
<svg viewBox="0 0 552 138" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
308
|
+
<path d="M71.19 95.55c-12.85 0-24.72-5.46-33.46-14.97l-.41-.45-19.59 16.08.45.52C30.37 110.64 49.8 120 71.19 120c34.26 0 59.25-24.7 59.25-58.76h-25.53c0 20.42-14.32 34.31-33.72 34.31Z" fill="#005EB4"/>
|
|
309
|
+
<path d="M71.19 36.42c13.56 0 24.8 5.32 33.36 15.04l.41.46 19.52-16.15-.44-.52C111.8 21.27 92.34 12 71.19 12 36.41 12 12 36.7 12 70.63h25.53c0-20.3 14.32-34.21 33.66-34.21Z" fill="#005EB4"/>
|
|
310
|
+
<path d="M190.05 96.74V76.2h38.82V58.01h-38.82V42.44h43.48V24.04h-64.12v91.32h66.46V96.74h-45.82Z" fill="#005EB4"/>
|
|
311
|
+
<path d="M287.9 45.04c-6.53 0-12.37 1.73-17.36 5.15V24.04h-20v91.32h20v-4.3c4.99 3.63 10.96 5.49 17.75 5.49 18.74 0 33.01-15.58 33.01-36.09 0-20.25-14.54-35.42-33.4-35.42Zm-2.53 53.5c-9.62 0-16.63-7.52-16.63-17.86 0-10.07 7-17.53 16.29-17.53 9.62 0 16.63 7.46 16.63 17.53 0 10.34-7.01 17.86-16.29 17.86Z" fill="#005EB4"/>
|
|
312
|
+
<path d="M335.35 24.04h20.64v91.32h-20.64V24.04Z" fill="#005EB4"/>
|
|
313
|
+
<path d="M397.25 45.04c-20.78 0-36.74 15.37-36.74 35.42 0 20.32 15.96 36.09 36.39 36.09 20.78 0 36.74-15.5 36.74-35.82 0-20.45-15.97-35.69-36.39-35.69Zm-.18 53.5c-9.48 0-16.11-7.52-16.11-18.28 0-10.14 6.86-17.25 16.65-17.25 9.41 0 16.04 7.11 16.04 17.25 0 10.76-6.86 18.28-16.58 18.28Z" fill="#005EB4"/>
|
|
314
|
+
<path d="M460.2 62.87v-16.4h-13.06v68.89h20.64V79.07c0-9.35 5.73-14.7 14.18-14.7h6.53V45.04h-4.62c-10.3 0-18.68 5.73-23.67 17.83Z" fill="#005EB4"/>
|
|
315
|
+
<circle cx="526" cy="90" r="14" fill="#FF7043"/>
|
|
316
|
+
</svg>
|
|
317
|
+
</div>
|
|
318
|
+
<div class="icon-circle">
|
|
319
|
+
<span class="icon">${icon}</span>
|
|
320
|
+
</div>
|
|
321
|
+
<h1>${escapeHtml(title)}</h1>
|
|
322
|
+
<p class="message">${escapeHtml(message)}</p>
|
|
323
|
+
${codeBlock}
|
|
324
|
+
<p class="footer">Powered by <a href="https://epilot.cloud" target="_blank" rel="noopener">epilot</a></p>
|
|
325
|
+
</div>
|
|
326
|
+
</body>
|
|
327
|
+
</html>`;
|
|
328
|
+
};
|
|
329
|
+
var escapeHtml = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
330
|
+
export {
|
|
331
|
+
auth_login_default as default
|
|
332
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJOXXFMA.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HN4QDJOJ.js";
|
|
8
|
+
import "./chunk-6RBLA5YE.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/automation.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJOXXFMA.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HN4QDJOJ.js";
|
|
8
|
+
import "./chunk-6RBLA5YE.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/billing.ts
|
|
11
11
|
import { defineCommand } from "citty";
|