@epilot/cli 0.1.93 → 0.1.95

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 CHANGED
@@ -29,7 +29,7 @@ npm install -g @epilot/cli
29
29
 
30
30
  <!-- usage-help -->
31
31
  ```
32
- epilot v0.1.93 — CLI for epilot APIs
32
+ epilot v0.1.95 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -557,7 +557,7 @@
557
557
  "get": {
558
558
  "operationId": "downloadFile",
559
559
  "summary": "downloadFile",
560
- "description": "Generate a pre-signed download URL for a file.\n\nThe returned URL is valid for a limited time (typically 15 minutes) and can be used to download the file directly.\n",
560
+ "description": "Generate a pre-signed download URL for a file.\n\nThe returned URL is valid for a limited time (typically 15 minutes) and can be used to download the file directly.\n\n**Download attribution (`x-track-*`):** any query parameter whose name starts with\n`x-track-` is treated as opaque tracking metadata and signed into the returned URL, so it\nshows up in the S3 access logs / CloudTrail data events when the link is actually opened.\nThis is a generic, service-agnostic channel — e.g. the customer portal sends\n`x-track-portal-id` and `x-track-contact-id`. Only the `x-track-` namespace is forwarded;\nthe values cannot affect how S3 resolves or serves the object. Parameter names must match\n`^x-track-[a-z0-9](?:[a-z0-9_-]{0,38}[a-z0-9])?$`, values are capped at 256 characters, and\nat most 10 such parameters are honoured (see the `x-track` parameter below).\n",
561
561
  "tags": [
562
562
  "File"
563
563
  ],
@@ -588,6 +588,20 @@
588
588
  "type": "boolean",
589
589
  "default": true
590
590
  }
591
+ },
592
+ {
593
+ "name": "x-track",
594
+ "in": "query",
595
+ "required": false,
596
+ "style": "form",
597
+ "explode": true,
598
+ "description": "Download-attribution channel. Provide any number of query parameters whose names\nstart with `x-track-` (e.g. `x-track-portal-id`, `x-track-contact-id`); each is signed\ninto the pre-signed URL verbatim so the download is recorded in the S3 access logs /\nCloudTrail data events. Only the `x-track-` namespace is forwarded — values cannot\naffect how S3 resolves or serves the object. Parameter names must match\n`^x-track-[a-z0-9](?:[a-z0-9_-]{0,38}[a-z0-9])?$`, values are capped at 256 characters,\nand at most 10 such parameters are honoured.\n",
599
+ "schema": {
600
+ "type": "object",
601
+ "additionalProperties": {
602
+ "type": "string"
603
+ }
604
+ }
591
605
  }
592
606
  ],
593
607
  "responses": {
@@ -1243,6 +1257,9 @@
1243
1257
  "401": {
1244
1258
  "$ref": "#/components/responses/UnauthorizedError"
1245
1259
  },
1260
+ "403": {
1261
+ "$ref": "#/components/responses/ForbiddenError"
1262
+ },
1246
1263
  "404": {
1247
1264
  "$ref": "#/components/responses/NotFoundError"
1248
1265
  },
@@ -2443,6 +2443,10 @@
2443
2443
  "passkey_enabled": {
2444
2444
  "type": "boolean",
2445
2445
  "description": "Whether passkey login is enabled for this organization"
2446
+ },
2447
+ "passkeys_registered": {
2448
+ "type": "boolean",
2449
+ "description": "Whether the user has at least one passkey registered. Lets the login\nUI offer passkey authentication as an alternative to an MFA code.\nDiscloses nothing that :beginPasskeyAuthentication doesn't already\nreveal for a known email address.\n"
2446
2450
  }
2447
2451
  }
2448
2452
  },
@@ -21,7 +21,7 @@ var auth_default = defineCommand({
21
21
  description: "Manage authentication"
22
22
  },
23
23
  subCommands: {
24
- login: () => import("./auth-login-7EWYCAZ7.js").then((m) => m.default),
24
+ login: () => import("./auth-login-3AY5U4JU.js").then((m) => m.default),
25
25
  token: () => import("./auth-token-APXLIQAO.js").then((m) => m.default),
26
26
  logout: defineCommand({
27
27
  meta: { name: "logout", description: "Remove stored credentials" },
@@ -61,6 +61,7 @@ var auth_default = defineCommand({
61
61
  const tokenUse = claims?.token_use;
62
62
  const roles = claims?.assume_roles;
63
63
  const readOnly = claims?.read_only === true;
64
+ const anonymize = claims?.anonymize === true;
64
65
  if (name) process.stdout.write(` Name: ${name}
65
66
  `);
66
67
  if (adminEmail && adminEmail !== name) process.stdout.write(` Email: ${adminEmail}
@@ -76,6 +77,8 @@ var auth_default = defineCommand({
76
77
  if (roles?.length) process.stdout.write(` Roles: ${roles.join(", ")}
77
78
  `);
78
79
  process.stdout.write(` Access: ${readOnly ? `${YELLOW}read-only${RESET}` : `${GREEN}read-write${RESET}`}
80
+ `);
81
+ if (anonymize) process.stdout.write(` Data: ${YELLOW}anonymized${RESET}
79
82
  `);
80
83
  if (creds.expires_at) {
81
84
  const expiry = new Date(creds.expires_at);
@@ -40,6 +40,10 @@ var auth_login_default = defineCommand({
40
40
  token: { type: "string", description: "Manually provide a token instead of browser login" },
41
41
  profile: { type: "string", description: "Save credentials to this profile" },
42
42
  readonly: { type: "boolean", description: "Generate a read-only token (cannot perform write actions)" },
43
+ anonymize: {
44
+ type: "boolean",
45
+ description: "Generate an anonymized token (personal data is masked in all API responses)"
46
+ },
43
47
  "use-dev": { type: "boolean", description: "Use dev environment (portal.dev.epilot.cloud)" },
44
48
  "use-staging": { type: "boolean", description: "Use staging environment (portal.staging.epilot.cloud)" }
45
49
  },
@@ -47,6 +51,7 @@ var auth_login_default = defineCommand({
47
51
  const profileName = args.profile || process.env.EPILOT_PROFILE;
48
52
  const env = resolveEnvironment(args["use-dev"], args["use-staging"]);
49
53
  const readonly = Boolean(args.readonly);
54
+ const anonymize = Boolean(args.anonymize);
50
55
  if (args.token) {
51
56
  saveCredentials({ token: args.token }, profileName);
52
57
  const suffix = profileName ? ` to profile "${profileName}"` : "";
@@ -63,7 +68,7 @@ var auth_login_default = defineCommand({
63
68
  );
64
69
  process.exit(1);
65
70
  }
66
- const token = await browserLogin(profileName, env, readonly);
71
+ const token = await browserLogin(profileName, env, readonly, anonymize);
67
72
  if (token) {
68
73
  process.stdout.write(`${GREEN}${BOLD}Login successful!${RESET}
69
74
  `);
@@ -74,7 +79,7 @@ var auth_login_default = defineCommand({
74
79
  }
75
80
  }
76
81
  });
77
- var browserLogin = async (profileName, env = "production", readonly = false) => {
82
+ var browserLogin = async (profileName, env = "production", readonly = false, anonymize = false) => {
78
83
  const state = randomBytes(32).toString("hex");
79
84
  const verificationCode = randomBytes(3).toString("hex").toUpperCase();
80
85
  const suffix = profileName ? ` ${DIM}(profile: ${profileName})${RESET}` : "";
@@ -86,6 +91,12 @@ ${BOLD}epilot CLI Login${RESET}${suffix}
86
91
  if (readonly) {
87
92
  process.stdout.write(
88
93
  `${YELLOW}Read-only mode: the CLI session will not be able to perform write actions.${RESET}
94
+ `
95
+ );
96
+ }
97
+ if (anonymize) {
98
+ process.stdout.write(
99
+ `${YELLOW}Anonymize mode: personal data will be masked in all API responses for this CLI session.${RESET}
89
100
  `
90
101
  );
91
102
  }
@@ -125,7 +136,7 @@ ${BOLD}epilot CLI Login${RESET}${suffix}
125
136
  const port = address.port;
126
137
  const callbackUrl = `http://localhost:${port}/callback`;
127
138
  const portalUrl = getPortalUrl(env);
128
- const loginUrl = `${portalUrl}/login?cli_callback=${encodeURIComponent(callbackUrl)}&state=${state}&code=${verificationCode}` + (readonly ? `&readonly=true` : "");
139
+ const loginUrl = `${portalUrl}/login?cli_callback=${encodeURIComponent(callbackUrl)}&state=${state}&code=${verificationCode}` + (readonly ? `&readonly=true` : "") + (anonymize ? `&anonymize=true` : "");
129
140
  process.stdout.write(`
130
141
  ${DIM}Login URL: ${loginUrl}${RESET}
131
142
 
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
11
11
  var main = defineCommand({
12
12
  meta: {
13
13
  name: "epilot",
14
- version: "0.1.93",
14
+ version: "0.1.95",
15
15
  description: "CLI for epilot APIs"
16
16
  },
17
17
  args: {
@@ -27,11 +27,11 @@ var main = defineCommand({
27
27
  jsonata: { type: "string", description: "JSONata expression" }
28
28
  },
29
29
  subCommands: {
30
- auth: () => import("../auth-4HG7B2GC.js").then((m) => m.default),
30
+ auth: () => import("../auth-WMXFMPWE.js").then((m) => m.default),
31
31
  profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
32
32
  config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
33
33
  completion: () => import("../completion-IGVIBAFM.js").then((m) => m.default),
34
- upgrade: () => import("../upgrade-EMXIHRN3.js").then((m) => m.default),
34
+ upgrade: () => import("../upgrade-W43OKEIV.js").then((m) => m.default),
35
35
  "access-token": () => import("../access-token-WWE6BDJH.js").then((m) => m.default),
36
36
  address: () => import("../address-EH3C4CVB.js").then((m) => m.default),
37
37
  "address-suggestions": () => import("../address-suggestions-RRSLOBFW.js").then((m) => m.default),
@@ -134,7 +134,7 @@ process.stderr.on("error", (err) => {
134
134
  if (err.code === "EPIPE") process.exit(0);
135
135
  throw err;
136
136
  });
137
- var VERSION = true ? "0.1.93" : (await null).default.version;
137
+ var VERSION = true ? "0.1.95" : (await null).default.version;
138
138
  var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
139
139
  process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
140
140
  var args = process.argv.slice(2);
@@ -72,7 +72,7 @@ ${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}
72
72
  }
73
73
  });
74
74
  var getCurrentVersion = () => {
75
- if (true) return "0.1.93";
75
+ if (true) return "0.1.95";
76
76
  try {
77
77
  const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
78
78
  encoding: "utf-8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/cli",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "description": "CLI for epilot APIs",
5
5
  "type": "module",
6
6
  "bin": {