@curviate/cli 0.10.0 → 0.12.0

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.
@@ -208,6 +208,7 @@ var READ_SINGLE_FLAGS = {
208
208
  preview: GLOBAL_FLAGS.preview,
209
209
  verbose: GLOBAL_FLAGS.verbose
210
210
  };
211
+ var WRITE_SINGLE_FLAGS = READ_SINGLE_FLAGS;
211
212
 
212
213
  export {
213
214
  getConfigPath,
@@ -219,5 +220,6 @@ export {
219
220
  updateProfileField,
220
221
  GLOBAL_FLAGS,
221
222
  WRITE_FLAGS,
222
- READ_SINGLE_FLAGS
223
+ READ_SINGLE_FLAGS,
224
+ WRITE_SINGLE_FLAGS
223
225
  };
@@ -26,6 +26,7 @@ var EXIT_CODE_MAP = {
26
26
  LINKEDIN_SERVICE_UNAVAILABLE: 7,
27
27
  // Account / connection state (8)
28
28
  ACCOUNT_RESTRICTED: 8,
29
+ RESOURCE_ACCESS_RESTRICTED: 8,
29
30
  LINKEDIN_AUTH_FAILED: 8,
30
31
  LINKEDIN_COOKIE_INVALID: 8,
31
32
  CONNECTION_IN_PROGRESS: 8,
@@ -51,7 +52,10 @@ var EXIT_CODE_MAP = {
51
52
  function getExitCode(code) {
52
53
  return EXIT_CODE_MAP[code] ?? 1;
53
54
  }
55
+ var AUTH_NEEDED = 12;
56
+
54
57
  export {
55
58
  EXIT_CODE_MAP,
56
- getExitCode
59
+ getExitCode,
60
+ AUTH_NEEDED
57
61
  };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readConfig
4
- } from "./chunk-TDYIQHQX.js";
4
+ } from "./chunk-4JHGVY7R.js";
5
5
 
6
6
  // src/lib/resolve.ts
7
7
  var DEFAULT_BASE_URL = "https://api.curviate.com";
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/lib/readline.ts
4
+ import { createInterface } from "readline";
5
+ async function readlineSync(prompt, opts = {}) {
6
+ return new Promise((resolve, reject) => {
7
+ process.stderr.write(prompt);
8
+ if (opts.mask && typeof process.stdin.setRawMode === "function") {
9
+ process.stdin.setRawMode(true);
10
+ process.stdin.resume();
11
+ process.stdin.setEncoding("utf8");
12
+ let input = "";
13
+ const onData = (char) => {
14
+ if (char === "\r" || char === "\n") {
15
+ process.stdin.setRawMode(false);
16
+ process.stdin.pause();
17
+ process.stdin.removeListener("data", onData);
18
+ process.stderr.write("\n");
19
+ resolve(input);
20
+ } else if (char === "") {
21
+ process.stdin.setRawMode(false);
22
+ process.stdin.pause();
23
+ process.stdin.removeListener("data", onData);
24
+ reject(new Error("Interrupted."));
25
+ } else if (char === "\x7F" || char === "\b") {
26
+ input = input.slice(0, -1);
27
+ } else {
28
+ input += char;
29
+ }
30
+ };
31
+ process.stdin.on("data", onData);
32
+ } else {
33
+ const rl = createInterface({
34
+ input: process.stdin,
35
+ output: void 0,
36
+ // suppress default echo (prompt already on stderr)
37
+ terminal: false
38
+ });
39
+ rl.once("line", (line) => {
40
+ rl.close();
41
+ resolve(line.trim());
42
+ });
43
+ rl.once("error", reject);
44
+ rl.once("close", () => resolve(""));
45
+ }
46
+ });
47
+ }
48
+
49
+ export {
50
+ readlineSync
51
+ };
@@ -28,5 +28,6 @@ async function resolveTextOrStdin(rawText, out, readStdin) {
28
28
 
29
29
  export {
30
30
  STDIN_SENTINEL,
31
+ defaultReadStdin,
31
32
  resolveTextOrStdin
32
33
  };
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  STDIN_SENTINEL
4
- } from "./chunk-CHFKVAEI.js";
4
+ } from "./chunk-U7Y4EXHT.js";
5
5
 
6
6
  // src/cli.ts
7
7
  import { defineCommand } from "citty";
@@ -42,9 +42,10 @@ function findUnknownFlag(rawArgs, declared) {
42
42
  let name = arg.replace(/^-+/, "");
43
43
  const eq = name.indexOf("=");
44
44
  if (eq !== -1) name = name.slice(0, eq);
45
- if (name.startsWith("no-")) name = name.slice(3);
46
45
  if (name === "") continue;
47
- if (!declared.has(name)) return arg;
46
+ if (declared.has(name)) continue;
47
+ if (name.startsWith("no-") && declared.has(name.slice(3))) continue;
48
+ return arg;
48
49
  }
49
50
  return null;
50
51
  }
@@ -138,23 +139,23 @@ var main = defineCommand({
138
139
  // Subcommand registry — names and descriptions are static for help rendering;
139
140
  // the handler implementation is loaded lazily on first invocation.
140
141
  subCommands: {
141
- login: () => import("./login-POKHNDYX.js").then((m) => m.loginCommand),
142
- config: () => import("./config-2GBLD4GN.js").then((m) => m.configCommand),
142
+ login: () => import("./login-BBVQLXM7.js").then((m) => m.loginCommand),
143
+ config: () => import("./config-Q2AEWSEC.js").then((m) => m.configCommand),
143
144
  // ---------------------------------------------------------------------------
144
145
  // Noun groups — lazy-loaded on first invocation.
145
146
  // ---------------------------------------------------------------------------
146
- profile: () => import("./profile-2YE3IC3O.js").then((m) => m.profileCommand),
147
- company: () => import("./company-QB7VCLXJ.js").then((m) => m.companyCommand),
148
- job: () => import("./job-QCKWY257.js").then((m) => m.jobCommand),
149
- connect: () => import("./connect-2OAOLYQO.js").then((m) => m.connectCommand),
150
- search: () => import("./search-5BBFRE6T.js").then((m) => m.searchCommand),
151
- inbox: () => import("./inbox-AFVIF6ZU.js").then((m) => m.inboxCommand),
152
- message: () => import("./message-MP4TJJXS.js").then((m) => m.messageCommand),
153
- post: () => import("./post-Q3KR3TN3.js").then((m) => m.postCommand),
154
- account: () => import("./account-XV3MU5S5.js").then((m) => m.accountCommand),
155
- webhook: () => import("./webhook-7BJUYU4H.js").then((m) => m.webhookCommand),
156
- "sales-nav": () => import("./sales-nav-SG6IXCTR.js").then((m) => m.salesNavCommand),
157
- recruiter: () => import("./recruiter-2CETQNCU.js").then((m) => m.recruiterCommand)
147
+ profile: () => import("./profile-DD5GMGNL.js").then((m) => m.profileCommand),
148
+ company: () => import("./company-RU2CA5DY.js").then((m) => m.companyCommand),
149
+ job: () => import("./job-FGGQEXSU.js").then((m) => m.jobCommand),
150
+ connect: () => import("./connect-QT6ZOS75.js").then((m) => m.connectCommand),
151
+ search: () => import("./search-ZGTS45BT.js").then((m) => m.searchCommand),
152
+ inbox: () => import("./inbox-DN7X7CM2.js").then((m) => m.inboxCommand),
153
+ message: () => import("./message-6K5E3CUF.js").then((m) => m.messageCommand),
154
+ post: () => import("./post-2JQZ3OSF.js").then((m) => m.postCommand),
155
+ account: () => import("./account-NZBO6Y5I.js").then((m) => m.accountCommand),
156
+ webhook: () => import("./webhook-XPWBI675.js").then((m) => m.webhookCommand),
157
+ "sales-nav": () => import("./sales-nav-QTSTJMKA.js").then((m) => m.salesNavCommand),
158
+ recruiter: () => import("./recruiter-XHVMQWK6.js").then((m) => m.recruiterCommand)
158
159
  },
159
160
  async run() {
160
161
  const { runMain } = await import("citty");
@@ -0,0 +1,337 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ streamAll
4
+ } from "./chunk-GXTZION6.js";
5
+ import {
6
+ slimCompany,
7
+ slimSearchJobs,
8
+ slimSearchPeople,
9
+ slimSearchPosts
10
+ } from "./chunk-SSPILTKF.js";
11
+ import {
12
+ resolveIdentifier
13
+ } from "./chunk-DMQZEPQE.js";
14
+ import {
15
+ createClient,
16
+ renderError,
17
+ renderSuccess,
18
+ renderUnexpectedError,
19
+ resolveEffectiveConfig
20
+ } from "./chunk-JXF47TRY.js";
21
+ import {
22
+ GLOBAL_FLAGS
23
+ } from "./chunk-4JHGVY7R.js";
24
+
25
+ // src/commands/company.ts
26
+ import { defineCommand } from "citty";
27
+ function buildOutputStreams() {
28
+ return {
29
+ stdout: { write: (s) => process.stdout.write(s) },
30
+ stderr: { write: (s) => process.stderr.write(s) }
31
+ };
32
+ }
33
+ function requireAccount(account, out) {
34
+ if (!account) {
35
+ out.stderr.write("error: --account is required for this command. Set it via --account, CURVIATE_ACCOUNT, or `curviate config set-account`.\n");
36
+ process.exit(2);
37
+ }
38
+ return account;
39
+ }
40
+ function rejectPreviewOnRead(preview, out) {
41
+ if (preview) {
42
+ out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
43
+ process.exit(2);
44
+ }
45
+ }
46
+ function resolveOutputOpts(flags) {
47
+ return {
48
+ json: (flags.json ?? false) || !process.stdout.isTTY,
49
+ isTTY: process.stdout.isTTY ?? false,
50
+ fields: flags.fields,
51
+ verbose: flags.verbose ?? false
52
+ };
53
+ }
54
+ async function handleSdkError(err, outOpts, out) {
55
+ const { CurviateError } = await import("@curviate/sdk");
56
+ if (err instanceof CurviateError) {
57
+ const { getExitCode } = await import("./exit-codes-ZTY2NY3X.js");
58
+ renderError(err, outOpts, out);
59
+ process.exit(getExitCode(err.code));
60
+ }
61
+ renderUnexpectedError(err, out);
62
+ process.exit(1);
63
+ }
64
+ async function runCompanyGet(client, flags, out) {
65
+ rejectPreviewOnRead(flags.preview, out);
66
+ if (flags.all) {
67
+ out.stderr.write("error: --all is not supported on non-paginated commands.\n");
68
+ process.exit(2);
69
+ }
70
+ if (flags.sections !== void 0) {
71
+ out.stderr.write("error: --sections is not supported on company commands.\n");
72
+ process.exit(2);
73
+ }
74
+ const accountId = requireAccount(flags.account, out);
75
+ const rawId = flags.id ?? "";
76
+ const resolvedId = resolveIdentifier(rawId);
77
+ const outOpts = { ...resolveOutputOpts(flags), slim: slimCompany };
78
+ try {
79
+ const result = await client.account(accountId).companies.get(resolvedId);
80
+ renderSuccess(result, outOpts, out);
81
+ } catch (err) {
82
+ await handleSdkError(err, outOpts, out);
83
+ }
84
+ }
85
+ async function runCompanyEmployees(client, flags, out) {
86
+ rejectPreviewOnRead(flags.preview, out);
87
+ const accountId = requireAccount(flags.account, out);
88
+ const identifier = flags.id ?? "";
89
+ const ns = client.account(accountId);
90
+ const outOpts = resolveOutputOpts(flags);
91
+ const params = {};
92
+ if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
93
+ if (flags.cursor) params["cursor"] = flags.cursor;
94
+ if (flags.keywords) params["keywords"] = flags.keywords;
95
+ if (flags.location) params["location"] = flags.location;
96
+ try {
97
+ if (flags.all) {
98
+ const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
99
+ const fn = (p) => ns.companies.employees(identifier, p);
100
+ for await (const item of streamAll(fn, params, {
101
+ maxPages,
102
+ onTruncated: (n) => out.stderr.write(`Streaming truncated at ${n} page(s). Use --all --max-pages or --cursor for manual paging.
103
+ `)
104
+ })) {
105
+ out.stdout.write(JSON.stringify(item) + "\n");
106
+ }
107
+ return;
108
+ }
109
+ const result = await ns.companies.employees(identifier, params);
110
+ renderSuccess(result, { ...outOpts, slim: slimSearchPeople }, out);
111
+ } catch (err) {
112
+ await handleSdkError(err, outOpts, out);
113
+ }
114
+ }
115
+ async function runCompanyPosts(client, flags, out) {
116
+ rejectPreviewOnRead(flags.preview, out);
117
+ const accountId = requireAccount(flags.account, out);
118
+ const identifier = flags.id ?? "";
119
+ const ns = client.account(accountId);
120
+ const outOpts = resolveOutputOpts(flags);
121
+ const params = {};
122
+ if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
123
+ if (flags.cursor) params["cursor"] = flags.cursor;
124
+ try {
125
+ if (flags.all) {
126
+ const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
127
+ const fn = (p) => ns.companies.posts(identifier, p);
128
+ for await (const item of streamAll(fn, params, {
129
+ maxPages,
130
+ onTruncated: (n) => out.stderr.write(`Streaming truncated at ${n} page(s). Use --all --max-pages or --cursor for manual paging.
131
+ `)
132
+ })) {
133
+ out.stdout.write(JSON.stringify(item) + "\n");
134
+ }
135
+ return;
136
+ }
137
+ const result = await ns.companies.posts(identifier, params);
138
+ renderSuccess(result, { ...outOpts, slim: slimSearchPosts }, out);
139
+ } catch (err) {
140
+ await handleSdkError(err, outOpts, out);
141
+ }
142
+ }
143
+ async function runCompanyJobs(client, flags, out) {
144
+ rejectPreviewOnRead(flags.preview, out);
145
+ const accountId = requireAccount(flags.account, out);
146
+ const identifier = flags.id ?? "";
147
+ const ns = client.account(accountId);
148
+ const outOpts = resolveOutputOpts(flags);
149
+ const params = {};
150
+ if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
151
+ if (flags.cursor) params["cursor"] = flags.cursor;
152
+ if (flags.keywords) params["keywords"] = flags.keywords;
153
+ try {
154
+ if (flags.all) {
155
+ const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
156
+ const fn = (p) => ns.companies.jobs(identifier, p);
157
+ for await (const item of streamAll(fn, params, {
158
+ maxPages,
159
+ onTruncated: (n) => out.stderr.write(`Streaming truncated at ${n} page(s). Use --all --max-pages or --cursor for manual paging.
160
+ `)
161
+ })) {
162
+ out.stdout.write(JSON.stringify(item) + "\n");
163
+ }
164
+ return;
165
+ }
166
+ const result = await ns.companies.jobs(identifier, params);
167
+ renderSuccess(result, { ...outOpts, slim: slimSearchJobs }, out);
168
+ } catch (err) {
169
+ await handleSdkError(err, outOpts, out);
170
+ }
171
+ }
172
+ async function runCompanyFollowers(client, flags, out) {
173
+ rejectPreviewOnRead(flags.preview, out);
174
+ const accountId = requireAccount(flags.account, out);
175
+ const identifier = flags.id ?? "";
176
+ const ns = client.account(accountId);
177
+ const outOpts = resolveOutputOpts(flags);
178
+ const params = {};
179
+ if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
180
+ if (flags.cursor) params["cursor"] = flags.cursor;
181
+ try {
182
+ if (flags.all) {
183
+ const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
184
+ const fn = (p) => ns.companies.followers(identifier, p);
185
+ for await (const item of streamAll(fn, params, {
186
+ maxPages,
187
+ onTruncated: (n) => out.stderr.write(`Streaming truncated at ${n} page(s). Use --all --max-pages or --cursor for manual paging.
188
+ `)
189
+ })) {
190
+ out.stdout.write(JSON.stringify(item) + "\n");
191
+ }
192
+ return;
193
+ }
194
+ const result = await ns.companies.followers(identifier, params);
195
+ renderSuccess(result, outOpts, out);
196
+ } catch (err) {
197
+ await handleSdkError(err, outOpts, out);
198
+ }
199
+ }
200
+ var companyEmployeesCommand = defineCommand({
201
+ meta: { name: "employees", description: "List people who currently work at the company." },
202
+ args: {
203
+ ...GLOBAL_FLAGS,
204
+ id: { type: "positional", description: "The company's numeric provider_id (the id field of `company <id>`)." },
205
+ keywords: { type: "string", description: "Free-text keyword filter across employee profile fields." },
206
+ location: { type: "string", description: "Opaque location id from `search parameters --type LOCATION`." }
207
+ },
208
+ async run({ args }) {
209
+ const flags = args;
210
+ const cfg = await resolveEffectiveConfig({
211
+ apiKey: flags["api-key"],
212
+ baseUrl: flags["base-url"],
213
+ timeout: flags.timeout,
214
+ account: flags.account,
215
+ profile: flags.profile
216
+ });
217
+ if (!cfg.apiKey) {
218
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
219
+ process.exit(3);
220
+ }
221
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
222
+ const out = buildOutputStreams();
223
+ await runCompanyEmployees(client, { ...flags, account: flags.account ?? cfg.account }, out);
224
+ }
225
+ });
226
+ var companyPostsCommand = defineCommand({
227
+ meta: { name: "posts", description: "List the company's posts." },
228
+ args: {
229
+ ...GLOBAL_FLAGS,
230
+ id: { type: "positional", description: "The company's numeric provider_id (the id field of `company <id>`)." }
231
+ },
232
+ async run({ args }) {
233
+ const flags = args;
234
+ const cfg = await resolveEffectiveConfig({
235
+ apiKey: flags["api-key"],
236
+ baseUrl: flags["base-url"],
237
+ timeout: flags.timeout,
238
+ account: flags.account,
239
+ profile: flags.profile
240
+ });
241
+ if (!cfg.apiKey) {
242
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
243
+ process.exit(3);
244
+ }
245
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
246
+ const out = buildOutputStreams();
247
+ await runCompanyPosts(client, { ...flags, account: flags.account ?? cfg.account }, out);
248
+ }
249
+ });
250
+ var companyJobsCommand = defineCommand({
251
+ meta: { name: "jobs", description: "List the company's open job postings." },
252
+ args: {
253
+ ...GLOBAL_FLAGS,
254
+ id: { type: "positional", description: "The company's numeric provider_id (the id field of `company <id>`)." },
255
+ keywords: { type: "string", description: "Free-text keyword filter across job postings." }
256
+ },
257
+ async run({ args }) {
258
+ const flags = args;
259
+ const cfg = await resolveEffectiveConfig({
260
+ apiKey: flags["api-key"],
261
+ baseUrl: flags["base-url"],
262
+ timeout: flags.timeout,
263
+ account: flags.account,
264
+ profile: flags.profile
265
+ });
266
+ if (!cfg.apiKey) {
267
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
268
+ process.exit(3);
269
+ }
270
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
271
+ const out = buildOutputStreams();
272
+ await runCompanyJobs(client, { ...flags, account: flags.account ?? cfg.account }, out);
273
+ }
274
+ });
275
+ var companyFollowersCommand = defineCommand({
276
+ meta: { name: "followers", description: "List the company's followers. Requires page-admin permission." },
277
+ args: {
278
+ ...GLOBAL_FLAGS,
279
+ id: { type: "positional", description: "The company's numeric provider_id (the id field of `company <id>`)." }
280
+ },
281
+ async run({ args }) {
282
+ const flags = args;
283
+ const cfg = await resolveEffectiveConfig({
284
+ apiKey: flags["api-key"],
285
+ baseUrl: flags["base-url"],
286
+ timeout: flags.timeout,
287
+ account: flags.account,
288
+ profile: flags.profile
289
+ });
290
+ if (!cfg.apiKey) {
291
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
292
+ process.exit(3);
293
+ }
294
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
295
+ const out = buildOutputStreams();
296
+ await runCompanyFollowers(client, { ...flags, account: flags.account ?? cfg.account }, out);
297
+ }
298
+ });
299
+ var companyCommand = defineCommand({
300
+ meta: { name: "company", description: "Fetch a company profile by URL, slug, or numeric id, and its sub-resources." },
301
+ args: {
302
+ ...GLOBAL_FLAGS,
303
+ id: { type: "positional", description: "Company identifier (URL, slug, or native id)." },
304
+ sections: { type: "string", description: "Not supported on company commands \u2014 usage error (exit 2) if supplied." }
305
+ },
306
+ subCommands: {
307
+ employees: companyEmployeesCommand,
308
+ posts: companyPostsCommand,
309
+ jobs: companyJobsCommand,
310
+ followers: companyFollowersCommand
311
+ },
312
+ async run({ args }) {
313
+ const flags = args;
314
+ const cfg = await resolveEffectiveConfig({
315
+ apiKey: flags["api-key"],
316
+ baseUrl: flags["base-url"],
317
+ timeout: flags.timeout,
318
+ account: flags.account,
319
+ profile: flags.profile
320
+ });
321
+ if (!cfg.apiKey) {
322
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
323
+ process.exit(3);
324
+ }
325
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
326
+ const out = buildOutputStreams();
327
+ await runCompanyGet(client, { ...flags, account: flags.account ?? cfg.account }, out);
328
+ }
329
+ });
330
+ export {
331
+ companyCommand,
332
+ runCompanyEmployees,
333
+ runCompanyFollowers,
334
+ runCompanyGet,
335
+ runCompanyJobs,
336
+ runCompanyPosts
337
+ };
@@ -7,7 +7,7 @@ import {
7
7
  renameProfile,
8
8
  setActiveProfile,
9
9
  updateProfileField
10
- } from "./chunk-TDYIQHQX.js";
10
+ } from "./chunk-4JHGVY7R.js";
11
11
 
12
12
  // src/commands/config.ts
13
13
  import { defineCommand } from "citty";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- streamAll
4
- } from "./chunk-GXTZION6.js";
5
2
  import {
6
3
  buildPreviewOutput
7
4
  } from "./chunk-R3VLWLVV.js";
5
+ import {
6
+ streamAll
7
+ } from "./chunk-GXTZION6.js";
8
8
  import {
9
9
  slimInviteReceived,
10
10
  slimInviteReceivedItem,
@@ -20,11 +20,11 @@ import {
20
20
  renderSuccess,
21
21
  renderUnexpectedError,
22
22
  resolveEffectiveConfig
23
- } from "./chunk-47SYFQRF.js";
23
+ } from "./chunk-JXF47TRY.js";
24
24
  import {
25
25
  GLOBAL_FLAGS,
26
26
  WRITE_FLAGS
27
- } from "./chunk-TDYIQHQX.js";
27
+ } from "./chunk-4JHGVY7R.js";
28
28
 
29
29
  // src/commands/connect.ts
30
30
  import { defineCommand } from "citty";
@@ -79,7 +79,7 @@ async function runConnectSend(client, flags, out) {
79
79
  } catch (err) {
80
80
  const { CurviateError } = await import("@curviate/sdk");
81
81
  if (err instanceof CurviateError) {
82
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
82
+ const { getExitCode } = await import("./exit-codes-ZTY2NY3X.js");
83
83
  renderError(err, outOpts, out);
84
84
  process.exit(getExitCode(err.code));
85
85
  }
@@ -117,7 +117,7 @@ async function runConnectSent(client, flags, out) {
117
117
  } catch (err) {
118
118
  const { CurviateError } = await import("@curviate/sdk");
119
119
  if (err instanceof CurviateError) {
120
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
120
+ const { getExitCode } = await import("./exit-codes-ZTY2NY3X.js");
121
121
  renderError(err, outOpts, out);
122
122
  process.exit(getExitCode(err.code));
123
123
  }
@@ -155,7 +155,7 @@ async function runConnectReceived(client, flags, out) {
155
155
  } catch (err) {
156
156
  const { CurviateError } = await import("@curviate/sdk");
157
157
  if (err instanceof CurviateError) {
158
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
158
+ const { getExitCode } = await import("./exit-codes-ZTY2NY3X.js");
159
159
  renderError(err, outOpts, out);
160
160
  process.exit(getExitCode(err.code));
161
161
  }
@@ -193,7 +193,7 @@ async function runConnectRespond(client, flags, out) {
193
193
  } catch (err) {
194
194
  const { CurviateError } = await import("@curviate/sdk");
195
195
  if (err instanceof CurviateError) {
196
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
196
+ const { getExitCode } = await import("./exit-codes-ZTY2NY3X.js");
197
197
  renderError(err, outOpts, out);
198
198
  process.exit(getExitCode(err.code));
199
199
  }
@@ -222,7 +222,7 @@ async function runConnectCancel(client, flags, out) {
222
222
  } catch (err) {
223
223
  const { CurviateError } = await import("@curviate/sdk");
224
224
  if (err instanceof CurviateError) {
225
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
225
+ const { getExitCode } = await import("./exit-codes-ZTY2NY3X.js");
226
226
  renderError(err, outOpts, out);
227
227
  process.exit(getExitCode(err.code));
228
228
  }
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ AUTH_NEEDED,
4
+ EXIT_CODE_MAP,
5
+ getExitCode
6
+ } from "./chunk-HMAGEMF7.js";
7
+ export {
8
+ AUTH_NEEDED,
9
+ EXIT_CODE_MAP,
10
+ getExitCode
11
+ };
@@ -11,11 +11,11 @@ import {
11
11
  renderSuccess,
12
12
  renderUnexpectedError,
13
13
  resolveEffectiveConfig
14
- } from "./chunk-47SYFQRF.js";
14
+ } from "./chunk-JXF47TRY.js";
15
15
  import {
16
16
  GLOBAL_FLAGS,
17
17
  READ_SINGLE_FLAGS
18
- } from "./chunk-TDYIQHQX.js";
18
+ } from "./chunk-4JHGVY7R.js";
19
19
 
20
20
  // src/commands/inbox.ts
21
21
  import { defineCommand } from "citty";
@@ -69,7 +69,7 @@ function validateIsoZTimestamp(value, flagName, out) {
69
69
  async function handleSdkError(err, outOpts, out) {
70
70
  const { CurviateError } = await import("@curviate/sdk");
71
71
  if (err instanceof CurviateError) {
72
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
72
+ const { getExitCode } = await import("./exit-codes-ZTY2NY3X.js");
73
73
  renderError(err, outOpts, out);
74
74
  process.exit(getExitCode(err.code));
75
75
  }
@@ -11,10 +11,10 @@ import {
11
11
  renderSuccess,
12
12
  renderUnexpectedError,
13
13
  resolveEffectiveConfig
14
- } from "./chunk-47SYFQRF.js";
14
+ } from "./chunk-JXF47TRY.js";
15
15
  import {
16
16
  READ_SINGLE_FLAGS
17
- } from "./chunk-TDYIQHQX.js";
17
+ } from "./chunk-4JHGVY7R.js";
18
18
 
19
19
  // src/commands/job.ts
20
20
  import { defineCommand } from "citty";
@@ -55,7 +55,7 @@ async function runJobGet(client, flags, out) {
55
55
  } catch (err) {
56
56
  const { CurviateError } = await import("@curviate/sdk");
57
57
  if (err instanceof CurviateError) {
58
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
58
+ const { getExitCode } = await import("./exit-codes-ZTY2NY3X.js");
59
59
  renderError(err, outOpts, out);
60
60
  process.exit(getExitCode(err.code));
61
61
  }