@powerhousedao/common 6.0.0-dev.91 → 6.0.0-dev.93
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/dist/clis/utils.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
export declare class NodeVersionError extends Error {
|
|
2
|
+
constructor(currentVersion: string, minimumVersion: string);
|
|
3
|
+
static isError(error: unknown): error is NodeVersionError;
|
|
4
|
+
}
|
|
1
5
|
export declare function assertNodeVersion(nodeVersion?: string): void;
|
|
2
6
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/clis/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../clis/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB,CAAC,WAAW,SAAwB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../clis/utils.ts"],"names":[],"mappings":"AAGA,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAO1D,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB;CAG1D;AAED,wBAAgB,iBAAiB,CAAC,WAAW,SAAwB,QAMpE"}
|
package/dist/clis/utils.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { lt } from "semver";
|
|
2
2
|
import { MINIMUM_NODE_VERSION } from "./constants.js";
|
|
3
|
+
export class NodeVersionError extends Error {
|
|
4
|
+
constructor(currentVersion, minimumVersion) {
|
|
5
|
+
super(`Node version ${minimumVersion} or higher is required. Current version: ${currentVersion}`);
|
|
6
|
+
this.name = "NodeVersionError";
|
|
7
|
+
}
|
|
8
|
+
static isError(error) {
|
|
9
|
+
return error instanceof Error && error.name === "NodeVersionError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
3
12
|
export function assertNodeVersion(nodeVersion = process.versions.node) {
|
|
4
13
|
if (!nodeVersion)
|
|
5
14
|
return;
|
|
6
15
|
if (lt(nodeVersion, MINIMUM_NODE_VERSION)) {
|
|
7
|
-
throw new
|
|
16
|
+
throw new NodeVersionError(nodeVersion, MINIMUM_NODE_VERSION);
|
|
8
17
|
}
|
|
9
18
|
}
|
|
10
19
|
//# sourceMappingURL=utils.js.map
|
package/dist/clis/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../clis/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,UAAU,iBAAiB,CAAC,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI;IACnE,IAAI,CAAC,WAAW;QAAE,OAAO;IAEzB,IAAI,EAAE,CAAC,WAAW,EAAE,oBAAoB,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../clis/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,cAAsB,EAAE,cAAsB;QACxD,KAAK,CACH,gBAAgB,cAAc,4CAA4C,cAAc,EAAE,CAC3F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,KAAc;QAC3B,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,CAAC;IACrE,CAAC;CACF;AAED,MAAM,UAAU,iBAAiB,CAAC,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI;IACnE,IAAI,CAAC,WAAW;QAAE,OAAO;IAEzB,IAAI,EAAE,CAAC,WAAW,EAAE,oBAAoB,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;IAChE,CAAC;AACH,CAAC"}
|