The manifest
pdm-generator.json sits in the generator's directory. The PDM checks it when it syncs, and checks every run's parameters against it.
| Field | What it is |
|---|---|
schema, schemaVersion | "pdm-generator", "1.0.0" |
name, description | Shown in the PDM |
runtime | "node". Other languages are planned |
entry | The file whose default export is the generator |
parameters | The form, in order. See below |
outputs | What a run makes: exactly one { "key": …, "kind": "part" } or "assembly" |
A parameter:
| Field | |
|---|---|
name | What the code gets it as, in params |
label | What the form says. The name if you leave it out |
type | number, integer, boolean, string or enum |
default | Required, so every run has every value |
min, max | For numbers |
values | For enum: the choices |
unit | Shown next to the field, mm or deg for example. Nothing is converted: the code gets what was typed |
The key of an output is part of what makes a result the same document again: the same parameters and the same key give the same document.