@hendoi/henmesh 0.1.0 → 0.1.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/README.md CHANGED
@@ -1,70 +1,188 @@
1
- # @hendoi/henmesh — JavaScript / TypeScript SDK (HM-JS-SDK-001)
1
+ # @hendoi/henmesh
2
2
 
3
- Official headless HTTPS client for production [HENMESH](https://henmesh.hendoi.com). Same REST surface as the workspace.
3
+ **Official JavaScript / TypeScript SDK for [HENMESH](https://henmesh.hendoi.com)** — HENDOI’s mesh / grid-prep product.
4
4
 
5
- **Version 0.1.0** · **Docs:** [https://api.hendoi.com/?doc=henmesh-overview](https://api.hendoi.com/?doc=henmesh-overview) · **npm:** [@hendoi/henmesh](https://www.npmjs.com/package/@hendoi/henmesh)
5
+ **Version 0.1.2** · [npm package page](https://www.npmjs.com/package/@hendoi/henmesh)
6
6
 
7
- Header on every call: `X-Henmesh-Client: henmesh-js/0.1.0`.
7
+ ---
8
+
9
+ ## Why this package exists (purpose)
10
+
11
+ Before CFD or FEA, you need a **mesh** you can trust enough for screening — 2-D airfoil/section grids, quality checks, independence / GCI, and 3-D wing meshes.
12
+
13
+ This npm package lets you run HENMESH **from code**:
14
+
15
+ - Generate 2-D / 3-D meshes
16
+ - Check quality and independence
17
+ - Build FSI maps
18
+ - Ask for CAD formats
19
+
20
+ **In one sentence:** use `@hendoi/henmesh` when you want mesh prep automation in Node/TypeScript — same cloud product as the website.
21
+
22
+ It does **not** install HyperMesh on your PC. It calls the HENMESH cloud API.
23
+
24
+ ---
25
+
26
+ ## Who should use it (applications)
27
+
28
+ | You are… | You use this package to… |
29
+ |---|---|
30
+ | CFD prep engineer | Script 2-D / 3-D mesh generate + quality |
31
+ | Automation developer | Overnight mesh independence / GCI jobs |
32
+ | FSI workflow owner | Map fluid ↔ structure meshes |
33
+ | Stack user | Mesh after HENFOIL/HENSYNTH, before HENFLOW |
34
+
35
+ ---
36
+
37
+ ## Where you use it
38
+
39
+ 1. Your Node/TypeScript project
40
+ 2. Production host `https://henmesh.hendoi.com`
41
+ 3. API key starting with `hmk_…`
42
+
43
+ Website links:
44
+
45
+ - Product: [hendoi.com/products/henmesh](https://hendoi.com/products/henmesh)
46
+ - App: [henmesh.hendoi.com](https://henmesh.hendoi.com)
47
+ - Complete guide: [hendoi.com/blog/henmesh-complete-product-guide](https://hendoi.com/blog/henmesh-complete-product-guide)
48
+ - Help: [hendoi.com/help/henmesh](https://hendoi.com/help/henmesh)
49
+ - FAQ: [hendoi.com/faq](https://hendoi.com/faq)
50
+ - Pricing: [hendoi.com/pricing](https://hendoi.com/pricing)
51
+ - API overview: [api.hendoi.com/?doc=henmesh-overview](https://api.hendoi.com/?doc=henmesh-overview)
52
+ - Auth: [api.hendoi.com/?doc=henmesh-authentication](https://api.hendoi.com/?doc=henmesh-authentication)
53
+ - All JS SDKs: [api.hendoi.com/?doc=javascript-sdk](https://api.hendoi.com/?doc=javascript-sdk)
54
+
55
+ ---
56
+
57
+ ## What you need
58
+
59
+ - HENMESH key `hmk_…`
60
+ - Node.js **18+**
61
+
62
+ ---
8
63
 
9
64
  ## Install
10
65
 
11
66
  ```bash
67
+ # PURPOSE: add the HENMESH SDK
12
68
  npm install @hendoi/henmesh
69
+ npm install @hendoi/henmesh@0.1.2
13
70
  ```
14
71
 
15
- Requires Node.js ≥ 18 (native `fetch`). License: **LicenseRef-Proprietary** (HENDOI).
72
+ ---
73
+
74
+ ## Set your API key
75
+
76
+ ```bash
77
+ # PURPOSE: authenticate HENMESH calls
78
+ export HENMESH_API_KEY=hmk_YOUR_KEY_HERE
79
+ ```
16
80
 
17
- ## Auth
81
+ PowerShell:
18
82
 
19
- Create a `hmk_…` key on HENMESH → **Developers**. Keys do not cross products.
83
+ ```powershell
84
+ $env:HENMESH_API_KEY="hmk_YOUR_KEY_HERE"
85
+ ```
20
86
 
21
87
  ```bash
22
- export HENMESH_API_KEY=hmk_…
23
- # optional: export HENMESH_API_URL=https://henmesh.hendoi.com
24
- # local: export HENMESH_API_URL=http://localhost:8005
88
+ export HENMESH_API_URL=https://henmesh.hendoi.com
25
89
  ```
26
90
 
27
- ## Example
91
+ ---
28
92
 
29
- ```ts
93
+ ## How to run — get output
94
+
95
+ ### 1) Check usage
96
+
97
+ **Purpose:** confirm the key and remaining budget.
98
+
99
+ ```js
30
100
  import { Client } from "@hendoi/henmesh";
31
101
 
32
- const c = new Client(); // HENMESH_API_KEY
33
- console.log(await c.usage());
102
+ const c = new Client();
103
+ console.log(JSON.stringify(await c.usage(), null, 2));
34
104
  console.log(await c.methods());
105
+ ```
35
106
 
107
+ ```bash
108
+ node check-usage.mjs
36
109
  ```
37
110
 
38
- ## What it cannot claim
111
+ ### 2) Generate a 2-D airfoil mesh + quality
112
+
113
+ **Purpose:** create a screening mesh, then ask HENMESH how good it is.
39
114
 
40
- Not HyperMesh / Pointwise certification meshing.
115
+ ```js
116
+ import { Client } from "@hendoi/henmesh";
117
+
118
+ const c = new Client();
119
+
120
+ // PURPOSE: generate 2-D airfoil mesh (body = same fields as API / UI)
121
+ const mesh = await c.mesh2dAirfoil({
122
+ // e.g. coordinates, spacing requests — see API docs
123
+ });
124
+ console.log("mesh keys:", Object.keys(mesh));
125
+
126
+ // PURPOSE: quality explain (skew / aspect / ortho style gates)
127
+ const quality = await c.mesh2dQuality({
128
+ // pass mesh id / payload from previous step
129
+ });
130
+ console.log("quality keys:", Object.keys(quality));
131
+
132
+ // PURPOSE: independence / GCI-style scrub before citing a soft residual
133
+ // const indep = await c.mesh2dIndependence({ … });
134
+ ```
41
135
 
42
- ## Client methods → REST
136
+ ### 3) 3-D wing + FSI map
43
137
 
44
- | Method | Route |
138
+ ```js
139
+ const wing = await c.mesh3dWing({ /* … */ });
140
+ console.log("wing mesh keys:", Object.keys(wing));
141
+
142
+ const fsi = await c.meshFsiMap({ /* … */ });
143
+ console.log("fsi keys:", Object.keys(fsi));
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Commands cheat-sheet
149
+
150
+ | Call | Purpose |
45
151
  |---|---|
46
- | `mesh2dAirfoil` / `mesh2dSection` | 2-D generate |
47
- | `mesh2dQuality` / `mesh2dIndependence` | quality / GCI |
48
- | `mesh3dWing` / `mesh3dQuality` | 3-D wing |
49
- | `meshFsiMap` | FSI map |
152
+ | `npm install @hendoi/henmesh` | Install SDK |
153
+ | `export HENMESH_API_KEY=hmk_…` | Auth |
154
+ | `await c.usage()` | Budget check |
155
+ | `await c.mesh2dAirfoil({…})` | 2-D airfoil mesh |
156
+ | `await c.mesh2dSection({…})` | 2-D section mesh |
157
+ | `await c.mesh2dQuality({…})` | Quality report |
158
+ | `await c.mesh2dIndependence({…})` | Independence / GCI |
159
+ | `await c.mesh3dWing({…})` | 3-D wing mesh |
160
+ | `await c.mesh3dQuality({…})` | 3-D quality |
161
+ | `await c.meshFsiMap({…})` | FSI map |
162
+ | `await c.cadFormats()` | Supported CAD formats |
163
+
164
+ ---
50
165
 
51
- Long solves often return a job; methods with `awaitJob=true` (default) poll `GET /api/v1/jobs/:id`.
166
+ ## Honest limits
167
+
168
+ Not HyperMesh / Pointwise certification meshing. Screening grids + honesty explain only. See the [product guide](https://hendoi.com/blog/henmesh-complete-product-guide).
169
+
170
+ ---
52
171
 
53
172
  ## Sister packages
54
173
 
55
- | Python (PyPI) | JavaScript (npm) |
174
+ | Need | Package |
56
175
  |---|---|
57
- | `pip install henfoil` | `npm install @hendoi/henfoil` |
58
- | `pip install hensynth` | `npm install @hendoi/hensynth` |
59
- | `pip install henmesh` | `npm install @hendoi/henmesh` |
60
- | `pip install henflow` | `npm install @hendoi/henflow` |
61
- | `pip install henstruct` | `npm install @hendoi/henstruct` |
176
+ | Section | [@hendoi/henfoil](https://www.npmjs.com/package/@hendoi/henfoil) |
177
+ | Aircraft | [@hendoi/hensynth](https://www.npmjs.com/package/@hendoi/hensynth) |
178
+ | CFD | [@hendoi/henflow](https://www.npmjs.com/package/@hendoi/henflow) |
179
+ | FEA | [@hendoi/henstruct](https://www.npmjs.com/package/@hendoi/henstruct) |
180
+ | Python | [henmesh on PyPI](https://pypi.org/project/henmesh/) |
62
181
 
63
- ## Links
182
+ ---
64
183
 
65
- | | |
66
- |---|---|
67
- | **npm** | https://www.npmjs.com/package/@hendoi/henmesh |
68
- | Product | https://henmesh.hendoi.com |
69
- | API docs | https://api.hendoi.com/?doc=henmesh-overview |
70
- | Support | support@hendoi.com |
184
+ ## Support
185
+
186
+ support@hendoi.com · [FAQ](https://hendoi.com/faq) · [Help](https://hendoi.com/help/henmesh)
187
+
188
+ © HENDOI TECHNOLOGIES PRIVATE LIMITED · LicenseRef-Proprietary — see `LICENSE`.
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /** HTTP client for HENMESH /api/v1 — HM-JS-SDK-001 (0.1.0). */
2
- export declare const CLIENT_VERSION = "0.1.0";
1
+ /** HTTP client for HENMESH /api/v1 — HM-JS-SDK-001 (0.1.2). */
2
+ export declare const CLIENT_VERSION = "0.1.2";
3
3
  export type Json = Record<string, unknown>;
4
4
  export declare class HenmeshError extends Error {
5
5
  status: number;
package/dist/client.js CHANGED
@@ -1,5 +1,5 @@
1
- /** HTTP client for HENMESH /api/v1 — HM-JS-SDK-001 (0.1.0). */
2
- export const CLIENT_VERSION = "0.1.0";
1
+ /** HTTP client for HENMESH /api/v1 — HM-JS-SDK-001 (0.1.2). */
2
+ export const CLIENT_VERSION = "0.1.2";
3
3
  const DEVELOPERS_HELP = "Create a hmk_… key: sign in at https://hendoi.com/login → open HENMESH → " +
4
4
  "Developers (or Settings → API) → copy the key → export HENMESH_API_KEY=hmk_…";
5
5
  export class HenmeshError extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hendoi/henmesh",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Official HENMESH JavaScript/TypeScript SDK — 2-D/3-D mesh, quality, GCI, FSI map.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -11,24 +11,40 @@
11
11
  "import": "./dist/index.js"
12
12
  }
13
13
  },
14
- "files": ["dist", "LICENSE", "README.md"],
14
+ "files": [
15
+ "dist",
16
+ "LICENSE",
17
+ "README.md"
18
+ ],
15
19
  "scripts": {
16
20
  "build": "tsc -p tsconfig.json",
17
21
  "test": "npm run build && node --test test/client.test.js",
18
22
  "prepublishOnly": "npm run build"
19
23
  },
20
- "engines": { "node": ">=18" },
21
- "keywords": ["henmesh", "hendoi", "aerospace", "sdk", "typescript"],
24
+ "engines": {
25
+ "node": ">=18"
26
+ },
27
+ "keywords": [
28
+ "henmesh",
29
+ "hendoi",
30
+ "aerospace",
31
+ "sdk",
32
+ "typescript"
33
+ ],
22
34
  "author": "HENDOI TECHNOLOGIES PRIVATE LIMITED <support@hendoi.com>",
23
- "license": "SEE LICENSE IN LICENSE",
24
- "publishConfig": { "access": "public" },
35
+ "license": "SEE LICENSE IN LICENSE",
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
25
39
  "homepage": "https://henmesh.hendoi.com",
26
40
  "repository": {
27
41
  "type": "git",
28
- "url": "https://github.com/hendoi/hendoi.git",
42
+ "url": "git+https://github.com/hendoi/hendoi.git",
29
43
  "directory": "henmesh-sdk/js"
30
44
  },
31
- "bugs": { "url": "https://hendoi.com/contact" },
45
+ "bugs": {
46
+ "url": "https://hendoi.com/contact"
47
+ },
32
48
  "devDependencies": {
33
49
  "typescript": "^5.6.0",
34
50
  "@types/node": "^22.0.0"