@intercom/cli 0.14.0 → 0.15.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.
- package/CHANGELOG.md +20 -0
- package/dist/index.js +150 -52
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
View it from the CLI with `intercom changelog`.
|
|
9
9
|
|
|
10
|
+
## [0.15.0] - 2026-11-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `intercom fin workflows list`, `get` and `upload` now return a `web_url` that opens the workflow in the visual builder. The builder URL uses a different id from the workflow's `id`, so use this field instead of building the URL yourself.
|
|
15
|
+
- `intercom articles list`, `search`, `get`, `create` and `update` add a `web_url` that opens each article in the Intercom editor, in the workspace's own region.
|
|
16
|
+
- `intercom fin workflows upload --note <text>` labels the saved version, as `fin procedures upload --note` already does. The note shows in `intercom fin workflows versions <id>`.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- `intercom fin workflows upload --verify` no longer reports drift on `web_url` or `workflow_instance_id`. The server assigns those itself, so a file copied from another workflow no longer fails verification.
|
|
21
|
+
- `intercom fin workflows get <id> --version <version_id>` and `intercom fin procedures get <id> --version <version_id>` now download that version. Before, a space between `--version` and the id printed the CLI's own version instead; only `--version=<version_id>` worked.
|
|
22
|
+
- `intercom fin workflows upload --verify` no longer reports drift when an uploaded audio file, such as a phone greeting or hold music, comes back with a fresh download signature. The link still points at the same file.
|
|
23
|
+
|
|
24
|
+
## [0.14.1] - 2026-10-27
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- `intercom auth signup` no longer reads its CSRF token from the old signup page, which is moving to the new signup site. It now gets the token from the signup state endpoint, so signup keeps working after the old page redirects.
|
|
29
|
+
|
|
10
30
|
## [0.14.0] - 2026-09-02
|
|
11
31
|
|
|
12
32
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,51 @@ async function fetchWithTimeout(url, init, options) {
|
|
|
59
59
|
return response;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
// src/api/regions.ts
|
|
63
|
+
var REGION_BASE_URLS = {
|
|
64
|
+
us: "https://api.intercom.io",
|
|
65
|
+
eu: "https://api.eu.intercom.io",
|
|
66
|
+
au: "https://api.au.intercom.io"
|
|
67
|
+
};
|
|
68
|
+
var APP_BASE_URLS = {
|
|
69
|
+
[REGION_BASE_URLS.us]: "https://app.intercom.com",
|
|
70
|
+
[REGION_BASE_URLS.eu]: "https://app.eu.intercom.com",
|
|
71
|
+
[REGION_BASE_URLS.au]: "https://app.au.intercom.com"
|
|
72
|
+
};
|
|
73
|
+
function appBaseUrlFor(apiBaseUrl) {
|
|
74
|
+
return process.env.INTERCOM_APP_BASE_URL || APP_BASE_URLS[apiBaseUrl.replace(/\/+$/, "")];
|
|
75
|
+
}
|
|
76
|
+
function regionBaseUrl(region) {
|
|
77
|
+
if (!region) return void 0;
|
|
78
|
+
return REGION_BASE_URLS[region];
|
|
79
|
+
}
|
|
80
|
+
function normalizeRegion(value) {
|
|
81
|
+
if (typeof value !== "string") return void 0;
|
|
82
|
+
switch (value.trim().toLowerCase()) {
|
|
83
|
+
case "us":
|
|
84
|
+
case "usa":
|
|
85
|
+
case "united states":
|
|
86
|
+
return "us";
|
|
87
|
+
case "eu":
|
|
88
|
+
case "europe":
|
|
89
|
+
return "eu";
|
|
90
|
+
case "au":
|
|
91
|
+
case "australia":
|
|
92
|
+
return "au";
|
|
93
|
+
default:
|
|
94
|
+
return void 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function detectRegion(me) {
|
|
98
|
+
if (!me || typeof me !== "object") return void 0;
|
|
99
|
+
const m = me;
|
|
100
|
+
const app = m.app;
|
|
101
|
+
return normalizeRegion(app?.region ?? m.region);
|
|
102
|
+
}
|
|
103
|
+
function resolveBaseUrl(region) {
|
|
104
|
+
return process.env.INTERCOM_API_BASE_URL || regionBaseUrl(region) || void 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
62
107
|
// src/api/client.ts
|
|
63
108
|
var DEFAULT_BASE_URL = "https://api.intercom.io";
|
|
64
109
|
var MAX_RAW_ERROR_LEN = 500;
|
|
@@ -104,6 +149,9 @@ var IntercomClient = class _IntercomClient {
|
|
|
104
149
|
this.verbose = options.verbose ?? false;
|
|
105
150
|
this.timeoutMs = options.timeoutMs ?? API_TIMEOUT_MS;
|
|
106
151
|
}
|
|
152
|
+
get appBaseUrl() {
|
|
153
|
+
return appBaseUrlFor(this.baseUrl);
|
|
154
|
+
}
|
|
107
155
|
authHeader() {
|
|
108
156
|
if (this.authType === "api_key") {
|
|
109
157
|
return `Basic ${Buffer.from(`${this.appId}:${this.token}`).toString("base64")}`;
|
|
@@ -363,43 +411,6 @@ ${await value.text()}`);
|
|
|
363
411
|
}
|
|
364
412
|
};
|
|
365
413
|
|
|
366
|
-
// src/api/regions.ts
|
|
367
|
-
var REGION_BASE_URLS = {
|
|
368
|
-
us: "https://api.intercom.io",
|
|
369
|
-
eu: "https://api.eu.intercom.io",
|
|
370
|
-
au: "https://api.au.intercom.io"
|
|
371
|
-
};
|
|
372
|
-
function regionBaseUrl(region) {
|
|
373
|
-
if (!region) return void 0;
|
|
374
|
-
return REGION_BASE_URLS[region];
|
|
375
|
-
}
|
|
376
|
-
function normalizeRegion(value) {
|
|
377
|
-
if (typeof value !== "string") return void 0;
|
|
378
|
-
switch (value.trim().toLowerCase()) {
|
|
379
|
-
case "us":
|
|
380
|
-
case "usa":
|
|
381
|
-
case "united states":
|
|
382
|
-
return "us";
|
|
383
|
-
case "eu":
|
|
384
|
-
case "europe":
|
|
385
|
-
return "eu";
|
|
386
|
-
case "au":
|
|
387
|
-
case "australia":
|
|
388
|
-
return "au";
|
|
389
|
-
default:
|
|
390
|
-
return void 0;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
function detectRegion(me) {
|
|
394
|
-
if (!me || typeof me !== "object") return void 0;
|
|
395
|
-
const m = me;
|
|
396
|
-
const app = m.app;
|
|
397
|
-
return normalizeRegion(app?.region ?? m.region);
|
|
398
|
-
}
|
|
399
|
-
function resolveBaseUrl(region) {
|
|
400
|
-
return process.env.INTERCOM_API_BASE_URL || regionBaseUrl(region) || void 0;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
414
|
// src/auth/store.ts
|
|
404
415
|
import { readFileSync, mkdirSync } from "fs";
|
|
405
416
|
|
|
@@ -933,6 +944,19 @@ async function fetchCsrfToken(url, timeoutMs = API_TIMEOUT_MS, init) {
|
|
|
933
944
|
if (!match) throw new Error("Could not find CSRF token");
|
|
934
945
|
return { token: match[1], cookies: extractCookies(response) };
|
|
935
946
|
}
|
|
947
|
+
async function fetchSignupCsrfToken(baseUrl, timeoutMs) {
|
|
948
|
+
const url = `${baseUrl}/ember/signups/state`;
|
|
949
|
+
const response = await fetchWithTimeout(
|
|
950
|
+
url,
|
|
951
|
+
{ headers: { Accept: "application/json" } },
|
|
952
|
+
{ timeoutMs }
|
|
953
|
+
);
|
|
954
|
+
if (!response.ok)
|
|
955
|
+
throw new AuthError(`Failed to fetch ${url}: ${response.status}`);
|
|
956
|
+
const data = await response.json();
|
|
957
|
+
if (!data.csrf_token) throw new AuthError("Could not find CSRF token");
|
|
958
|
+
return { token: data.csrf_token, cookies: extractCookies(response) };
|
|
959
|
+
}
|
|
936
960
|
async function signup(options) {
|
|
937
961
|
const {
|
|
938
962
|
baseUrl,
|
|
@@ -943,9 +967,8 @@ async function signup(options) {
|
|
|
943
967
|
plan = "advanced",
|
|
944
968
|
timeoutMs = API_TIMEOUT_MS
|
|
945
969
|
} = options;
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
csrfUrl,
|
|
970
|
+
const { token: csrfToken, cookies } = await fetchSignupCsrfToken(
|
|
971
|
+
baseUrl,
|
|
949
972
|
timeoutMs
|
|
950
973
|
);
|
|
951
974
|
const solutionId = PLAN_SOLUTION_IDS[plan] ?? PLAN_SOLUTION_IDS["advanced"];
|
|
@@ -1592,6 +1615,13 @@ function htmlToText(html) {
|
|
|
1592
1615
|
function stripBody(items) {
|
|
1593
1616
|
return items.map(({ body: _body, ...rest }) => rest);
|
|
1594
1617
|
}
|
|
1618
|
+
function withWebUrl(article, appBaseUrl) {
|
|
1619
|
+
if (!appBaseUrl || article.id == null || article.workspace_id == null) return article;
|
|
1620
|
+
return {
|
|
1621
|
+
...article,
|
|
1622
|
+
web_url: `${appBaseUrl}/a/apps/${String(article.workspace_id)}/knowledge-hub/article/${String(article.id)}`
|
|
1623
|
+
};
|
|
1624
|
+
}
|
|
1595
1625
|
function registerArticlesCommand(program) {
|
|
1596
1626
|
const articles = program.command("articles").description("Manage help center articles (list, get, create, update, delete, search)").addHelpText(
|
|
1597
1627
|
"after",
|
|
@@ -1633,6 +1663,7 @@ Examples:
|
|
|
1633
1663
|
}
|
|
1634
1664
|
result = raw;
|
|
1635
1665
|
}
|
|
1666
|
+
result.data = result.data?.map((a) => withWebUrl(a, client.appBaseUrl));
|
|
1636
1667
|
const items = result.data ?? [];
|
|
1637
1668
|
render(
|
|
1638
1669
|
result,
|
|
@@ -1676,6 +1707,11 @@ Examples:
|
|
|
1676
1707
|
data.articles = stripBody(data.articles);
|
|
1677
1708
|
}
|
|
1678
1709
|
}
|
|
1710
|
+
if (Array.isArray(result.data)) {
|
|
1711
|
+
result.data = result.data.map((a) => withWebUrl(a, client.appBaseUrl));
|
|
1712
|
+
} else if (result.data && Array.isArray(result.data.articles)) {
|
|
1713
|
+
result.data.articles = result.data.articles.map((a) => withWebUrl(a, client.appBaseUrl));
|
|
1714
|
+
}
|
|
1679
1715
|
const dataAfter = result.data;
|
|
1680
1716
|
const items = Array.isArray(dataAfter) ? dataAfter : dataAfter?.articles ?? [];
|
|
1681
1717
|
render(
|
|
@@ -1697,12 +1733,13 @@ Examples:
|
|
|
1697
1733
|
articles.command("get <id>").description("Get a help center article by ID").option("--json", "Output as JSON").option("--jq <expr>", "Filter JSON output with jq expression").option("--verbose", "Show HTTP request/response details").action(async function(id) {
|
|
1698
1734
|
const opts = this.optsWithGlobals();
|
|
1699
1735
|
const client = await resolveClient(opts);
|
|
1700
|
-
const result = await client.get(`/articles/${id}`);
|
|
1736
|
+
const result = withWebUrl(await client.get(`/articles/${id}`), client.appBaseUrl);
|
|
1701
1737
|
render(result, opts, () => {
|
|
1702
1738
|
const meta = detail({
|
|
1703
1739
|
ID: String(result.id ?? ""),
|
|
1704
1740
|
Title: String(result.title ?? ""),
|
|
1705
1741
|
State: String(result.state ?? ""),
|
|
1742
|
+
"Web URL": result.web_url != null ? String(result.web_url) : void 0,
|
|
1706
1743
|
"Author ID": result.author_id != null ? String(result.author_id) : void 0,
|
|
1707
1744
|
Updated: formatTimestamp(result.updated_at),
|
|
1708
1745
|
Created: formatTimestamp(result.created_at)
|
|
@@ -1743,14 +1780,15 @@ Use -F for typed values (numbers, booleans) and @file reads.`
|
|
|
1743
1780
|
const parsed = parseInt(body.author_id, 10);
|
|
1744
1781
|
if (!isNaN(parsed)) body.author_id = parsed;
|
|
1745
1782
|
}
|
|
1746
|
-
const result = await client.post("/articles", body);
|
|
1783
|
+
const result = withWebUrl(await client.post("/articles", body), client.appBaseUrl);
|
|
1747
1784
|
render(
|
|
1748
1785
|
result,
|
|
1749
1786
|
opts,
|
|
1750
1787
|
() => detail({
|
|
1751
1788
|
ID: String(result.id ?? ""),
|
|
1752
1789
|
Title: String(result.title ?? ""),
|
|
1753
|
-
State: String(result.state ?? "")
|
|
1790
|
+
State: String(result.state ?? ""),
|
|
1791
|
+
"Web URL": result.web_url != null ? String(result.web_url) : void 0
|
|
1754
1792
|
})
|
|
1755
1793
|
);
|
|
1756
1794
|
});
|
|
@@ -1775,14 +1813,15 @@ Use -F for typed values (numbers, booleans) and @file reads.`
|
|
|
1775
1813
|
const parsed = parseInt(body.author_id, 10);
|
|
1776
1814
|
if (!isNaN(parsed)) body.author_id = parsed;
|
|
1777
1815
|
}
|
|
1778
|
-
const result = await client.put(`/articles/${id}`, body);
|
|
1816
|
+
const result = withWebUrl(await client.put(`/articles/${id}`, body), client.appBaseUrl);
|
|
1779
1817
|
render(
|
|
1780
1818
|
result,
|
|
1781
1819
|
opts,
|
|
1782
1820
|
() => detail({
|
|
1783
1821
|
ID: String(result.id ?? ""),
|
|
1784
1822
|
Title: String(result.title ?? ""),
|
|
1785
|
-
State: String(result.state ?? "")
|
|
1823
|
+
State: String(result.state ?? ""),
|
|
1824
|
+
"Web URL": result.web_url != null ? String(result.web_url) : void 0
|
|
1786
1825
|
})
|
|
1787
1826
|
);
|
|
1788
1827
|
});
|
|
@@ -2954,7 +2993,36 @@ function scalarsMatch(sent, saved) {
|
|
|
2954
2993
|
if (typeof saved === "object") {
|
|
2955
2994
|
return false;
|
|
2956
2995
|
}
|
|
2957
|
-
|
|
2996
|
+
if (String(sent) === String(saved)) {
|
|
2997
|
+
return true;
|
|
2998
|
+
}
|
|
2999
|
+
const unsignedSent = withoutSignature(String(sent));
|
|
3000
|
+
return unsignedSent !== null && unsignedSent === withoutSignature(String(saved));
|
|
3001
|
+
}
|
|
3002
|
+
var SIGNATURE_PARAMS = ["expires", "signature", "req"];
|
|
3003
|
+
var UPLOAD_HOSTS = [
|
|
3004
|
+
/^downloads\.intercomcdn\.eu$/,
|
|
3005
|
+
/^downloads(\.[a-z]+)?\.intercomcdn\.com$/,
|
|
3006
|
+
/\.intercom-attachments(-[0-9]+)?\.(com|eu)$/,
|
|
3007
|
+
/^video-messages\.intercomcdn\.com$/,
|
|
3008
|
+
/\.intercom-mail\.(com|eu)$/
|
|
3009
|
+
];
|
|
3010
|
+
function withoutSignature(value) {
|
|
3011
|
+
if (!/^https?:\/\//i.test(value)) {
|
|
3012
|
+
return null;
|
|
3013
|
+
}
|
|
3014
|
+
try {
|
|
3015
|
+
const url = new URL(value);
|
|
3016
|
+
if (!UPLOAD_HOSTS.some((host) => host.test(url.hostname))) {
|
|
3017
|
+
return null;
|
|
3018
|
+
}
|
|
3019
|
+
for (const param of SIGNATURE_PARAMS) {
|
|
3020
|
+
url.searchParams.delete(param);
|
|
3021
|
+
}
|
|
3022
|
+
return url.toString();
|
|
3023
|
+
} catch {
|
|
3024
|
+
return null;
|
|
3025
|
+
}
|
|
2958
3026
|
}
|
|
2959
3027
|
function findDrift(sent, saved, path = "") {
|
|
2960
3028
|
const here = path || ".";
|
|
@@ -3520,7 +3588,16 @@ function ensureWorkflowType(raw) {
|
|
|
3520
3588
|
}
|
|
3521
3589
|
function registerWorkflowsCommand(fin) {
|
|
3522
3590
|
const workflows = fin.command("workflows").description("Manage Fin SDK workflows");
|
|
3523
|
-
workflows.command("list").description("List Fin SDK workflows").option("--json", "Output as JSON").option("--verbose", "Show HTTP request/response details").
|
|
3591
|
+
workflows.command("list").description("List Fin SDK workflows").option("--json", "Output as JSON").option("--verbose", "Show HTTP request/response details").addHelpText(
|
|
3592
|
+
"after",
|
|
3593
|
+
`
|
|
3594
|
+
Examples:
|
|
3595
|
+
$ intercom fin workflows list
|
|
3596
|
+
$ intercom fin workflows list --jq '.web_url'
|
|
3597
|
+
|
|
3598
|
+
Each workflow's web_url opens it in the visual builder. Use it rather than
|
|
3599
|
+
building a URL from id: the builder uses a different id.`
|
|
3600
|
+
).action(async function() {
|
|
3524
3601
|
const opts = this.optsWithGlobals();
|
|
3525
3602
|
const client = await resolveClient(opts);
|
|
3526
3603
|
const result = await client.get("/fin-sdk/workflows");
|
|
@@ -3549,7 +3626,8 @@ Examples:
|
|
|
3549
3626
|
$ intercom fin workflows get 42 --version 4821 # print that version's YAML
|
|
3550
3627
|
|
|
3551
3628
|
The YAML it prints is ready to edit and re-upload with
|
|
3552
|
-
\`intercom fin workflows upload\`.
|
|
3629
|
+
\`intercom fin workflows upload\`. Its web_url field links to the workflow in
|
|
3630
|
+
the visual builder, whose URL uses a different id from this one.
|
|
3553
3631
|
|
|
3554
3632
|
--version downloads the re-uploadable YAML of a historical version, so you can
|
|
3555
3633
|
diff a local file against what is live (\`intercom fin workflows versions <id>\`
|
|
@@ -3570,19 +3648,22 @@ shows which version that is).`
|
|
|
3570
3648
|
console.log(text.replace(/\n+$/, ""));
|
|
3571
3649
|
}
|
|
3572
3650
|
});
|
|
3573
|
-
workflows.command("upload <file>").description('Upload a workflow YAML file (creates if id is "new", updates if numeric)').option("--verify", "Fail if the saved workflow differs from the file uploaded").option("--json", "Output as JSON").option("--jq <expr>", "Filter JSON output with jq expression").option("--verbose", "Show HTTP request/response details").addHelpText(
|
|
3651
|
+
workflows.command("upload <file>").description('Upload a workflow YAML file (creates if id is "new", updates if numeric)').option("--note <text>", "Version note to record against this save").option("--verify", "Fail if the saved workflow differs from the file uploaded").option("--json", "Output as JSON").option("--jq <expr>", "Filter JSON output with jq expression").option("--verbose", "Show HTTP request/response details").addHelpText(
|
|
3574
3652
|
"after",
|
|
3575
3653
|
`
|
|
3576
3654
|
Examples:
|
|
3577
3655
|
$ intercom fin workflows upload ./welcome.yaml
|
|
3578
3656
|
$ intercom fin workflows get wf-42 > local.yaml; vim local.yaml; intercom fin workflows upload local.yaml
|
|
3579
|
-
$ intercom fin workflows upload ./new.yaml --json | jq .
|
|
3657
|
+
$ intercom fin workflows upload ./new.yaml --json | jq .web_url
|
|
3580
3658
|
$ intercom fin workflows upload ./welcome.yaml --verify
|
|
3659
|
+
$ intercom fin workflows upload ./welcome.yaml --note "added VIP routing"
|
|
3581
3660
|
|
|
3582
3661
|
The YAML file's id field determines whether this creates or updates:
|
|
3583
3662
|
id: "new" \u2192 creates a new workflow
|
|
3584
3663
|
id: <int> \u2192 updates the existing workflow with that id
|
|
3585
3664
|
|
|
3665
|
+
--note labels this save in \`intercom fin workflows versions <id>\`.
|
|
3666
|
+
|
|
3586
3667
|
--verify compares the workflow the server saved against the file just uploaded
|
|
3587
3668
|
and exits non-zero listing any field that did not survive the round-trip. Fields
|
|
3588
3669
|
the server adds (ids, defaults) are ignored; only content that was sent and came
|
|
@@ -3595,6 +3676,9 @@ back missing or changed is reported.`
|
|
|
3595
3676
|
const formData = new FormData();
|
|
3596
3677
|
const blob = new Blob([yamlBody], { type: "application/x-yaml" });
|
|
3597
3678
|
formData.append("file_data", blob, basename3(filePath));
|
|
3679
|
+
if (opts.note) {
|
|
3680
|
+
formData.append("version_note", opts.note);
|
|
3681
|
+
}
|
|
3598
3682
|
const result = await client.postFormData("/fin-sdk/upload", formData);
|
|
3599
3683
|
render(
|
|
3600
3684
|
result,
|
|
@@ -3603,7 +3687,7 @@ back missing or changed is reported.`
|
|
|
3603
3687
|
"ID": String(result.id ?? ""),
|
|
3604
3688
|
"Type": result.type != null ? String(result.type) : void 0,
|
|
3605
3689
|
"Message": result.message != null ? String(result.message) : void 0,
|
|
3606
|
-
"
|
|
3690
|
+
"Web URL": result.web_url != null || result.visual_builder_url != null ? String(result.web_url ?? result.visual_builder_url) : void 0
|
|
3607
3691
|
})
|
|
3608
3692
|
);
|
|
3609
3693
|
if (opts.verify && !isDryRun()) {
|
|
@@ -3731,6 +3815,8 @@ function withoutExpectedChanges(sent) {
|
|
|
3731
3815
|
const rest = { ...sent };
|
|
3732
3816
|
delete rest.type;
|
|
3733
3817
|
delete rest.version;
|
|
3818
|
+
delete rest.web_url;
|
|
3819
|
+
delete rest.workflow_instance_id;
|
|
3734
3820
|
if (String(rest.id ?? "").toLowerCase() === "new") {
|
|
3735
3821
|
delete rest.id;
|
|
3736
3822
|
}
|
|
@@ -5181,6 +5267,18 @@ Examples:
|
|
|
5181
5267
|
});
|
|
5182
5268
|
}
|
|
5183
5269
|
|
|
5270
|
+
// src/argv.ts
|
|
5271
|
+
function attachVersionValues(argv) {
|
|
5272
|
+
const out = [...argv];
|
|
5273
|
+
for (let i = 3; i < out.length - 1; i++) {
|
|
5274
|
+
if (out[i] === "--") break;
|
|
5275
|
+
if (out[i] === "--version" && !out[i + 1].startsWith("-")) {
|
|
5276
|
+
out.splice(i, 2, `--version=${out[i + 1]}`);
|
|
5277
|
+
}
|
|
5278
|
+
}
|
|
5279
|
+
return out;
|
|
5280
|
+
}
|
|
5281
|
+
|
|
5184
5282
|
// src/index.ts
|
|
5185
5283
|
function detectBinaryName() {
|
|
5186
5284
|
const argv1 = process.argv[1] ?? "";
|
|
@@ -5262,7 +5360,7 @@ var isMainModule = process.argv[1]?.endsWith("index.js") || process.argv[1]?.end
|
|
|
5262
5360
|
if (isMainModule) {
|
|
5263
5361
|
const program = createProgram();
|
|
5264
5362
|
try {
|
|
5265
|
-
await program.parseAsync();
|
|
5363
|
+
await program.parseAsync(attachVersionValues(process.argv));
|
|
5266
5364
|
} catch (err) {
|
|
5267
5365
|
handleError(err);
|
|
5268
5366
|
}
|