dxfl 0.2.1 → 0.2.2
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 +6 -0
- package/dist/error.js +4 -3
- package/dist/guichet.js +2 -1
- package/dist/index.js +1 -1
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
package/dist/error.js
CHANGED
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { S3ServiceException } from "@aws-sdk/client-s3";
|
|
11
|
+
import clc from "cli-color";
|
|
11
12
|
export class ErrorCtx {
|
|
12
13
|
constructor(ctx, error) {
|
|
13
14
|
this.ctx = ctx;
|
|
@@ -82,10 +83,10 @@ export function wrapS3Call(context, expectedCodes, f) {
|
|
|
82
83
|
// otherwise it is thrown as an exception.
|
|
83
84
|
export function handleError(e) {
|
|
84
85
|
if (e instanceof ErrorMsg) {
|
|
85
|
-
console.error(
|
|
86
|
+
console.error(`${clc.red("Error:")} ${e.msg}`);
|
|
86
87
|
}
|
|
87
88
|
else if (e instanceof ErrorGuichet) {
|
|
88
|
-
let msg = "Error: ";
|
|
89
|
+
let msg = clc.red("Error: ");
|
|
89
90
|
if (e.cause.kind == "Unauthorized") {
|
|
90
91
|
msg +=
|
|
91
92
|
"failed to authenticate with Guichet. Is your password and login correct?";
|
|
@@ -96,7 +97,7 @@ export function handleError(e) {
|
|
|
96
97
|
console.error(msg);
|
|
97
98
|
}
|
|
98
99
|
else {
|
|
99
|
-
console.error("Unexpected error
|
|
100
|
+
console.error(clc.red("Unexpected error:") + "\n", e);
|
|
100
101
|
}
|
|
101
102
|
process.exit(1);
|
|
102
103
|
}
|
package/dist/guichet.js
CHANGED
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { WebsiteApi, } from "guichet-sdk-ts";
|
|
11
|
+
import clc from "cli-color";
|
|
11
12
|
import { ErrorGuichet } from "./error.js";
|
|
12
13
|
// The GuichetApi class wraps WebsiteApi (from the guichet sdk). It catches
|
|
13
14
|
// errors that can happen in normal use, and it turn them into a dedicated error type
|
|
@@ -44,7 +45,7 @@ export class GuichetApi {
|
|
|
44
45
|
// the migration of websites *.web.deuxfleurs.fr to bucket
|
|
45
46
|
// names with the full domain name.
|
|
46
47
|
// We just warn that this is a working but deprecated name.
|
|
47
|
-
console.log(
|
|
48
|
+
console.log(`${clc.yellow("Warning")}: the name "${vhost}" is now deprecated for this website,` +
|
|
48
49
|
` you should use "${vhost}.web.deuxfleurs.fr" instead.`);
|
|
49
50
|
}
|
|
50
51
|
return websiteInfo;
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { login, logout } from "./auth.js";
|
|
|
5
5
|
import { deploy } from "./deploy.js";
|
|
6
6
|
import { empty } from "./empty.js";
|
|
7
7
|
import { vhostsList } from "./vhosts.js";
|
|
8
|
-
program.name("dxfl").description("Deuxfleurs CLI tool").version("0.2.
|
|
8
|
+
program.name("dxfl").description("Deuxfleurs CLI tool").version("0.2.2");
|
|
9
9
|
program
|
|
10
10
|
.command("login")
|
|
11
11
|
.description("Link your Deuxfleurs account with this tool.")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dxfl",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
6
6
|
"author": "Deuxfleurs Team <coucou@deuxfleurs.fr>",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@commander-js/extra-typings": "^13.1.0",
|
|
25
25
|
"@supercharge/promise-pool": "^3.2.0",
|
|
26
26
|
"@types/node": "^22.13.5",
|
|
27
|
+
"cli-color": "^2.0.4",
|
|
27
28
|
"commander": "^13.1.0",
|
|
28
29
|
"fast-uri": "^3.0.6",
|
|
29
30
|
"guichet-sdk-ts": "^0.1.0",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"zod-validation-error": "^3.4.1"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
39
|
+
"@types/cli-color": "^2.0.6",
|
|
38
40
|
"onchange": "^7.1.0",
|
|
39
41
|
"prettier": "3.5.3"
|
|
40
42
|
}
|