@velarscript/cli 0.19.1 → 0.20.0
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/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -8
- package/skill/ai-skill-node.md +15 -6
- package/skill/ai-skill-server.md +1 -1
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velarscript/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "The VelarScript command-line compiler, dev server, test runner, and language server.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"velar": "./dist/cli.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@velarscript/compiler": "0.
|
|
34
|
-
"@velarscript/core": "0.
|
|
35
|
-
"@velarscript/desktop": "0.
|
|
36
|
-
"@velarscript/node": "0.
|
|
37
|
-
"@velarscript/server": "0.
|
|
38
|
-
"@velarscript/web": "0.
|
|
39
|
-
"create-velar": "0.
|
|
33
|
+
"@velarscript/compiler": "0.20.0",
|
|
34
|
+
"@velarscript/core": "0.20.0",
|
|
35
|
+
"@velarscript/desktop": "0.20.0",
|
|
36
|
+
"@velarscript/node": "0.20.0",
|
|
37
|
+
"@velarscript/server": "0.20.0",
|
|
38
|
+
"@velarscript/web": "0.20.0",
|
|
39
|
+
"create-velar": "0.20.0",
|
|
40
40
|
"esbuild": "^0.28.1",
|
|
41
41
|
"playwright": "^1.58.2"
|
|
42
42
|
}
|
package/skill/ai-skill-node.md
CHANGED
|
@@ -83,14 +83,14 @@ type CreateArticle:
|
|
|
83
83
|
|
|
84
84
|
export server articles:
|
|
85
85
|
/// Reports whether this service is ready.
|
|
86
|
-
@get(p"/health") => {ok: true}
|
|
86
|
+
@get health(p"/health") => {ok: true}
|
|
87
87
|
|
|
88
|
-
@get(p"/articles/{id:number}?{details:bool?}"):
|
|
88
|
+
@get readArticle(p"/articles/{id:number}?{details:bool?}"):
|
|
89
89
|
if id < 1:
|
|
90
90
|
throw HttpProblem({status: 404, code: "article.not_found", title: "Article not found"})
|
|
91
91
|
return {id, details: details ?? false}
|
|
92
92
|
|
|
93
|
-
@post(p"/articles", input: CreateArticle):
|
|
93
|
+
@post createArticle(p"/articles", input: CreateArticle):
|
|
94
94
|
return created({id: 1, title: input.title})
|
|
95
95
|
|
|
96
96
|
```
|
|
@@ -114,6 +114,12 @@ patterns require `as name` so the compiler never injects identifiers that are
|
|
|
114
114
|
hidden inside another declaration. The old `path=` spelling is an error with a
|
|
115
115
|
mechanical fix to the positional form and `as path`.
|
|
116
116
|
|
|
117
|
+
For a public contract, put one stable source identifier between the role and
|
|
118
|
+
the pattern: `@get readArticle(...)` or `@websocket worldRealtime(...)`.
|
|
119
|
+
Operation identities must be unique after composition, survive `prefix`, and
|
|
120
|
+
are emitted verbatim to OpenAPI. Leave the name out only for a local route whose
|
|
121
|
+
method/path-derived OpenAPI identity is sufficient.
|
|
122
|
+
|
|
117
123
|
On `POST`, `PUT`, or `PATCH`, one concrete Data parameter is the
|
|
118
124
|
checked JSON body. A `Request` parameter explicitly requests the complete
|
|
119
125
|
request, including `queryAll` and cooperative `cancellation`. Ambiguous bodies,
|
|
@@ -282,7 +288,9 @@ task finishes. `setCookie` and
|
|
|
282
288
|
fields. Never start long-lived work by
|
|
283
289
|
dropping a Promise; use an owned lifecycle, background task, Worker, or process.
|
|
284
290
|
|
|
285
|
-
`docs` adds a bundled offline UI and OpenAPI 3.1 JSON.
|
|
291
|
+
`docs` adds a bundled offline UI and OpenAPI 3.1 JSON. HTTP and WebSocket
|
|
292
|
+
operations share its `paths` catalog; WebSocket entries use GET, response 101,
|
|
293
|
+
and `x-velar-transport: websocket`. Compiler route types
|
|
286
294
|
and response helpers supply parameter, body, response, content-type, and static
|
|
287
295
|
success-status schemas. Applicable framework-generated 400, 401, 413, 415, and
|
|
288
296
|
422 responses are included automatically; a preceding `///` comment supplies
|
|
@@ -317,7 +325,7 @@ session belongs in the route table:
|
|
|
317
325
|
import {WebSocketConnection} from "velar/websocket"
|
|
318
326
|
|
|
319
327
|
server realtime:
|
|
320
|
-
@websocket(p"/worlds/{worldId:string}/realtime", connection: WebSocketConnection):
|
|
328
|
+
@websocket worldRealtime(p"/worlds/{worldId:string}/realtime", connection: WebSocketConnection):
|
|
321
329
|
async for message in connection:
|
|
322
330
|
await connection.send(message)
|
|
323
331
|
```
|
|
@@ -331,7 +339,8 @@ contains these routes rejects its legacy single `path` option and does not offer
|
|
|
331
339
|
accepted sessions through `WebSocketServer.next()`.
|
|
332
340
|
|
|
333
341
|
Set
|
|
334
|
-
`maxBodyBytes` to the supplied application value. `
|
|
342
|
+
`maxBodyBytes` to the supplied application value. `host` is non-empty text of
|
|
343
|
+
at most 255 code units without NUL. `origins` contains exact
|
|
335
344
|
canonical HTTP/HTTPS origins. The default rejects any upgrade carrying
|
|
336
345
|
`Origin`; no-Origin non-browser clients remain allowed. Use `["*"]` only for an
|
|
337
346
|
intentional unrestricted policy. A rejected browser origin receives 403 before
|