geomcli 0.5.15 → 0.5.17
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/index.d.ts +2 -2
- package/dist/index.js +11 -8
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { tGeomFunc, tParamVal, EFormat, tAllPageDef } from 'geometrix';
|
|
1
|
+
import { tGeomFunc, tParamVal, EFormat, tAllPageDef, tPackage } from 'geometrix';
|
|
2
2
|
|
|
3
3
|
declare function geom_write(iPartName: string, fgeom: tGeomFunc, simTime: number, iParam: tParamVal, iFormat: EFormat, iFace?: string, iDir?: string, iFname?: string): Promise<string>;
|
|
4
4
|
|
|
5
|
-
declare function geom_cli(iArgs: string[], dList: tAllPageDef, outDir?: string): Promise<void>;
|
|
5
|
+
declare function geom_cli(iArgs: string[], dList: tAllPageDef, appPackage: tPackage, outDir?: string): Promise<void>;
|
|
6
6
|
|
|
7
7
|
export { geom_cli, geom_write };
|
package/dist/index.js
CHANGED
|
@@ -114,14 +114,15 @@ async function geom_write(iPartName, fgeom, simTime, iParam, iFormat, iFace = ""
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
// src/geom_cli.ts
|
|
117
|
-
import { PType, EFormat as EFormat2, designParam, prefixLog, paramListToVal } from "geometrix";
|
|
117
|
+
import { PType, EFormat as EFormat2, designParam, prefixLog, paramListToVal, version_details } from "geometrix";
|
|
118
118
|
import yargs from "yargs";
|
|
119
119
|
import { hideBin } from "yargs/helpers";
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
function print_version_details(appPackage) {
|
|
121
|
+
const strList = version_details(appPackage);
|
|
122
|
+
for (const str of strList) {
|
|
123
|
+
console.log(str);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
125
126
|
function get_design_array(dList) {
|
|
126
127
|
const rDesignArray = Object.keys(dList);
|
|
127
128
|
return rDesignArray;
|
|
@@ -419,8 +420,8 @@ function list_outopt(dList, selD, paramPath, modif) {
|
|
|
419
420
|
console.log(rlog);
|
|
420
421
|
}
|
|
421
422
|
var cmd_write = false;
|
|
422
|
-
async function geom_cli(iArgs, dList, outDir = "output") {
|
|
423
|
-
const argv = yargs(hideBin(iArgs)).scriptName("geom_cli").version(version).usage("Usage: $0 <global-options> command <command-argument>").example([
|
|
423
|
+
async function geom_cli(iArgs, dList, appPackage, outDir = "output") {
|
|
424
|
+
const argv = yargs(hideBin(iArgs)).scriptName("geom_cli").version(appPackage.version).usage("Usage: $0 <global-options> command <command-argument>").example([
|
|
424
425
|
["$0 list-designs", "list the available designs"],
|
|
425
426
|
["$0 list-designs-detailed", "list the available designs with detailed information"],
|
|
426
427
|
["$0 -d heliostat/rake compute-log", "compute and print the log"],
|
|
@@ -452,6 +453,8 @@ async function geom_cli(iArgs, dList, outDir = "output") {
|
|
|
452
453
|
type: "string",
|
|
453
454
|
description: "Rename the output filename",
|
|
454
455
|
default: ""
|
|
456
|
+
}).command("versions", "print details about the app version and its dependencies", {}, () => {
|
|
457
|
+
print_version_details(appPackage);
|
|
455
458
|
}).command(["list-designs", "list"], "list the available designs", {}, () => {
|
|
456
459
|
list_designs(dList, false);
|
|
457
460
|
}).command("list-designs-detailed", "list the available designs with details", {}, () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geomcli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.17",
|
|
4
4
|
"description": "the nodejs companion library of geometrix",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -41,21 +41,21 @@
|
|
|
41
41
|
"clean": "shx rm -fr build dist node_modules"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"geometrix": "^0.5.
|
|
44
|
+
"geometrix": "^0.5.13",
|
|
45
45
|
"yargs": "^17.7.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/yargs": "^17.0.32",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
50
|
-
"@typescript-eslint/parser": "^6.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
50
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
51
51
|
"eslint": "^8.56.0",
|
|
52
52
|
"eslint-config-prettier": "^9.1.0",
|
|
53
53
|
"npm-run-all": "^4.1.5",
|
|
54
|
-
"prettier": "^3.
|
|
54
|
+
"prettier": "^3.2.4",
|
|
55
55
|
"shx": "^0.3.4",
|
|
56
56
|
"tsup": "^8.0.1",
|
|
57
57
|
"typescript": "^5.3.3",
|
|
58
|
-
"vitest": "^1.1
|
|
58
|
+
"vitest": "^1.2.1"
|
|
59
59
|
},
|
|
60
60
|
"exports": {
|
|
61
61
|
".": {
|