@selvajs/solve 1.0.0-beta.8 → 1.0.0-beta.9
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/client.cjs +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +144 -150
- package/dist/client.d.ts +144 -150
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +291 -308
- package/dist/server.d.ts +291 -308
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/shared.cjs +0 -1
- package/dist/shared.d.cts +3 -3
- package/dist/shared.d.ts +3 -3
- package/dist/shared.js +1 -1
- package/dist/solve-fn-lsWj61m5.d.cts +48 -0
- package/dist/solve-fn-lsWj61m5.d.ts +48 -0
- package/dist/{solve-input-CqYtetTA.d.ts → solve-input-BDv_JdvS.d.cts} +8 -7
- package/dist/{solve-input-CqYtetTA.d.cts → solve-input-BDv_JdvS.d.ts} +8 -7
- package/package.json +13 -10
- package/dist/shared.cjs.map +0 -1
- package/dist/shared.js.map +0 -1
- package/dist/solve-fn-DrRgaPZ5.d.cts +0 -46
- package/dist/solve-fn-DrRgaPZ5.d.ts +0 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selvajs/solve",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.9",
|
|
4
4
|
"description": "One owner for the Selva solve flow — input change to solve result, on both sides of the wire, with no transport and no UI",
|
|
5
5
|
"author": "VektorNode",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,13 +55,16 @@
|
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist",
|
|
58
|
-
"README.md"
|
|
58
|
+
"README.md",
|
|
59
|
+
"!**/__tests__/**",
|
|
60
|
+
"!**/*.test.*",
|
|
61
|
+
"!**/*.spec.*"
|
|
59
62
|
],
|
|
60
63
|
"sideEffects": false,
|
|
61
64
|
"dependencies": {
|
|
62
|
-
"@selvajs/compute": "^4.0.0-beta.
|
|
63
|
-
"@selvajs/platform": "^0.16.1-beta.
|
|
64
|
-
"@selvajs/schemas": "5.0.0-beta.
|
|
65
|
+
"@selvajs/compute": "^4.0.0-beta.5",
|
|
66
|
+
"@selvajs/platform": "^0.16.1-beta.2",
|
|
67
|
+
"@selvajs/schemas": "5.0.0-beta.2"
|
|
65
68
|
},
|
|
66
69
|
"devDependencies": {
|
|
67
70
|
"@eslint/js": "^10.0.1",
|
|
@@ -71,10 +74,11 @@
|
|
|
71
74
|
"eslint-config-prettier": "^10.1.8",
|
|
72
75
|
"globals": "^17.5.0",
|
|
73
76
|
"prettier": "^3.9.6",
|
|
74
|
-
"
|
|
77
|
+
"tsdown": "^0.22.14",
|
|
75
78
|
"typescript": "~6.0.3",
|
|
76
79
|
"vite": "^8.1.5",
|
|
77
|
-
"vitest": "^4.1.10"
|
|
80
|
+
"vitest": "^4.1.10",
|
|
81
|
+
"@selvajs/config": "0.0.3"
|
|
78
82
|
},
|
|
79
83
|
"engines": {
|
|
80
84
|
"node": ">=22.0.0"
|
|
@@ -83,9 +87,8 @@
|
|
|
83
87
|
"access": "public"
|
|
84
88
|
},
|
|
85
89
|
"scripts": {
|
|
86
|
-
"build": "pnpm type-check &&
|
|
87
|
-
"dev": "
|
|
88
|
-
"clean": "node --input-type=module -e \"import fs from 'fs'; fs.rmSync('dist', { recursive: true, force: true })\"",
|
|
90
|
+
"build": "pnpm type-check && tsdown",
|
|
91
|
+
"dev": "tsdown --watch",
|
|
89
92
|
"lint": "eslint .",
|
|
90
93
|
"lint:fix": "eslint . --fix",
|
|
91
94
|
"format": "prettier --write .",
|
package/dist/shared.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/selva/selva/packages/solve/dist/shared.cjs"],"names":[],"mappings":"AAAA","file":"/home/runner/work/selva/selva/packages/solve/dist/shared.cjs"}
|
package/dist/shared.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The solve contract — what a solve returns and what a caller supplies to run one.
|
|
3
|
-
*
|
|
4
|
-
* Lives in `shared/` because both halves of the package speak it: `client/` calls a `SolveFn` and
|
|
5
|
-
* stores its `SolveResult`; `server/` produces the payload one is built from.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* `TMesh` is deliberately opaque and defaults to `unknown`: this package never inspects meshes, and
|
|
9
|
-
* typing them would drag a renderer dependency into a package whose whole point is not having one.
|
|
10
|
-
* The app that owns assembly (parse → `THREE.Object3D[]`) is the only place that knows the concrete
|
|
11
|
-
* type, and it narrows by writing `SolveResult<THREE.Object3D>` at its own seam.
|
|
12
|
-
*/
|
|
13
|
-
interface SolveResult<TMesh = unknown, TSource = unknown> {
|
|
14
|
-
outputs: Record<string, unknown>;
|
|
15
|
-
meshes?: TMesh[];
|
|
16
|
-
errors?: string[];
|
|
17
|
-
warnings?: string[];
|
|
18
|
-
/**
|
|
19
|
-
* The unparsed payload this result was built from, passed through verbatim. Opaque here for the
|
|
20
|
-
* same reason as `TMesh`: a consumer that must persist or re-submit exactly what it showed the
|
|
21
|
-
* user narrows it at its own seam. Travels with the result through the driver's memo, so a
|
|
22
|
-
* cached hit carries the source that produced it. Unlike `meshes` it needs no ownership policy —
|
|
23
|
-
* it is inert data, not a GPU-backed handle.
|
|
24
|
-
*
|
|
25
|
-
* Supplied by the `SolveFn`, so it is present only when the one in use sets it
|
|
26
|
-
* (`createComputeFetchSolveFn` does). A transport with no raw payload to hand back leaves it
|
|
27
|
-
* absent — see `values` on telling absent from unsupported.
|
|
28
|
-
*/
|
|
29
|
-
source?: TSource;
|
|
30
|
-
/**
|
|
31
|
-
* The input set that produced this result, stamped by the driver rather than the `SolveFn` — a
|
|
32
|
-
* memo hit never calls the `SolveFn`, so a consumer reading values captured inside it would pair
|
|
33
|
-
* the on-screen result with whatever solved last. Keeping the pair atomic is the point: a commit
|
|
34
|
-
* path holding a `SolveResult` cannot mismatch artifact and inputs.
|
|
35
|
-
*
|
|
36
|
-
* Present only from a driver that owns a request/response pair (`createRequestResponseDriver`).
|
|
37
|
-
* A push driver cannot attribute an incoming frame to a request and must leave this absent
|
|
38
|
-
* rather than guess — so `undefined` means "this transport does not supply it", not "no solve
|
|
39
|
-
* yet", and a consumer that needs the pair requires a request/response driver. See `SolveDriver`.
|
|
40
|
-
*/
|
|
41
|
-
values?: Record<string, unknown>;
|
|
42
|
-
}
|
|
43
|
-
/** Implementations should listen to `signal` and abort/clean up when it fires. */
|
|
44
|
-
type SolveFn<TMesh = unknown, TSource = unknown> = (values: Record<string, unknown>, signal: AbortSignal) => Promise<SolveResult<TMesh, TSource>>;
|
|
45
|
-
|
|
46
|
-
export type { SolveFn as S, SolveResult as a };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The solve contract — what a solve returns and what a caller supplies to run one.
|
|
3
|
-
*
|
|
4
|
-
* Lives in `shared/` because both halves of the package speak it: `client/` calls a `SolveFn` and
|
|
5
|
-
* stores its `SolveResult`; `server/` produces the payload one is built from.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* `TMesh` is deliberately opaque and defaults to `unknown`: this package never inspects meshes, and
|
|
9
|
-
* typing them would drag a renderer dependency into a package whose whole point is not having one.
|
|
10
|
-
* The app that owns assembly (parse → `THREE.Object3D[]`) is the only place that knows the concrete
|
|
11
|
-
* type, and it narrows by writing `SolveResult<THREE.Object3D>` at its own seam.
|
|
12
|
-
*/
|
|
13
|
-
interface SolveResult<TMesh = unknown, TSource = unknown> {
|
|
14
|
-
outputs: Record<string, unknown>;
|
|
15
|
-
meshes?: TMesh[];
|
|
16
|
-
errors?: string[];
|
|
17
|
-
warnings?: string[];
|
|
18
|
-
/**
|
|
19
|
-
* The unparsed payload this result was built from, passed through verbatim. Opaque here for the
|
|
20
|
-
* same reason as `TMesh`: a consumer that must persist or re-submit exactly what it showed the
|
|
21
|
-
* user narrows it at its own seam. Travels with the result through the driver's memo, so a
|
|
22
|
-
* cached hit carries the source that produced it. Unlike `meshes` it needs no ownership policy —
|
|
23
|
-
* it is inert data, not a GPU-backed handle.
|
|
24
|
-
*
|
|
25
|
-
* Supplied by the `SolveFn`, so it is present only when the one in use sets it
|
|
26
|
-
* (`createComputeFetchSolveFn` does). A transport with no raw payload to hand back leaves it
|
|
27
|
-
* absent — see `values` on telling absent from unsupported.
|
|
28
|
-
*/
|
|
29
|
-
source?: TSource;
|
|
30
|
-
/**
|
|
31
|
-
* The input set that produced this result, stamped by the driver rather than the `SolveFn` — a
|
|
32
|
-
* memo hit never calls the `SolveFn`, so a consumer reading values captured inside it would pair
|
|
33
|
-
* the on-screen result with whatever solved last. Keeping the pair atomic is the point: a commit
|
|
34
|
-
* path holding a `SolveResult` cannot mismatch artifact and inputs.
|
|
35
|
-
*
|
|
36
|
-
* Present only from a driver that owns a request/response pair (`createRequestResponseDriver`).
|
|
37
|
-
* A push driver cannot attribute an incoming frame to a request and must leave this absent
|
|
38
|
-
* rather than guess — so `undefined` means "this transport does not supply it", not "no solve
|
|
39
|
-
* yet", and a consumer that needs the pair requires a request/response driver. See `SolveDriver`.
|
|
40
|
-
*/
|
|
41
|
-
values?: Record<string, unknown>;
|
|
42
|
-
}
|
|
43
|
-
/** Implementations should listen to `signal` and abort/clean up when it fires. */
|
|
44
|
-
type SolveFn<TMesh = unknown, TSource = unknown> = (values: Record<string, unknown>, signal: AbortSignal) => Promise<SolveResult<TMesh, TSource>>;
|
|
45
|
-
|
|
46
|
-
export type { SolveFn as S, SolveResult as a };
|