sendscript 2.3.6 → 2.3.8
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/CHANGELOG.md +12 -0
- package/README.md +17 -1
- package/example/typescript/docs/functions/add.md +1 -1
- package/example/typescript/docs/functions/square.md +1 -1
- package/package.json +5 -5
- package/parse.mjs +0 -1
- package/schema.mjs +6 -1
- package/stringify.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v2.3.8](https://github.com/bas080/sendscript/compare/v2.3.7...v2.3.8)
|
|
8
|
+
|
|
9
|
+
- Move typedoc dep to dev deps [`a084b1d`](https://github.com/bas080/sendscript/commit/a084b1dad2f76ceb3b79fac390210f1ccfa368f8)
|
|
10
|
+
|
|
11
|
+
#### [v2.3.7](https://github.com/bas080/sendscript/compare/v2.3.6...v2.3.7)
|
|
12
|
+
|
|
13
|
+
> 14 April 2026
|
|
14
|
+
|
|
15
|
+
- Fix missing schema node type [`afb2d1b`](https://github.com/bas080/sendscript/commit/afb2d1b8cba4406c659db1f76f79b4e1de3d1872)
|
|
16
|
+
|
|
7
17
|
#### [v2.3.6](https://github.com/bas080/sendscript/compare/v2.3.5...v2.3.6)
|
|
8
18
|
|
|
19
|
+
> 14 April 2026
|
|
20
|
+
|
|
9
21
|
- Document recursive nature of schema [`ddcd466`](https://github.com/bas080/sendscript/commit/ddcd46667db0d4e76c123d5dcf7e04e05b9c6e3e)
|
|
10
22
|
|
|
11
23
|
#### [v2.3.5](https://github.com/bas080/sendscript/compare/v2.3.4...v2.3.5)
|
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ Write JS code that you can run on servers, browsers or other clients.
|
|
|
15
15
|
* [Parse](#parse)
|
|
16
16
|
* [parse](#parse)
|
|
17
17
|
* [References](#references)
|
|
18
|
+
* [SchemaNode](#schemanode)
|
|
18
19
|
* [Schema](#schema)
|
|
19
20
|
* [defaultLeafStringify](#defaultleafstringify)
|
|
20
21
|
* [Stringify](#stringify)
|
|
@@ -172,9 +173,22 @@ Schema supports:
|
|
|
172
173
|
|
|
173
174
|
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Nested instrumented API object
|
|
174
175
|
|
|
176
|
+
### SchemaNode
|
|
177
|
+
|
|
178
|
+
A single schema node.
|
|
179
|
+
|
|
180
|
+
Type: ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | \[[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Schema](#schema)])
|
|
181
|
+
|
|
175
182
|
### Schema
|
|
176
183
|
|
|
177
|
-
|
|
184
|
+
A schema defines the structure of the runtime API tree.
|
|
185
|
+
|
|
186
|
+
* string → leaf node
|
|
187
|
+
* \[name, children] → namespace node
|
|
188
|
+
|
|
189
|
+
Schema is recursive: nodes can contain nested schemas.
|
|
190
|
+
|
|
191
|
+
Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[SchemaNode](#schemanode)>
|
|
178
192
|
|
|
179
193
|
### defaultLeafStringify
|
|
180
194
|
|
|
@@ -196,6 +210,8 @@ Creates a stringify function for SendScript AST structures.
|
|
|
196
210
|
|
|
197
211
|
* `leafStringify` (optional, default `defaultLeafStringify`)
|
|
198
212
|
|
|
213
|
+
Returns **[stringify](#stringify)** 
|
|
214
|
+
|
|
199
215
|
### stringify
|
|
200
216
|
|
|
201
217
|
Serializes a program into a JSON string representation.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **add**(`a`, `b`): `number`
|
|
10
10
|
|
|
11
|
-
Defined in: [math.ts:1](https://github.com/bas080/sendscript/blob/
|
|
11
|
+
Defined in: [math.ts:1](https://github.com/bas080/sendscript/blob/a084b1dad2f76ceb3b79fac390210f1ccfa368f8/example/typescript/math.ts#L1)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **square**(`a`): `number`
|
|
10
10
|
|
|
11
|
-
Defined in: [math.ts:2](https://github.com/bas080/sendscript/blob/
|
|
11
|
+
Defined in: [math.ts:2](https://github.com/bas080/sendscript/blob/a084b1dad2f76ceb3b79fac390210f1ccfa368f8/example/typescript/math.ts#L2)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sendscript",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
4
4
|
"description": "Blur the line between server and client code.",
|
|
5
5
|
"module": true,
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"superjson": "^2.2.6",
|
|
28
28
|
"tap": "^21.6.3",
|
|
29
|
-
"tape-check": "^1.0.0-rc.0"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"debug": "^4.4.3",
|
|
29
|
+
"tape-check": "^1.0.0-rc.0",
|
|
33
30
|
"typedoc": "^0.28.18",
|
|
34
31
|
"typedoc-plugin-markdown": "^4.11.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"debug": "^4.4.3"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/parse.mjs
CHANGED
package/schema.mjs
CHANGED
package/stringify.mjs
CHANGED
|
@@ -105,7 +105,7 @@ function defaultLeafStringify (x) {
|
|
|
105
105
|
* Creates a stringify function for SendScript AST structures.
|
|
106
106
|
*
|
|
107
107
|
* @param {(value: any) => string} [leafSerializer=strictStringify]
|
|
108
|
-
* @returns {
|
|
108
|
+
* @returns {stringify}
|
|
109
109
|
* @public
|
|
110
110
|
*/
|
|
111
111
|
export default function Stringify (leafStringify = defaultLeafStringify) {
|