cppmodel 0.9.0 → 0.9.1

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
@@ -82,9 +82,10 @@ Inputs and outputs are numbers. Parameters keep their JSON type. All three have
82
82
  - **`run()` is synchronous.** It blocks the event loop until the simulation has finished, which is
83
83
  fine for scripts and tests. In a server, run simulations in a
84
84
  [worker thread](https://nodejs.org/api/worker_threads.html).
85
- - **Workspace access:** set `CPPMODEL_USERNAME` and `CPPMODEL_PASSWORD` for scripts and CI. Pass
86
- `{ offline: true }` to run without the workspace. Without credentials, the first run prints a
87
- sign-in link and waits until you've signed in.
85
+ - **Workspace access:** every run reads its inputs from and records its execution in your
86
+ workspace. Set `CPPMODEL_USERNAME` and `CPPMODEL_PASSWORD` for scripts and CI. Without
87
+ credentials, the first run prints a sign-in link and waits 60 seconds for you to sign in
88
+ (`CPPMODEL_LOGIN_TIMEOUT` changes that, in seconds); without a sign-in, `run()` throws.
88
89
  - **Fingerprint:** each execution records a `CppModel.BinaryFingerprint` of the simulation's code,
89
90
  so the workspace can tell runs of the same code from runs of changed code. It is the fingerprint
90
91
  of the file that creates the simulation. Set `sim.fingerprintFile` to use another file.
package/index.d.ts CHANGED
@@ -69,7 +69,7 @@ export declare class Parameters {
69
69
  }
70
70
 
71
71
  export interface SimulationOptions<S extends Simulation = Simulation> {
72
- /** When true, run() doesn't reach the workspace: nothing is fetched or submitted. */
72
+ /** When true, run() doesn't reach the workspace and then throws: a run that skips the workspace verifies nothing. */
73
73
  offline?: boolean;
74
74
  init?: (simulation: S) => void;
75
75
  step?: (simulation: S, timeMs: number) => void;
package/index.js CHANGED
@@ -393,7 +393,10 @@ class Simulation {
393
393
  check(c.setTiming(this._live(), this.totalTimeMs, value));
394
394
  }
395
395
 
396
- /** When true, run() doesn't reach the workspace: nothing is fetched or submitted. */
396
+ /**
397
+ * When true, run() doesn't reach the workspace: nothing is fetched or submitted, and run() then
398
+ * throws, because a run that skips the workspace verifies nothing.
399
+ */
397
400
  get offline() {
398
401
  return this.#offline;
399
402
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cppmodel",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Write CppModel simulations in Node.js",
5
5
  "keywords": ["cppmodel", "simulation", "plant model", "testing", "embedded"],
6
6
  "homepage": "https://cppmodel.com",
Binary file
Binary file
Binary file