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 +4 -3
- package/index.d.ts +1 -1
- package/index.js +4 -1
- package/package.json +1 -1
- package/prebuilds/darwin/libcppmodel.dylib +0 -0
- package/prebuilds/linux-arm64/libcppmodel.so.1 +0 -0
- package/prebuilds/linux-x64/libcppmodel.so.1 +0 -0
- package/prebuilds/win32-arm64/cppmodel.dll +0 -0
- package/prebuilds/win32-x64/cppmodel.dll +0 -0
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:**
|
|
86
|
-
`
|
|
87
|
-
sign-in link and waits
|
|
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:
|
|
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
|
-
/**
|
|
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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|