shipmail-cli 0.4.5 → 0.4.6
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/LICENSE +1 -1
- package/dist/cli.js +6 -6
- package/package.json +4 -4
package/LICENSE
CHANGED
package/dist/cli.js
CHANGED
|
@@ -8,13 +8,13 @@ import { env as processEnv, exit, stderr, stdout } from "process";
|
|
|
8
8
|
import { fileURLToPath } from "url";
|
|
9
9
|
import {
|
|
10
10
|
CONFERENCING_PROVIDER_IDS,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
ShipmailClient,
|
|
12
|
+
ShipmailError,
|
|
13
13
|
WEBHOOK_EVENT_TYPES
|
|
14
14
|
} from "shipmail";
|
|
15
15
|
|
|
16
16
|
// src/version.ts
|
|
17
|
-
var VERSION = "0.4.
|
|
17
|
+
var VERSION = "0.4.6";
|
|
18
18
|
|
|
19
19
|
// src/cli.ts
|
|
20
20
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|
|
@@ -143,7 +143,7 @@ function createClient(parsed, options) {
|
|
|
143
143
|
organizationId: organizationId(parsed, env),
|
|
144
144
|
...options.fetch ? { fetch: options.fetch } : {}
|
|
145
145
|
};
|
|
146
|
-
return new
|
|
146
|
+
return new ShipmailClient(config);
|
|
147
147
|
}
|
|
148
148
|
function writeJson(out, value) {
|
|
149
149
|
out.write(`${JSON.stringify(value, null, 2)}
|
|
@@ -278,7 +278,7 @@ async function rawApiRequest(parsed, runOptions, method, path, body, authRequire
|
|
|
278
278
|
}
|
|
279
279
|
const targetOrganizationId = organizationId(parsed, env);
|
|
280
280
|
if (targetOrganizationId) {
|
|
281
|
-
headers["X-
|
|
281
|
+
headers["X-Shipmail-Organization-Id"] = targetOrganizationId;
|
|
282
282
|
}
|
|
283
283
|
let requestBody;
|
|
284
284
|
if (body !== void 0) {
|
|
@@ -1942,7 +1942,7 @@ ${JSON.stringify(err.body, null, 2)}
|
|
|
1942
1942
|
`);
|
|
1943
1943
|
return;
|
|
1944
1944
|
}
|
|
1945
|
-
if (err instanceof
|
|
1945
|
+
if (err instanceof ShipmailError) {
|
|
1946
1946
|
const shipmailError = err;
|
|
1947
1947
|
const status = shipmailError.status !== void 0 ? ` (HTTP ${shipmailError.status})` : "";
|
|
1948
1948
|
const requestId = shipmailError.requestId ? ` request_id=${shipmailError.requestId}` : "";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shipmail-cli",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Official CLI for the
|
|
3
|
+
"version": "0.4.6",
|
|
4
|
+
"description": "Official CLI for the Shipmail API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"shipmail": "dist/cli.js"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"domain",
|
|
27
27
|
"terminal"
|
|
28
28
|
],
|
|
29
|
-
"author": "
|
|
29
|
+
"author": "Shipmail",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"homepage": "https://shipmail.to/docs/cli",
|
|
32
32
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"shipmail": "0.4.
|
|
44
|
+
"shipmail": "0.4.13"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.4.0",
|